The default bug view has changed. See this FAQ.

stylo: style change via insertRule and deleteRule may not work

NEW
Assigned to

Status

()

Core
CSS Parsing and Computation
P1
normal
2 months ago
7 days ago

People

(Reporter: xidorn, Assigned: cjku)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 months ago
Created attachment 8833827 [details]
testcase

See the attached testcase. In theory, the newly inserted style should be applied to the element, so the color should be green and the computed style would change to green as well. But it doesn't work.

Solely delete the given rule via deleteRule doesn't work either, but if you use both insertRule and deleteRule, things magically start to work.

CSSOM code should have noticed the document that there is rule added / removed. Probably the corresponding flag in document is not checked?
Is this basically the same issue as bug 1331874, where we don't implement the RestyleManager callbacks correctly?
(Reporter)

Comment 2

2 months ago
I'm unsure about that. Bug 1331874 sounds more similar to bug 1331301 where style is added as part of the document (via DOM API), so maybe restyle manager isn't aware of the new stylesheets. In this case, the style info is added via CSSOM, and the CSSOM API correctly informs the document that there are changes to existing stylesheets.

I would suggest they are different issues.
Xidorn, are you going to take these kinds of bugs?
Flags: needinfo?(xidorn+moz)
(In reply to Andrew Overholt [:overholt] from comment #3)
> Xidorn, are you going to take these kinds of bugs?

You can avoid triaging any bugs with |stylo:| in the title. We'll take care of them.
Flags: needinfo?(xidorn+moz)
Component: DOM: CSS Object Model → CSS Parsing and Computation
Priority: -- → P1
CJ, Jet said you could help us out on Stylo. Would you mind looking at this?

Let me know if you have any questions. :-)
Assignee: nobody → cku
Flags: needinfo?(cku)
(Assignee)

Comment 6

9 days ago
Sure
Flags: needinfo?(cku)
(Reporter)

Comment 7

7 days ago
I suspect bug 1347381 may also fix this. Let's wait for that to land first and see.
Depends on: 1347381
(Assignee)

Comment 8

7 days ago
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #7)
> I suspect bug 1347381 may also fix this. Let's wait for that to land first
> and see.

noted
bug 1347381 fixed at least one test mentioning this bug. I think there are a few failures left, but I haven't dug in whether they're legit or not.
You need to log in before you can comment on or make changes to this bug.