Unreviewed, roll out r215229
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 May 2017 19:39:16 +0000 (19:39 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 May 2017 19:39:16 +0000 (19:39 +0000)
commit255812b77a4e232961d22bff1739ae2eeceae359
tree25afe35dd6678d900532c2e1f03b9d88780055f0
parentf5f7c25e94f712513b89fff54fcf916ec7a56e80
Unreviewed, roll out r215229

It caused CachedScripts in MemoryCache to be reused with different encodings
even though CachedScript potentially has already decoded data or cached hash
with a previous encoding.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt:

Source/WebCore:

* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
* loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::sawError):
(WebCore::TextResourceDecoder::encodingSet): Deleted.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::setEncoding):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::hasUnknownEncoding):
(WebCore::CachedResource::setHasUnknownEncoding):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):

LayoutTests:

* TestExpectations:
* fast/loader/cache-encoding-expected.txt:
* fast/loader/cache-encoding.html:
* http/tests/preload/preload-encoding-expected.txt:
* http/tests/preload/preload-encoding.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/loader/cache-encoding-expected.txt
LayoutTests/fast/loader/cache-encoding.html
LayoutTests/http/tests/preload/preload-encoding-expected.txt
LayoutTests/http/tests/preload/preload-encoding.php
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/loader/TextResourceDecoder.cpp
Source/WebCore/loader/TextResourceDecoder.h
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp