If allocation fails, we'll now just discard the entire contents of
mAllocatedPointers and stop using it going forward.
See the documentation alongside the mAllocatedPointers declaration (in this
patch) for more details.
Differential Revision: https://phabricator.services.mozilla.com/D143416
This patch doesn't change behavior. As of this patch, this variable gets
instantiated immediately (in the PresShell constructor) and is never null, so
no logic/beheavior has changed.
This lays the groundwork for the next patch, which will add one case where this
variable does get nulled out (and add logic to handle that).
Differential Revision: https://phabricator.services.mozilla.com/D143411
To support magnifying glass on GeckoView, I would like to add `dragcaret`
event and, clientX and clientX in CaretStateChangedEvent chrome event.
Actually, accessible caret fires `presscaret` and `releasecaret` when
accessbile caret is pressed or released. But when dragging this caret, no
chrome event is fired. Since magnifying glass listens to moving this caret,
I would like `dargcaret` for GeckoView.
Also, Users' dragging point is necessary to set better position of magnifying
glass windows. So I also want client point of dragging point on `presscaret`
and `dragcaret` event.
This event and properties are on layout.accessiblecaret.magnifier.enabled=true,
So this can be only for GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D137965
This doesn't change behavior; it just makes the existing CSS a bit more concise.
('inset' is a shorthand that sets top, right, bottom, and left all at once.)
Depends on D143099
Differential Revision: https://phabricator.services.mozilla.com/D143109
As indicated in the new code-comment, we do need the html element to be the
full height of the viewport. But:
- we don't need to set width to 100%. The default, 'auto', has the same effect.
- we don't need to set margin/padding to 0; they default to 0 on 'html'.
- we don't need to set anything on the body, since it doesn't render or have
any children in the box tree. (The video descendant is abspos and hence uses
the viewport as its containing block, not the body.)
As an extra check that this is reasonable, note that the similar
TopLevelImageDocument.css stylesheet doesn't have any CSS rules that target the
html or body elements.
Differential Revision: https://phabricator.services.mozilla.com/D143099
This change applies the same fix in the code above for mix-blend
containers to backdrop roots. Without this, the backdrop-root is
the viewport, so it includes things like the fixed position background
rects used for checkerboarding.
Differential Revision: https://phabricator.services.mozilla.com/D142772
We fallback to use main-thread animations if the timeline is inactive or we
cannot get scroll offsets or the scroll range from APZC on the compositor
thread.
Differential Revision: https://phabricator.services.mozilla.com/D141168
Remote browsers don't block onload otherwise, so we could spawn a task
to the initial about:blank, and getting that replaced by the real load
before the task executed.
Differential Revision: https://phabricator.services.mozilla.com/D142940
This allows popups and sidebars to use the chrome preferred
color-scheme.
This moves the responsibility of setting the content-preferred color
scheme to the appropriate browsers to the front-end (via tabs.css).
We still return the PreferredColorSchemeForContent() when there's no
pres context (e.g., for display:none in-process iframes). We could
potentially move a bunch of the pres-context data to the document
instead, but that should be acceptable IMO as for general web content
there's no behavior change in any case.
Differential Revision: https://phabricator.services.mozilla.com/D142578
In bug 1744009[1] I changed some code that looked like:
* Get the dropdown frame intrinsic size.
* If there's overlay scrollbars, add the non-overlay scrollbar size.
That code came from bug 869314. I misread the "if there's overlay
scrollbars" bit.
There's no need to explicitly add the scrollbar width to the intrinsic
size anymore. The dropdown frame no longer exists, and the button size
is split out from the scrollbar size nowadays. There's no reason
to artificially add any size to the content frame.
[1]: https://hg.mozilla.org/integration/autoland/rev/78130d73ca75#l24.652
Differential Revision: https://phabricator.services.mozilla.com/D142834
On Wayland popup flipping and such is not Firefox's responsibility.
Once we've decided the final popup position because the compositor told
us, we move the popup to a fixed position, and internally the popup
becomes unanchored.
Using this boolean to make decisions after the initial popuppositioned
event is wrong, so avoid exposing it to JS.
Differential Revision: https://phabricator.services.mozilla.com/D142679
This implements a new DrawTarget API call, DrawShadow. This can be used to draw
the shadow of a given Path and Pattern. Unlike DrawSurfaceWithShadow, this only
draws the shadow to simplify the resulting implementation. DrawTarget provides
a default implementation that will draw a blurred shadow to a transient surface
before handing it off to DrawSurfaceWithShadow, allowing existing DrawTarget
implementations to function without having to implement the new API at all.
Within DrawTargetWebgl, DrawShadow allows direct caching of the shadow in the
existing PathCache mechanism, unlike DrawSurfaceWithShadow which would usually
be called with different transient surfaces every time, even if the input
patterns actually matched.
CanvasRenderingContext2D is modified to call DrawShadow when only a shadow
needs to be applied without any filter. AdjustedTarget is modified to wrap
the necessary DrawTarget draw calls so they can be dispatched appropriately.
Since a lot of redundant shadow parameters are shared between DrawShadow and
DrawSurfaceWithShadow, and since a lot of consumers of these functions need
to also pass around these parameters, this also bundles these into a new
ShadowOptions structure to make this easier.
Differential Revision: https://phabricator.services.mozilla.com/D142026