Commit Graph

21793 Commits

Author SHA1 Message Date
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