Commit graph

2208 commits

Author SHA1 Message Date
Botond Ballo
3290b1740f Bug 1519339 - Clamp the pending visual scroll offset if using it as the main-thread's visual viewport offset. r=tnikkel
Depends on D163532

Differential Revision: https://phabricator.services.mozilla.com/D163533
2022-12-09 09:01:43 +00:00
Botond Ballo
283c0a23b7 Bug 1519339 - Do not hand off smooth scrolls in an overflow:hidden direction to APZ. r=dlrobertson
APZ cannot currently scroll in directions which are overflow:hidden
(it does not know the full scroll range bounds in those directions).

Therefore, main-thread scrolling in these directions should not be
handed off to APZ.

Differential Revision: https://phabricator.services.mozilla.com/D161351
2022-12-09 09:01:42 +00:00
Dan Robertson
877e8b332d Bug 1803455 - Fire scrollend for a main thread smooth scroll. r=botond
Use the original start position of main thread smooth scrolls to determine
if the scroll position changed on scroll complete, and fire a scrollend
event if it did.

Differential Revision: https://phabricator.services.mozilla.com/D163550
2022-12-02 22:26:55 +00:00
Martin Robinson
abb5044ca7 Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Botond Ballo
68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Ben Freist
a0881d2bec Bug 1801458 - [refactor] Migrate NS_STYLE_UNICODE_BIDI_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162487
2022-11-22 18:37:02 +00:00
Emilio Cobos Álvarez
d38d7fc847 Bug 1801517 - Remove nsPresContext::IsRootContentDocument(). r=hiro
The Element caller only cares about avoiding a flush and can use the
observable parent layout stuff.

The scrollframe one clearly wants the cross-process version according to
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D162477
2022-11-21 08:04:58 +00:00
Dan Robertson
7cac973684 Bug 1796690 - Fire scrollend for scroll that updates scroll position. r=hiro
Do not fire a scrollend event for a instant scroll that does not change the
scroll position.

Depends on D161265

Differential Revision: https://phabricator.services.mozilla.com/D160156
2022-11-18 15:12:10 +00:00
Cristian Tuns
ef7f87bef7 Backed out 3 changesets (bug 1796690) for causing mochitest failures on browser_primaryUI.js CLOSED TREE
Backed out changeset 28f9e04d3500 (bug 1796690)
Backed out changeset 70903d77e4f0 (bug 1796690)
Backed out changeset 66ddf8488393 (bug 1796690)
2022-11-16 18:22:14 -05:00
Dan Robertson
9baee76621 Bug 1796690 - Fire scrollend for scroll that updates scroll position. r=hiro
Do not fire a scrollend event for a instant scroll that does not change the
scroll position.

Depends on D161265

Differential Revision: https://phabricator.services.mozilla.com/D160156
2022-11-16 16:52:24 +00:00
Csoregi Natalia
fc5a2ea215 Backed out changeset 56bc7d891bd3 (bug 1519339) for failures on helper_overflowhidden_zoom.html. CLOSED TREE 2022-11-15 03:10:25 +02:00
Botond Ballo
239e18e404 Bug 1519339 - Do not hand off smooth scrolls in an overflow:hidden direction to APZ. r=dlrobertson
APZ cannot currently scroll in directions which are overflow:hidden
(it does not know the full scroll range bounds in those directions).

Therefore, main-thread scrolling in these directions should not be
handed off to APZ.

Differential Revision: https://phabricator.services.mozilla.com/D161351
2022-11-14 22:50:21 +00:00
Hiroyuki Ikezoe
9954b93ca8 Bug 1745969 - Stop doing SnapCoord. r=tnikkel
With doing SnapCoord we mis-consider non-scrollable frames as scrollable in APZ,
thus it causes unexpected overscroll gutters.

Depends on D161417

Differential Revision: https://phabricator.services.mozilla.com/D161419
2022-11-14 21:08:55 +00:00
Ting-Yu Lin
514d412f9b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-12 04:38:53 +00:00
Ting-Yu Lin
c565d29604 Bug 1799732 Part 2 - Flatten the namespace for FrameChildList and co. by removing namespace layout. r=emilio
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.

This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D161863
2022-11-12 04:38:53 +00:00
Noemi Erli
7c40c0e983 Backed out 3 changesets (bug 1799732) for causing build bustages in nsIFrame.cpp CLOSED TREE
Backed out changeset e559f9dbc76f (bug 1799732)
Backed out changeset c40fda7a8b0b (bug 1799732)
Backed out changeset 1f84bfb41ab8 (bug 1799732)
2022-11-12 02:16:45 +02:00
Ting-Yu Lin
192956df1b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-11 23:44:17 +00:00
Ting-Yu Lin
75940b1777 Bug 1799732 Part 2 - Flatten the namespace for FrameChildList and co. by removing namespace layout. r=emilio
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.

This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D161863
2022-11-11 23:44:16 +00:00
David Shin
460a4fd6d9 Bug 1791069 - Clamp scrollable element's first/last baseline position to border box. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161068
2022-11-10 17:49:00 +00:00
Cosmin Sabou
dd216c1307 Backed out changeset d55e22227807 (bug 1791069) for wpt failures on negative-overflow-002.html. CLOSED TREE 2022-11-10 07:59:42 +02:00
David Shin
71aa402ce9 Bug 1791069 - Clamp scrollable element's first/last baseline position to border box. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161068
2022-11-09 21:46:03 +00:00
Noemi Erli
5589527051 Backed out changeset 27903633c625 (bug 1791069) for causing web-platform failures CLOSED TREE 2022-11-09 19:36:35 +02:00
David Shin
247d54c98b Bug 1791069 - Clamp scrollable element's first/last baseline position to border box. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161068
2022-11-09 16:25:46 +00:00
Stanca Serban
edb43a2039 Backed out 2 changesets (bug 1745969) for causing mochitests failures on test_bug842853-2.html.CLOSED TREE
Backed out changeset 11b84155f96e (bug 1745969)
Backed out changeset 6fd4ba66ac87 (bug 1745969)
2022-11-09 03:20:35 +02:00
Butkovits Atila
670b9fcab3 Backed out changeset 33ba5e2e97b1 (bug 1791069) for causing failures at grid-align-baseline-line-clamp-002.tentative.html. CLOSED TREE 2022-11-09 01:06:06 +02:00
David Shin
a8a89e8507 Bug 1791069 - Clamp scrollable element's first/last baseline position to border box. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161068
2022-11-08 21:32:44 +00:00
Hiroyuki Ikezoe
a9fdcf76cc Bug 1745969 - Stop doing SnapCoord. r=tnikkel
With doing SnapCoord we mis-consider non-scrollable frames as scrollable in APZ,
thus it causes unexpected overscroll gutters.

Depends on D161417

Differential Revision: https://phabricator.services.mozilla.com/D161419
2022-11-08 21:08:35 +00:00
Sandor Molnar
1ae11a4732 Backed out 2 changesets (bug 1745969) for causing wpt/mochitest failures.
Backed out changeset a23bb92cb6fe (bug 1745969)
Backed out changeset aec681965be3 (bug 1745969)
2022-11-08 05:51:09 +02:00
Hiroyuki Ikezoe
23cced6f2f Bug 1745969 - Stop doing SnapCoord. r=tnikkel
With doing SnapCoord we mis-consider non-scrollable frames as scrollable in APZ,
thus it causes unexpected overscroll gutters.

Differential Revision: https://phabricator.services.mozilla.com/D161419
2022-11-08 02:56:03 +00:00
Sandor Molnar
dd9e307496 Backed out 3 changesets (bug 1796690) for causing mochitest failures in browser/components/urlbar/tests/browser/browser_UrlbarInput_overflow.js CLOSED TREE
Backed out changeset 5040c6736ee7 (bug 1796690)
Backed out changeset d86f25e5b636 (bug 1796690)
Backed out changeset 887104a60dc4 (bug 1796690)
2022-11-08 01:20:27 +02:00
Dan Robertson
4fa4081971 Bug 1796690 - Fire scrollend for scroll that updates scroll position. r=hiro
Do not fire a scrollend event for a instant scroll that does not change the
scroll position.

Depends on D161265

Differential Revision: https://phabricator.services.mozilla.com/D160156
2022-11-07 20:05:20 +00:00
Ting-Yu Lin
040feb02dd Bug 1798373 Part 7 - Change nsContainerFrame::InsertFrames() to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160843
2022-11-01 21:15:55 +00:00
Ting-Yu Lin
c99b45fa14 Bug 1798373 Part 6 - Change nsContainerFrame::AppendFrames() to take rvalue reference of nsFrameList. r=emilio
Change nsBlockFrame::AppendFrames() helper, too.

Differential Revision: https://phabricator.services.mozilla.com/D160842
2022-11-01 21:15:54 +00:00
Ting-Yu Lin
4787078c5c Bug 1798373 Part 5 - Change nsContainerFrame::SetInitialChildList() to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160841
2022-11-01 21:15:54 +00:00
Ting-Yu Lin
adf4fab73c Bug 1798373 Part 2 - Change nsFrameList::AppendFrames to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160838
2022-11-01 21:15:52 +00:00
Ting-Yu Lin
569c5f244b Bug 1798373 Part 1 - Change nsFrameList::InsertFrames to take rvalue reference of nsFrameList. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160837
2022-11-01 21:15:52 +00:00
Butkovits Atila
0dc4da0978 Backed out 2 changesets (bug 1379458) for causing failures at nsGfxScrollFrame.cpp. CLOSED TREE
Backed out changeset dd6888957eff (bug 1379458)
Backed out changeset 3239f01e81d7 (bug 1379458)
2022-10-29 22:15:03 +03:00
Dan Robertson
71d94d4d28 Bug 1379458 - The ScrollParentId should match the ASR tree. r=botond,tnikkel,mstange
Make the ScrollMetadata's mScrollParentId match what is found in the active
scroll root tree.

Differential Revision: https://phabricator.services.mozilla.com/D149925
2022-10-29 02:44:43 +00:00
Cristian Tuns
d82d2ab676 Backed out 3 changesets (bug 1379458) for causing reftest failures on nsDisplayList.cpp CLOSED TREE
Backed out changeset 1d37427ef6f2 (bug 1379458)
Backed out changeset 54494d5e152c (bug 1379458)
Backed out changeset e1347c761038 (bug 1379458)
2022-10-27 18:09:35 -04:00
Dan Robertson
321a256996 Bug 1379458 - The ScrollParentId should match the ASR tree. r=botond,tnikkel,mstange
Make the ScrollMetadata's mScrollParentId match what is found in the active
scroll root tree.

Differential Revision: https://phabricator.services.mozilla.com/D149925
2022-10-27 21:16:22 +00:00
Ting-Yu Lin
cd2c1471d2 Bug 1795196 Part 2 - Convert ComputedMin{I|B}Size() and ComputedMax{I|B}Size() that return writable references to setters. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159353
2022-10-18 00:26:20 +00:00
Ting-Yu Lin
ce9040c985 Bug 1794035 Part 4 - Use range-based for loops to iterate nsFrameList. r=emilio
After this patch, we still need nsFrameList::Enumerator to iterate
nsFrameList::Slice. We might enhance nsFrameList::Iterator to support Slice, but
I'll leave this for another day.

Differential Revision: https://phabricator.services.mozilla.com/D158809
2022-10-07 01:41:41 +00:00
Emilio Cobos Álvarez
abe0dac72c Bug 1794056 - Use static pref version of scroll distance prefs. r=hiro,TYLin
These were already static prefs for APZ, let's use them everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D158817
2022-10-06 23:56:58 +00:00
Dan Robertson
0e8347096e Bug 1785105 - Fire scrollend events. r=hiro,emilio
Fire scrollend events to the document and elements if
apz.scrollend.event.enabled is set. If the guarding preference is not set,
fire a chrome-only event to preserve the pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D157652
2022-10-06 01:07:16 +00:00
Emilio Cobos Álvarez
048e9bb783 Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-10-01 02:35:31 +00:00
Csoregi Natalia
462f51927a Backed out changeset 63fbc22d2223 (bug 1792741) for causing assertion failures on nsCSSFrameConstructor.cpp. CLOSED TREE 2022-10-01 04:22:22 +03:00
Emilio Cobos Álvarez
39da87ded4 Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-10-01 00:28:13 +00:00
Butkovits Atila
c01a6393db Backed out changeset 511ee0f8727c (bug 1792741) for causing failures at browser_aboutDialog_distribution. 2022-09-30 03:56:41 +03:00
Emilio Cobos Álvarez
04c73bdd6a Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-09-29 23:34:41 +00:00
Martin Robinson
3b0ff9fae9 Bug 1791760 - Move GetContainSizeAxes to nsIFrame r=emilio
This will allow this function to eventually return an appropriate value
depending on whether or not content is skipped via `content-visibility:
auto`. This change also starts looking directly at whether
content-visibility is skipping content or not, which should make it
compatible with a future `content-visibility: auto` implementation.

Differential Revision: https://phabricator.services.mozilla.com/D157831
2022-09-22 12:11:09 +00:00