Commit graph

115 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a8cfb8a96f Bug 1472602 - Sticky/relative position fixes in nsTableWrapperFrame. r=dholbert
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.

Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.

Differential Revision: https://phabricator.services.mozilla.com/D147092
2022-05-23 23:40:42 +00:00
Iulian Moraru
3fb8d69e14 Backed out changeset e3377838e213 (bug 1472602) for causing multiple failures related to StickyScrollContainer. CLOSED TREE 2022-05-24 01:14:50 +03:00
Emilio Cobos Álvarez
86ec9c28f7 Bug 1472602 - Sticky/relative position fixes in nsTableWrapperFrame. r=dholbert
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.

Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.

Differential Revision: https://phabricator.services.mozilla.com/D147092
2022-05-23 20:43:15 +00:00
Ting-Yu Lin
72ec26664d Bug 1692116 Part 2 - Fix table flex item's flex base size & hypothetical main size in a column flex container. r=dholbert
Bug 1674302 made table flex item to be able to grow or shrink towards
another size. However, for an inflexible table flex item, its
hypothetical main size is the final main size. We have to compute the
flex base size correctly when generating FlexItem.

With Part 1, it's easy to change nsTableWrapperFrame::ComputeSize() to
return the correct block-size.

Differential Revision: https://phabricator.services.mozilla.com/D106156
2021-02-25 20:06:10 +00:00
Ting-Yu Lin
96a2597206 Bug 1692116 Part 1 - Let nsTableWrapperFrame::ComputeAutoSize() return a resolved block-size. r=dholbert
We already compute both the inner table frame and the caption frame's
block-sizes in InnerTableShrinkWrapSize() and CaptionShrinkWrapSize(),
respectively. Rather than throwing them away, popping them up to
ComputeAutoSize().

This is a preparation patch for Part 2, and it hasn't changed the
behavior yet.

Differential Revision: https://phabricator.services.mozilla.com/D106155
2021-02-25 20:06:10 +00:00
Ting-Yu Lin
1e1db8c9d9 Bug 1674302 Part 3 - Fix flex base size resolution and main/cross size override for table flex items. r=dholbert
This is the main patch of this bug.

When a flex container provides size overrides for a table flex item,
there are two use cases.

(1) When resolving flex base size, we want to use `flex-basis` to
replace the preferred main size on the *inner table frame* directly.
This is how `height` works on a table element. That is, it sets the
height of the inner table frame, not the table wrapper. This patch
invents `mApplyOverridesVerbatim` flag to tell table wrapper frame don't
do any modification.

(2) When overriding main-size/cross-size for a table flex item, the size
is for *table wrapper frame*. To apply the size to inner table frame,
the table wrapper frame needs adjust the size by subtracting the area
occupied by caption, border, and padding (depending on the box-sizing).

This patch fixes the flex base resolution, and implements the logic for
(2).

We use nsLayoutUtils::GetStyleFrame() to dig into inner table's sizing
properties when resolving flex base size, so we can stop inheriting flex
properties to table wrapper frame in ua.css.

We also need to check style frame's StylePosition() in IsCrossSizeAuto()
so that non-'auto' sizes can prevent tables from being stretched in the
cross axis, just as happens with other flex items. Otherwise with this
patch, the table flex item with fixed height in
dom/flex/test/chrome/test_flex_item_rect.html will be wrongly stretched.

Differential Revision: https://phabricator.services.mozilla.com/D103437
2021-02-18 05:45:25 +00:00
Ting-Yu Lin
2f4dfc348c Bug 1691875 Part 3 - Always compute inner table's border and padding before initializing its ReflowInput. r=layout-reviewers,jfkthame,mats
This is a preparation patch for bug 1674302. We'll need border padding
to reduce the size for inner table size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D104643
2021-02-15 18:30:03 +00:00
Ting-Yu Lin
fbda8a1788 Bug 1691875 Part 2 - Pass the area occupied by caption into CreateReflowInputForInnerTable(). r=mats,jfkthame
If the table wrapper frame has a caption, several sizes that are used to
initialized inner table's ReflowInput needs to be reduced:

1. the available block-size,
2. containing block size,
3. StyleSizeOverrides (will be considered in bug 1674302).

This patch gives CreateReflowInputForInnerTable() an argument to pass
the space occupied by the caption in order to reduce the above sizes.

Note the old code doesn't reduce the constrained available block-size
when recreating ReflowInput for a table grid item, but this patch does.

