188 Commits
Author SHA1 Message Date
Ting-Yu Lin 1b99f231da Bug 2041516 Part 1 - Assert fresh reflow status at the beginning of AbsoluteContainingBlock::Reflow(). r=layout-reviewers,emilio
This patch enforces the invariant for `AbsoluteContainingBlock::Reflow()` that
most of the `Reflow()` functions already have.

Differential Revision: https://phabricator.services.mozilla.com/D302429
2026-05-26 19:07:08 +00:00
Eugeniusz Lewandowski fc8097fcc3 Bug 1650944 - Remove ReflowInput.h include from nsIFrame.h r=firefox-style-system-reviewers,layout-reviewers,emilio
Removed the Reflow Input in nsIFrame. Added includes for ReflowInput as
necessary in cpp files. Also Forward Declared nsLineLayout in 3 header
files.

Differential Revision: https://phabricator.services.mozilla.com/D298203
2026-05-04 12:06:23 +00:00
Emilio Cobos Álvarez cbd055339f Bug 2031110 - Remove -moz-scrolled-canvas and make viewport styles non-inheriting. r=jwatt
They never inherit anything (except background, but that is a no-op
because viewport inherits from nullptr, which is the initial style).

It seems in the past we relied on recomputing some of this for direction
propagation or so, according to the comments, but that's definitely no
longer true.

Also the comment about needing overflow: auto is wrong, because we've
since always created scrollbars for the root (and avoided reframes).

Similarly, the assertion about viewport is kinda unnecessary. It was
introduced in:

  https://hg.mozilla.org/mozilla-central/rev/8fd06045940a05d56d833a0488262fe2279d3702

