Open Bug 1379031 Opened 7 years ago Updated 2 years ago

Consider unshipping ::-moz-tree-* pseudos from web content

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: xidorn, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed, site-compat)

Apparently, CSS doesn't support styling anonymous boxes at all, and selectors for anonymous boxes are all -moz-prefixed. Actually, there is potentially some risk if an anonymous box is incorrectly styled. We should probably unship them from the web content. There are certain web compatibility risk for this, because some websites use some of the selectors to do browser-sniffing (one case: bug 1378846 comment 3). For that case, we probably need to ask them to avoid doing so...
Code-wise, unshipping should this always be easy. The question is how should we mitigate the webcompat hit...
dbaron, what do you think about this?
Flags: needinfo?(dbaron)
I believe we already don't allow them in Web content: https://searchfox.org/mozilla-central/rev/f1472e5b57fea8d4a7bbdd81c44e46958fe3c1ce/layout/style/nsCSSParser.cpp#5928-5933 with the exception of the tree pseudos (as documented there). We still need to support the tree pseudos where XUL is enabled (i.e., chrome, which is more than UA sheets), but it should be pretty safe to unship them from Web content, since XUL trees aren't exposed to Web content.
Flags: needinfo?(dbaron)
(In reply to David Baron :dbaron: ⌚️UTC-7 from comment #3) > We still need to support the tree pseudos where XUL is enabled (i.e., > chrome, which is more than UA sheets), but it should be pretty safe to > unship them from Web content, since XUL trees aren't exposed to Web content. Well... except it isn't. Bug 1378846 is such a case.
Given that we have disallowed other pseudos in web content, change the summary.
Summary: Consider unshipping anonymous box from web content → Consider unshipping ::-moz-tree-* pseudos from web content
Apparently, ::-moz-tree-row(hover) is a wide-spreading hack to apply Firefox-specific styles. See for example: * https://stackoverflow.com/questions/952861/targeting-only-firefox-with-css/25397485#25397485 * http://browserhacks.com/#fx
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.