Also, this patch goes ahead to recreate ReflowInput when the area
occupied by caption is non-empty, which may or may not affect the
containing block size for grid item. But for now, I keep it simple
because bug 16743202 is going to add logic that needs to recreate
ReflowInput when there is any size overrides. I tend not to
over-optimize the performance.

Differential Revision: https://phabricator.services.mozilla.com/D104642
2021-02-15 18:30:03 +00:00
Ting-Yu Lin
1c4cc18a9f Bug 1691875 Part 1 - Split and rename nsTableWrapperFrame::ChildShrinkWrapISize() into two methods for caption and inner table. r=layout-reviewers,jfkthame
This patch is similar to Bug 1690901 Part 2, but for ChildShrinkWrapISize().
https://hg.mozilla.org/mozilla-central/rev/33171dca5ccd

Also, aCBSize should be passed by const-reference, not by value.

Differential Revision: https://phabricator.services.mozilla.com/D104641
2021-02-15 18:30:02 +00:00
Ting-Yu Lin
bfc8d66755 Bug 1527734 - Use ReflowInput::mContainingBlockSize instead of GridItemCBSizeProperty(). r=mats
Grid container stores the containing block size on a table wrapper grid
item in GridItemCBSizeProperty(), but the size is also passed as a
parameter when creating table wrapper's ReflowInput, and is stored in
ReflowInput::mContainingBlockSize. We can use mContainingBlockSize
directly instead of GridItemCBSizeProperty().

The test 002.html is inspired from the testcases in bug 1527734.
003.html and 004.html are inspired from the testcase in bug 1521088.
004.html is 003.html with 'width:500px' added to <table>, which we still
fail with this patch.

Differential Revision: https://phabricator.services.mozilla.com/D104144
2021-02-09 00:59:39 +00:00
Ting-Yu Lin
5f5bebcbde Bug 1689504 Part 3 - Remove the specialized code to set a collapsed table's border & padding in SizeComputationInput. r=emilio
When creating a ReflowInput for inner table frame in
CreateReflowInputForInnerTable(), we pass the customize border & padding
if the table frame is border-collapsed.

Similarly, when creating a SizeComputationInput for inner table frame,
we should be able to pass border & padding rather than having a
specialized logic in SizeComputationInput::InitOffsets(). This patch
makes this a reality.

Differential Revision: https://phabricator.services.mozilla.com/D104350
2021-02-08 10:26:41 +00:00
Ting-Yu Lin
244ddf8eff Bug 1689504 Part 2 - Move the computation of ComputeSizeFlag from ComputeAutoSize() to ChildShrinkWrapISize(). r=emilio
If the table wrapper frame has a caption, we don't need to compute the
flags twice, because the flag can be determined solely by table wrapper
frame's properties.

Differential Revision: https://phabricator.services.mozilla.com/D104349
2021-02-08 10:24:32 +00:00
Ting-Yu Lin
6165da56dc Bug 1689504 Part 1 - Remove the output margin parameter on nsTableWrapperFrame::ChildShrinkWrapISize(). r=emilio
Bug 1688690 has ensured inner table's computed margins are all zero.
Here, the only caller is asking the margin of the inner table, which is
always 0. Hence this patch.

Differential Revision: https://phabricator.services.mozilla.com/D104348
2021-02-08 10:24:21 +00:00
Emilio Cobos Álvarez
bebec20c7a Bug 1690706 - Move caption-side outside of mako. r=TYLin
Make it an enum class, etc.

Differential Revision: https://phabricator.services.mozilla.com/D103978
2021-02-07 12:33:45 +00:00
Ting-Yu Lin
400614dec3 Bug 1690901 Part 3 - Rename OuterDoReflowChild() to ReflowChild() for nsTableWrapperFrame. r=layout-reviewers,mats
Differential Revision: https://phabricator.services.mozilla.com/D104107
2021-02-05 04:46:44 +00:00
Ting-Yu Lin
3f737fcc31 Bug 1690901 Part 2 - Split and rename nsTableWrapperFrame::OuterBeginReflowChild() into two methods for caption and inner table. r=layout-reviewers,mats
Split OuterBeginReflowChild() so that we don't need to branch logic for
caption and inner table.

Rename the methods because OuterBeginReflowChild() only creates the
ReflowInput, and has nothing to do with actual reflow. We could give
both methods the same name like `CreateChildReflowInput` and rely on
function overloading to call the correct method depending on the frame
type, but I prefer clearer method names.

Differential Revision: https://phabricator.services.mozilla.com/D104106
2021-02-05 04:46:42 +00:00
Ting-Yu Lin
680aa0d526 Bug 1690901 Part 1 - Make GetCaptionSide() and HasSideCaption() const methods. r=layout-reviewers,mats
Differential Revision: https://phabricator.services.mozilla.com/D104105
2021-02-05 04:43:38 +00:00
Ting-Yu Lin
ec91abb3dc Bug 1690715 - Expand nsTableWrapperFrame::InitChildReflowInput() at its only caller. r=dholbert
The purpose of InitChildReflowInput() is to provide customized border,
padding, and containing block size for the *inner table frame*, not for
the caption frame. So the caption frame's ReflowInput doesn't need to be
initialized in a separate step.

Differential Revision: https://phabricator.services.mozilla.com/D103436
2021-02-04 05:17:11 +00:00
Ting-Yu Lin
349e6f61c6 Bug 1688690 Part 3 - Simplify nsTableWrapperFrame's methods where the nsTableFrame's margin is used. r=emilio
Rename SetDesiredSize() to ComputeFinalBSize() because it now computes
only the final block-size.

Differential Revision: https://phabricator.services.mozilla.com/D103066
2021-01-27 01:52:04 +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
Ting-Yu Lin
90546a2af8 Bug 1688690 Part 1 - Extract content-box inline-size in nsTableWrapperFrame::Reflow(). r=emilio
`aOuterRI.ComputedSize(wm).ISize(wm)` can be extracted as a variable
because it is used repeatedly.

Differential Revision: https://phabricator.services.mozilla.com/D103064
2021-01-26 19:52:09 +00:00
Ting-Yu Lin
a43cae175a Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-26 02:47:40 +00:00
Csoregi Natalia
0492d8333a Backed out 8 changesets (bug 1686603) for causing crashtest failures. CLOSED TREE
Backed out changeset 94b5d0986d27 (bug 1686603)
Backed out changeset e7edf6fcc41d (bug 1686603)
Backed out changeset 4c9271f07178 (bug 1686603)
Backed out changeset 7013b95266ae (bug 1686603)
Backed out changeset cf7a55638aef (bug 1686603)
Backed out changeset 7717a0f2a37b (bug 1686603)
Backed out changeset c82593b13a61 (bug 1686603)
Backed out changeset fd1d95a1e706 (bug 1686603)
2021-01-26 04:32:13 +02:00
Ting-Yu Lin
ffce5ed7d6 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-25 22:29:31 +00:00
Mihai Alexandru Michis
b6b2f1e5f4 Backed out 7 changesets (bug 1686603) for causing crashtest assertion failures.
CLOSED TREE

Backed out changeset 19cba7d34a7f (bug 1686603)
Backed out changeset 3a0d0155ea5e (bug 1686603)
Backed out changeset f1f672cdd0c6 (bug 1686603)
Backed out changeset 63020922e2fd (bug 1686603)
Backed out changeset 8766ce79ba5e (bug 1686603)
Backed out changeset 965dbe8de1e1 (bug 1686603)
Backed out changeset b1328ee45f43 (bug 1686603)
2021-01-21 09:21:12 +02:00
Ting-Yu Lin
d0c462cb81 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-21 04:17:59 +00:00
Ting-Yu Lin
1c052b9ff3 Bug 1674931 Part 2 - Add WritingMode argument to SizeComputationInput::ComputedLogicalBorderPadding(), and adapt callers. r=jfkthame
This patch is similar to Part 1, but for ComputedLogicalBorderPadding().

Differential Revision: https://phabricator.services.mozilla.com/D95662
2020-11-03 19:57:40 +00:00
Ting-Yu Lin
9910d9e651 Bug 1674931 Part 1 - Add WritingMode argument to SizeComputationInput::ComputedLogicalMargin(), and adapt callers. r=jfkthame
It's straightforward to determine which writing mode is required to pass
to ComputedLogicalMargin() by looking at any subsequent method called on
the margin.

For example, if we see

```
ComputedLogicalMargin().BStartEnd(wm);
```

the writing mode needed to pass to `ComputedLogicalMargin()` is `wm`.

Differential Revision: https://phabricator.services.mozilla.com/D95661
2020-11-03 19:44:58 +00:00
Ting-Yu Lin
8c17380539 Bug 1674450 Part 6 - Convert ReflowInput::Init()'s optional border and padding parameters to Maybe<LogicalMargin>. r=layout-reviewers,jfkthame
Similar to the optional aContainingBlockSize parameter, both border and
padding should use logical coordinates in ReflowInput::mFrame's writing
mode.

Table frames that need to override border and padding can be simplified a bit.
However, DR_init_constraints_cookie and DR_init_offsets_cookie become more
complex, but they're only for debugging. I'm not planning to update their
internal APIs.

Differential Revision: https://phabricator.services.mozilla.com/D95369
2020-10-31 14:39:23 +00:00
Ting-Yu Lin
b5d7c879c0 Bug 1673056 - Remove nsLayoutUtils::MIN_ISIZE and nsLayoutUtils::PREF_ISIZE. r=mats
Both are aliases to IntrinsicISizeType::MinISize and
IntrinsicISizeType::PrefISize.

Remove MOZ_ASSERT in nsLayoutUtils::IntrinsicForAxis and
nsContainerFrame::DoInlineIntrinsicISize since IntrinsicISizeType is a
enum class nowadays, which cannot have other values.

I've compiled this patch with DEBUG_INTRINSIC_WIDTH defined in
nsLayoutUtils.cpp, and fixed aWM undefined in
nsLayoutUtils::MinSizeContributionForAxis().

Differential Revision: https://phabricator.services.mozilla.com/D94618
2020-10-23 22:52:02 +00:00
Botond Ballo
948cec1b06 Bug 1667594 - Avoid including nsLayoutUtils.h in nsContainerFrame.h. r=emilio
nsContainerFrame.h was only using the enum nsLayoutUtils::IntrinsicISizeType,
which this patch moves to LayoutConstants.h instead.

Depends on D91505

Differential Revision: https://phabricator.services.mozilla.com/D91506
2020-09-26 18:19:14 +00:00
Ting-Yu Lin
ecca275fc4 Bug 1168478 Part 2 - Combine the border and padding arguments for nsIFrame::ComputeSize(). r=dholbert
Also combine the border and padding arguments for
nsContainerFrame::ComputeSizeWithIntrinsicDimensions(), too. This method
is used as a helper to implement ComputeSize() for various replaced
elements. Its callers are all within nsIFrame's derived classes'
overridden methods, so I'm not bothering to convert them in a separate
patch.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90064
2020-09-14 20:42:22 +00:00
Ting-Yu Lin
ff5d92f454 Bug 1168478 Part 1 - Combine the border and padding argument for nsIFrame::ComputeAutoSize(). r=dholbert
Also, revise the nsIFrame::ComputeAutoSize()'s documentation.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90063
2020-09-14 20:39:17 +00:00
Ting-Yu Lin
8763701634 Bug 1663822 Part 6 - Convert the anonymous enum controlling ReflowInput's behavior into an EnumSet. r=dholbert
This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D89545
2020-09-11 17:59:21 +00:00
Ting-Yu Lin
40a9b68f6b Bug 1663822 Part 2 - Change ComputeSizeFlags into an EnumSet. r=dholbert
This patch does:
1. Rename the original ComputeSizeFlags to ComputeSizeFlag (dropping the
"s"), and make it an enum class.
2. Make ComputeSizeFlags an EnumSet.
3. Adapt the users to use EnumSet's APIs.

The `Default` enum value in ComputeSizeFlag is not needed. It equals to an
empty ComputeSizeFlags.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D89541
2020-09-11 18:32:16 +00:00
Ting-Yu Lin
160f14be50 Bug 1663822 Part 1 - Drop the "e" prefix from the enum values in ComputeSizeFlags. r=dholbert
This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D89540
2020-09-11 18:31:56 +00:00
Boris Chiou
dd3c20ccd8 Bug 1639963 - Update the API of nsIFrame::ComputeSize for aspect-ratio. r=emilio
In order to apply Automatic content-based minimum sizes, we have to know
the content size on the block axis. We cannot get the content size until
we finish the reflow of the child frames. So we have to keep a flag
which indicates the size of the ratio-dependent axis is overrideen by
aspect-ratio in ReflowInput.

We will set the correct return value in the next patch, For now, we
always return AspectRatioUsage::None.

Differential Revision: https://phabricator.services.mozilla.com/D79335
2020-08-17 06:57:56 +00:00
Ting-Yu Lin
fdc00547f6 Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron
This patch is generated by:

