DescriptionRemove internal use of Document::defaultCharset
This is in preparation for removing document.defaultCharset itself.
The third argument for FormDataBuilder::encodingFromAcceptCharset was
added in https://codereview.chromium.org/25417007 to handle a situation
where a form was inserted into an ImageDocument, which did not have an
encoding.
In https://codereview.chromium.org/1180793002 the charset attribute and
its aliases was made to never return null by initializing
DocumentEncodingData to UTF-8, and so the fallback to defaultCharset in
encodingFromAcceptCharset is now unreachable.
While in the area, clean up encodingFromAcceptCharset slightly to take
an explicit fallback encoding that must be valid, and use a range-based
for loop for readability.
TEST=LayoutTests/fast/images/image-page-injected-script-crash.html
BUG=567738
Committed: https://crrev.com/177c3bb89bc8072ac8b150e20a816b7e0f752802
Cr-Commit-Position: refs/heads/master@{#375835}
Patch Set 1 #
Messages
Total messages: 14 (7 generated)
|