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?
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?
(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.
CJ, Jet said you could help us out on Stylo. Would you mind looking at this? Let me know if you have any questions. :-)
I suspect bug 1347381 may also fix this. Let's wait for that to land first and see.
(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.