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

51 Коммитов

Автор SHA1 Сообщение Дата
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
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
Miko Mynttinen 76c9644105 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-19 11:28:20 +00:00
Alexandru Michis fbd939b860 Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen ffc501ddc9 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +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
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
Ting-Yu Lin 545a6376cd Bug 1677635 Part 4 - Rename nsOverflowAreas to OverflowAreas, and move it into mozilla namespace. r=layout-reviewers,emilio
This patch is generated via the rename functionality in my editor; add
`mozilla::` prefix to `OverflowAreas` in headers; and remove the
`OverflowType` alias added in Part 1.

Differential Revision: https://phabricator.services.mozilla.com/D97235
2020-11-18 00:08:12 +00:00
Matt Woodrow 9dd8ce0730 Bug 1664804 - Compute whether top layer content is opaque. r=miko
The default styling for a ::backdrop pseudo element results in it being fully opaque and occluding all the rest of the page.
This allows us to detect that case early, and skip doing any work for the rest of the page.

Differential Revision: https://phabricator.services.mozilla.com/D91669
2020-10-15 22:38:49 +00:00
Razvan Maries 1677e557a4 Backed out 3 changesets (bug 1664804) for high frequent failures at APZCTreeManager.cpp. CLOSED TREE
Backed out changeset 3d03dbc5ab3f (bug 1664804)
Backed out changeset cdc14c572652 (bug 1664804)
Backed out changeset aba3cff2d5dd (bug 1664804)
2020-10-15 03:35:32 +03:00
Matt Woodrow 05719c2a8a Bug 1664804 - Compute whether top layer content is opaque. r=miko
The default styling for a ::backdrop pseudo element results in it being fully opaque and occluding all the rest of the page.
This allows us to detect that case early, and skip doing any work for the rest of the page.

Differential Revision: https://phabricator.services.mozilla.com/D91669
2020-10-14 22:43:38 +00:00
Csoregi Natalia da0a3666b9 Backed out 4 changesets (bug 1664804) for failures on browser_inspector_highlighter-geometry_06.js. CLOSED TREE
Backed out changeset a54e27ab0e56 (bug 1664804)
Backed out changeset 5e665bbcad8d (bug 1664804)
Backed out changeset f9c62853d8ba (bug 1664804)
Backed out changeset 17fef6ea08fe (bug 1664804)
2020-10-08 04:12:57 +03:00
Matt Woodrow 00c5ca19cb Bug 1664804 - Compute whether top layer content is opaque. r=miko
The default styling for a ::backdrop pseudo element results in it being fully opaque and occluding all the rest of the page.
This allows us to detect that case early, and skip doing any work for the rest of the page.

Differential Revision: https://phabricator.services.mozilla.com/D91669
2020-10-07 20:39:14 +00:00
Narcis Beleuzu bdbb131e90 Backed out 4 changesets (bug 1664804) for assertion failures on AsyncCompositionManager.cpp CLOSED TREE
Backed out changeset 8afa0054e3cf (bug 1664804)
Backed out changeset df9da74b1612 (bug 1664804)
Backed out changeset 237da1bcdd52 (bug 1664804)
Backed out changeset a5ae04b52977 (bug 1664804)
2020-10-06 07:04:07 +03:00
Matt Woodrow d7af7ee6ec Bug 1664804 - Compute whether top layer content is opaque. r=miko
The default styling for a ::backdrop pseudo element results in it being fully opaque and occluding all the rest of the page.
This allows us to detect that case early, and skip doing any work for the rest of the page.

Differential Revision: https://phabricator.services.mozilla.com/D91669
2020-10-06 01:44:45 +00:00
Simon Giesecke 8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00
Hiroyuki Ikezoe aa7c736bad Bug 1563649 - As with display list item and reflow for position:fixed elements, use the adjusted layout viewport size getComputedStyle() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D41930

--HG--
extra : moz-landing-system : lando
2019-09-05 01:15:05 +00:00
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

Differential Revision: https://phabricator.services.mozilla.com/D38389

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Emilio Cobos Álvarez cf56163d41 Bug 1509044 - FrameLoader.clipSubdocument is unused. r=jwatt,smaug
Plus it generally doesn't work for e10s, etc. etc.

Differential Revision: https://phabricator.services.mozilla.com/D12547

--HG--
extra : moz-landing-system : lando
2018-11-21 20:06:15 +00:00
Gerald Squelart b099eab802 Bug 1488684 - Made nsIFrame-derived classes and some others 'final' where possible - r=dbaron
All classes deriving from nsIFrame that did not have any subclasses themselves
(at the time of writing this patch) have been marked with `final`.
Some other Layout classes have also been made final, but this was opportunistic
while working on nsIFrame subclasses, and is definitely not exhaustive, further
patches welcome; refer to bug 1332680.

Advantages of marking a class final include:
- Allowing the compiler to devirtualize some method calls (i.e., calling
  virtual functions directly instead of going through the vtable),
- Indicating that the class is not currently subclassed,
- Preventing subclassing without being aware that this would remove the
  finalization benefits of the parent class.
`final` does not signify that these classes should *never* be subclassed, this
is left for developers to decide.

Differential Revision: https://phabricator.services.mozilla.com/D5020

--HG--
extra : moz-landing-system : lando
2018-09-06 01:23:14 +00:00
Jeremy Lempereur 96d35f35bd Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : f67d64ef18a643077d5019048399e68acc722337
2018-07-22 21:49:38 +02:00
Cosmin Sabou 7cf1ac297e Backed out changeset 542243f5f600 (bug 1471708) for failling reftest on gfx/layers/apz/test/reftest/async-scrollbar-1. 2018-08-05 07:57:50 +03:00
Jeremy Lempereur e591a6945a Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : 9d13a680ebf76a5f86c9040a5a16981514435dc8
2018-07-22 21:49:38 +02:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Matt Woodrow 40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst 8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Emilio Cobos Álvarez 3b4c243485 Bug 1374752: Pack together the StyleSet, ChangeList and handled change hints, and use the latter with anonymous boxes while we're at it. r=heycam
MozReview-Commit-ID: DiWcUwD9po5

--HG--
extra : rebase_source : 9805874c06c6376a13e0379211363cb51f3e033d
2017-06-20 23:21:27 +02:00
Boris Zbarsky 7a8cb34ac0 Bug 1374761 part 1. Properly restyle the viewport and its child anonymous box when we do a restyle. r=heycam
The child anon box may be an nsHTMLScrollFrame, a nsRootBoxFrame, or a
nsSimplePageSequenceFrame.   nsHTMLScrollFrame already knows how to deal with
its anonymous box kids, nsRootBoxFrame doesn't have any, and the next changeset
will deal with anon box kids of nsSimplePageSequenceFrame.

MozReview-Commit-ID: 2ZV061EhRmc

--HG--
extra : rebase_source : 43084315454284fc6d7353ccdb20137611b2ee46
2017-06-21 11:45:12 -04:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Mats Palmgren a254b64145 Bug 1364805 part 4 - Remove the now unused LayoutFrameType values from the ctors. r=jfkthame
MozReview-Commit-ID: 1RSDoc3pQXf
2017-05-26 12:11:11 +02:00
Mats Palmgren 1242172259 Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values.  For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Mats Palmgren ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Mats Palmgren 896c347cb8 Bug 1348665 part 2 - Remove the ViewProperty and store the nsView* in a field on the relevant frame classes instead. r=tnikkel
The relevant frame classes are:
SubDocumentFrame
ListControlFrame (only when used for (non-e10s?) comboboxes)
PluginFrame
ViewportFrame
MenuPopupFrame

The view is now created in the frame's Init() method, except for
ViewportFrame which has its view assigned by the frame constructor
via a SetView() call.

MozReview-Commit-ID: 4O7Hm1yqwIp
2017-03-21 01:22:13 +01:00
Mats Palmgren e8c6fd3388 Bug 1342801 - Store the 'writing-mode' used value on nsIFrame and make GetWritingMode non-virtual. r=jfkthame
MozReview-Commit-ID: HPhuxjDbOdh
2017-02-28 18:58:30 +01:00