But since then we always skip fixup for all anon boxes anyways, and
specify display: block explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D293710
2026-04-13 20:27:47 +00:00
Emilio Cobos Álvarez 11be491237 Bug 2024942 - Reduce more includes of ServoStyleConsts. r=sergesanspaille
Use nsTArray + span for SendAsyncMessage since it allows for incomplete
types (std::vector on libc++ doesn't).

Differential Revision: https://phabricator.services.mozilla.com/D288906
2026-03-21 07:07:21 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
denvercoder21 48db755925 Bug 1880375 - Use fixed viewport accounted for dynmamic toolbar height for fixed position elements r=hiro,layout-reviewers,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D269773
2026-01-28 11:52:04 +00:00
Emilio Cobos Álvarez 45879990e9 Bug 1725177 - Make ::backdrop a real generated content pseudo-element. r=layout-reviewers,firefox-style-system-reviewers,dshin
This allows animating ::backdrop and addresses long-standing animation
issues.

Differential Revision: https://phabricator.services.mozilla.com/D276755
2025-12-17 22:11:20 +00:00
Emilio Cobos Álvarez ba0e228d4f Bug 2000639 - Remove nsViewManager. r=jwatt
After the previous patches, nsViewManager is basically a backpointer to
its pres shell.

Remove it and just make PresShell manage the root view directly. After
this is done, we can decide what to do about nsView (which is itself
little more than a widget listener that forwards to pres shell right
now).

This technically starts listening to mParentWidget slightly later (on
pres shell creation), but I think that's ok.

Differential Revision: https://phabricator.services.mozilla.com/D272890
2025-11-28 10:48:18 +00:00
Emilio Cobos Álvarez ef2d17cdc5 Bug 2000626 - Move delayed resizes to PresShell. r=jwatt
This removes the last need for frames to have a view around.

Differential Revision: https://phabricator.services.mozilla.com/D272884
2025-11-28 09:35:45 +00:00
Emilio Cobos Álvarez 8ef739bd5f Bug 2000145 - Remove more nsView members. r=tnikkel,layout-reviewers
* Dimensions don't need to be a rect, just a size.
 * We don't need a frame, it's just the pres shells root frame.
 * mWidgetIsTopLevel is always true iff there is a widget.

Differential Revision: https://phabricator.services.mozilla.com/D272573
2025-11-15 00:32:55 +00:00
Emilio Cobos Álvarez 05318948d5 Bug 1999623 - Remove more view code. r=tnikkel,layout-reviewers
Remove and simplify some view-using code:

 * Add nsIFrame::GetOwnWidget() to get an nsIWidget rather than doing
   menupopup-or-view.
 * Move widget invalidation to the only place it's used.
 * Don't deal with reentrant paints. Assert more strongly.
 * Move SetView only to ViewportFrame.

Differential Revision: https://phabricator.services.mozilla.com/D272208
2025-11-12 18:36:54 +00:00
Emilio Cobos Álvarez 1baa0244f2 Bug 1946263 - Clear mouse capture only if under the document that's going away. r=tnikkel,layout-reviewers
I couldn't repro this locally but I think the paragraph below explains
what's going on.

Bug 1998125 made nsView::DropMouseGrabbing clear the mouse grab
unconditionally. Instead do it if only on our document to restore the
previous behavior when the document is going away.

Differential Revision: https://phabricator.services.mozilla.com/D272202
2025-11-12 06:33:25 +00:00
Emilio Cobos Álvarez 4bbf8598d1 Bug 1998125 - Remove a lot of now unused view code. r=layout-reviewers,firefox-style-system-reviewers,dshin
No need to reposition views during layout and so on, now that we don't
use views for either popups nor subdocuments.

No need for nsView to have parent / sibling / children either.

Differential Revision: https://phabricator.services.mozilla.com/D271205
2025-11-12 01:53:45 +00:00
Ting-Yu Lin f36ac04143 Bug 1983345 Part 9 - Remove ViewportFrame::AdjustReflowInputAsContainingBlock(). r=firefox-style-system-reviewers,layout-reviewers,emilio
`AdjustReflowInputAsContainingBlock` and
`GetContainingBlockAdjustedForScrollbars()` does the same thing, except the
former adjusts the `ReflowInput` parameter.

I assume the adjustment of `ReflowInput` is not really needed if we pass the
testcase `layout/reftests/bugs/844178.html` added in bug 844178.

Differential Revision: https://phabricator.services.mozilla.com/D268305
2025-10-13 22:04:11 +00:00
Ting-Yu Lin a8df54d157 Bug 1991352 Part 3 - Rename nsAbsoluteContainingBlock.{h,cpp} to AbsoluteContainingBlock.{h,cpp}. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D266559
2025-09-29 07:28:49 +00:00
Ting-Yu Lin ca88488080 Bug 1991352 Part 2 - Rename nsAbsoluteContainingBlock to mozilla::AbsoluteContainingBlock. r=firefox-style-system-reviewers,layout-reviewers,emilio
With this patch moves `AbsoluteContainingBlock` into `mozilla` namespace, we
could remove `mozilla::` qualifiers in the header.

Differential Revision: https://phabricator.services.mozilla.com/D266558
2025-09-29 07:28:45 +00:00
Ting-Yu Lin a99f189eb3 Bug 1991352 Part 1 - Change AbsPosReflowFlags to an EnumSet. r=layout-reviewers,emilio
Also, move it into `mozilla` namespace.

Differential Revision: https://phabricator.services.mozilla.com/D266557
2025-09-29 07:28:41 +00:00
Timothy Nikkel dbe8df76fa Bug 1984898. Properly update asrs during partial display list update. r=layout-reviewers,emilio
The asr of some display items depends on the items that it contains. When we do a partial display list update and we merge display list we can change what an item contains so we might have to update the asr of the item. UpdateASR performs this work. Unfortunately it doesn't quite do it correctly.

Items whose asr depends on the items that it contains will pick the asr that is an ancestor (or equal to) of the asr of every item that it contains. Additionally we want the asr to be an ancestor (or equal to) the initial asr for the item.

aContainerASR in UpdateASR contains the asr that is an ancestor of every contained item. So UpdateASR assumes that if the item is not a wrap list item that it wants the container asr as its asr. This is not correct. Additionally it assumes that if the item is a wrap list item (or subclass) that it wants the ancestor behaviour for it's asr. This is also not correct. What each display item wants for its asr is more complicated then that.

The pernosco session https://bugzilla.mozilla.org/show_bug.cgi?id=1764863#c1 gives an example of this going wrong. In that case the item is a transform item and it only contains items whose asr is a descendant of the asr of the transform item. The transform item is not a wrap list, so we set the asr of the transform item to a descendant of the asr that it should be.

To fix this we add a function to all display items that opts them in to this ancestor behaviour for asrs if they want it. Some display item types only want the ancestor behaviour in some cases so it can't just be based on the display item type. In making this change we need to look at all display item types that can return non-null from GetChildren (if they can't have children the asr won't change dynamically based on children/the contents). There are four such classes (and then all of their subclasses): nsDisplayContainer, nsDisplayTransform, nsDisplayPerspective, nsDisplayWrapList. In practice nsDisplayContainer is always Ancestor asr (but we still pass Ancestor at all places we create one). nsDisplayPerspective and nsDisplayTransform are always Constant asr. and nsDisplayWrapList has a very large tree of subclasses with various different behaviours of asr.

This also fixes a bug in UpdateASR: if aContainerASR is nothing then we should set the asr to the frame asr rather then early exiting.

Differential Revision: https://phabricator.services.mozilla.com/D262257
2025-08-28 16:33:50 +00:00
Lando 59ad26a1eb Bug 1960755: apply code formatting via Lando
# ignore-this-changeset
2025-08-15 21:24:25 +00:00
Boris Chiou 32d77c48fe Bug 1960755 - Specialize the reflow input and the containing block for snapshot containing block. r=layout-reviewers,view-transitions-reviewers,emilio,firefox-style-system-reviewers
Per spec, snapshot containing block should include scrollbar-gutter, so
we shouldn't adjust its position and size by the scrollbar sizes.
However, for the rest of children of viewport frame still need this
adjustment, so we move all the calculation into
nsAbsoluteContainingBlock::Reflow() and
nsAbsoluteContainingBlock::ReflowAbsoluteFrame(), and choose the proper
ReflowInput and containing block for different kid frames.
https://www.w3.org/TR/css-view-transitions-1/#snapshot-containing-block-concept

Differential Revision: https://phabricator.services.mozilla.com/D260220
2025-08-15 21:24:07 +00:00
Boris Chiou 98ffe096b8 Bug 1960755 - Replace pointer with reference in ViewportFrame::AdjustReflowInputAsContainingBlock(). r=TYLin
This function may be used outside ViewportFrame, and we expect its
parameter, `ReflowInput`, is non-null always, so use reference to avoid
any accidents.

Differential Revision: https://phabricator.services.mozilla.com/D260511
2025-08-15 21:24:03 +00:00
Emilio Cobos Álvarez 38c323c984 Bug 1981748 - Avoid building the top layer past the 255th page. r=dshin
This patch makes sure that top layer display items that we build for a
given page are uniquely tagged with the page number, which avoids
uniqueness assertion failures with the patch from bug 1972694.

In theory this could also trivially happen by printing a modal <dialog>
or so, but it currently doesn't, see bug 1981732.

The patch in bug 1972694 exposes this on a devtools test
(browser_browser_toolbox_print_preview.js) because we start creating an
isolation container for the DevTools anonymous content, which is in the
top layer, and we currently didn't set the page number in the
ViewportFrame::BuildDisplayList which ends up building it, failing our
unique display item assertions.

Differential Revision: https://phabricator.services.mozilla.com/D260270
2025-08-07 14:51:55 +00:00
Timothy Nikkel 7859b66f13 Bug 1847329. Don't put area elements (which don't have their own frames) into the top layer when painting. r=layout-reviewers,emilio
Neither Chrome nor Safari support full screening an area element.

Differential Revision: https://phabricator.services.mozilla.com/D257972
2025-07-23 10:59:57 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
Emilio Cobos Álvarez 08ff761bf1 Bug 1972663 - Allow capturing dialogs and "regular" top layer items in view transitions. r=tnikkel
This requires splitting the top layer code a little bit, but nothing too
crazy.

This also prevents filters on the root element from applying to things
like the devtools highlighters, which seems would be otherwise
unintended.

Differential Revision: https://phabricator.services.mozilla.com/D254079
2025-07-03 10:14:36 +00:00
Emilio Cobos Álvarez 9332b3b092 Bug 1968078 - Only assert ShouldInTopLayerForFullscreen for actual fullscreen elements. r=jwatt
The top layer is also used for popover and such. Not sure there's a lot
of value in this assertion nowadays anyways...

Differential Revision: https://phabricator.services.mozilla.com/D251863
2025-05-31 18:18:24 +00:00
Emilio Cobos Álvarez 8ff4a65ffa Bug 1967507 - Simplify custom content container set-up. r=smaug,devtools-reviewers,nchevobbe
I haven't been able to reproduce this locally, but I see what's going
on, and I think we could do better.

This avoids the frame flush from nsCanvasFrame::CreateAnonymousContent,
and in general makes the anonymous content timing a lot more reasonable
(see the FlushPendingNotifications call that's getting removed).

The ServoStyleSet changes are needed now that there are multiple style
roots that can be unstyled like that.

It also simplifies the API as now it's not dependent on having a canvas
frame around (and thus doesn't need to flush layout).

Differential Revision: https://phabricator.services.mozilla.com/D250531
2025-05-22 13:06:12 +00:00
Boris Chiou 6167f461bd Bug 1922299 - Add ::-moz-snapshot-containing-block to wrap the view transition pseudo element tree. r=view-transitions-reviewers,emilio
We introduce `::-moz-snapshot-containing-block` pseudo-element to wrap
the view transition pseudo-element tree. This pseudo-element is only for
internal usage and cannot be accessed from outside.

Note that the related wpt,
`snapshot-containing-block-static.html`
`snapshot-containing-block-absolute.html`
are still failed because of Bug 1960755.

Also, add a test to check the snapshot containing block in the iframe,
and avoid hitting the issue of Bug 1960755.

There is no better way to verify that we do establish the fixed
positioning containing block, because it's unlikely to make the size of the
snapshot containing block be different from the viewport size on desktop
(note: this pseudo-element doesn't expose to the web), so I verified this
patch by changing the size of snapshot containing block manually in the UA
stylesheet, to see if it establish the fixed positioning containing block.

Differential Revision: https://phabricator.services.mozilla.com/D245648
2025-05-01 02:29:10 +00:00
Emilio Cobos Álvarez 350a1a6916 Bug 1954956 - Tweak a debug-only assert.
No behavior change because <xul:browser> used to take the following
early-return.

MANUAL PUSH: Trivial change CLOSED TREE
2025-03-20 22:26:10 +01:00
Emilio Cobos Álvarez 6214351191 Bug 1922300 - View display list transition pseudo-tree in a pseudo-top layer. r=view-transitions-reviewers,boris
On top of the regular top layer but under DevTools and other UA content.

Differential Revision: https://phabricator.services.mozilla.com/D239378
2025-02-26 12:29:47 +00:00
Cristina Horotan 5bc51022a0 Backed out 9 changesets (bug 1922300, bug 1950362, bug 1919333, bug 1950176, bug 1948058, bug 1950177, bug 1922298) for causing multiple Wr failures
Backed out changeset 54c87e09251a (bug 1919333)
Backed out changeset 813274ba35a0 (bug 1919333)
Backed out changeset a37d91fc2a7a (bug 1950362)
Backed out changeset 97f67f9048b5 (bug 1922298)
Backed out changeset 4c11b366fcaf (bug 1919333)
Backed out changeset dbde76fa73a9 (bug 1948058)
Backed out changeset ba3d9d95cd56 (bug 1922300)
Backed out changeset 0fe786bf2709 (bug 1950177)
Backed out changeset 8d9f52e91779 (bug 1950176)
2025-02-26 06:23:09 +02:00
Emilio Cobos Álvarez b0a2ce3620 Bug 1922300 - View display list transition pseudo-tree in a pseudo-top layer. r=view-transitions-reviewers,boris
On top of the regular top layer but under DevTools and other UA content.

Differential Revision: https://phabricator.services.mozilla.com/D239378
2025-02-25 22:48:30 +00:00
Ting-Yu Lin 6af05a0977 Bug 1909761 Part 2 - Create a helper struct IntrinsicSizeInput to aggregate needed data when computing intrinsic inline size. r=dholbert
This patch changes the signature to `GetMinISize()`, `GetPrefISize()`,
`IntrinsicISize` by adding a helper struct as a preparation. Then we can just
add more data such as a percentage basis to the struct without altering the
signature in the future.

When passing `IntrinsicSizeInput` struct down to another helper method, we
generally just pass the original one if the method is computing the intrinsic
size of our own or our anonymous children. If the method is computing our
children's intrinsic contribution, we'll need to create a brand new
`IntrinsicSizeInput` for our children.

Differential Revision: https://phabricator.services.mozilla.com/D219521
2024-09-03 04:25:41 +00:00
Butkovits Atila 4d06404349 Backed out 6 changesets (bug 1909761) for causing failures at test_contextmenu_rtl.xhtml. CLOSED TREE
Backed out changeset 1e9f47784a54 (bug 1909761)
Backed out changeset d2dcf159185b (bug 1909761)
Backed out changeset 3f48c106bff9 (bug 1909761)
Backed out changeset 38d1e5eda09d (bug 1909761)
Backed out changeset 8de556490289 (bug 1909761)
Backed out changeset 4e7f22f43bb4 (bug 1909761)
2024-08-28 10:44:09 +03:00
Ting-Yu Lin f0ff97db90 Bug 1909761 Part 2 - Create a helper struct IntrinsicSizeInput to aggregate needed data when computing intrinsic inline size. r=dholbert
This patch changes the signature to `GetMinISize()`, `GetPrefISize()`,
`IntrinsicISize` by adding a helper struct as a preparation. Then we can just
add more data such as a percentage basis to the struct without altering the
signature in the future.

When passing `IntrinsicSizeInput` struct down to another helper method, we
generally just pass the original one if the method is computing the intrinsic
size of our own or our anonymous children. If the method is computing our
children's intrinsic contribution, we'll need to create a brand new
`IntrinsicSizeInput` for our children.

Differential Revision: https://phabricator.services.mozilla.com/D219521
2024-08-28 06:18:44 +00:00
Ting-Yu Lin a024d0e616 Bug 1914661 Part 3 - Add ReflowInput::SetBResizeForPercentages(). r=dholbert
We have `SetBResize()`, so it would be useful to add a method to set
`mIsBResizeForPercentages` flag for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D220023
2024-08-23 19:52:50 +00:00
Ting-Yu Lin 2969a5e0cb Bug 1909995 Part 2 - Add IntrinsicISize() as a helper to implement GetMinISize() and GetPrefISize(). r=layout-reviewers,emilio
Most frame types have identical or very similar implementation for GetMinISize()
and GetPrefISize(), and many of them already have `IntrinsicISize()` to unify
the implementation. This patch introduces nsIFrame::IntrinsicISize() so that
derived classes only need to override one method.

`nsBlockFrame`, `ColumnSetWrapperFrame`, and `nsColumnSetFrame` are the only
three classes where their `GetMinISize()` and `GetPrefISize()` have significant
differences. Therefore, we rename `GetMinISize()` and `GetPrefISize()` to
`MinISize()` and `PrefISize`, respectively, and use them as helpers to implement
their `IntrinsicISize()`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D217790
2024-07-26 20:54:56 +00:00
Emilio Cobos Álvarez db0f986473 Bug 1906132 - Propagate BResize flag from viewport frame to root scroll frame. r=dholbert
The regression range is baffling, but it just shows a missing
invalidation.

The extension has worked around this upstream:

  https://github.com/AdguardTeam/AdguardBrowserExtension/commit/a48ff54cf6ec7e93f651e8b55b77d08eb0fe1be2

But the root cause is a bug in Firefox. The popup here had styles much
like:

```
html, body, #root {
  height: 100%;
  min-height: 100%;
  width: auto;
  min-width: 320px;
}
```

The popup starts off zero-sized, but then gets re-measured async at some
point by the extension code.

Main issue here is that, due to the bresize, we reflow the viewport,
then the html, but the html loses the bresize flag. So we don't reflow
the body element to give it the right height.

Before my patch, the body was reflowed because there was a BFC under it,
so it had the NS_BLOCK_HAS_CLEAR_CHILDREN flag, which ended up papering
over this bug.

I think this can only happen with the special shrink-wrap resize mode,
because it's the only thing that can turn a percentage bsize like 100%
from behaving like a percentage to behave like auto... So I haven't been
able to reproduce outside of our extension popup usage. Otherwise the
percentages resolving to different things would set the bresize flag
appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D215842
2024-07-05 17:50:41 +00:00
Ting-Yu Lin ab35a66805 Bug 1901652 Part 2 - Fix hypothetical position for fixed-pos elements when scrollbar-gutters are on both edges. r=layout-reviewers,emilio
When computing a hypothetical position for a fixed-pos element, we first compute
its position relative to the nearest block container `containingBlock`, and then
get the offset between `containingBlock` and the actual fixed-pos containing
block, i.e. the ViewportFrame.

However, using the ViewportFrame's origin (0,0) is incorrect. The fixed-pos
element's origin should exclude the scrollbar or scrollbar-gutter area [1].

We've fixed the containing block's origin for ViewportFrame (bug 728807), which
is used when reflowing the fixed-pos frames. The bug fixed the fixed-pos
element's position when `inset` value is specified. In this patch, when
computing the hypothetical position, we should also adjust the offset to the
containing block's origin for ViewportFrame so that the origin doesn't include
the scrollbar-gutter area, because we'll add the containing block's origin after
we reflow the fixed-pos frame at [2]. Failing to exclude the scrollbar-gutter
will cause us to shift the fixed-pos position by the scrollbar-gutter twice if
the element does use the hypothetical position as the final position

[1] A recent CSSWG resolution changed this so that top-layer or fullscreen
fixed-pos element cover the scrollbar or scrollbar-gutter. This is bug 1874091.
[2] https://searchfox.org/mozilla-central/rev/94f839e924ba6c69f3e0d062d4c6cc4fee7cad5b/layout/generic/nsAbsoluteContainingBlock.cpp#850-853

Differential Revision: https://phabricator.services.mozilla.com/D213345
2024-06-18 04:43:27 +00:00
Sandor Molnar fc33dbde1c Backed out 3 changesets (bug 1901652) for causing mochitest failures @ browser_scrollToPoint.js CLOSED TREE
Backed out changeset 24bb7e89929c (bug 1901652)
Backed out changeset 8fc6e70268be (bug 1901652)
Backed out changeset a7a4eb34e7b1 (bug 1901652)
2024-06-17 10:06:06 +03:00
Ting-Yu Lin ce1e398f26 Bug 1901652 Part 3 - Fix hypothetical position for fixed-pos elements when scrollbar-gutters are on both edges. r=layout-reviewers,emilio
When computing a hypothetical position for a fixed-pos element, we first compute
its position relative to the nearest block container `containingBlock`, and then
get the offset between `containingBlock` and the actual fixed-pos containing
block, i.e. the ViewportFrame.

However, using the ViewportFrame's origin (0,0) is incorrect. The fixed-pos
element's origin should exclude the scrollbar or scrollbar-gutter area [1].

We've fixed the containing block's origin for ViewportFrame (bug 728807), which
is used when reflowing the fixed-pos frames. The bug fixed the fixed-pos
element's position when `inset` value is specified. In this patch, when
computing the hypothetical position, we should also adjust the offset to the
containing block's origin for ViewportFrame so that the origin doesn't include
the scrollbar-gutter area, because we'll add the containing block's origin after
we reflow the fixed-pos frame at [2]. Failing to exclude the scrollbar-gutter
will cause us to shift the fixed-pos position by the scrollbar-gutter twice if
the element does use the hypothetical position as the final position

[1] A recent CSSWG resolution changed this so that top-layer or fullscreen
fixed-pos element cover the scrollbar or scrollbar-gutter. This is bug 1874091.
[2] https://searchfox.org/mozilla-central/rev/94f839e924ba6c69f3e0d062d4c6cc4fee7cad5b/layout/generic/nsAbsoluteContainingBlock.cpp#850-853

Differential Revision: https://phabricator.services.mozilla.com/D213345
2024-06-17 02:43:02 +00:00
Ting-Yu Lin d4223ff969 Bug 1901652 Part 2 - Implement GetScrollTargetFrame() for ViewportFrame. r=layout-reviewers,emilio
`nsIFrame` provides `GetScrollTargetFrame()` for getting the scroll container
child under a frame. We can implement this for ViewportFrame so that callers
don't need to get the first child and then downcast.

Differential Revision: https://phabricator.services.mozilla.com/D213344
2024-06-17 02:43:01 +00:00
Ting-Yu Lin 5cdee429ce Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-30 06:32:22 +00:00
Sebastian Hengst bf4dfe53f8 Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Ting-Yu Lin 37e9b779f9 Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-28 04:46:20 +00:00
Ting-Yu Lin b4a0842882 Bug 1824877 Part 3 - Change ScrollContainerFrame's type from Scroll to ScrollContainer. r=dholbert
This effectively changes the `IsScrollFrame()` helper to
`IsScrollContainerFrame()`.

Differential Revision: https://phabricator.services.mozilla.com/D210357
2024-05-15 17:50:49 +00:00
Ting-Yu Lin 8a77ebbb16 Bug 1888535 Part 5 - Remove DISPLAY_REFLOW. r=layout-reviewers,emilio
It is used in `Reflow()` implementations.

Differential Revision: https://phabricator.services.mozilla.com/D206317
2024-04-02 19:03:05 +00:00
Ting-Yu Lin 319fc12b73 Bug 1888535 Part 4 - Remove DISPLAY_PREF_INLINE_SIZE and DISPLAY_MIN_INLINE_SIZE. r=layout-reviewers,emilio
The two macros are used in `GetPrefISize()` and `GetMinISize()` implementations.
After removing them, we could further simplify some implementations because we
don't need a `result` variable in many cases.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D206316
2024-04-02 19:03:04 +00:00
Artur Iunusov 06d1306fcc Bug 1770944 - Remove nsIMozBrowserFrame. r=smaug
Depends on D155254

Differential Revision: https://phabricator.services.mozilla.com/D170397
2024-03-07 13:04:21 +00:00
Narcis Beleuzu 197b39f007 Backed out 16 changesets (bug 1770944) as req by asuth.
Backed out changeset 61af32f40777 (bug 1770944)
Backed out changeset 4ff0c45db93b (bug 1770944)
Backed out changeset 8a217eff7bcd (bug 1770944)
Backed out changeset 6435f48c96bf (bug 1770944)
Backed out changeset 0d2432765ca0 (bug 1770944)
Backed out changeset 58e02566db85 (bug 1770944)
Backed out changeset 0a8c4c2460ee (bug 1770944)
Backed out changeset 9416bafd9982 (bug 1770944)
Backed out changeset 79de4f83fe2e (bug 1770944)
Backed out changeset 63ac518aceb0 (bug 1770944)
Backed out changeset 14952f872b77 (bug 1770944)
Backed out changeset f65e0967ad75 (bug 1770944)
Backed out changeset bd53c42038f7 (bug 1770944)
Backed out changeset 36c378ba8212 (bug 1770944)
Backed out changeset 9ba54ab06348 (bug 1770944)
Backed out changeset fb5a54b3cbe9 (bug 1770944)
2024-02-23 21:11:08 +02:00