Bug 1893409 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It looks like we hit [`the assertion`](https://searchfox.org/mozilla-central/rev/7f8450b7a32bfbafa060c184d3a3ac9c197e814f/layout/inspector/InspectorUtils.cpp#321-324). In other words, we cannot map this rule to the style rule map.

However, if we put the style into the same file, e.g. put every thing in `style.css` into the html file, we can see the starting style again.

I'm still trying to figure out a way to fix this API anyway.
It looks like we hit [this assertion](https://searchfox.org/mozilla-central/rev/7f8450b7a32bfbafa060c184d3a3ac9c197e814f/layout/inspector/InspectorUtils.cpp#321-324). In other words, we cannot map this rule to the style rule map.

However, if we put the style into the same file, e.g. put every thing in `style.css` into the html file, we can see the starting style again.

I suspect I forgot to add starting style rules into `ServoStyleRuleMap`, which seems only for Inspector.

I'm still trying to figure out a way to fix this API anyway.
It looks like we hit [this assertion](https://searchfox.org/mozilla-central/rev/7f8450b7a32bfbafa060c184d3a3ac9c197e814f/layout/inspector/InspectorUtils.cpp#321-324). In other words, we cannot map this rule to the style rule map.

However, if we put the style into the same file, e.g. put every thing in `style.css` into the html file, we can see the starting style again.

I suspect I forgot to add starting style rules into `ServoStyleRuleMap`, which seems only for Inspector.

I'm still trying to figure out a way to fix this API anyway.

Updated: It seems we recreate the style rules when opening Inspector, if we are using a separate style file. And we fill the ServoStyleRuleMap with the new created rules. However, the starting style is still linked to the old style rules, so we cannot map it to the properly style rule in ServoStyleRuleMap.
It looks like we hit [this assertion](https://searchfox.org/mozilla-central/rev/7f8450b7a32bfbafa060c184d3a3ac9c197e814f/layout/inspector/InspectorUtils.cpp#321-324). In other words, we cannot map this rule to the style rule map.

However, if we put the style into the same file, e.g. put every thing in `style.css` into the html file, we can see the starting style again.

I suspect I forgot to add starting style rules into `ServoStyleRuleMap`, which seems only for Inspector.

I'm still trying to figure out a way to fix this API anyway.

Updated: It seems we recreate the style rules when opening Inspector, if we are using a separate style file (e.g. `style.css` in the test). And we fill the ServoStyleRuleMap with the new created rules. However, the starting style is still linked to the old style rules, so we cannot map it to the properly style rule in ServoStyleRuleMap.

Back to Bug 1893409 Comment 9