Граф коммитов

78939 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 50b0c4bcfd Bug 1464761 Part 2 - Remove IsTruncated() in nsTableRowFrame::ReflowCellFrame(). r=dholbert
We call NS_FRAME_SET_TRUNCATION (via nsReflowStatus::UpdateTruncated) in the end
of every frame's Reflow() to update nsReflowStatus::mTruncated bit. In the
following patches, I'm going to rewrite all the callers of IsTruncated(), and
ultimately remove the mTruncated bit.

In this patch, I rewrite the callsite in ReflowCellFrame() by moving
nsReflowStatus::UpdateTruncated logic [1] into it. Note that we use an assertion
in ReflowCellFrame to make sure nsTableRowFrame and nsTableCellFrame have the
same writing-mode.

The only test covering the code path is `layout/reftests/bugs/409084-1a.html`.

[1] https://searchfox.org/mozilla-central/rev/2946e9b450cb35afaf8dad927a8d187975dcd74d/layout/generic/nsIFrame.cpp#256-258

Differential Revision: https://phabricator.services.mozilla.com/D151459
2022-07-27 21:55:17 +00:00
Ting-Yu Lin 31f785b94b Bug 1464761 Part 1 - Remove IsTruncated() in FlowAndPlaceFloat(). r=dholbert
Add a wpt print test that catches an accidental behavior change for a previous
version of this patch.

Differential Revision: https://phabricator.services.mozilla.com/D151458
2022-07-27 21:55:17 +00:00
Glenn Watson a00b8ca709 Bug 1779952 - Refactor and optimize internal representation of clip state r=nical
This patch refactors how clip chains are internally represented and used
during scene and frame building. The intent is to make clip processing
during frame building more efficient and consistent. Additionally, this
work enables follow ups to cache the result of clip-chain builds between
frame and scene builds.

These changes will significantly reduce the cost of the visibility pass
for the common case when not much content has changed. In this patch,
the public API for clipping remains (mostly) the same, in order to allow
landing and stabilising this work without major changes to Gecko. However,
a longer term goal is to make the public WR clip API more closely match
the internal representation, to reduce work done during scene building.

Clips on a primitive can be categorized into two buckets. The first are
local clips that are specific to the primitive and move with it. These
could essentially be considered part of the definition of the primitive
itself. The second are a hierarchy of clips that apply to one or more
items, and may move independently of the primitive(s) they clip. These
clips are things like scroll regions, stacking context clips, iframe
clip regions etc. On (real world) pages, the clip hierarchy is typically
quite shallow, with a small number of clips that are shared by a large
number of primitives.

Finding clips that are shared between primitives is both required (for
things such as determining which picture cache slice a primitive can
be assigned to, while applying the shared clips during composition), and
also a potential optimization (processing shared clips only once and
caching this clip state similar primitives).

The public clip-chain API has two complexities that make the above
difficult and time consuming for WR to determine. It was possible to
express a clipping hierarchy both via the legacy clip parenting path
(via `ClipId` definitions) and also via clip-chains (the `parent`
field of a `ClipChain`). Second, clip-chains themselves can define
an arbitrary number and ordering of clips. Clips can also implicitly
apply to primitives via parent stacking contexts and iframes, but must
sometimes be removed (when an intermediate surface is created) for
performance reasons.

The new internal representation provided by this patch introduces a
`ClipTree` structure which is built during scene building by accumulating
the set of clips that apply to a primitive from all explicit and implicit
sources, and grafting this on to the existing clip-tree structure.
This provides WR a simple way to determine which clips are shared between
primitive (by checking ancestry) and reduces the size of the internal
representation (by sharing clips where possible rather than duplicating).
Interning is still used to identify parts of the clip-tree that define
the same clipping state.

Specific changes in this patch:
 * Remove legacy `ClipId` style parenting support (in conjunction with
   previous patches)
 * Remove the public API ability to specify the clip on a primitive via
   `ClipId` (it must now be a clip-chain)
 * Remove `combined_local_clip_rect` from `PrimitiveInstance`, reducing
   the size of the structure significantly
 * Introduce `ClipTree` used during frame building, which is created by
   `ClipTreeBuilder` during scene building
 * Separate out per-primitive clip concept (`ClipTreeLeaf`) from clipping
   hierarchy (`ClipTreeNode`). In future, more elements will be moved to
   the `ClipTreeLeaf` and the state of each `ClipTreeNode` will be cached)
 * Simplify the logic to disable / remove clips during frame building that
   are applied by parent surface(s)
 * Port hit-testing to be based on `ClipTree` which is simpler, faster and
   also resolves some edge case correctness bugs
 * Use a simpler and faster method to find shared clips during picture
   cache slice assignment of primitives
 * Update wrench to use the public clip-chain API definition changes

This patch already introduces some real-world optimizations (for example,
`displaylist_mutate` becomes 6% faster overall), but mostly sets things
up for follow up patches to be able to cache clip-state between frames,
which should result in much larger wins.

Differential Revision: https://phabricator.services.mozilla.com/D151987
2022-07-26 21:13:32 +00:00
Emilio Cobos Álvarez 8c0e9c2e38 Bug 1781034 - Add a shortcut to open the browser toolbox to the layout debugger. r=layout-reviewers,devtools-reviewers,nchevobbe,dshin
Depends on D152628

Differential Revision: https://phabricator.services.mozilla.com/D152629
2022-07-26 15:06:30 +00:00
Emilio Cobos Álvarez eef7f0ff16 Bug 1781034 - Remove layout debugger's visual debugging. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D152628
2022-07-26 15:06:30 +00:00
Emilio Cobos Álvarez d98aff87e0 Bug 1781140 - Remove nsTimingFunction and ComputedTimingFunction. r=dshin
They're simple wrappers of StyleComputedTimingFunction so we can remove
them.

Differential Revision: https://phabricator.services.mozilla.com/D152700
2022-07-26 14:49:02 +00:00
Marian-Vasile Laza aa61e2020a Backed out 2 changesets (bug 1781034) for causing bustages on nsImageFrame.cpp. CLOSED TREE
Backed out changeset 6a7a9375987a (bug 1781034)
Backed out changeset 58728270361e (bug 1781034)
2022-07-26 17:45:06 +03:00
Emilio Cobos Álvarez 75b34d5fc7 Bug 1781034 - Add a shortcut to open the browser toolbox to the layout debugger. r=layout-reviewers,devtools-reviewers,nchevobbe,dshin
Depends on D152628

Differential Revision: https://phabricator.services.mozilla.com/D152629
2022-07-26 14:08:57 +00:00
Emilio Cobos Álvarez 81b3b99519 Bug 1781034 - Remove layout debugger's visual debugging. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D152628
2022-07-26 14:08:56 +00:00
Lee Salzman c78dca6613 Bug 1779681 - Mark WebGL framebuffer as initially valid in DrawTargetWebgl. r=aosmond,gfx-reviewers
mWebglValid gets initialized to false, but it will never get reset to true until the next
frame, causing us to render into Skia the first frame rather than accelerate. Therefor, we
should just initialize it to valid. Since it is cleared to zero initially, this is safe.

Differential Revision: https://phabricator.services.mozilla.com/D151896
2022-07-26 13:41:32 +00:00
Hiroyuki Ikezoe 6cd2d7b509 Bug 1780701 - Skip returning the snap target if the snap position is same as the scroll destination. r=botond
Depends on D152617

Differential Revision: https://phabricator.services.mozilla.com/D152618
2022-07-26 06:59:14 +00:00
Hiroyuki Ikezoe 287d08b58f Bug 1780701 - Collect mSnapTargets even if ComputeScrollSnapInfo gets called for ScrollMetadata. r=botond
mSnapTargets stores the ids for all candidate snap taget elements in this scroll
container. Before this change, we collect the ids when we snap or re-snap on the
main-thread. It's used to check whether the last snap target ids comming from
APZ are not stale or not. So if we haven't done any snapping or re-snapping on
the main-thread, we mis-consider all incoming last snap target ids are stale,
thus we fail to re-snap to the position where we snapped on APZ. This issue
had been wall-papered, will be revealed by the next change in this commit series
(we had been unnecessary snappings and re-snappings).

Differential Revision: https://phabricator.services.mozilla.com/D152617
2022-07-26 06:59:14 +00:00
Ting-Yu Lin 1a163a2709 Bug 1778931 Part 3 - Tweak floatRI's mIsTopOfPage bit in FlowAndPlaceFloat(). r=dholbert
The old code tweaks mIsTopOfPage in ReflowFloat(). However
`aAvailableSize.ISize()` (in containing block's writing-mode) always equals to
ContentISize() because it is computed via ComputeAvailableSizeForFloat().
Therefore, the only reason the floatRI's mIsTopOfPage can be `false` is when
some floats are already being placed, and we only check this in the
`!earlyFloatReflow` branch.

By tweaking mIsTopOfPage bit in FlowAndPlaceFloat(), we can also remove two
unused parameters in ReflowFloat().

This patch shouldn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151457
2022-07-26 04:54:37 +00:00
Ting-Yu Lin 72a69515dc Bug 1778931 Part 2 - Revise two if branches checking float's reflow status. r=dholbert
The if-branch is incorrect because ShouldAvoidBreakInside() [1] is called via
the parent block instance with float child's ReflowInput as the argument. In
principle, the child frame should report break-before status if it cannot fit
the page/column and wants to avoid breaking. Removing this if-branch is
potentially a behavior change, but it is the correct thing to do. (Note that
ReflowFloat()'s caller FlowAndPlaceFloat() already handles
IsInlineBreakBefore(). If the float frame type already implements break-avoid,
we are fine.)

The else-if branch can never be reached except when the float is a letter frame,
and we've tested that scenario a few lines just before the this added assertion.
The code coverage also shows this branch in never reached.
https://coverage.moz.tools/#revision=e6e2286d2ac25001127a1cf54a87a95fb435c734&path=layout%2Fgeneric%2FnsBlockFrame.cpp&view=file&line=6682

[1] Note: ShouldAvoidBreakInside() is a protected member function, which can
only be called for concrete frame classes inheriting from nsContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D151456
2022-07-26 04:54:37 +00:00
Ting-Yu Lin 82c88e59cb Bug 1778931 Part 1 - Create a float's ReflowInput in FlowAndPlaceFloat() and pass it into ReflowFloat(). r=dholbert
There is some advantage to creating the float's ReflowInput in
FlowAndPlaceFloat().

1. ReflowFloat() doesn't need to output the float's margin and offset via the
   output arguments. FlowAndPlaceFloat() can get them from the local ReflowInput
   directly.

2. Since we are going to reflow the float, we have to create a ReflowInput
   anyway. FloatMarginISize() can take the ReflowInput and be simplified. No need
   to waste time to create a separate SizeComputationInput.

Also, delete the comment "Pass floatRS so the frame hierarchy can be
used (redoFloatRS has the same hierarchy)" because I believe it is obsolete.

This patch also lays the foundation for other improvements in the later patches.

Differential Revision: https://phabricator.services.mozilla.com/D151455
2022-07-26 04:54:36 +00:00
Emilio Cobos Álvarez 7b5024c960 Bug 1781102 - Remove assert count from a crashtest that no longer asserts.
MANUAL PUSH: Trivial progression to fix orange in a CLOSED TREE
2022-07-26 02:11:17 +02:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Emilio Cobos Álvarez 9ff152af79 Bug 1781102 - Make <hr> styles match the spec. r=TYLin
This matches Chromium, the spec, and fixes the rendering in
https://esta.cbp.dhs.gov/

Spec: https://html.spec.whatwg.org/#the-hr-element-2

Remove -moz-float-edge, to fix the second part of the WPT (also matches
Chromium and the spec which obviously has no such thing).

Differential Revision: https://phabricator.services.mozilla.com/D152670
2022-07-25 19:54:41 +00:00
Joel Maher 07bf82568a Bug 1780996 - Adjust windows10 screen resolution to match physical hardware if using gpu instance. r=gbrown,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D152612
2022-07-25 17:33:50 +00:00
Oriol Brufau 90681da9ee Bug 1781097 - Obey contain-intrinsic-size in block containers. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152666
2022-07-25 16:40:07 +00:00
Hiroyuki Ikezoe 0f520bb5c0 Bug 1780154 - Skip returning the snap target if the scroll-snap-type on the axis is `none`. r=botond
If we return the snap target in such cases, even though the target position is
unchanged from the original scroll destination, the target will be handled as a
valid last-snapped target element, thus we will try to re-snap to the element's
scroll-snap-align position rather than keeping the scroll position as it is.

Differential Revision: https://phabricator.services.mozilla.com/D152353
2022-07-25 01:27:03 +00:00
Oriol Brufau 6ae79ec065 Bug 1780475 - Obey contain-intrinsic-size in ContainSizeAxes. r=emilio
ContainSizeAxes::ContainSize and ContainSizeAxes::ContainIntrinsicSize
were just using 0 for the axes with size containment, now they will take
contain-intrinsic-width and contain-intrinsic-height into account.

The WritingMode parameter is replaced with a nsIFrame from which the
properties are retrieved.

There are various places that aren't currently using these functions, so
the effect of this patch is rather minimal, but some cases of the new
test are now passing.

Differential Revision: https://phabricator.services.mozilla.com/D152355
2022-07-22 14:35:10 +00:00
Edgar Chen 775d68bc7e Bug 1778486 - Use Pointer event to record last user input position; r=smaug
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.

Differential Revision: https://phabricator.services.mozilla.com/D151282
2022-07-22 13:51:47 +00:00
Emily McDonough e9d545fba3 Bug 1780671 - Make EnsureAutoPageName walk back up the frame tree only when necessary r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D152471
2022-07-22 05:01:40 +00:00
Kelsey Gilbert d085ddc24e Bug 1780460 - Increase fuzzy tolerance due to new R-wr-dc3-c variant. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D152444
2022-07-21 23:00:31 +00:00
Kelsey Gilbert 57c2db097c Bug 1780466 - Increase fuzzy tolerance due to new R-wr-dc3-c variant. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D152443
2022-07-21 23:00:31 +00:00
Daniel Holbert d1c8cf3e12 Bug 1780444 part 1: Use the default "overflow-clip-box" value ("padding-box") on textarea, to match other browsers on not-clipping overly-long lines at the content/padding box threshold. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152309
2022-07-21 17:14:41 +00:00
Emilio Cobos Álvarez bf56ce8562 Bug 1780455 - Fix an assertion to account for imagemap hacks. r=jwatt
I tried to add a crashtest without the video attachment and so on but
that didn't quite make it.

Differential Revision: https://phabricator.services.mozilla.com/D152374
2022-07-21 15:57:14 +00:00
Bogdan Szekely 86a4afe3d3 Backed out changeset 5ffdcd317253 (bug 1778486) for causing mochitest failures on test_getLastOverWindowPointerLocationInCSSPixels.html CLOSED TREE 2022-07-21 16:58:07 +03:00
Edgar Chen 758aaaa824 Bug 1778486 - Use Pointer event to record last user input position; r=smaug
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.

Differential Revision: https://phabricator.services.mozilla.com/D151282
2022-07-21 08:56:48 +00:00
Ting-Yu Lin b4c04f0197 Bug 1779269 - Fix AccessibleCaret's display on disabled form controls. r=emilio,webdriver-reviewers,whimboo,geckoview-reviewers,m_kato
A disabled form controls cannot be focused, and its frame selection is different
from the one for not-editable content. Use GetLastFocusedFrameSelection() (added
in Bug 253870) to get the correct frame selection that is visible to the user.

Add some basic tests for disabled <textarea> such as long pressing to select,
dragging, etc. They should behave the same as normal <textarea>.

Differential Revision: https://phabricator.services.mozilla.com/D151800
2022-07-21 05:44:30 +00:00
Hiroyuki Ikezoe 7ecc3eddc9 Bug 1779909 - Skip re-snapping during pan/touch gestures or scrollbar dragging. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D152229
2022-07-21 00:02:10 +00:00
Edgar Chen 203c68fb20 Bug 1779206 - Part 2: Do not always fire first pointermove event for touch; r=smaug
We don't handle the first touchmove event differently, so I think we should do
the same thing for pointermove event, otherwise, we might fire a pointermove event
without a touchmove event for the first touch action after touchstart if the touch
postition isn't changed.

Depends on D152152

Differential Revision: https://phabricator.services.mozilla.com/D152153
2022-07-20 21:12:32 +00:00
Edgar Chen 229f81373c Bug 1779206 - Part 1: Move test_bug968148.html to dom/events/test/pointerevents/; r=smaug
Like other pointer event tests

Differential Revision: https://phabricator.services.mozilla.com/D152152
2022-07-20 21:12:32 +00:00
Iulian Moraru eefea78474 Backed out changeset 9a5d1eaadf39 (bug 1778486) for causing mochitest-crash failures on test_getLastOverWindowPointerLocationInCSSPixels.html. CLOSED TREE 2022-07-20 18:56:03 +03:00
Iulian Moraru bb39ddfac8 Backed out 2 changesets (bug 1779206) for causing mochitest-plain failures on test_bug968148.html.
Backed out changeset c6b2cd1eef62 (bug 1779206)
Backed out changeset c93e8b401e3c (bug 1779206)
2022-07-20 18:55:08 +03:00
Edgar Chen 4811778c31 Bug 1778486 - Use Pointer event to record last user input position; r=smaug
In order to support record the last user input for touch given APZ won't
synthesize mouse event for touch in parent process. Using pointer event could
support pen input nicely, too.

Differential Revision: https://phabricator.services.mozilla.com/D151282
2022-07-20 15:03:19 +00:00
Edgar Chen b8f51ed9f1 Bug 1779206 - Part 2: Do not always fire first pointermove event for touch; r=smaug
We don't handle the first touchmove event differently, so I think we should do
the same thing for pointermove event, otherwise, we might fire a pointermove event
without a touchmove event for the first touch action after touchstart if the touch
postition isn't changed.

Depends on D152152

Differential Revision: https://phabricator.services.mozilla.com/D152153
2022-07-20 14:55:35 +00:00
Edgar Chen 1350b0d487 Bug 1779206 - Part 1: Move test_bug968148.html to dom/events/test/pointerevents/; r=smaug
Like other pointer event tests

Differential Revision: https://phabricator.services.mozilla.com/D152152
2022-07-20 14:55:34 +00:00
Emilio Cobos Álvarez 6716667434 Bug 1776498 - Use popup class with all popups. r=Jamie,handyman
Manage their shadow style per-window instead. It is a bit unfortunate, but
alas, seems to work, and we had existing code for various workarounds, so it's
not too gross.

The menulist special-case isn't needed anymore, menulists always have
eTransparencyTransparent nowadays on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D151994
2022-07-20 09:45:04 +00:00
Ting-Yu Lin e4b537b53a Bug 1780264 Part 3 - Remove ReflowInput::mStyleText. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152204
2022-07-20 00:48:22 +00:00
Ting-Yu Lin efdf31a619 Bug 1780264 Part 2 - Remove ReflowInput::mStylePadding. r=emilio
While I'm here, rename the local variable `styleMargin` to `margin` to make the
naming consistent with the `padding` naming in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D152203
2022-07-20 00:48:22 +00:00
Ting-Yu Lin 991f16122f Bug 1780264 Part 1 - Remove ReflowInput::mStyleVisibility. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D152202
2022-07-20 00:48:21 +00:00
Florian Quèze ab3e31f024 Bug 1742797 - Fix intermittent test failures, r=hiro.
Depends on D151481

Differential Revision: https://phabricator.services.mozilla.com/D151480
2022-07-19 19:56:22 +00:00
Hiroyuki Ikezoe 131d95ccf5 Bug 1742797 - Discard WebRender resources when popup hides. r=Gijs,emilio
The browser test in this change was originally written by Gijs.

Differential Revision: https://phabricator.services.mozilla.com/D134444
2022-07-19 19:56:21 +00:00
Bogdan Szekely 232b44e383 Backed out changeset dc6dc0fd83e9 (bug 1427635) for causing geckoview-junit failures. CLOSED TREE 2022-07-19 16:22:31 +03:00
Emilio Cobos Álvarez 5aa53ad4fb Bug 1427635: Fix DoCompareTreePosition frame tree version with null aCommonAncestor. r=xidorn
It doesn't fill the ancestors of the first frame if aCommonAncestor is
null, which means that we get garbage afterwards.

MANUAL PUSH: Relanding of old patch.
2022-07-19 12:05:09 +02:00
Martin Robinson 2fbf04543f Bug 1777478 - Animations in content hidden by `content-visibility` should not fire events or resolve promises r=hiro
Keep a separate list of animations in the timeline that are hidden by
content visibility. This allows the DocumentTimeline to disconnect from
the refresh driver when all animations are hidden and prevents ticking
hidden animations in general.

Differential Revision: https://phabricator.services.mozilla.com/D150764
2022-07-19 09:57:21 +00:00
Emilio Cobos Álvarez 3b6039fcf1 Bug 1780075 - Remove outline-style: auto pref. r=layout-reviewers,dholbert
All platforms support it, so just assert instead.

Differential Revision: https://phabricator.services.mozilla.com/D152109
2022-07-19 09:25:11 +00:00
Butkovits Atila 398eded3f1 Backed out 4 changesets (bug 1742797, bug 1748808) for causing crashes at mozilla::layers::APZCTreeManagerParent::RecvUpdateZoomConstraints.
Backed out changeset 23f2a369a5a7 (bug 1748808)
Backed out changeset 5b0edd03f698 (bug 1742797)
Backed out changeset 8ed69c2c1d49 (bug 1742797)
Backed out changeset 18e11e7ea9d0 (bug 1742797)
2022-07-19 08:12:04 +03:00
Jeff Muizelaar 5cbce534c4 Bug 1779602 - Remove nsImageGeometryMixin. r=tnikkel
nsImageGeometryMixin was disabled in bug 1776198. No problems have shown up
so let's get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D151864
2022-07-18 21:20:50 +00:00
Florian Quèze b00890b2e8 Bug 1742797 - Fix intermittent test failures, r=hiro.
Differential Revision: https://phabricator.services.mozilla.com/D151480
2022-07-18 18:01:52 +00:00
Hiroyuki Ikezoe 2468744569 Bug 1742797 - Discard WebRender resources when popup hides. r=Gijs,emilio
The browser test in this change was originally written by Gijs.

Differential Revision: https://phabricator.services.mozilla.com/D134444
2022-07-18 18:01:51 +00:00
Emilio Cobos Álvarez 53e6d30937 Bug 1777982 - Remove invalid leftover assert. DONTBUILD
MANUAL PUSH: Remove assert that doesn't hold if aliases are disabled
but I forgot to remove from the initial patch.
2022-07-18 19:41:23 +02:00
Dan Robertson 01442549da Bug 1777324 - Move reftest README to firefox source documentation. r=tnikkel
Move the README for the layout reftests to the firefox source documentation.

Differential Revision: https://phabricator.services.mozilla.com/D150630
2022-07-15 21:40:22 +00:00
Thomas Wisniewski e0cfd50914 Bug 1762462 - Make tests in layout/base/tests/ reflect Always Partitioning Storage; r=smaug
Depends on D148058

Differential Revision: https://phabricator.services.mozilla.com/D148059
2022-07-15 13:26:21 +00:00
Andi-Bogdan Postelnicu 806f346204 Bug 1519636 - Reformat recent changes to the Google coding style. r=marco
Updated with clang-format version 14.0.5 (taskcluster-ThuAJINyTKOILKeakawQZw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D151908
2022-07-15 08:27:50 +00:00
Hiroyuki Ikezoe f01e673d43 Bug 1774537 - Skip re-snapping if there's any async scroll is running. r=botond
Depends on D149497

Differential Revision: https://phabricator.services.mozilla.com/D150929
2022-07-15 06:47:38 +00:00
Hiroyuki Ikezoe da8dbbfc2f Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-15 06:47:37 +00:00
Hiroyuki Ikezoe 34ca1c470f Bug 1774537 - Propagate last snap target id(s) from APZ to the content. r=botond
Depends on D149495

Differential Revision: https://phabricator.services.mozilla.com/D149496
2022-07-15 06:47:37 +00:00
Emily McDonough 0a018773d2 Bug 1779496 - Make more of nsCSSProps constexpr r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151768
2022-07-15 03:12:37 +00:00
criss c2ed3856fd Merge mozilla-central to autoland on a CLOSED TREE 2022-07-15 00:46:48 +03:00
criss 5ea9694f10 Merge autoland to mozilla-central. a=merge 2022-07-15 00:43:42 +03:00
Cristian Tuns 2f5fe88da3 Backed out 19 changesets (bug 1758745, bug 1758740, bug 1762462, bug 1779603) for causing mochitest failures on browser_partitionedConsoleMessage.js CLOSED TREE
Backed out changeset e3c8cd6f00b6 (bug 1779603)
Backed out changeset 4e46a6f209b4 (bug 1762462)
Backed out changeset 00c0c6314640 (bug 1762462)
Backed out changeset 8f11221f859f (bug 1762462)
Backed out changeset ffbf90e3bbab (bug 1762462)
Backed out changeset 0c760428dfec (bug 1762462)
Backed out changeset 7c99293cc8f9 (bug 1762462)
Backed out changeset 92bd237a95e1 (bug 1762462)
Backed out changeset 74539a3cc7fc (bug 1762462)
Backed out changeset acf08a10c6fb (bug 1762462)
Backed out changeset 0cf191a7739f (bug 1762462)
Backed out changeset 030c276d6669 (bug 1762462)
Backed out changeset a88a099c684d (bug 1762462)
Backed out changeset cbd69786a24b (bug 1762462)
Backed out changeset e5e0655206a8 (bug 1762462)
Backed out changeset 707f9dfed501 (bug 1762462)
Backed out changeset 619e4bb01a81 (bug 1762462)
Backed out changeset 02b7641683b0 (bug 1758745)
Backed out changeset a2f110442038 (bug 1758740)
2022-07-14 17:26:17 -04:00
Andrew Osmond 3368585195 Bug 1779570. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D151857
2022-07-14 20:17:10 +00:00
Andrew Osmond a9049b5248 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 19:53:09 +00:00
Cristian Tuns 42e074c74e Backed out changeset 429187de34ff (bug 1779269) for causing geckoview-junit failures CLOSED TREE 2022-07-14 16:04:59 -04:00
Thomas Wisniewski 1573bf3cdb Bug 1762462 - Make tests in layout/base/tests/ reflect Always Partitioning Storage; r=smaug
Depends on D148058

Differential Revision: https://phabricator.services.mozilla.com/D148059
2022-07-14 19:26:30 +00:00
criss ba063e13c6 Backed out changeset e4cd98b5984d (bug 1779519) for causing build bustages. CLOSED TREE 2022-07-14 22:06:53 +03:00
Botond Ballo 69e8a22280 Bug 1771822 - Follow-up simplifications to DisplayPortUtils functions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D151798
2022-07-14 18:39:34 +00:00
Botond Ballo 5a6eae75b5 Bug 1771822 - Remove the layers.low-precision-{buffer,resolution} prefs. r=tnikkel
These are no longer used.

Depends on D151796

Differential Revision: https://phabricator.services.mozilla.com/D151797
2022-07-14 18:39:33 +00:00
Andrew Osmond 9f767ee84a Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 18:35:49 +00:00
Ting-Yu Lin b331e396e5 Bug 1779269 - Fix AccessibleCaret's display on disabled form controls. r=emilio,webdriver-reviewers,whimboo
A disabled form controls cannot be focused, and its frame selection is different
from the one for not-editable content. Use GetLastFocusedFrameSelection() (added
in Bug 253870) to get the correct frame selection that is visible to the user.

Add some basic tests for disabled <textarea> such as long pressing to select,
dragging, etc. They should behave the same as normal <textarea>.

Differential Revision: https://phabricator.services.mozilla.com/D151800
2022-07-14 17:29:34 +00:00
Kagami Sascha Rosylight bb679fa417 Bug 1769290 - Part 24: Apply mozilla-js-handle-rooted-typedef against layout,security,storage,tools r=andi
Differential Revision: https://phabricator.services.mozilla.com/D151791
2022-07-14 17:00:24 +00:00
Emilio Cobos Álvarez 4414d74633 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.

Mostly automatic via:

  rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'

With trivial build fixes.

Not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151846
2022-07-14 16:03:25 +00:00
Emilio Cobos Álvarez b72d809b50 Bug 1779592 - Fix a bug in DrawImageInternal uncovered by bug 1779457. r=aosmond
We want to ensure the right viewport is set.

Differential Revision: https://phabricator.services.mozilla.com/D151840
2022-07-14 15:40:22 +00:00
Robert Longson 6d40e0c47b Bug 1531888 - ignore invalid clip-path references when hit testing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151811
2022-07-14 15:39:27 +00:00
Jeff Muizelaar d4b42e2000 Bug 1779580 - Use a nsRect instead of region for the visible area. r=mstange
The region could never be more complicated than a single rect anyways.

Differential Revision: https://phabricator.services.mozilla.com/D151831
2022-07-14 15:25:13 +00:00
Emilio Cobos Álvarez c2e8559d66 Bug 1779457 - Annotate some tests as failing when using drawSnapshot while I investigate.
MANUAL PUSH: Orange fix CLOSED TREE
2022-07-14 16:44:50 +02:00
Emilio Cobos Álvarez 5e23ef2ae0 Bug 1778983 - Remove useless ProcessPendingRestyles call. r=boris
That was about XBL constructors being able to run script. But XBL is
gone and this should just be wasted work.

I want to land this in preparation for container queries substantially
changing the model here.

Differential Revision: https://phabricator.services.mozilla.com/D151495
2022-07-14 12:47:59 +00:00
Emilio Cobos Álvarez 575e1efaa1 Bug 1778983 - Ensure we cancel transitions without the need of an extra flush. r=boris
When something switches to display: none, right now we rely on
StopAnimationsForElementsWithoutFrames(), which posts a restyle and the
previous ProcessPendingRestyles call was papering over it.

For other elements in the display none subtree it doesn't matter,
because we don't keep their styles around, but for the display: none
element themselves we do need to update transitions on time.

We could, possibly more generally, remove
StopAnimationsForElementsWithoutFrames() altogether and cancel
animations when we clear style data, perhaps... But that's probably
worth a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D151600
2022-07-14 12:45:14 +00:00
Emilio Cobos Álvarez 64e4056cb8 Bug 1779457 - Make prefers-color-scheme of SVG images match embedder on content too. r=aosmond
As per discussion in https://github.com/w3c/csswg-drafts/issues/7213.

Differential Revision: https://phabricator.services.mozilla.com/D151751
2022-07-14 10:04:38 +00:00
Bogdan Szekely a8bd595d93 Backed out 4 changesets (bug 1774537) for causing mochitest failures on test_group_wheelevents.html CLOSED TREE
Backed out changeset 8a52eb5b9043 (bug 1774537)
Backed out changeset 5fb8ccdcbfea (bug 1774537)
Backed out changeset 44f1a68c16f4 (bug 1774537)
Backed out changeset 1f32db09b9a8 (bug 1774537)
2022-07-14 10:23:31 +03:00
Bogdan Szekely 79c89f90f4 Backed out 4 changesets (bug 1774537) for causing mochitest failures on test_group_wheelevents.html CLOSED TREE
Backed out changeset 8a52eb5b9043 (bug 1774537)
Backed out changeset 5fb8ccdcbfea (bug 1774537)
Backed out changeset 44f1a68c16f4 (bug 1774537)
Backed out changeset 1f32db09b9a8 (bug 1774537)
2022-07-14 10:23:31 +03:00
Hiroyuki Ikezoe 251e2e49ef Bug 1774537 - Skip re-snapping if there's any async scroll is running. r=botond
Depends on D149497

Differential Revision: https://phabricator.services.mozilla.com/D150929
2022-07-14 02:19:12 +00:00
Hiroyuki Ikezoe b300a9f04f Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-14 02:19:12 +00:00
Hiroyuki Ikezoe 802ddc1ef6 Bug 1774537 - Propagate last snap target id(s) from APZ to the content. r=botond
Depends on D149495

Differential Revision: https://phabricator.services.mozilla.com/D149496
2022-07-14 02:19:11 +00:00
Norisz Fay 388468729f Backed out 18 changesets (bug 1762462, bug 1758745, bug 1758740) for causing mochitest failures on test_storage_copied.html
Backed out changeset a27ae15872a9 (bug 1762462)
Backed out changeset b7d979a36324 (bug 1762462)
Backed out changeset 6249efe40513 (bug 1762462)
Backed out changeset 1e81ed3014a0 (bug 1762462)
Backed out changeset 92cec5f5db1c (bug 1762462)
Backed out changeset fa3c45b4de5c (bug 1762462)
Backed out changeset 64df67f43ad7 (bug 1762462)
Backed out changeset d66dd76ec2b6 (bug 1762462)
Backed out changeset 4f8aaba02a03 (bug 1762462)
Backed out changeset 81eb7d60dea9 (bug 1762462)
Backed out changeset 01504f5f818a (bug 1762462)
Backed out changeset 2615b571c9ba (bug 1762462)
Backed out changeset 73ed8be3f117 (bug 1762462)
Backed out changeset edb94ba8ec59 (bug 1762462)
Backed out changeset 21dd6fdc672e (bug 1762462)
Backed out changeset 31a70f9ad879 (bug 1762462)
Backed out changeset 5261ee5a2368 (bug 1758745)
Backed out changeset ad6ffd85ef3c (bug 1758740)
2022-07-14 03:16:08 +03:00
Thomas Wisniewski ce444ad742 Bug 1762462 - Make tests in layout/base/tests/ reflect Always Partitioning Storage; r=smaug
Depends on D148058

Differential Revision: https://phabricator.services.mozilla.com/D148059
2022-07-13 22:45:02 +00:00
Emilio Cobos Álvarez 18834df73a Bug 1773891 - Remove duplicate tooltip styling. r=dao
I don't think why we have a mobile stylesheet (IIUC Android doesn't have
tooltips...), but I noticed that most tooltip styles are the same and it
should be doable to just unify them in xul.css.

We can't keep the platform-specific bits on their own stylesheet because
it loads _before_ xul.css, and thus overrides wouldn't quite do.

Depends on D151640

Differential Revision: https://phabricator.services.mozilla.com/D151641
2022-07-12 23:00:46 +00:00
Emilio Cobos Álvarez 4910266cb7 Bug 1777982 - Some minor cleanups in nsCSSProps.h. r=jwatt
Drive-by, but might as well remove this useless namespacing.

Depends on D151594

Differential Revision: https://phabricator.services.mozilla.com/D151595
2022-07-12 22:22:18 +00:00
Emilio Cobos Álvarez 7c3737dc89 Bug 1777982 - Propagate flags from original property to aliases. r=AlaskanEmily
Even we don't have internal aliases right now (and that seems a bit
silly) we do have pref-gated aliases. An alias ID passed to IsEnabled
with the wrong EnabledState would misbehave, assert, and crash.

Though we don't have such callers in the tree because InspectorUtils
passes only arguments that make us not look at the flags, it seems more
reliable this way.

Differential Revision: https://phabricator.services.mozilla.com/D151594
2022-07-12 22:22:17 +00:00
Boris Chiou ccc7ef067d Bug 1293490 - Part 3: Support animation-composition in keyframe at rules. r=emilio
So we can specify the keyframe-specific composite operation. However,
these is a spec issue about the default composite for CSS Animations:
https://github.com/w3c/csswg-drafts/issues/7476.

I choose to use auto as the default composite for missing keyframes to match
the definition in web-animations-1 because I think this makes more sense:
> If the keyframe-specific composite operation for a keyframe is not set, the
> composite operation specified for the keyframe effect as a whole is used for
> values specified in that keyframe.

Differential Revision: https://phabricator.services.mozilla.com/D150808
2022-07-12 19:02:04 +00:00
Boris Chiou 89b362daff Bug 1293490 - Part 2: Hook animation-composition to CSS animations. r=emilio
Let nsAnimationManager takes animation-composition into account.

Note: This doesn't support animation-composition on each keyframes.

Differential Revision: https://phabricator.services.mozilla.com/D150807
2022-07-12 19:02:04 +00:00
Boris Chiou 41a30d913e Bug 1293490 - Part 1: Implement CSS animation-composition longhand in style system. r=emilio
This patch introduces animation-composition longhand but we don't
accept it in @keyframe rule for now. I will support this for @keyframe
in the patch series.

Besides, the shorthand of animation doesn't include animation-composition.
The spec issue is: https://github.com/w3c/csswg-drafts/issues/6946.
We could fix the shorthand once this spec issue gets updated.

Differential Revision: https://phabricator.services.mozilla.com/D150299
2022-07-12 19:02:03 +00:00
Csoregi Natalia c97011ab89 Backed out 4 changesets (bug 1742797) for causing failures on /browser_ext_getViews.js. CLOSED TREE
Backed out changeset c48ff146a33d (bug 1742797)
Backed out changeset a692ca1d8401 (bug 1742797)
Backed out changeset cfc1f440fb6d (bug 1742797)
Backed out changeset 88f60761e884 (bug 1742797)
2022-07-13 01:02:54 +03:00
Florian Quèze 330fea72a1 Bug 1742797 - Address review comment and ignore spurious popuphiding events on Linux r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D151622
2022-07-12 15:17:21 +00:00
Florian Quèze b34ac7abcf Bug 1742797 - Fix intermittent test failures, r=hiro.
Differential Revision: https://phabricator.services.mozilla.com/D151480
2022-07-12 14:46:53 +00:00
Hiroyuki Ikezoe 82e797537b Bug 1742797 - Discard WebRender resources when popup hides. r=Gijs,emilio
The browser test in this change was originally written by Gijs.

Differential Revision: https://phabricator.services.mozilla.com/D134444
2022-07-12 14:46:52 +00:00
Cristian Tuns b39b0d3b9d Backed out changeset ef564358a7e8 (bug 1778983) for causing wpt failures in CSSTransition-canceling.tentative.html CLOSED TREE 2022-07-12 07:48:51 -04:00
Emilio Cobos Álvarez 482d8239cb Bug 1777135 - Part 2: Improve nsNativeTheme::IsDarkBackground by accounting for default bg color. r=dholbert
Since callers want just an effective color to compute whether it's dark,
we simplify the API a bit too.

This makes sure we find the dark background in plain text documents.

Differential Revision: https://phabricator.services.mozilla.com/D151018
2022-07-12 09:51:47 +00:00
Emilio Cobos Álvarez b8d58c68d0 Bug 1777135 - Part 1: make nsPresContext::DefaultBackgroundColor account for default-background color-scheme. r=dholbert
And remove one unused caller.

This might change behavior of some selection contrast checks and backplating
which will potentially use the right background-color after this patch. The
next patch ensures this is also accounted for for scrollbars.

Unfortunately selection contrast checks are non-trivial to test because we only
do the contrast check with system colors, and we'd need a default selection
color close to the highlight color to do this.

Differential Revision: https://phabricator.services.mozilla.com/D151017
2022-07-12 09:51:47 +00:00
Emilio Cobos Álvarez 1b27bde4b3 Bug 1778718 - Make filter/backdrop-filter wrapping work when ignoring a scroll frame. r=tnikkel
Factor the code to build the top layer and wrapping for filters into a
common function.

Differential Revision: https://phabricator.services.mozilla.com/D151475
2022-07-12 09:46:01 +00:00
Emilio Cobos Álvarez bc6e066129 Bug 1778718 - Make filters on the root work when using fallback drawing. r=tnikkel
This code-path will be hit with the next patch.

Depends on D151473

Differential Revision: https://phabricator.services.mozilla.com/D151474
2022-07-12 09:46:01 +00:00
Emilio Cobos Álvarez c4ef579d53 Bug 1778983 - Remove useless ProcessPendingRestyles call. r=boris
That was about XBL constructors being able to run script. But XBL is
gone and this should just be wasted work.

I want to land this in preparation for container queries substantially
changing the model here.

Differential Revision: https://phabricator.services.mozilla.com/D151495
2022-07-12 09:45:39 +00:00
Botond Ballo fea611dcac Bug 1771822 - Do not explicitly set apz.allow_zooming in mochitests. r=tnikkel
We can't do likewise for reftests and web platform tests because
those test suites disable apz.allow_zooming by default on android.

Differential Revision: https://phabricator.services.mozilla.com/D151576
2022-07-12 06:49:11 +00:00
criss a2b0dea609 Backed out 4 changesets (bug 1774537) for causing mochitest failures on test_group_scroll_snap.html
Backed out changeset 47bb66885515 (bug 1774537)
Backed out changeset 9bb536d111a7 (bug 1774537)
Backed out changeset e3ab56189fa0 (bug 1774537)
Backed out changeset 61b3c13db9ea (bug 1774537)
2022-07-12 08:59:19 +03:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Hiroyuki Ikezoe fc6888c9f9 Bug 1774537 - Skip re-snapping if there's any async scroll is running. r=botond
Depends on D149497

Differential Revision: https://phabricator.services.mozilla.com/D150929
2022-07-12 03:01:14 +00:00
Hiroyuki Ikezoe db52d38a69 Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-12 03:01:14 +00:00
Hiroyuki Ikezoe 88f14ab50f Bug 1774537 - Propagate last snap target id(s) from APZ to the content. r=botond
Depends on D149495

Differential Revision: https://phabricator.services.mozilla.com/D149496
2022-07-12 03:01:13 +00:00
Kelsey Gilbert 925ea31507 Bug 1778855 - Use e.g. gfxEnv::MOZ_GL_DEBUG() instead of gfxEnv::GlDebug(). r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D151547
2022-07-11 23:59:53 +00:00
Andrew Osmond 4874cd6687 Bug 1779098 - Ensure we check FontFaceSetDocumentImpl::mDocument for nullptr. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151557
2022-07-11 23:24:47 +00:00
Andrew Osmond e68f562f8d Bug 1779096 - Clear FontFaceSetImpl::mOwner when destroyed. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151554
2022-07-11 23:24:36 +00:00
Emilio Cobos Álvarez 325be139ff Bug 1778718 - Clean-up some scroll frame DL building code. r=tnikkel
This doesn't change behavior but makes the next patch simpler, and makes
the ignore-scrollframe and non-ignore-scrollframe code-paths match.

Differential Revision: https://phabricator.services.mozilla.com/D151473
2022-07-11 20:18:35 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Emilio Cobos Álvarez f912244bff Bug 1778965 - Clean-up a bit alt text code. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D151482
2022-07-11 17:29:31 +00:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Narcis Beleuzu 2d9fc73670 Backed out changeset 1861b83150d9 (bug 1774697) for wpt failure on user-select-on-input-and-contenteditable.html CLOSED TREE 2022-07-11 17:15:34 +03:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Tiaan Louw 06b74d6d77 Bug 1774697 - Ignore the computed "user-select" on editable elements r=dholbert
Check for a text input or editable host first, because they always set
the used style to 'contain' (The spec actually requires 'contain', but
we implement the 'contain' behavior as a flavor of 'text')

https://drafts.csswg.org/css-ui-4/#content-selection

Differential Revision: https://phabricator.services.mozilla.com/D149731
2022-07-11 11:45:22 +00:00
Hiroyuki Ikezoe 8037b62525 Bug 1768746 - Resolve scroll-snap-align with the targe element's writing mode if the size is larger than the snapport. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D151096
2022-07-10 23:38:27 +00:00
Emilio Cobos Álvarez a4adec1fe6 Bug 1778834 - Fix a typo in AccentColor handling. r=dholbert
If we're using the theme accent then we should _not_ use the standin.

Differential Revision: https://phabricator.services.mozilla.com/D151442
2022-07-10 18:09:57 +00:00
David Shin d360f1fee3 Bug 1766041: Part 3: Migrate C++ `BeforeFlag` to that of Rust's. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D150567
2022-07-09 17:33:58 +00:00
Andrew Osmond ccb3289c49 Bug 1778608 - Fix FontFaceSetWorkerImpl destruction off main thread. r=emilio
The loaders need to be destroyed on the main thread. Assertions for
gfxUserFontSet and gfxFontFamily need to be updated for workers.

Depends on D151342

Differential Revision: https://phabricator.services.mozilla.com/D151343
2022-07-08 17:34:46 +00:00
Andrew Osmond fc4e22dac5 Bug 1778610 - Ensure we support flushing user fonts for FontFaceSetWorkerImpl. r=emilio
This is necessary for when we want to draw text with Canvas 2D and a
user font. This ensures the necessary font families are populated prior
to processing the text run.

Differential Revision: https://phabricator.services.mozilla.com/D151342
2022-07-08 17:34:45 +00:00
smolnar 5141a24432 Backed out 5 changesets (bug 1777287, bug 1778610, bug 1778681, bug 1778608, bug 1778694) for causing assertion failures in mozilla/ServoUtils.h CLOSED TREE
Backed out changeset 0aef1644a90e (bug 1777287)
Backed out changeset 53145a539af3 (bug 1778694)
Backed out changeset d2ec7b6792ec (bug 1778681)
Backed out changeset 921a5cd15b42 (bug 1778608)
Backed out changeset d1b85405ea07 (bug 1778610)
2022-07-08 17:17:00 +03:00
Andrew Osmond 5865d04029 Bug 1778608 - Fix FontFaceSetWorkerImpl destruction off main thread. r=emilio
The loaders need to be destroyed on the main thread. Assertions for
gfxUserFontSet and gfxFontFamily need to be updated for workers.

Depends on D151342

Differential Revision: https://phabricator.services.mozilla.com/D151343
2022-07-08 13:24:35 +00:00
Andrew Osmond f61d0a1634 Bug 1778610 - Ensure we support flushing user fonts for FontFaceSetWorkerImpl. r=emilio
This is necessary for when we want to draw text with Canvas 2D and a
user font. This ensures the necessary font families are populated prior
to processing the text run.

Differential Revision: https://phabricator.services.mozilla.com/D151342
2022-07-08 13:24:34 +00:00
Emilio Cobos Álvarez f6e2a99fb9 Bug 1778695 - Account for color-mix pref in test_bug877690.
Differential Revision: https://phabricator.services.mozilla.com/D151370
2022-07-08 12:34:55 +00:00
Csoregi Natalia 33193d6158 Backed out 5 changesets (bug 1766041) for gtest failures on APZCBasicTester. CLOSED TREE
Backed out changeset 3b0cd4ee7d1e (bug 1766041)
Backed out changeset 5de0ed4fd59b (bug 1766041)
Backed out changeset cc7ffb683e8a (bug 1766041)
Backed out changeset ce5a895e7a06 (bug 1766041)
Backed out changeset 315578c436ca (bug 1766041)
2022-07-08 03:12:42 +03:00
David Shin 07b055639d Bug 1766041: Part 3: Migrate C++ `BeforeFlag` to that of Rust's. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D150567
2022-07-07 22:52:58 +00:00
Andrew Osmond c5989fee52 Bug 1072107 - Part 9. Expose FontFaceSet on workers. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149254
2022-07-07 21:24:11 +00:00
Andrew Osmond 15c3439858 Bug 1072107 - Part 8. Provide worker variant of FontFaceSetImpl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149252
2022-07-07 21:24:11 +00:00
Andrew Osmond ae9f0f107d Bug 1072107 - Part 7. Make FontFaceLoader check for associated document. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150542
2022-07-07 21:24:10 +00:00
Andrew Osmond e28f840226 Bug 1072107 - Part 6. Dispatch font calls and callbacks as necessary. r=emilio
Also update thread assertions.

Differential Revision: https://phabricator.services.mozilla.com/D149253
2022-07-07 21:24:10 +00:00
Andrew Osmond 3a9bb7fc8e Bug 1072107 - Part 5. Skip logging to the console for workers right now r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149246
2022-07-07 21:24:10 +00:00
Andrew Osmond 05d24c06de Bug 1072107 - Part 4. Rework gfxFontSrcPrincipal creation to never be lazy. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150541
2022-07-07 21:24:09 +00:00
Andrew Osmond e24677ee1b Bug 1072107 - Part 3. Expose GetURLExtraData on FontFaceSetImpl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150540
2022-07-07 21:24:09 +00:00
Andrew Osmond 508ecd766a Bug 1072107 - Part 2. Expose FontFaceSet on nsIGlobalObject. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149245
2022-07-07 21:24:08 +00:00
Andrew Osmond 47426f9e36 Bug 1072107 - Part 1. Expose method to load user fonts from workers. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149244
2022-07-07 21:24:08 +00:00
Ting-Yu Lin dc7ac912b3 Bug 1323517 Part 7 - Fix the placement of an orthogonal float with an auto block-size. r=jfkthame
The old code in AddFloat() used to call nsBlockFrame::ComputeFloatISize() to
compute a float's inline-size, compare it with current line's available
inline-size, and determine whether FlowAndPlaceFloat() should be called.
However, it doesn't handle an orthogonal float with an auto block-size.

Luckily, FlowAndPlaceFloat() already has logic dealing with orthogonal
floats (bug 1141867), so this patch defers the decision to place a float below
the current line until the float's margin inline-size is computed in
FlowAndPlaceFloat().

Differential Revision: https://phabricator.services.mozilla.com/D151209
2022-07-07 19:01:56 +00:00
Ting-Yu Lin b9cb8817f5 Bug 1323517 Part 6 - Change FlowAndPlaceFloat()'s return value to a tri-state enum. r=jfkthame
This patch is a preparation for the next part, and doesn't change the behavior
yet.

FlowAndPlaceFloat() is used to return true and false. This patch changes its
return value `true` to `PlaceFloatResult::Placed` and `false` to
`PlaceFloatResult::ShouldPlaceInNextContinuation`.

In the next part, we'll move the logic dealing with "below the current line
floats" into FlowAndPlaceFloat(), and make it return
`PlaceFloatResult::ShouldPlaceBelowCurrentLine`.

Differential Revision: https://phabricator.services.mozilla.com/D151208
2022-07-07 19:01:56 +00:00
Ting-Yu Lin 48a466967c Bug 1323517 Part 5 - Improve the available size computation for reflowing a float. r=jfkthame
First of all, `nsBlockFrame::AdjustFloatAvailableSpace()` is misleading. It
doesn't adjust the argument `aFloatAvailableSpace` at all, nor does it use any
fields in nsBlockFrame. It simply returns the available space in the parent
block's content area. Thus, I move it into BlockReflowState, and have it return
the available size rather than a rect because a size is sufficient for reflowing
a float.

Also, nsBlockFrame::ReflowFloat() only cares about the available size, but not
the position of the available space, so it is sufficient to pass a LogicalSize
computed by the new method ComputeAvailableSizeForFloat().

In FlowAndPlaceFloat(), there is a loop searching for a wide enough band to
place the float. We don't need to adjust availSize every time mBCoord is changed
in the loop. We can just call ComputeAvailableSizeForFloat() to get a new
available size before reflowing the float in the `!earlyFloatReflow` branch.

This patch shouldn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151207
2022-07-07 19:01:56 +00:00
Ting-Yu Lin 70e03e7368 Bug 1323517 Part 4 - Pass a dummy rect into ReflowBlock() when reflowing a float. r=jfkthame
This is a preparation for the next part.

Differential Revision: https://phabricator.services.mozilla.com/D151206
2022-07-07 19:01:55 +00:00
Ting-Yu Lin 9727d0b740 Bug 1323517 Part 3 - Rename GetLowestFloatTop to LowestFloatBStart. r=jfkthame
Both the method's documentation and implementation already use logical
coordinate.

Differential Revision: https://phabricator.services.mozilla.com/D151205
2022-07-07 19:01:55 +00:00
Ting-Yu Lin 0b0c4753f9 Bug 1323517 Part 2 - Remove float debug log that requires manual #define. r=jfkthame
These are small printf statements that are not build by CI, which increase
maintenance burden.

Differential Revision: https://phabricator.services.mozilla.com/D151204
2022-07-07 19:01:54 +00:00
Ting-Yu Lin ed00bfdbb9 Bug 1323517 Part 1 - Remove a duplicate assertion, and assert a fresh reflow status in ReflowFloat(). r=jfkthame
In FlowAndPlaceFloat(), condense two identical assertions about float frame
parent into one.

FlowAndPlaceFloat() calls ReflowFloat() only once, either an early reflow (when
`earlyFloatReflow` is `true`) or a late reflow (when `earlyFloatReflow` is
`false`), so the reflow status is always fresh.

Differential Revision: https://phabricator.services.mozilla.com/D151203
2022-07-07 19:01:54 +00:00
Emilio Cobos Álvarez 2c2f20586e Bug 1778396 - Add color-mix to DevTools autocomplete. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D151180
2022-07-07 10:29:59 +00:00
James Graham b57989d24a Bug 1773696 - Make wheel event IPC depend on test_events_async_enabled, r=smaug
The `widget->DispatchInputEvent` codepath only works in gecko CI
configurations, so to allow this to be used for e.g. WebDriver
implement a path that doesn't go via the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D150632
2022-07-06 19:55:12 +00:00
Ting-Yu Lin 291489917d Bug 1778178 - Convert ReflowInput's available size write-accessors to setters. r=layout-reviewers,jfkthame
This patch rewrites some callers, but they shouldn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151042
2022-07-06 17:39:57 +00:00
Robert Longson 18bbb02fab Bug 1778298 - gradient href should ignore base tag if local r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151130
2022-07-06 17:12:23 +00:00
Julien Wajsberg f2cc927a5c Bug 1777473 - Rename the frame label for PresShell::Destroy and expose to javascript developers r=emilio
The existing frame label was reusing the function name, but we already
have it when using native stacks. Renaming it to a more understandable
name should make it easier for our javascript developers users without
impairing gecko developers.

Differential Revision: https://phabricator.services.mozilla.com/D150976
2022-07-06 14:02:05 +00:00
Julien Wajsberg 0a8f408133 Bug 1777473 - Expose some more layout frame labels to javascript developers r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150757
2022-07-06 14:02:04 +00:00
Ziran Sun 435c380565 Bug 1778062 - Add support for parsing the `contain-intrinsic-size` property from the CSS-sizing specification. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151001
2022-07-06 11:47:51 +00:00
Mirko Brodesser 0225cd5e0d Bug 1778286: declare `aEvent` of `nsIFrame::GetContentForEvent` `const`. r=emilio
Simplifies reasoning about it.

Differential Revision: https://phabricator.services.mozilla.com/D151118
2022-07-06 10:22:30 +00:00
Robert Longson 4bcc81eaf7 Bug 1777671 - Account for glyph orientations when returning rotation of character r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D150858
2022-07-06 06:01:22 +00:00
Ting-Yu Lin 0cf9b03af3 Bug 1777627 Part 3 - Improve BlockReflowState::mBorderPadding's documentation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D150833
2022-07-05 23:43:52 +00:00
Ting-Yu Lin 8197bd4fb0 Bug 1777627 Part 2 - Remove aIsAdjacentWithBStart argument on nsBlockReflowContext::ReflowBlock(). r=emilio
aIsAdjacentWithBStart is used to clear the mIsTopOfPage bit for the ReflowInput
argument `aFrameRI`. However, ReflowBlock() already has aState argument to query
IsAdjacentWithBStart(), so there's no need for aIsAdjacentWithBStart argument.

Differential Revision: https://phabricator.services.mozilla.com/D150832
2022-07-05 23:43:52 +00:00
Ting-Yu Lin 6e0a1ac033 Bug 1777627 Part 1 - Improve BlockReflowState::IsAdjacentWithTop(). r=emilio
I rename and add a comment to the helper, and rewrite it to make it closer to
what the comment describes. The behavior is the same because `mBCoord` and
`mContentArea.BStart(wm)` are both initialized as `mBorderPadding.BStart(wm)`
[1].

Note `isAdjacentWithTop` local variable in ReflowFloat() is not changed because
it's going to be removed in the next patch.

[1] https://searchfox.org/mozilla-central/rev/2005e8d87ee045f19dac58e5bff32eff7d01bc9b/layout/generic/BlockReflowState.cpp#142

Differential Revision: https://phabricator.services.mozilla.com/D150831
2022-07-05 23:43:51 +00:00
Emilio Cobos Álvarez 9675f1e7bc Bug 1778199 - Simplify ServoCSSParser::GetURLExtraData. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D151056
2022-07-05 19:40:14 +00:00
Jonathan Kew 2f7b62ff61 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-05 07:55:56 +00:00
Dan Robertson 83ab6a777b Bug 1753019 - Adjust sticky position elements for the dynamic toolbar. r=botond
Use the animation id from the stacking context to find the hit-testing tree node
for hit tests of elements that are sticky positioned. Then use this hit-testing
tree node reference to apply APZ transforms if the sticky positioned element is
stuck to the root content.

Differential Revision: https://phabricator.services.mozilla.com/D150047
2022-07-04 18:14:59 +00:00
Dan Robertson affccc0acb Bug 1753019 - Use the animation id to identify hit testing metadata. r=botond,gw
## Summary

Pass the fixed position element animation id through webrender, returning the
the animation id in the hit-test result if the element is a fixed position
element. This animation id then can be used to lookup the relevant Hit-Testing
Tree Node, which can be used to find the fixed (or sticky) position side bits.

## Motivation

Sticky content can be currently stuck to the root content or not, based on the
scroll position. As a result, when hit testing sticky content, APZ needs both
the sticky position side bits and additional information to determine if the
element is currently stuck to the root content. This is needed to fix the
hit-testing of sticky position content when a APZ transform is being applied,
such as overscroll and hiding the dynamic toolbar.

## Implementation

The information needed to determine if a element is currently stuck to the root
content and the fixed/sticky position side bits is already stored in the
hit-testing tree node. Any hit test result should have a corresponding
hit-testing tree node entry. When a hit-test result contains a animation id and
a hit-testing tree node is found, we can store a pointer to this node and use
this to check the fixed/sticky position side bits. Something similar is already
done for hit test results when a scrollbar is hit.

Differential Revision: https://phabricator.services.mozilla.com/D148648
2022-07-04 18:14:58 +00:00
Csoregi Natalia da06c30fac Backed out changeset 1b43d3f38946 (bug 1777209) for causing reftest failures e.g. 602200-4.html. CLOSED TREE 2022-07-04 19:27:42 +03:00
Jonathan Kew c94cf2c2a7 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-04 14:08:16 +00:00
Neil Deakin 48036d9e36 Bug 1682621, the command event can supply an input source so provide it in PendingPopup::MouseInputSource so that it is available during the popupshowing event, r=tnikkel
This is to fix the test failure in browser_menu_touch.js.

Differential Revision: https://phabricator.services.mozilla.com/D150805
2022-07-03 09:44:39 +00:00
Neil Deakin 8b90152eab Bug 1682621, set input source to MOZ_SOURCE_KEYBOARD for command events on buttons, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149284
2022-07-03 09:44:38 +00:00
Bogdan Szekely ad5599bfa2 Backed out changeset 566b061ee95d (bug 1777209) for causing multiple failures CLOSED TREE 2022-07-01 18:16:27 +03:00
Joel Maher 537a5a0dc8 Bug 1777549 - remove remaining e10s conditions in manifest files. r=gbrown,extension-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D150820
2022-07-01 13:49:42 +00:00
Jonathan Kew 9af0d47ce3 Bug 1777209 - Use DrawSurface rather than FillRect to paint <canvas>, and don't use EXTEND_PAD when writing to PDF. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150601
2022-07-01 09:17:04 +00:00
Hiroyuki Ikezoe 22c71836b8 Bug 1777652 - Minor followup fixes for bug 1530253. r=botond
*

Differential Revision: https://phabricator.services.mozilla.com/D150848
2022-07-01 04:47:09 +00:00
Hiroyuki Ikezoe 5e0384e16d Bug 1530253 - Trigger resnap on scroll-snap-type or scroll-snap-align changes. r=emilio
Depends on D148863

Differential Revision: https://phabricator.services.mozilla.com/D148864
2022-07-01 01:35:33 +00:00
Hiroyuki Ikezoe 77f616cdaf Bug 1530253 - Trigger re-snap on reflows and in RecomputePosition. r=botond,emilio
The basic machinery to trigger re-snap is same as what scroll anchoring does,
queueing a triggering request and flush the queued requests after reflows
finished.

Depends on D148862

Differential Revision: https://phabricator.services.mozilla.com/D148863
2022-07-01 01:35:32 +00:00
Hiroyuki Ikezoe b3f8eec3ae Bug 1530253 - Implement the logic to choose the best snap point for re-snap. r=botond
Depends on D148861

Differential Revision: https://phabricator.services.mozilla.com/D148862
2022-07-01 01:35:32 +00:00
Hiroyuki Ikezoe 539894373e Bug 1530253 - Store the last snap target ids in the case of instant scroll oparations on the main-thread. r=botond,emilio
Depends on D148860

Differential Revision: https://phabricator.services.mozilla.com/D148861
2022-07-01 01:35:31 +00:00
Hiroyuki Ikezoe e61d931bb9 Bug 1530253 - Give the snap target ids to ScrollToWithOrigin. r=botond
The snap targt ids will be the last snap target ids we use for re-snapping.

Depends on D148859

Differential Revision: https://phabricator.services.mozilla.com/D148860
2022-07-01 01:35:31 +00:00
Hiroyuki Ikezoe 7369e5e99a Bug 1530253 - Add a wrapper struct representing various arguments for ScrollToWithOrigin. r=botond
Depends on D148858

Differential Revision: https://phabricator.services.mozilla.com/D148859
2022-07-01 01:35:30 +00:00
Hiroyuki Ikezoe 02531dcb21 Bug 1530253 - Replace internal ScrollFrameHelper::ScrollTo calls with ScrollFrameHelper::ScrollToWithOrigin. r=botond
There are some call sites of ScrollTo involving will a GetSnapPointForDestination
call. For re-snapping, we need to inform not only the snap point but also the
snap target id(s). To do it, in subsequent patches in this commit series, we will
change only ScrollToWithOrigin arguments rather than both ScrollTo and
ScrollToWithOrigin.

Depends on D148857

Differential Revision: https://phabricator.services.mozilla.com/D148858
2022-07-01 01:35:30 +00:00
Hiroyuki Ikezoe ce73d6bd80 Bug 1530253 - Make GetSnapPointForDestination return the last snapped target id(s). r=botond
Depends on D148856

Differential Revision: https://phabricator.services.mozilla.com/D148857
2022-07-01 01:35:30 +00:00
Hiroyuki Ikezoe e176812c3d Bug 1530253 - Assign an id to each scroll snap target for tracking the last snapped element. r=botond,emilio
Depends on D148855

Differential Revision: https://phabricator.services.mozilla.com/D148856
2022-07-01 01:35:29 +00:00
Hiroyuki Ikezoe 76e0bb9d9b Bug 1530253 - Introduce a new struct wrapping various varibles in CalcSnapPoints. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148855
2022-07-01 01:35:29 +00:00
Mike Conley 49438bb09a Bug 1774262 - Make search-textbox component easier to theme. r=mstriemer,desktop-theme-reviewers,dao,freddyb
This allows consumers of the component to override the clear search icon
and change the width of the focus outline.

Differential Revision: https://phabricator.services.mozilla.com/D149563
2022-06-30 22:07:01 +00:00
Cosmin Sabou 9e9ab757ca Backed out changeset 7451166dbe99 (bug 1774262) for causing a11y failures on test_txtctrl.xhtml. CLOSED TREE 2022-06-30 22:59:04 +03:00
Mike Conley 92b02b188f Bug 1774262 - Make search-textbox component easier to theme. r=mstriemer,desktop-theme-reviewers,dao,freddyb
This allows consumers of the component to override the clear search icon
and change the width of the focus outline.

Differential Revision: https://phabricator.services.mozilla.com/D149563
2022-06-30 19:11:29 +00:00
Sebastian Hengst 304227d5c2 Bug 1774376 - update file-to-Bugzilla-component mappings for Graphics team r=perftest-reviewers,gfx-reviewers,sparky,aosmond,nical
Components got reorganized in bug 1774288.

Differential Revision: https://phabricator.services.mozilla.com/D149375
2022-06-30 18:07:29 +00:00
smolnar b55439e310 Backed out changeset cfa4f2bc03ab (bug 1774262) for causing build bustages in searchfield-cancel.svg CLOSED TREE 2022-06-30 21:08:03 +03:00
Mike Conley 84745515a4 Bug 1774262 - Make search-textbox component easier to theme. r=mstriemer,desktop-theme-reviewers,dao,freddyb
This allows consumers of the component to override the clear search icon
and change the width of the focus outline.

Differential Revision: https://phabricator.services.mozilla.com/D149563
2022-06-30 17:38:17 +00:00
Jeff Muizelaar b54167f8b0 Bug 1777380 - Get PrintHitTestInfoStatsInternal building again. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D150675
2022-06-30 15:15:09 +00:00
Andrew Osmond 305c52258d Bug 1777301 - Fix crash in FontFaceSetDocumentImpl::Destroy due to clearing document reference too early. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D150684
2022-06-30 11:59:15 +00:00
Kris Maglione ce5a40d75a Bug 1773770: Part 1 - Remove defunct layout module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D149429
2022-06-30 09:12:15 +00:00
Nika Layzell 8f236832ff Bug 1758115 - Part 2: Streamline locking, initialization and shutdown for TimelineConsumers, r=smaug
The current implementation of TimelineConsumers contains some unnecessary
complexity due to how it is initialized as a singleton, and the need for it to
be initialized and used in a threadsafe way. This patch attempts to simplify it
by making all members static, and removing the need to explicitly observe
shutdown for cleanup.

In addition, this approach avoids the risk of the type being accessed from
off-main-thread during initialization or shutdown.

Depends on D150442

Differential Revision: https://phabricator.services.mozilla.com/D150443
2022-06-29 15:01:51 +00:00
Norisz Fay 75a2126b47 Backed out 2 changesets (bug 1682621) for causing bc failures on browser_menu_touch.js CLOSED TREE
Backed out changeset 88be5107a4a1 (bug 1682621)
Backed out changeset e32910a4948b (bug 1682621)
2022-06-29 19:36:51 +03:00
Neil Deakin 3ae34d7959 Bug 1682621, set input source to MOZ_SOURCE_KEYBOARD for command events on buttons, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D149284
2022-06-29 12:38:30 +00:00
Andrew Osmond 091dc0483c Bug 1771493 - Part 4. Split FontFaceSetDocumentImpl from FontFaceSetImpl. r=emilio
This patch splits document specific functionality from FontFaceSetImpl
into a new class FontFaceSetDocumentImpl. This will make it easier to
fork FontFaceSetImpl for workers.

Differential Revision: https://phabricator.services.mozilla.com/D147819
2022-06-28 21:47:01 +00:00
Andrew Osmond 7c2ad16f5c Bug 1771493 - Part 3. Abstract away buffer extraction from FontFaceImpl::InitializeSource. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147818
2022-06-28 21:47:00 +00:00
Andrew Osmond c9e5ad2c49 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 21:47:00 +00:00
Andrew Osmond e134d17fa0 Bug 1771493 - Part 1. Split FontFace(Set) into DOM facing and implementation classes. r=emilio
This patch aims to split the implementation details of FontFace(Set)
into FontFace(Set)Impl classes. The Impl variants have threadsafe
refcounting and are intended to be the basis for worker support for
FontFace(Set). We need threadsafe objects to pass around because parts
of the stack can only run on the main thread (network loading of font
data, graphics initialization of a font) even if the FontFace(Set)
itself lives on a DOM worker thread. Given the DOM facing objects are
cycle collected, we need additional indirection to support this use
case.

This patch should be a non-functional change.

Differential Revision: https://phabricator.services.mozilla.com/D147505
2022-06-28 21:46:59 +00:00