2016-04-22 Matthew Hanson Merge r199881. rdar://problem/25879593 2016-04-22 Antti Koivisto REGRESSION (r194898): Multi download of external SVG defs file by xlinks:href (caching) https://bugs.webkit.org/show_bug.cgi?id=156368 Reviewed by Simon Fraser. We would load svg resources with fragment identifier again because the encoding never matched. Test: http/tests/svg/svg-use-external.html * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::setEncoding): (WebCore::TextResourceDecoder::hasEqualEncodingForCharset): Encoding can depend on mime type. Add a comparison function that takes this into account. (WebCore::findXMLEncoding): * loader/TextResourceDecoder.h: (WebCore::TextResourceDecoder::encoding): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedResource.h: (WebCore::CachedResource::textResourceDecoder): Add a way to get the TextResourceDecoder from a cached resource. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy): Use the new comparison function. * loader/cache/CachedSVGDocument.h: * loader/cache/CachedScript.h: * loader/cache/CachedXSLStyleSheet.h: 2016-04-15 Babak Shafiei Merge r199598. 2016-04-15 Said Abou-Hallawa Calling SVGAnimatedPropertyTearOff::animationEnded() will crash if the SVG property is not animating https://bugs.webkit.org/show_bug.cgi?id=156549 Reviewed by Darin Adler. A speculative fix for a crash which may happen when calling animationEnded() of any SVGAnimatedProperty while it is not animating. * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::executeAction): 2016-04-08 Babak Shafiei Merge r199253. 2016-04-08 Jer Noble Unreviewed 32-bit build fix; make type of std::min<> explicit. * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::render): 2016-04-08 Babak Shafiei Merge r199252. 2016-04-08 Jer Noble CRASH in AudioDestinationNode::render() https://bugs.webkit.org/show_bug.cgi?id=156308 Reviewed by Eric Carlson. Yet another math error in AudioDestinationIOS::render(). It is possible for the difference between m_startSpareFrame and m_endSpareFrame to be greater than the numberOfFrames to be rendered. Protect against this case by taking the min() of those two values and only advancing m_startSpareFrame by that amount. This guarantees that framesThisTime will never underflow, and that data will not be written past the end of the ioData parameter. * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::render): 2016-04-06 Matthew Hanson Merge r199116. rdar://problem/25468815 2016-04-06 Jer Noble CRASH in AudioDestinationNode::render() https://bugs.webkit.org/show_bug.cgi?id=156308 Reviewed by Eric Carlson. AudioDestinationNode::render() will crash when passed in a zero-length frame count. Rather than get into this bad state, ASSERT() and bail out early in this case. Also, address the situation in AudioDestinationIOS::render which can cause this 0-frame count to occur. * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::render): * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::render): 2016-04-05 Matthew Hanson Merge r199042. rdar://problem/25533763 2016-04-04 Jer Noble [iOS] Crash when playing