Closed
Bug 1139560
Opened 9 years ago
Closed 9 years ago
`srcset` parser doesn’t adhere to the spec
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
People
(Reporter: mat, Assigned: jdm)
References
Details
(Keywords: regression)
Attachments
(4 files, 7 obsolete files)
1.20 KB,
patch
|
lizzard
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
1.38 KB,
patch
|
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
3.00 KB,
patch
|
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
15.73 KB,
patch
|
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 Steps to reproduce: Open http://w3c-test.org/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html in FF Nightly (39.0a1). Actual results: Of 235 parser tests, only 34 pass. Expected results: Ideally, 100% of these tests would pass. Failing on edge cases is to be expected, but the differences between the parser as implemented and as specified have led to issues with extremely common use cases (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1139554 )
Updated•9 years ago
|
Blocks: picture-prefon
Updated•9 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Updated•9 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•9 years ago
|
||
The vast majority of these failures are just currentSrc returning null instead of "" and most of the others are bug 1139554. I'll take a look.
Depends on: 1139554
![]() |
||
Comment 2•9 years ago
|
||
Er, per spec currentSrc can't ever return null: it's not a nullable type. Why did we implement it as nullable?
Comment 3•9 years ago
|
||
(In reply to Not doing reviews right now from comment #2) > Er, per spec currentSrc can't ever return null: it's not a nullable type. > Why did we implement it as nullable? It was nullable in the spec at the time: https://github.com/zcorpan/picture-element/commit/03aa705fac83
Comment 4•9 years ago
|
||
We already have a NonStandard flag from the parser, just add it to the list of flags that make the parse fail Fixes failures in web-platform-tests suite
Attachment #8573063 -
Flags: review?(jst)
Comment 5•9 years ago
|
||
Missed "... Set position to the previous character in input." step in https://html.spec.whatwg.org/#parse-a-srcset-attribute That is due to the After descriptor state consuming characters, but then returning the last one to the next loop iteration Fixes failures in web-platform-tests
Attachment #8573064 -
Flags: review?(jst)
Comment 6•9 years ago
|
||
The spec was updated to make this non-nullable, updated. WPT failures catch this as well.
Attachment #8573065 -
Flags: review?(jst)
Comment 7•9 years ago
|
||
These + bug 1139554 try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8486fcfa11f6 Down to 229 Pass / 6 Fail, remaining failures are much less concerning, will circle back
Updated•9 years ago
|
Attachment #8573063 -
Flags: review?(jst) → review+
Updated•9 years ago
|
Attachment #8573064 -
Flags: review?(jst) → review+
Updated•9 years ago
|
Attachment #8573065 -
Flags: review?(jst) → review+
Comment 9•9 years ago
|
||
Here's a patch fix web-platform test expectations based on John's fixes.
![]() |
||
Comment 10•9 years ago
|
||
[Tracking Requested - why for this release]: Potential bugs in new feature.
tracking-firefox38:
--- → ?
Updated•9 years ago
|
Attachment #8575426 -
Flags: review?(jst) → review+
Comment 11•9 years ago
|
||
Thanks Johnny. John, can you check in my patch along with yours?
Updated•9 years ago
|
Looks like this still needs check-in. It would be good if this can land and we have a chance to uplift it to 38 before next Monday (merge day).
Flags: needinfo?(miket)
Comment 13•9 years ago
|
||
Unfortunately I don't have commit access to check these patches in myself.
Johnny, what should happen in this situation? This and bug 1139554 both seem to need check-in.
Flags: needinfo?(jst)
Comment 16•9 years ago
|
||
Sorry for the delay here, I talked with jdm on irc and he's going to check these in. Bug 1139554 can be landed and closed, the patches here can be landed, but a follow-up needs to be opened or this bug left open for the remaining for WPT failures.
Comment 17•9 years ago
|
||
Fixing the bit-rot that will be caused by bug 1139554 landing before this. Carrying forward r+.
Attachment #8575426 -
Attachment is obsolete: true
Assignee | ||
Comment 18•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e8b305f26b0 https://hg.mozilla.org/integration/mozilla-inbound/rev/dc2cd9c336c9 https://hg.mozilla.org/integration/mozilla-inbound/rev/a0ef86da9b15
Assignee | ||
Comment 19•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ffcb5e699ef5
Comment 20•9 years ago
|
||
Backed out for w-p-t failures. https://hg.mozilla.org/integration/mozilla-inbound/rev/dcc49f2ed016 https://treeherder.mozilla.org/logviewer.html#?job_id=8158212&repo=mozilla-inbound
Comment 21•9 years ago
|
||
Disabling the test that caused backout. It's passing on my machine but failing others. Will invesigate further in Bug 1064083. 3rd time's a charm?
Updated•9 years ago
|
Attachment #8584329 -
Attachment is obsolete: true
Comment 22•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cfa26b2b9c66 is green, let's try again.
Keywords: checkin-needed
Comment 23•9 years ago
|
||
hi, that failed to apply: renamed 1139560 -> update-wpt-expectations-3.patch applying update-wpt-expectations-3.patch patching file testing/web-platform/meta/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html.ini Hunk #1 FAILED at 0 1 out of 1 hunks FAILED -- saving rejects to file testing/web-platform/meta/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html.ini.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh update-wpt-expectations-3.patch could you take a look, thanks!
Flags: needinfo?(miket)
Updated•9 years ago
|
Keywords: checkin-needed
Comment 24•9 years ago
|
||
OK, that was confusing. Some changes landed (yesterday) on how unicode escapes are handled in the test ini files for web-platform-tests. From jgraham, "Basically now most characters in prefs files are stored as unescaped UTF8 except ones below 0x20 (iirc) and ones that have special meanings to the ini parser" That explains the collision. Rebased and wpt 1-4 are passing @ https://treeherder.mozilla.org/#/jobs?repo=try&revision=47ab480ebfc8.
Attachment #8584776 -
Attachment is obsolete: true
Updated•9 years ago
|
Keywords: checkin-needed
Comment 25•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/70e0f2d8fb1e https://hg.mozilla.org/integration/mozilla-inbound/rev/24ed34bd6ae1 https://hg.mozilla.org/integration/mozilla-inbound/rev/bb871246ca63 https://hg.mozilla.org/integration/mozilla-inbound/rev/80c32af73390
Keywords: checkin-needed
Comment 26•9 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=8334126&repo=mozilla-inbound
Flags: needinfo?(john)
Assignee | ||
Comment 27•9 years ago
|
||
We are having such a coordination breakdown. This is ridiculous :(
Flags: needinfo?(john)
Comment 28•9 years ago
|
||
Agreed, I don't think I'm helping here. :/
Comment 29•9 years ago
|
||
Adding dev-doc-needed: not sure if this will need specific doc, but it is a good opportunity to check the accuracy of ours.
Keywords: dev-doc-needed
Reporter | ||
Comment 30•9 years ago
|
||
Sorry if I’m swooping in mid-process, but how are we looking on landing these fixes? Is there anything we’re waiting on that the RICG could help out with?
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(josh)
Assignee | ||
Comment 31•9 years ago
|
||
I just need to finish the merge process here, but thanks for the offer.
Flags: needinfo?(josh)
Assignee | ||
Comment 32•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/341484805367 https://hg.mozilla.org/integration/mozilla-inbound/rev/6452590ddb77 https://hg.mozilla.org/integration/mozilla-inbound/rev/61445e93cd38
Comment 33•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/341484805367 https://hg.mozilla.org/mozilla-central/rev/6452590ddb77 https://hg.mozilla.org/mozilla-central/rev/61445e93cd38
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Assignee | ||
Comment 34•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8573063 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Assignee: john → josh
Assignee | ||
Comment 35•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8573064 -
Attachment is obsolete: true
Assignee | ||
Comment 36•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8573065 -
Attachment is obsolete: true
Assignee | ||
Comment 37•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8586252 -
Attachment is obsolete: true
Assignee | ||
Comment 38•9 years ago
|
||
Comment on attachment 8590815 [details] [diff] [review] Reject non-standard parses of integers in srcset descriptors Approval Request Comment [Feature/regressing bug #]: 1018389 [User impact if declined]: Easily-encountered feature brokenness (see originating bug report) [Describe test coverage new/current, TreeHerder]: Thorough suite of WPT tests. [Risks and why]: Low. This feature is isolated and these patches merely allow more web content to display as expected; if it breaks, the content just doesn't appear. [String/UUID change made/needed]: None Please consider this an approval request for all patches in this bug.
Attachment #8590815 -
Flags: approval-mozilla-beta?
Attachment #8590815 -
Flags: approval-mozilla-aurora?
Keywords: regression
Comment on attachment 8590815 [details] [diff] [review] Reject non-standard parses of integers in srcset descriptors Approving for uplift to aurora. RyanVM, this should apply to all patches in this bug.
Attachment #8590815 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 40•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/d83a84142769 https://hg.mozilla.org/releases/mozilla-aurora/rev/3057b13be498 https://hg.mozilla.org/releases/mozilla-aurora/rev/c7d9cd5c2f8b https://hg.mozilla.org/releases/mozilla-aurora/rev/422331ee9895
Comment 41•9 years ago
|
||
Unsurprisingly, the trunk patch hit bustage on Aurora. I'm making one attempt to fix before backing out: https://hg.mozilla.org/releases/mozilla-aurora/rev/6f39280c5746
Comment 42•9 years ago
|
||
Comment 41 was a bit over-aggressive (stolen from one of the last green Try pushes, but whatever). One more follow-up, already confirmed green on Try. https://hg.mozilla.org/releases/mozilla-aurora/rev/d0eda02ebe76
Comment 43•9 years ago
|
||
Comment on attachment 8590815 [details] [diff] [review] Reject non-standard parses of integers in srcset descriptors Taking as it is a new feature of 38. Should be in 38 beta 4.
Attachment #8590815 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 44•9 years ago
|
||
Comment on attachment 8590816 [details] [diff] [review] Fix srcset parser 'After descriptor' state mishandling spaces [Triage Comment]
Attachment #8590816 -
Flags: approval-mozilla-beta+
Attachment #8590816 -
Flags: approval-mozilla-aurora+
Updated•9 years ago
|
Attachment #8590817 -
Flags: approval-mozilla-beta+
Attachment #8590817 -
Flags: approval-mozilla-aurora+
Updated•9 years ago
|
Attachment #8590819 -
Flags: approval-mozilla-beta+
Attachment #8590819 -
Flags: approval-mozilla-aurora+
Comment 45•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/dffb5c867f47 https://hg.mozilla.org/releases/mozilla-beta/rev/07666fc071be https://hg.mozilla.org/releases/mozilla-beta/rev/7285a02cd883 https://hg.mozilla.org/releases/mozilla-beta/rev/cd5b5709b2e4
Updated•8 years ago
|
Keywords: dev-doc-needed
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•