Closed
Bug 1274519
Opened 9 years ago
Closed 9 years ago
Should not append result to the candidate list if got unexpected token at the end of string when parsing sizes attribute
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
Details
(Whiteboard: btpp-active)
Attachments
(1 file, 2 obsolete files)
|
8.31 KB,
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
CSSParserImpl::ParseSourceSizeList() should not append result to the candidate list if got unexpected token at the end of string when parsing sizes attribute.
Some wpt failures in http://w3c-test.org/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html are caused by this bug.
for example,
<img srcset="/images/green-1x1.png?f33 50w, /images/green-16x16.png?f33 51w" sizes="1px !important">
test expects failing to parse sizes attribute [1] and use default value (100vw), so `/images/green-16x16.png` will be selected.
But we parse sizes as `1px` and then select `/images/green-1x1.png`.
[1] https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-sizes-attribute
| Assignee | ||
Comment 1•9 years ago
|
||
| Assignee | ||
Comment 2•9 years ago
|
||
Updated•9 years ago
|
Whiteboard: btpp-active
| Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8754712 [details] [diff] [review]
Patch, v1
Review of attachment 8754712 [details] [diff] [review]:
-----------------------------------------------------------------
Please see comment #0 for the details, thank you.
Attachment #8754712 -
Flags: review?(josh)
Comment 4•9 years ago
|
||
Comment on attachment 8754712 [details] [diff] [review]
Patch, v1
Review of attachment 8754712 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know the CSS parser code at all. From the point of view of the responsive image code, if the API can tell us whether the string was consumed entirely without errors then I think that's all we require.
Attachment #8754712 -
Flags: review?(josh) → review?(cam)
Comment 5•9 years ago
|
||
Comment on attachment 8754712 [details] [diff] [review]
Patch, v1
Review of attachment 8754712 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks.
::: layout/style/nsCSSParser.cpp
@@ +2176,5 @@
> CLEAR_ERROR();
> ReleaseScanner();
> mHTMLMediaMode = false;
>
> + return aQueries.Length() > 0;
!aQueries.IsEmpty()
Attachment #8754712 -
Flags: review?(cam) → review+
| Comment hidden (obsolete) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8754712 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•9 years ago
|
||
(Upload correct one)
Address review comment #5.
Attachment #8756162 -
Attachment is obsolete: true
Attachment #8756166 -
Flags: review+
| Assignee | ||
Comment 8•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 10•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•