Closed Bug 1330503 Opened 8 years ago Closed 7 years ago

stylo: URL values in CSSStyleSheet.insertRule and rule.style.setProperty are not recognized correctly

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox53 --- affected

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file)

This seems to be a common failure pattern revealled by the style system tests. I'll investigate why this happens.
So they are explicitly dropped because of lack of ParserContextExtraData [1]. Looking at the code, I guess we can probably put ParserContextExtraData to Stylesheet, so that we don't need to pass in that every time when we want to parse something. [1] https://github.com/servo/servo/blob/f37aa1292706ebcf6727aea4ef30707d8e0e0569/components/style/values/specified/url.rs#L100-L105
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #1) > So they are explicitly dropped because of lack of ParserContextExtraData [1]. Yeah I've seen a lot of logging around that. > Looking at the code, I guess we can probably put ParserContextExtraData to > Stylesheet, so that we don't need to pass in that every time when we want to > parse something. Or the PerDocumentStyleData. Unless it differs between stylesheets?
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #2) > > Looking at the code, I guess we can probably put ParserContextExtraData to > > Stylesheet, so that we don't need to pass in that every time when we want to > > parse something. > > Or the PerDocumentStyleData. Unless it differs between stylesheets? They are definitely different between stylesheets. We would probably need one in PerDocumentStyleData as well, for style elements and attributes.
Oh, probably no need for style elements, because they have their own stylesheet.
Now I successfully make it parse, but it seems inserting rule doesn't affect the computed value... probably need to investigate what happens in the restyler.
Hmmm, it fixes much fewer issues than I thought... I have a WIP solution, but given it's not that helpful, I decide not to complete it at this moment.
Summary: stylo: URL values in rule added via CSSStyleSheet.insertRule are not recognized correctly → stylo: URL values in CSSStyleSheet.insertRule and rule.style.setProperty are not recognized correctly
Attached patch WIP patchSplinter Review
Blocks: 1310886
Over to xidorn with the other url stuff.
Priority: -- → P1
I believe this has been fixed in some dependency of bug 1343964. The remaining failures which marked with this bug is actually bug 1356494.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: