Some pages use this to hide the focus outline. On Blink it seems black,
WebKit uses it to expose the OS accent color. Make it black, which is
the default when the color isn't implemented on a given platform.
Differential Revision: https://phabricator.services.mozilla.com/D119036
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.
Differential Revision: https://phabricator.services.mozilla.com/D119104
This enforces a stable frame to AGR mapping, which was previously changing when AGR status of the frame changed due to display port change.
The downside of this is that the intermediate results are not cached, which means more traversals.
Differential Revision: https://phabricator.services.mozilla.com/D118603
nsIDOMWindowUtils.getOMTAStyle is for querying an in-progress animating value
running on the compositor thread. The key to query the value is stored in the
target nsIFrame of the animating element, and the key is basically based on
the display item (type) in question, DisplayItemType::TYPE_TRANSFORM in cases of
transform animations, etc. So if getOMTAStyle gets called for an element
where
a) an animation is running on the compositor
b) a new animation is just created
then, it's possible that getOMTAStyle queries a)'s animation value instead of
b)'s.
Differential Revision: https://phabricator.services.mozilla.com/D119127
This eliminates a lot of down casting from nsIFrame* to nsListControlFrame*.
Make SetDropDown() accepts nsListControlFrame* because
nsCSSFrameConstructor already passes the derived type in.
We'll replace mListControlFrame with mDropdownFrame in the next part.
Differential Revision: https://phabricator.services.mozilla.com/D119206
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.
Depends on D119103
Differential Revision: https://phabricator.services.mozilla.com/D119104
As those don't have the same incremental reflow issues as root paginated
documents, and we do need this for remote iframes to update their
viewport.
Depends on D119103
Differential Revision: https://phabricator.services.mozilla.com/D119104
Since bug 1717726 we've disallowed having remote <browser> or remote <iframe>
inside nsDeckFrame which means `captureingFrame` in ClearMouseCapture(nsIFrame*)
function will never be called in an out-of-process thus we can use
IsAncestorFrameCrossDocInProcess there.
Also add an assertions that the function gets called only with a child frame of
nsDeckFrame since this function is used only inside nsDeckFrame.
Depends on D119068
Differential Revision: https://phabricator.services.mozilla.com/D119069
The background to have this assertion is that nsDeckFrame::HideBox calls
PresShell::ClearMouseCapture and ClearMouseCapture checks whether the
being-hidden panel has a content capturing mouse events or not but the check
doesn't work if the content is in a remote process. In our current
mozilla-central tree, there is no such nsDeckFrame other than our browser's
tab. In the case of our browser's tab when switching tabs, i.e. hiding an
active tab, clearing the mouse capturing state has (should have) worked since
E10S (Note for Fission cases it has worked since bug 1680405). So, because
nsDeckFrame will be obsoleted sooner or later, we disallow the situation
for other cases instead of adding special handling for the other case.
Differential Revision: https://phabricator.services.mozilla.com/D119067
GeckoView always calls preserveLayers(true) on all <browser> elements,
which causes the puppet widget to always be considered visible.
Given how the code worked before, aBrowsingContext.isActive = false
after that call would deactivate the pres shell, but after my patch it
stops doing so.
We don't really want to un-throttle the refresh driver etc just because
we're preserving layers, so propagate the state to the child process and
account for that in the logic to determine PresShell activeness.
Depends on D118703
Differential Revision: https://phabricator.services.mozilla.com/D118884
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.
Differential Revision: https://phabricator.services.mozilla.com/D118703
Even if the old one isn't, otherwise we can leak.
This doesn't happen at the moment because our printing code creates its
own browser with the initial about:blank loaded (which not Destroy()ing
is fine), and then host the clone in there.
In bug 1666247, for simplify mode the front-end is creating a non-static
document with the simplify mode, then reusing the same docshell for the
static document. That means that we forget the non-static document and
we can leak.
In comment 16 on that bug, the leak comes from a <link rel=stylesheet>
whose SheetLoadData we keep in Document::mPreloadService (which uses
Document::Destroy() to call ClearAllPreloads() and break cycles).
To fix it, check aDocument->IsStaticDocument(), not just
mDocument->IsStaticDocument()... That's the right check since it is the
cloning codepath the one that otherwise doesn't care about what was in
the viewer before.
Differential Revision: https://phabricator.services.mozilla.com/D118809
Even if the old one isn't, otherwise we can leak.
This doesn't happen at the moment because our printing code creates its
own browser with the initial about:blank loaded (which not Destroy()ing
is fine), and then host the clone in there.
In bug 1666247, for simplify mode the front-end is creating a non-static
document with the simplify mode, then reusing the same docshell for the
static document. That means that we forget the non-static document and
we can leak.
In comment 16 on that bug, the leak comes from a <link rel=stylesheet>
whose SheetLoadData we keep in Document::mPreloadService (which uses
Document::Destroy() to call ClearAllPreloads() and break cycles).
To fix it, check aDocument->IsStaticDocument(), not just
mDocument->IsStaticDocument()... That's the right check since it is the
cloning codepath the one that otherwise doesn't care about what was in
the viewer before.
Differential Revision: https://phabricator.services.mozilla.com/D118809
It should be treated as `uint32_t` since DOM API does so. However, there are
some exceptions:
* Result of `nsINode::ComputeIndexOf()`
* Result of `nsAString` methods
They return `-1` as not found, and anyway, they cannot treat large integer
than `INT32_MAX`. Therefore, this patch does not touch around them.
Differential Revision: https://phabricator.services.mozilla.com/D118933
During a `TextControlState` alive, `PasswordMaskData` should be alive too.
Otherwise, we cannot keep unmasked range at reframing.
Depends on D118756
Differential Revision: https://phabricator.services.mozilla.com/D118757
No functional change, this just makes it more explicit that each possible status
value is being considered, and unifies the handling of the two arrays.
Differential Revision: https://phabricator.services.mozilla.com/D118200
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
references'.
Differential Revision: https://phabricator.services.mozilla.com/D115298
It should have been working on fis-xorig runs since bug 1714594.
Note that the try run used for filing bug 1716409 was pushed on June 7th, whereas
bug 1714594 landed on June 11th.
Differential Revision: https://phabricator.services.mozilla.com/D118767
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
references'.
Differential Revision: https://phabricator.services.mozilla.com/D115298
Run TV and TC tasks with python 3. Several issues are addressed for TV:
- minor Android-only str/int type confusion for mozinfo parameter;
- the type of mozlog-generated log* options changes under py3, causing
difficulty when deepcopy'ing options; avoided by removing the need
for deepcopy;
- on Windows, with py 3.6, repeated process launches trigger a python
bug; avoided by running self-tests only once per TV session.
Differential Revision: https://phabricator.services.mozilla.com/D118769
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.
Differential Revision: https://phabricator.services.mozilla.com/D118703
This enables the following tasks on central:
+test-linux1804-64-asan/opt-reftest-fis-e10s
+test-linux1804-64-shippable-qr/opt-reftest-fis-e10s
+test-windows10-64-qr/debug-reftest-fis-e10s
+test-windows10-64-shippable-qr/opt-reftest-fis-e10s
and the following tasks on autoland:
+test-linux1804-64-asan/opt-reftest-fis-e10s
+test-linux1804-64-qr/opt-reftest-fis-e10s
+test-windows10-64-qr/debug-reftest-fis-e10s
+test-windows10-64-qr/opt-reftest-fis-e10s
Differential Revision: https://phabricator.services.mozilla.com/D118593
See rationale in bug 1698693 comment 9.
The added flags ensure we stop at the RSF even if it's overflow:hidden,
or if the starting frame is in fixed content.
Depends on D117387
Differential Revision: https://phabricator.services.mozilla.com/D117388
See rationale in bug 1698693 comment 8.
The added flags ensure we stop at the RSF even if it's overflow:hidden,
or if the starting frame is in fixed content.
Differential Revision: https://phabricator.services.mozilla.com/D117387
These aren't WPT because the CSS-page spec gives a large range of correct
behavior for handling page-size when printing. We also don't expect Firefox's
default handling to remain the same as it is implemented in this bug.
These also can't be paged reftests because of bug 1717138
Ideally we would be able to give a range of possible correct results for a WPT
that tests printing, but for now we are just testing the specific behavior we
implement.
Differential Revision: https://phabricator.services.mozilla.com/D117480
This is more correct as it takes care about falling back to white as needed in
printing mode.
This is still not perfect because themed frames still get black-on-black text.
I'm not super-sure what's the right way to fix that, will
file a follow-up for that. In particular, when you have a themed
button, we use the system colors (i.e., black) to paint
it, but nsLayoutUtils::DarkenColorIfNeeded doesn't know it
and darkens the text color anyways.
Easiest fix is just not use the system colors when
printing, but that feels not-amazing...
Differential Revision: https://phabricator.services.mozilla.com/D118275
The root cause of the crash was that FlexItem::NeedsFinalReflow
returned false even though the item had a non-empty next-in-flow.
This made the flex container skip the item's reflow and consider
the item's reflow status as COMPLETE, which triggers the removal
of the container's own next-in-flow, which causes the assertions
and eventually the crash.
Differential Revision: https://phabricator.services.mozilla.com/D118420
`select` event is now fired from selectionchange listener and thus the listener should be enabled regardless of the flag.
Differential Revision: https://phabricator.services.mozilla.com/D118400
This is more correct as it takes care about falling back to white as needed in
printing mode.
This is still not perfect because themed frames still get black-on-black text.
I'm not super-sure what's the right way to fix that, will
file a follow-up for that. In particular, when you have a themed
button, we use the system colors (i.e., black) to paint
it, but nsLayoutUtils::DarkenColorIfNeeded doesn't know it
and darkens the text color anyways.
Easiest fix is just not use the system colors when
printing, but that feels not-amazing...
Differential Revision: https://phabricator.services.mozilla.com/D118275
This removes the last use of DefineClip from Gecko, which will
allow removing and simplifying a lot of the clip handing code
during scene building in WR.
Differential Revision: https://phabricator.services.mozilla.com/D118121
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.
Differential Revision: https://phabricator.services.mozilla.com/D118011
Just drive-by, but seems reasonable to avoid the per-element comparison
if the pointers are the same.
Depends on D118015
Differential Revision: https://phabricator.services.mozilla.com/D118016
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
references'.
Differential Revision: https://phabricator.services.mozilla.com/D115298
When printing, we lighten backgrounds and darken colors, unless color-adjust:
exact is used. So with the current backplating logic we might end up using a dark
system color background for a backplate, but then darkening the test, ending up
in both more ink being used, and the text being unreadable.
We don't have a great test story for these but I can try...
Differential Revision: https://phabricator.services.mozilla.com/D117729
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
references'.
Differential Revision: https://phabricator.services.mozilla.com/D115298
This test formerly had a win7-specific fuzzy annotation. I'm generalizing that
annotation to include all Windows versions, since Windows 10 has had similar
fuzzy failures; and I'm also merging with the adjacent "gtkWidget" fuzzy
annotation, since it's got exactly the same fuzzy thresholds.
Differential Revision: https://phabricator.services.mozilla.com/D117719
Specifically: in DrawBackgroundImage (which we use to draw borders as well),
this patch makes us translate the anchor-point (together with our destination
rect), for each tiled call to DrawImageInternal.
Differential Revision: https://phabricator.services.mozilla.com/D116596
- Clear mAdjustOffsetForContextMenu at nsMenuPopupFrame when running on Wayland and use move-to-rect to produce the offset.
- Implement nsWindow::WaylandPopupIsContextMenu()
- Use mBonuds directly in NativeMoveResizeWaylandPopupCallback() instead of Gtk query.
- Add some more loggin and code polishing.
Differential Revision: https://phabricator.services.mozilla.com/D117283
- Clear mAdjustOffsetForContextMenu at nsMenuPopupFrame when running on Wayland and use move-to-rect to produce the offset.
- Implement nsWindow::WaylandPopupIsContextMenu()
- Use mBonuds directly in NativeMoveResizeWaylandPopupCallback() instead of Gtk query.
- Add some more loggin and code polishing.
Differential Revision: https://phabricator.services.mozilla.com/D117283
We have a couple of tests that fail on tryserver on certain platforms (though they pass for me locally),
apparently because the glyph measurements used to support the various glyph-related metrics may be
affected by resolution and/or hinting settings. So these are annotated as fuzzy for now.
If we undertake a reimplementation of font metrics to better harmonize behavior across platforms
(a longstanding wish!), perhaps we'll be able to eliminate these discrepancies.
Differential Revision: https://phabricator.services.mozilla.com/D116282
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts. The document certainly has no authority
to block those from loading. (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)
Differential Revision: https://phabricator.services.mozilla.com/D111695
Per https://github.com/w3c/csswg-drafts/issues/6126 these were
never intended to be included in the first place so this is just
fixing a bug. Note that I'm leaving them in the mRuleFaces array
so that the font loading machinery works the same as before.
I'm just excluding them when queried by document.fonts.
Differential Revision: https://phabricator.services.mozilla.com/D111694
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those. Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).
When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.
We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons. Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome. We used to
ignore these for list-style-type:<string> too.)
Differential Revision: https://phabricator.services.mozilla.com/D111693
As we audited in bug 1523500, the root scrollable frame in the OOP iframe is
always active, so using IsAncestorFrameCrossDocInProcess would be sufficient
for the assertions.
Differential Revision: https://phabricator.services.mozilla.com/D117501