Page MenuHomePhabricator

Bug 1847440 - Always store relative line numbers in CSS rules. r=nchevobbe,jdescottes
ClosedPublic

Authored by emilio on Aug 10 2023, 11:58 AM.
Referenced Files
Unknown Object (File)
Wed, Apr 8, 8:31 AM
Unknown Object (File)
Tue, Apr 7, 2:46 PM
Unknown Object (File)
Tue, Apr 7, 8:25 AM
Unknown Object (File)
Mon, Apr 6, 2:23 AM
Unknown Object (File)
Sun, Apr 5, 10:32 PM
Unknown Object (File)
Oct 13 2025, 12:05 AM
Unknown Object (File)
Oct 10 2025, 9:24 PM
Unknown Object (File)
May 27 2025, 3:07 PM
Subscribers

Details

Summary

CSS rules were storing absolute rather than relative line numbers (this
was done to match the old style system).

So when we hit the cached inline stylesheet code-path, for which we
share the CSS rules of the stylesheet, for the cache hit the line
numbers were completely off.

This particular page was probably regressed by bug 1834081, but the
issue could happen before with Shadow DOM.

Always store relative numbers and convert to absolute when asked by the
inspector, rather than the other way around.

This is simpler and makes the cache work.

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

Thanks Emilio, I tested the patch and it does fix the issue we were seeing in the Inspector.
i'll let you pick fluent c++ and rust reviewers to actually look at the patch :)

zrhoffman added a project: testing-approved.

Looks good with the clang-format issues addressed.

This revision is now accepted and ready to land.Aug 15 2023, 12:55 AM