```
# Rename the nsOverflowType enum.
rg -l "eVisualOverflow" layout/ gfx/ | xargs sed -i "s/eVisualOverflow/eInkOverflow/g"

# Rename and drop the "Get" prefix from various functions.
rg -l "GetVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowRect/InkOverflowRect/g"
rg -l "GetPreEffectsVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetPreEffectsVisualOverflowRect/PreEffectsInkOverflowRect/g"
rg -l "GetVisualOverflowFromDeltas" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowFromDeltas/InkOverflowFromDeltas/g"
rg -l "GetScrollableOverflowRect" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowRect/ScrollableOverflowRect/g"

# Rename, drop the "Get" prefix, and change the suffix "Area" to "Rect"
# (because they return nsRect) for the two methods in nsLineBox.
rg -l "GetVisualOverflowArea" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowArea/InkOverflowRect/g"
rg -l "GetScrollableOverflowArea" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowArea/ScrollableOverflowRect/g"

# Rename rest of the functions and variables.
rg -l "VisualOverflow" layout/ gfx/ | xargs sed -i "s/VisualOverflow/InkOverflow/g"
rg -l "visual overflow" layout/ gfx/ | xargs sed -i "s/visual overflow/ink overflow/g"
rg -l "visualOverflow" layout/ gfx/ | xargs sed -i "s/visualOverflow/inkOverflow/g"
rg -l "visOverflow" layout/ gfx/ | xargs sed -i "s/visOverflow/inkOverflow/g"
rg -l "vis-overflow" layout/ gfx/ python/ | xargs sed -i "s/vis-overflow/ink-overflow/g"

./mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D84231
2020-07-20 20:17:36 +00:00
Ting-Yu Lin
5628fa7944 Bug 1652646 Part 1 - Use nsIFrame::IsGridItem() whenever possible. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D83453
2020-07-14 23:31:11 +00:00
Kagami Sascha Rosylight
1afcf4d621 Bug 1630704 - Part 27: Remove nsFrame from inheritance chain r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81864
2020-07-06 22:29:42 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +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
Emilio Cobos Álvarez
bc8a8f5439 Bug 1492315 - Subtract table grid item margins correctly. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D63762

--HG--
extra : moz-landing-system : lando
2020-02-24 21:56:02 +00:00
Emilio Cobos Álvarez
4812f9408a Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 00:56:49 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Cameron McCormack
4ff6c875f8 Bug 1482778 - Include captions within table outlines. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D45802

--HG--
extra : moz-landing-system : lando
2019-09-22 23:42:04 +00:00
L. David Baron
1488be9417 Bug 1571250 - Convert flags passed to ReflowChild, FinishReflowChild, SyncFrameViewAfterReflow and from GetXULLayoutFlags / GetLayoutFlags into an enum class. r=TYLin
It seems better to convert this before adding a new flag (in bug
1547759) and risking replacing the wrong 0 with a flag.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:19 +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
Gerald Squelart
2f31b3fef4 Bug 1474771 - Propagate NS_FRAME_IS_DIRTY to descendants when marking as dirty rather than during reflow. r=dholbert
This simplifies dealing with frames that are pushed/pulled between
continuations during reflow, allows us to avoid the complexity of the
fix to 1459937, and hopefully fixes some of the regressions from bug
1308876.

This disables the changes from bug 1459937 by commenting out a single
line in ReparentFrameInternal in nsBlockFrame.cpp, but all the added
code will be removed in the following patch.

Co-authored-by: Gerald Squelart <gsquelart@mozilla.com>
Co-authored-by: L. David Baron <dbaron@dbaron.org>

Depends on D36423

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:56:43 +00:00
Daniel Holbert
0f84d86e05 Bug 1552287 part 2: [css-contain] Adjust various reflow & baseline methods so that layout-contained frames behave as if they have no baseline. r=TYLin
We previously (in bug 1491235) adjusted some utility code to make
layout-contained frames behave as if they have no baseline.

But that's not sufficient. To make frames fully report lack-of-a-baseline,
we now do the following for layout-contained frames, as of this patch:

 (a) We now leave the ReflowOutput outparam's BlockStartAscent member at its
     default value (which is what we do for frames without a baseline like
     e.g. nsCheckboxRadioFrame and nsHTMLCanvasFrame). And if the parent cares
     about the baseline, it'll then ask directly, using a baseline getter.

 (b) We now return 'false' in more implementations of bool-returning
     baseline-getter-methods (where 'false' indicates 'no baseline').

 (c) We now return the margin-box-bottom edge, in the nscoord-returning
     'GetLogicalBaseline()' getter method. (We typically do this by deferring
     to the inherited method, which ultimately comes from nsFrame's
     implementation). It's appropriate to use the margin-box-bottom edge when
     there's no baseline, per the definition of 'vertical-align: baseline',
     here: https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

Depends on D32182

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

--HG--
extra : moz-landing-system : lando
2019-05-24 04:46:17 +00:00