LayoutTests/imported/w3c:
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Sep 2015 02:04:02 +0000 (02:04 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Sep 2015 02:04:02 +0000 (02:04 +0000)
commitef69765da892e9d8915849e99279822cb4e6d281
tree6b86e778726ca0c23626e07cc40113b5930bc071
parentf3a3a61c08782be534e18c283ea5c9085615127c
LayoutTests/imported/w3c:
Document.characterSet should return "UTF-8" by default.
https://bugs.webkit.org/show_bug.cgi?id=148810
<rdar://problem/22548727>

Reviewed by Ryosuke Niwa.

Update the tests which test the default encoding of document.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/Node-properties-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:
Document.characterSet should return "UTF-8" instead of null by default.
https://bugs.webkit.org/show_bug.cgi?id=148810
<rdar://problem/22548727>

Reviewed by Ryosuke Niwa.

Document encoding should default to "UTF-8" as is specified in
https://dom.spec.whatwg.org/#concept-document-encoding. This behavior
is consistent with Firefox and Chrome.

* dom/Document.cpp:
(WebCore::Document::encoding): Returns nullAtom according to declearation.
(WebCore::Document::characterSetForBindings): Returns "UTF-8" by default instead of null String.
* dom/Document.h:
(WebCore::Document::charset):
(WebCore::Document::inputEncoding): Deleted.
(WebCore::Document::characterSet): Deleted.
* dom/Document.idl:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainResourceContent):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FormSubmission.cpp:
(WebCore::encodingFromAcceptCharset):

LayoutTests:
Document.characterSet should return "UTF-8" by default.
https://bugs.webkit.org/show_bug.cgi?id=148810
<rdar://problem/22548727>

Reviewed by Ryosuke Niwa.

Update the tests which test the default encoding of document.

* dom/xhtml/level3/core/documentgetinputencoding02-expected.txt: Obsolete test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level3/core/documentgetinputencoding02-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/dom/InlineStyleSheetOwner.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/FormSubmission.cpp