Add a combined decodeAndFlush to TextResourceDecoder
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Mar 2014 07:12:07 +0000 (07:12 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Mar 2014 07:12:07 +0000 (07:12 +0000)
commit6aa2d451ed71afe110955c1b69e232a7075c1fa5
treebc0038563380687dba54fbac8d0165dfd088322a
parent65940ab7579bcd129a38c05ce5ea83ee197de95a
Add a combined decodeAndFlush to TextResourceDecoder
https://bugs.webkit.org/show_bug.cgi?id=130560

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in: Added new symbol for decodeAndFlush. Also re-did
the geometry types #if so it would sort more logically.

* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::convertToText): Use decodeAndFlush.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Ditto.
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): Ditto.

* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::decodeAndFlush): Added.
* loader/TextResourceDecoder.h: Ditto.

* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest): Use decodeAndFlush.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::sheetText): Ditto.
(WebCore::CachedCSSStyleSheet::finishLoading): Ditto.

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureSVGFontData): Use decodeAndFlush. Also use nullptr.
(WebCore::CachedFont::getSVGFontById): Use descendantsOfType<SVGFontElement>
instead of using a NodeList. Much more efficient!

* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use decodeAndFlush.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script): Ditto.
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Ditto.
* page/Page.cpp:
(WebCore::Page::userStyleSheet): Ditto.

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView _decodeData:]): Use decodeAndFlush.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/fileapi/FileReaderLoader.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/NetworkResourcesData.cpp
Source/WebCore/loader/TextResourceDecoder.cpp
Source/WebCore/loader/TextResourceDecoder.h
Source/WebCore/loader/appcache/ManifestParser.cpp
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedSVGDocument.cpp
Source/WebCore/loader/cache/CachedScript.cpp
Source/WebCore/loader/cache/CachedXSLStyleSheet.cpp
Source/WebCore/page/Page.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm