nsPresContext fails to actually register callbacks for some of the prefs it wants to react to
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
Attachments
(3 files)
The nsPresContext::PreferenceChanged
method wants to respond to changes in a number of prefs that can affect @media (prefers-contrast)
.
However, a couple of these (layout.css.prefers-contrast.enabled
and privacy.resistFingerprinting
) are missing from the callback lists, so we will not actually get the expected callback when they are modified.
Unfortunately, simply adding them to the gExactCallbackPrefs
list results in intermittent (but frequent) failures in layout/style/test/test_bug418986-2.html
, which aims to test the effect of changing privacy.resistFingerprinting
.
It appears that just adding privacy.resistFingerprinting
to the requiresRefresh set in SpecialPowersParent.jsm is not sufficient to resolve this; the test failures still occur.
Assignee | ||
Comment 1•3 years ago
|
||
For some reason that I don't currently understand, the testcase bug418986-2 is sensitive to this,
and when we correctly observe changes in the resistFingerprinting spec, it starts to intermittently
fail a few of the media-queries-in-picture-elements tests. If the rest of the tests are disabled
and only those tests run, they consistently pass for me; but when they're running after the
various other tests, I see frequent failures in the non-resisting case for the device-height/-width/
-aspect-ratio tests.
Moving the media-queries-in-picture-elements tests ahead of the other categories seems to
avoid this, although it suggests there's some kind of underlying race or similar issuei in handling
the effect of the pref change on media queries.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
The test was relying on media queries not being recomputed, because it
ran something like this:
-
RFP off: add a bunch of images with class "testImage" to the
document. Then test all images with class "testImage". -
RFP on: do the same.
Note that there's no "remove all images added in step 1" step between 1
and 2. So the test with rfp on was also testing the images from step 1.
This worked before because resistFingerprinting didn't trigger
recomputation of the previous images.
Assignee | ||
Comment 3•3 years ago
|
||
This is a cut-down version of the 418986-2 testcase, with an explicit check that changes to
the resistFingerprinting pref will cause media queries to be re-evaluated and the resulting
computed styles to be updated at runtime.
Depends on D125857
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/129487f35030
https://hg.mozilla.org/mozilla-central/rev/55bc705a6b3f
https://hg.mozilla.org/mozilla-central/rev/589c77329c8d
Description
•