Closed
Bug 1331291
Opened 8 years ago
Closed 7 years ago
stylo: URL is incorrectly resolved when it is from a stylesheet loaded via @import
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla56
People
(Reporter: xidorn, Assigned: xidorn)
References
Details
Attachments
(1 file, 1 obsolete file)
Having the following code in "/test.html":
<!DOCTYPE html>
<style>
@import url(res/test.css);
</style>
<div id="test></div>
and the following code in "/res/test.css":
#test { background-image: url(a.png); }
The background-image of #test is resolved to "/a.png" rather than the expected result "/res/a.png".
(This is a failure revealed by layout/style/test/test_bug397427.html, although that test is meant to check effect of stylesheet redirection.)
Comment 1•8 years ago
|
||
This looks baseURI-related. Xidorn is looking at similar stuff in bug 1343964.
Assignee: nobody → xidorn+moz
Priority: -- → P1
Assignee | ||
Comment 2•7 years ago
|
||
I really hope I had left some note to myself... I think I had idea about how this should be fixed before...
Assignee | ||
Comment 3•7 years ago
|
||
Tried to think a bit, I think the idea was that, we need to change Stylesheet::update_from_str. We need to make that method take a UrlExtraData (at url_data) rather than having a reference, and assign url_data to Stylesheet.url_data. We may need to wrap RwLock around url_data for this.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8875570 [details]
Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.
https://reviewboard.mozilla.org/r/146988/#review152226
Attachment #8875570 -
Flags: review?(cam) → review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8875571 [details]
Bug 1331291 part 2 - Add test for inserting rule into imported stylesheet.
https://reviewboard.mozilla.org/r/146990/#review152228
Attachment #8875571 -
Flags: review?(cam) → review+
Assignee | ||
Comment 8•7 years ago
|
||
Servo side: servo/servo#17286
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8875570 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1aac46ac7a39
part 2 - Add test for inserting rule into imported stylesheet. r=heycam
Comment 11•7 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/678273a09bc0
followup - Disable the new test added.
Assignee | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/62c2763b9dd6
followup 2 - Fix the test added in the bug and enable it.
Comment 14•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1aac46ac7a39
https://hg.mozilla.org/mozilla-central/rev/678273a09bc0
https://hg.mozilla.org/mozilla-central/rev/62c2763b9dd6
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•