Closed Bug 1740230 Opened 3 years ago Closed 3 years ago

moz-lwtheme* pseudo-classes don't get invalidated correctly

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(5 files)

I found this while investigating the failures bug 1740089 caused. Probably also fixes bug 1737131.

Assignee: nobody → emilio

This I noticed while working on the following patches. Shouldn't have
any behavior change: the behavior does in fact match the element state
flag semantics correctly if we do this. We did split the dir flags into
two element bits a while ago.

:not(:dir()) still behaves correctly of course, and we have tests for that.

Use the same document state mechanism we have for :moz-locale-dir. Also,
simplify the setup of the later to be the same as :dir(), allowing the
matching code to be less repetitive.

This should fix some flakiness in chrome mochitests, but we have no existing
tests for these pseudo-classes more generally and since they're just
chrome-only I'm not super-excited about adding more.

Depends on D130734

Behind a pref for now. Given these selectors do nothing on non-chrome
documents (they just don't match) it seems worth trying.

A cursory search seems to indicate they're not used for UA detection or
something like that (or at least I haven't found such an usage).

Depends on D130735

And remove code for :-moz-submit-invalid completely.

Depends on D130736

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4176f472e85a Simplify :dir() implementation. r=dholbert
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e76b53d685ee Refactor :-moz-lwtheme pseudo-classes to get invalidated correctly. r=dholbert
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/180d03015fd1 Unexpose :-moz-locale-dir and :-moz-lwtheme* from content. r=dholbert

Without this some tests fail with the previous patch because code like:

https://searchfox.org/mozilla-central/rev/267682a8f45221bf0bfe999d4a0239706a43bc56/browser/base/content/browser-gestureSupport.js#651

starts throwing. Unfortunately I had missed that on my try run, because
the error message didn't include that exception (it seemed like an
intermittent browser-chrome failure instead).

We could expose a ChromeOnly API for this, but this seems better. This
fixes it trivially, and also removes the "no url data" situation from
the selector parser, which is nice.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba8e644ee9d2 Allow matches() / querySelector() / etc on Chrome docs to access chrome-only selectors. r=boris
Attachment #9250098 - Attachment description: Bug 1740230 - Allow matches() / querySelector() / etc on Chrome docs to access chrome-only selectors. r=boris,dholbert → Bug 1740230 - Allow matches() / querySelector() / etc on chrome docs to access chrome-only selectors. r=boris,dholbert
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/09cdd8f9b238 Allow matches() / querySelector() / etc on chrome docs to access chrome-only selectors. r=boris
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a6251c65131 Unexpose :-moz-locale-dir and :-moz-lwtheme* from content. r=dholbert
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/67a281174487 Remove some prefs for pseudo-classes that we have shipped/unshipped successfully. r=dholbert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: