Commit Graph

21886 Commits

Author SHA1 Message Date
Simon Giesecke
40403773d0 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104202
2021-02-09 18:19:39 +00:00
Nika Layzell
63fd915bfb Bug 1689147 - Part 1: Add extended attribute syntax to IPDL, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103366
2021-02-09 16:50:21 +00:00
Timothy Nikkel
12fb741116 Bug 1691160. Make MaybeCreateDisplayPortInFirstScrollFrameEncountered consider a zero margin display a not having a display port so it sets one. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D104359
2021-02-09 01:41:00 +00:00
Botond Ballo
3fe9749ca2 Bug 1691572 - Rename CalculateRootCompositionSize() to CalculateBoundingCompositionSize(). r=tnikkel
Since bug 1650183, the value returned by this function is not
necessarily the composition size of the RCD-RSF, but may be
a smaller size suitable for bounding the composited size of
scroll frames in a given process.

Differential Revision: https://phabricator.services.mozilla.com/D104463
2021-02-08 23:31:53 +00:00
Daniel Holbert
d1c38c39fc Bug 1691286: Fix nsPrintSettingsWin::CopyFromNative to reliably encode the pages' orientation in the mOrientation field (fixing mismatched landscape/portrait rendering in some cases). r=jfkthame
This was just a silly typo; I got the order of the ternary expression's options
backwards.

The mistake wasn't obvious from testing, because this function isn't always
invoked.  In particular, it's not invoked if I print "https://example.org" in a
fresh profile, but it *is* invoked if I print "about:support" or other
browser-internal pages.

Differential Revision: https://phabricator.services.mozilla.com/D104354
2021-02-08 23:01:37 +00:00
Miko Mynttinen
b6b5546bc8 Bug 1534549 - Part 4: Shrink nsDisplayCompositorHitTestInfo r=mstange
These changes make nsDisplayCompositorHitTestInfo inherit directly from nsDisplayItem, which should shrink it slightly. This also simplifies the logic: hit testing information is now available at nsDisplayItem level as opposed to nsPaintedDisplayItem.

Differential Revision: https://phabricator.services.mozilla.com/D103773
2021-02-06 22:30:57 +00:00
Miko Mynttinen
cf0c7ae9e3 Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-06 22:30:37 +00:00
Miko Mynttinen
d481341bf4 Bug 1534549 - Part 1: Remove old FLB hit test info optimization r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102514
2021-02-06 22:30:29 +00:00
Timothy Nikkel
ec6356e1be Bug 1691186. Don't clear minimal display ports in SetZeroMarginDisplayPortOnAsyncScrollableAncestors. r=botond
See https://bugzilla.mozilla.org/show_bug.cgi?id=1675547#c25 and https://bugzilla.mozilla.org/show_bug.cgi?id=1675547#c26

Short version: we hit a situation where we have a minimal display port, then SetZeroMarginDisplayPortOnAsyncScrollableAncestors clears the minimal display port to install a zero margin display port. Once the minimal display port is cleared we get a random (errant) repaint request from apz which sets a full display port (it doesn't want a display port, it just wants to sync content and apz).

Differential Revision: https://phabricator.services.mozilla.com/D104306
2021-02-06 21:12:46 +00:00
Botond Ballo
4357fa7621 Bug 1650183 - Handle nested content processes in CalculateRootCompositionSize(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D103979
2021-02-05 22:22:58 +00:00
Kagami Sascha Rosylight
0ea5caf27e Bug 1671768 - Part 3: Use MOZ_CAN_RUN_SCRIPT for Selection::SelectAllChildren r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D103779
2021-02-03 21:52:22 +00:00
Noemi Erli
1ea87269a8 Backed out 4 changesets (bug 1534549) for causing mochitest failures in test_group_wheelevents.html CLOSED TREE
Backed out changeset a03c745620d6 (bug 1534549)
Backed out changeset 2ac9c5dbe9f5 (bug 1534549)
Backed out changeset dabd0c5d21cf (bug 1534549)
Backed out changeset f1b390459263 (bug 1534549)
2021-02-05 02:41:19 +02:00
Miko Mynttinen
83f9800345 Bug 1534549 - Part 4: Shrink nsDisplayCompositorHitTestInfo r=mstange
These changes make nsDisplayCompositorHitTestInfo inherit directly from nsDisplayItem, which should shrink it slightly. This also simplifies the logic: hit testing information is now available at nsDisplayItem level as opposed to nsPaintedDisplayItem.

Differential Revision: https://phabricator.services.mozilla.com/D103773
2021-02-04 22:20:13 +00:00
Miko Mynttinen
63a9dd596a Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-04 22:19:56 +00:00
Miko Mynttinen
a32145a4c8 Bug 1534549 - Part 1: Remove old FLB hit test info optimization r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102514
2021-02-02 14:30:13 +00:00
Csoregi Natalia
4e864d755a Backed out 2 changesets (bug 1650183) for causing iframe displayport failures. CLOSED TREE
Backed out changeset 1955e50f311e (bug 1650183)
Backed out changeset 5982003ab9f2 (bug 1650183)
2021-02-04 21:10:58 +02:00
Botond Ballo
fbeaed290a Bug 1650183 - Handle nested content processes in CalculateRootCompositionSize(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D103979
2021-02-04 18:33:41 +00:00
Florian Quèze
d520574f5c Bug 1690375 - Record markers with partial stacks for flushing pending notifications and marking a style flush as needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D103844
2021-02-04 15:13:21 +00:00
Timothy Nikkel
d2930b87f0 Bug 1690433. Prefer to jank minimal display ports until we can set a proper display port over checkerboarding them. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103857
2021-02-04 11:17:06 +00:00
Timothy Nikkel
1be3156679 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
This patch is the result of auditing all places that look at the presence or absence of a display port to handle minimal display ports (HasDisplayPort, GetDisplayPort, etc).

Broadly speaking the places were in two categories:
1) things related to painting, that want to consider minimal display ports as display ports for purposes of things like sending over metadata and separating out layers.
2) things that care about async scrolling, and so actually want to have a properly sized display port.

Type 1) were not changed by this patch. Type 2) were changed to consider minimal display ports as not display ports.

Again, we are aiming to leave behaviour unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D103856
2021-02-04 11:16:59 +00:00
Timothy Nikkel
e2f27ec58a Bug 1690433. Create a minimal display port type. r=botond
We introduce a new type of display port, a minimal display port. It is controlled via a property on the content element. When the property is present any other display port specified on the element is ignored and instead the display port rect is computed by assuming 0 display port margins and no alignment (this reuses the existing code for display port suppression).

We then add code to set a minimal display port on every scroll frame that is painted that has WantAsyncScroll() when certain prefs are set (the prefs are disabled as of this patch though).

We then need to manage removing the minimal display port property when, before this patch, we would have created a regular display port. As well we need to add the minimal display port property when, before this patch, we would have removed a regular display port.

In order to do this I audited all sites where we set the display port rect and display port margins property. The changes to the code for handling the removal display ports happens in a later patch.

My audit found that all of the places we set a display port want to clear the minimal display port property except:
-UpdateSub/RootFrame in APZCCallbackHelper
-UpdateDisplayPortMarginsForPendingMetrics in DisplayPortUtils

UpdateDisplayPortMarginsForPendingMetrics is basically a fast path of the UpdateSub/RootFrame code. These are the places where we handle calls to RequestContentRepaint from apz. By adding an assert and running it through try server I found that UpdateSub/RootFrame can create a display port in the following cases:
-a scroll info layer
-a scroll frame with !WantAsyncScroll() (the main thread never creates a display port for a scroll frame with !WantAsyncScroll()) (for example if the main thread creates a scroll id and sends over metadata via nsLayoutUtils::GetRootMetaData, and then the scroll rect changes, that will cause a RequestContentRepaint call)
-a few instances that don't fall into the above that happened on try server but didn't reproduce for me locally, so I don't know more about them.
It's not very important whether we clear the minimal display port property for these cases or not (the first two cases we don't async scroll the scroll frame at all, the last case seems quite rare).

Note that we intentionally do not change the existing behaviour of zero margin display ports set via SetZeroMarginDisplayPortOnAsyncScrollableAncestors as we are aiming for no behaviour changes with this patch (until we flip the pref). A later patch in a different bug handles changing these display ports over to minimal display ports.

Differential Revision: https://phabricator.services.mozilla.com/D103855
2021-02-04 11:16:44 +00:00
Mats Palmgren
9302cabffc Bug 1690163 - Account for pseudo TableColGroupFrame not being marked as anon wrapper boxes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D103819
2021-02-04 01:10:29 +00:00
Anny Gakhokidze
b6692a0ebd Bug 1687574 - Change test_zoom_restore_bfcache.html to use BroadcastChannel, r=smaug
Also, make sure that BFCachePreventionObserver does not fire events for
elements that are part of an anonymous native tree.

Differential Revision: https://phabricator.services.mozilla.com/D103812
2021-02-03 18:11:02 +00:00
Emilio Cobos Álvarez
bfe77f303a Bug 1591120 - Move print and color-scheme simulation to browsingContext. r=ochameau,nika,devtools-backward-compat-reviewers
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D103782
2021-02-03 10:38:09 +00:00
tanweerali
8cdf45f9f7 Bug 1688502 - [Core] Remove else if condition after break in layout/base/nsBidiPresUtils.cpp#1338. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D103701
2021-02-02 21:50:42 +00:00
Masayuki Nakano
fef8b70479 Bug 1541915 - part 1: Move scroll position tests from layout/base/tests to dom/events/test and disable async font loading in dom/events/test r=smaug,jfkthame
Asynchronous font loading occurs during scroll position tests, it resets
scroll positions to 0.  So, this causes intermittent failures in such tests.
Disabling the async font loading under `layout/base/tests` may not be proper
solution because some layout tests may work perfectly even if global reflow
may occur.

Therefore, this patch moves 2 tests which check scroll position to under
`dom/events/test` and disabling the async font loading since the global reflow
shouldn't be related to the tests under `dom/events`.

Differential Revision: https://phabricator.services.mozilla.com/D103013
2021-02-02 03:05:04 +00:00
Masayuki Nakano
3210cefe0a Bug 1685491 - part 3: Fix some mochitests for conforming to use system default shortcut keys r=smaug
Some mochitests use `nsISelectionController` instead of synthesizing key since
`Home`, `End`, `PageUp` and `PageDown` didn't work as native key event.

Differential Revision: https://phabricator.services.mozilla.com/D102879
2021-02-02 03:31:06 +00:00
Hiroyuki Ikezoe
643a59ce4e Bug 1689371 - Use nsLayoutUtils::GetContentViewerSize to query the device display size if there is no MobileViewportManager. r=botond
Depends on D103611

Differential Revision: https://phabricator.services.mozilla.com/D103612
2021-02-01 23:54:08 +00:00
Hiroyuki Ikezoe
c9712128ee Bug 1689371 - Don't overwrite the dynamic toolbar height if we have set the pref value. r=botond
Otherwise on Android, we always use the toolbar height set by applications even
if the pref was set (Note that GeckoView Test Runner doesn't have the dynamic
toolbar thus the height is always 0).

Differential Revision: https://phabricator.services.mozilla.com/D103611
2021-02-02 02:47:31 +00:00
Emilio Cobos Álvarez
6f67ea2e3b Bug 1689993 - Make the non-native-theme font-size adjustment be the same in all platforms. r=spohl
The Windows code was going into effect even if non-native-theme was
enabled, so right now nnt does something different in windows from other
platforms.

I think we should make it match Windows, which also matches Chromium on
non-Windows platforms too.

Differential Revision: https://phabricator.services.mozilla.com/D103633
2021-02-01 14:51:50 +00:00
Mats Palmgren
1cfdb49731 Bug 1689912 - Reset aState.mHasRenderedLegend for the entire ConstructFieldSetFrame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D103607
2021-02-01 14:59:17 +00:00
Timothy Nikkel
8a6332429a Bug 1687886. Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always. r=botond
https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4741

That RequestContentRepaint call gets executed every time isDefault is true, ie whenever the azpc gets metrics for the first time. RequestContentRepaint causes a full display port to be set on the content. That is undesirable because we set zero margin display ports (via SetZeroMarginDisplayPortOnAsyncScrollableAncestors) and we don't want to expand them to full display ports.

This bug is to fix the regression caused by bug 1667475. Two other bugs also regressed this (bug 1662013 and bug 1627012), and we need to fix all of them to fix the problem. Bug 1687926 and bug 1687927 are filed to fix those.

See https://phabricator.services.mozilla.com/D91479#inline-517695 for the rationale for the original change.

Differential Revision: https://phabricator.services.mozilla.com/D102529
2021-02-01 11:15:04 +00:00
Mirko Brodesser
36372ab216 Bug 1688832: part 7) Declare AccessibleCaretManager::GetAllChildFrameRectsUnion static. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D103471
2021-01-29 18:57:30 +00:00
Mats Palmgren
f6ef0ea044 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-30 13:47:10 +00:00
Sean Feng
71ce0cfc2a Bug 1687358 - Implement telemetry probes to determine the best possible threshold for <lazyload> r=emilio
This patch implements five telemetry probes to help us learn how
lazyload thresholds perform in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D102845
2021-01-29 17:03:25 +00:00
Dorel Luca
689a7c82d0 Backed out changeset 2d16e9e90401 (bug 1683748) for WPT failures in html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html. CLOSED TREE 2021-01-29 22:07:09 +02:00
Mats Palmgren
ca5460eda2 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-29 15:45:42 +00:00
Emilio Cobos Álvarez
0a06c5acab Bug 1689343 - Enlarge the iframe viewport in bug1448730.html. r=spohl
Without this the non-native theme fails the last assertion of the test.

I couldn't reproduce locally but the word that it's supposed to be
selected is very close to being out of the iframe viewport on my
machine, so it'd make sense if the new non-native theme, which has a bit
more padding, causes the word to move a bit further down.

I've confirmed this fixes the issue.

Differential Revision: https://phabricator.services.mozilla.com/D103317
2021-01-29 14:31:32 +00:00
Mirko Brodesser
ab4314f6af Bug 1688832: part 6) Hide AccessibleCaretManager::Carets::mFirst, mSecond. r=smaug
Helps to see that they're never replaced with new instances.

Differential Revision: https://phabricator.services.mozilla.com/D103313
2021-01-29 09:46:09 +00:00
Mirko Brodesser
cff5e50b61 Bug 1688832: part 5) Add AccessibleCaretManager::Carets::GetSecond. r=smaug
Depends on D103311

Differential Revision: https://phabricator.services.mozilla.com/D103312
2021-01-28 17:28:19 +00:00
Mirko Brodesser
b0ddf0f1e6 Bug 1688832: part 4) Add AccessibleCaretManager::Carets::GetFirst. r=smaug
Will help to hide the `UniquePtr`s.

Depends on D103310

Differential Revision: https://phabricator.services.mozilla.com/D103311
2021-01-29 09:26:47 +00:00
Mirko Brodesser
97b7bf74f3 Bug 1688832: part 3) Add AccessibleCaretManager::Carets::HasVisuallyVisibleCaret. r=smaug
Depends on D103309

Differential Revision: https://phabricator.services.mozilla.com/D103310
2021-01-28 17:20:35 +00:00
Mirko Brodesser
8585eb61e5 Bug 1688832: part 2) Add AccessibleCaretManager::Carets::HasLogicallyVisibleCaret. r=smaug
Depends on D103308

Differential Revision: https://phabricator.services.mozilla.com/D103309
2021-01-28 17:02:40 +00:00
Mirko Brodesser
2ca0daf525 Bug 1688832: part 1) Encapsulate AccessibleCaretManager::mFirstCaret, mSecondCaret in mCarets. r=smaug
They belong together.

Depends on D103307

Differential Revision: https://phabricator.services.mozilla.com/D103308
2021-01-28 17:01:46 +00:00
Mirko Brodesser
1d42184140 Bug 1688832: part 0) Delete copy-constructor and copy-assignment operator of AccessibleCaretManager::LayoutFlusher. r=smaug
Safer.

Differential Revision: https://phabricator.services.mozilla.com/D103307
2021-01-28 16:42:24 +00:00
Emilio Cobos Álvarez
4b4ff83478 Bug 1689253 - Add a more sensible scrollbar size API to nsITheme, and use it to replace ScrollbarNonDisappearing. r=spohl
There's no reason we should need an scrollbar box to query the size of a
scrollbar. I plan to use this in the following patch to make the size of a
resizer not vary depending on whether the container has scrollbars or not,
which is what ultimately causes the reftest failure.

Differential Revision: https://phabricator.services.mozilla.com/D103302
2021-01-28 22:11:54 +00:00
Anny Gakhokidze
f105a0c763 Bug 1688767 - Change layout/base/tests/test_bug607529.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103189
2021-01-28 00:19:23 +00:00
Edgar Chen
c2c0ea7709 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 16:38:29 +00:00
Dorel Luca
b5c5a81751 Backed out changeset 4e317086de97 (bug 1672330) for Mochitest failures in dom/tests/mochitest/pointerlock/test_pointerlock_focus.html. CLOSED TREE 2021-01-27 14:05:29 +02:00
Dorel Luca
60f26fe4de Backed out 10 changesets (bug 1688832) for causing failures in builds/worker/checkouts/gecko/layout/base/PresShell.cpp. CLOSED TREE
Backed out changeset 595e1c877517 (bug 1688832)
Backed out changeset 5b09f705ef8d (bug 1688832)
Backed out changeset d836c47aef1c (bug 1688832)
Backed out changeset a52ca43f4156 (bug 1688832)
Backed out changeset 7183b7f948a6 (bug 1688832)
Backed out changeset 766c328fa158 (bug 1688832)
Backed out changeset dcc61c66c659 (bug 1688832)
Backed out changeset bd1ad0a8f943 (bug 1688832)
Backed out changeset c190058d85b8 (bug 1688832)
Backed out changeset 0848f7977679 (bug 1688832)
2021-01-27 12:37:54 +02:00
Edgar Chen
b81855eeb2 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 10:08:29 +00:00
Mirko Brodesser
9b0eb6b20d Bug 1688832: part 10) Hide UniquePtrs in AccessibleCaretManager::Carets. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102927
2021-01-27 09:43:14 +00:00
Mirko Brodesser
063ef6804a Bug 1688832: part 9) Add non-default constructor to AccessibleCaretManager::Carets. r=TYLin
Preparation to hide the `UniquePtr`s of `Carets`.

Differential Revision: https://phabricator.services.mozilla.com/D102925
2021-01-27 09:43:08 +00:00
Mirko Brodesser
c67ce67203 Bug 1688832: part 8) Add AccessibleCaretManager::Carets::GetSecond. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102924
2021-01-27 09:43:00 +00:00
Mirko Brodesser
875d96d72f Bug 1688832: part 7) Add AccessibleCaretManager::Carets::GetFirst. r=TYLin
Will help to hide the `UniquePtr`s.

Differential Revision: https://phabricator.services.mozilla.com/D102923
2021-01-27 09:43:42 +00:00
Mirko Brodesser
f172fe3858 Bug 1688832: part 6) Prepare AccessibleCaretManager::DispatchCaretStateChangedEvent for splitting. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102922
2021-01-27 09:43:40 +00:00
Mirko Brodesser
45bf972c17 Bug 1688832: part 5) Add static AccessibleCaretManager::GetSelection, ::GetFrameSelection. r=TYLin
Preparation to simplify `AccessibleCaretManager::Dispatch...`.

Differential Revision: https://phabricator.services.mozilla.com/D102921
2021-01-27 09:43:37 +00:00
Mirko Brodesser
acee8474e0 Bug 1688832: part 4) Add AccessibleCaretManager::SelectionStringifyer. r=TYLin
Will help to simplify `AccessibleCaretManager::Dispatch...`.

Differential Revision: https://phabricator.services.mozilla.com/D102920
2021-01-27 09:43:35 +00:00
Mirko Brodesser
3d4ea57f64 Bug 1688832: part 3) Add AccessibleCaretManager::Carets::AreVisuallyVisible r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102919
2021-01-27 09:43:32 +00:00
Mirko Brodesser
5394d16b24 Bug 1688832: part 2) Add AccessibleCaretManager::Carets::AreLogicallyVisible. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102918
2021-01-27 09:43:30 +00:00
Mirko Brodesser
2d9fd75ccc Bug 1688832: part 1) Encapsulate AccessibleCaretManager::mFirstCaret, mSecondCaret in mCarets. r=TYLin
They belong together.

Differential Revision: https://phabricator.services.mozilla.com/D102917
2021-01-27 09:42:22 +00:00
Timothy Nikkel
ce5fd1398c Bug 1687928. Move call to MaybeCreateDisplayPortInFirstScrollFrameEncountered before DecideScrollableLayer in PaintFrame. r=botond
Because DecideScrollableLayer uses the existence of a displayport in it's decision.

In practice though we only paint from process root documents and the root scroll frame will have a displayport (almost?) always. So it's a small correctness improvement that is likely to have little effect.

Differential Revision: https://phabricator.services.mozilla.com/D102588
2021-01-25 23:33:21 +00:00
Ting-Yu Lin
60ba2b527c Bug 1688690 Part 2 - Ensure nsTableFrame's computed margins are all zero. r=emilio
This patch makes the following changes:

1. Don't call ReflowInput::CalculateBlockSideMargins() for nsTableFrame
so that setting nsTableFrame's computed margins to zero in
SizeComputationInput::InitOffsets() remains true. Also, add an assertion
in nsTableFrame::Reflow() to ensure that.

2. Remove useless nsTableFrameWrapper::GetChildMargin() because the
method is used to get nsTableFrame's margins, which are now all zero.
Also, the old code that subtracts the block-axis margin from available
block-size doesn't really make sense.

3. Pass all-zero innerMargins to nsTableWrapperFrame::SetDesiredSize(),
and use table wrapper's content-box inline-size as the final desired
border-box inline-size rather than reconstructing it from caption and
inner table's inline-size & margin like the old code.

This inline-size already takes inner table's intrinsic size and
caption's inline-size into consideration in
nsTableWrapperFrame::ComputeAutoSize(), and is the final inline-size we
want to use.

In the next part, we are going to simplify all nsTableWrapperFrame's
methods that take inner frame's margin.

Differential Revision: https://phabricator.services.mozilla.com/D103065
2021-01-27 01:53:36 +00:00
Bogdan Tara
a9b6b7cff8 Backed out changeset a77ccd1c1659 (bug 1687358) for browser_lazyload_telemetry.js failures CLOSED TREE 2021-01-27 02:46:06 +02:00
Sean Feng
14dee2e52c Bug 1687358 - Implement telemetry probes to determine the best possible threshold for <lazyload> r=emilio
This patch implements five telemetry probes to help us learn how
lazyload thresholds perform in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D102845
2021-01-26 21:54:33 +00:00
Ting-Yu Lin
271fe90130 Bug 1617288 - Bump 1477847.html's assertion count by 1 for Android. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D102958
2021-01-25 19:37:28 +00:00
Edgar Chen
48c01f0a8b Bug 1688105 - Part 2: Get rid of dom.w3c_pointer_events.enabled; r=smaug
Depends on D102668

Differential Revision: https://phabricator.services.mozilla.com/D102669
2021-01-25 16:22:44 +00:00
Steven MacLeod
1dfc4f1aab Bug 1656107 - remove FindContentForSubDocument use from nsPresContext. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D98618
2021-01-21 00:44:53 +00:00
Mats Palmgren
b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Mats Palmgren
334efb391e Bug 1687239 part 1 - Remove plugin tests from layout/, dom/ and accessible/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102139
2021-01-25 11:53:31 +00:00
Mirko Brodesser
e18a0436b9 Bug 1685303: part 28) Add virtual AccessibleCaretManager::MaybeFlushLayout. r=TYLin,smaug
In the unit-tests, flushing is not done. This was prevented implicitly
by nulling `mPresShell`. This change makes that explicit by stubbing
`MaybeFlushLayout`.

Note that `IsTerminated`, which is called in the same context is already
virtual, so I expect this to not have a noticeable performance-impact.

Depends on D102607

Differential Revision: https://phabricator.services.mozilla.com/D102608
2021-01-22 12:18:05 +00:00
Mirko Brodesser
17413678c3 Bug 1685303: part 27) Add TODO to outdated documentation of AccessibleCaretManager. r=TYLin
Depends on D102606

Differential Revision: https://phabricator.services.mozilla.com/D102607
2021-01-22 18:37:50 +00:00
Emilio Cobos Álvarez
0ed6409ab9 Bug 1688004 - Build top layer items for XUL documents that don't have scrollframes. r=miko
This will allow the browser chrome to use `<dialog>` etc, see
bug 1685313.

Tweak the check to support scrolling="false" on reftests, so that we can
test this.

Differential Revision: https://phabricator.services.mozilla.com/D102623
2021-01-25 00:31:30 +00:00
Botond Ballo
7431701c98 Bug 1682919 - Avoid creating a new DisplayPortMargins object as a side effect of querying the displayport. r=tnikkel
DisplayPortMargins objects are only meant to be created when setting
display port margins, not when querying them, because the object's
constructor records the visual and layout scroll offsets at the time
of construction to use for adjusting the margins to be layout-relative.

Differential Revision: https://phabricator.services.mozilla.com/D102075
2021-01-24 04:08:00 +00:00
Kartikaya Gupta
61f758440f Bug 1686002 - Don't retarget touches if they land inside a clickable element. r=botond
Touches that land on a descendant of a clickable element should
not get retargeted to other nearby elements because the descendant
itself can react to those touch events.

Differential Revision: https://phabricator.services.mozilla.com/D102827
2021-01-23 06:00:21 +00:00
Butkovits Atila
9d529dd4e7 Backed out changeset 62050554681e (bug 1688004) for causing failure on test_disable_scroll_frame_plain.html. CLOSED TREE 2021-01-22 22:57:33 +02:00
Emilio Cobos Álvarez
6a72aab71b Bug 1688004 - Build top layer items for XUL documents that don't have scrollframes. r=miko
This will allow the browser chrome to use `<dialog>` etc, see
bug 1685313.

Tweak the check to support scrolling="false" on reftests, so that we can
test this.

Differential Revision: https://phabricator.services.mozilla.com/D102623
2021-01-22 14:44:17 +00:00
Mirko Brodesser
bda25fa56c Bug 1685303: part 26) Correct typo in AccessibleCaretManager::mAyncPanZoomState. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102606
2021-01-21 23:37:21 +00:00
nirmay
55420bffb0 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D102087
2021-01-21 17:45:19 +00:00
Edgar Chen
4827c5658b Bug 1686037 - Part 3: Remove duplicated ImplicitlyReleasePointerCapture call in PresShell; r=smaug
EventStateManager::PostHandleEvent would do the same thing, but need to handle
the cases that PresShell is destroyed and frame is destroyed in
pointerup/pointercancel event listener.

The former case would be handled in D102403. For the latter case, we allow
EventStateManager::PostHandleEvent to handle pointerup/pointercancel event while
frame is no longer available in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D102404
2021-01-21 14:54:55 +00:00
Mirko Brodesser
8dab90eba1 Bug 1685303: part 25) Hide AccessibleCaretManager::LayoutFlusher::mFlushing. r=TYLin
Depends on D102414

Differential Revision: https://phabricator.services.mozilla.com/D102415
2021-01-20 23:31:44 +00:00
Mirko Brodesser
f7d4eee8e5 Bug 1685303: part 24) Encapsulate LayoutFlusher from AccessibleCaretManager. r=TYLin
Encapsulates flushing-related functionality.

Please see part 25) for further simplifcation of `LayoutFlusher`.

Depends on D102413

Differential Revision: https://phabricator.services.mozilla.com/D102414
2021-01-20 23:31:42 +00:00
Mirko Brodesser
4a9742216a Bug 1685303: part 23) Declare AccessibleCaretManager::GetEditingHostForFrame static. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102413
2021-01-20 23:30:06 +00:00
Mirko Brodesser
c51f73c054 Bug 1685303: part 22) Qualify arguments of AccessibleCaretManager::UpdateCaretsForAlwaysTilt const. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102311
2021-01-20 10:15:08 +00:00
Mirko Brodesser
282d9a0708 Bug 1685303: part 21) Rename HideCarets to HideCaretsAndDispatchCaretStateChangedEvent. r=TYLin
It reflects clearer what the method does.

Differential Revision: https://phabricator.services.mozilla.com/D102303
2021-01-20 10:15:08 +00:00
Mirko Brodesser
d7bf5cbe1f Bug 1685303: part 20) const-correct internals of `AccessibleCaretManager::DispatchCaretStateChangedEvent. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D102302
2021-01-20 10:11:20 +00:00
Mirko Brodesser
32745c95ff Bug 1685303: part 19) Encapsulate DesiredAsyncPanZoomState from AccessibleCaretManager. r=TYLin
The wording is less ambigous and more `const`-access is allowed.

Differential Revision: https://phabricator.services.mozilla.com/D102301
2021-01-20 10:13:37 +00:00
Mirko Brodesser
3e7a8c2653 Bug 1685303: part 17) Slightly refactor AccessibleCaretManager::FlushLayout. r=TYLin
Now the method states clearer what it does.

Differential Revision: https://phabricator.services.mozilla.com/D102192
2021-01-20 10:13:07 +00:00
Markus Stange
7faca715d1 Bug 1684788 - Remove misguided MOZ_RELEASE_ASSERT and use a null check instead. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D101505
2021-01-20 01:32:02 +00:00
Boris Chiou
eff538f500 Bug 1646100 - Compute {min|max|fit}-content from the definite block-size and aspect-ratio. r=TYLin,emilio
ComputeISizeValue() takes aspect-ratio into account. Also, add a
ComputeSizeFlag which skips aspect-ratio in ComputeISizeValue(), so
internal table boxes can use this flag to skip aspect-ratio.

Differential Revision: https://phabricator.services.mozilla.com/D99290
2021-01-19 21:44:44 +00:00
Mirko Brodesser
34292507e2 Bug 1685303: part 18) Add some const-correctness to AccessibleCaretManager::GetCaretMode. r=smaug
Might later help to clean up the dependencies to `Selection`.

Differential Revision: https://phabricator.services.mozilla.com/D102199
2021-01-18 16:23:12 +00:00
Sean Feng
708bd702d2 Bug 1682045 - Allow nsPresContext to store and release the last registered OneShotPostRefreshObserver r=smaug
OneShotPostRefreshObserver works as the caller registers it, and
let it deletes itself via the DidRefresh method. The issue is that
DidRefresh is not guaranteed to run, and it'll leak PresShell
if it doesn't run.

This patch allows nsPresContext to store and release the last
registered OneShotPostRefreshObserver, and converted the existing
usage of OneShotPostRefreshObserver to use that. So instead of asking
OneShotPostRefreshObserver to delete itself, we now ask nsPresContext
to release it.

Differential Revision: https://phabricator.services.mozilla.com/D99939
2021-01-18 19:23:10 +00:00
Mirko Brodesser
217ea6c8ea Bug 1685303: part 14) Annotate SelectByTypeAtPoint with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101762
2021-01-15 09:28:07 +00:00
Micah Tigley
1b5b46ec79 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs,marionette-reviewers,whimboo,remote-protocol-reviewers
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-14 21:45:14 +00:00
Mirko Brodesser
0114f7f280 Bug 1685303: part 11) Add some const-correctness to frame code. r=smaug
Helps distinguishing what modifies frames and what doesn't.

Differential Revision: https://phabricator.services.mozilla.com/D101751
2021-01-14 14:45:01 +00:00
Mirko Brodesser
c0d32bffc5 Bug 1685303: part 10) Annotate nsFrameSelection::HandleClick with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 13:24:36 +00:00
Mirko Brodesser
31e33f4d2c Bug 1685303: part 9) Correct some comments in PresShell::EventHandler::HandleEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101571
2021-01-14 13:24:23 +00:00
Mirko Brodesser
f6f7a6f1aa Bug 1685303: part 8) Annotate nsFrameSelection::SetDragState with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 13:24:16 +00:00
Bogdan Tara
0700454a9e Backed out 4 changesets (bug 1685303) for bustage complaining about offsets CLOSED TREE
Backed out changeset a4640aac6619 (bug 1685303)
Backed out changeset bd2020c26531 (bug 1685303)
Backed out changeset 3f2e96b93f19 (bug 1685303)
Backed out changeset 8cf49a7677c9 (bug 1685303)
2021-01-14 12:58:25 +02:00
Mirko Brodesser
c6272f3a54 Bug 1685303: part 10) Annotate nsFrameSelection::HandleClick with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 10:21:17 +00:00