Closed
Bug 1102679
Opened 10 years ago
Closed 6 years ago
Implement ignoreBOM for TextDecoder
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
3.99 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
5.18 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
Spun off from bug 1092737.
Updated•10 years ago
|
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #1)
> Henri, how hard would this be to do?
Should be extremely easy if I understood the spec correctly.
(My understanding is: Our current behavior of always dropping the BOM should become the behavior that takes place is ignoreBOM is true and when ignoreBOM is false, we shouldn't remove the BOM. To not remove the BOM, we should instantiate the mozilla::Decoder using the WithoutBOMHandling variant of the factory methods instead of the WithBOMRemoval factory method right about here: https://searchfox.org/mozilla-central/source/dom/encoding/TextDecoder.cpp#45 )
Flags: needinfo?(hsivonen)
Assignee | ||
Comment 3•6 years ago
|
||
Attachment #8998010 -
Flags: review?(hsivonen)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•6 years ago
|
||
When ignoreBOM is true, the encoding spec says to not treat leading DOM bytes
specially, which corresponds to our NewDecoderWithoutBOMHandling factory method
for the encoder.
Attachment #8998011 -
Flags: review?(hsivonen)
Comment on attachment 8998011 [details] [diff] [review]
part 2. Implement support for the ignoreBOM option for TextDecoder
Review of attachment 8998011 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you!
Attachment #8998011 -
Flags: review?(hsivonen) → review+
Attachment #8998010 -
Flags: review?(hsivonen) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6bf52b9a4c93
part 1. Pass around the TextDecoderOptions as needed, not just one boolean from it. r=hsivonen
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b78b0c012ad
part 2. Implement support for the ignoreBOM option for TextDecoder. r=hsivonen
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/686d11ab65e4
followup. Restore failure annotation that should not have been removed. r=bzbarsky
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6bf52b9a4c93
https://hg.mozilla.org/mozilla-central/rev/4b78b0c012ad
https://hg.mozilla.org/mozilla-central/rev/686d11ab65e4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•