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

434 Коммитов

Автор SHA1 Сообщение Дата
Dorel Luca 689a7c82d0 Backed out changeset 2d16e9e90401 (bug 1683748) for WPT failures in html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html. CLOSED TREE 2021-01-29 22:07:09 +02:00
Mats Palmgren ca5460eda2 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-29 15:45:42 +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
Ting-Yu Lin 98cfb55831 Bug 1675128 Part 2 - Add WritingMode argument to ReflowInput::ComputedLogicalOffsets(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D96126
2020-11-06 09:12:00 +00:00
Ting-Yu Lin 655fc5b719 Bug 1674931 Part 4 - Remove zero-argument ReflowInput::ComputedSizeWithPadding(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D95664
2020-11-03 20:04:40 +00:00
Ting-Yu Lin 15775521ac Bug 1674931 Part 3 - Add WritingMode argument to SizeComputationInput::ComputedLogicalPadding(), and adapt callers. r=jfkthame
This patch is similar to Part 1, but for ComputedLogicalPadding().

Differential Revision: https://phabricator.services.mozilla.com/D95663
2020-11-03 19:56:03 +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 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 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 9cb3f93c40 Bug 1641085 Part 3 - Add APIs to manipulate excess overflow containers list. r=mats
This patch is similar to Part 2, but for adding APIs for
ExcessOverflowContainersProperty().

Differential Revision: https://phabricator.services.mozilla.com/D88457
2020-08-29 00:22:31 +00:00
Ting-Yu Lin 0076add365 Bug 1641085 Part 1 - Add move semantic to nsFrameList, and use it on SetOverflowFrames(). r=mats
It's useful to use `std::move()` to indicate the frames' ownership in one list
is transferred to the another list.

For a frame list managed by AutoFrameListPtr, after moving its frames to
another list, it can be automatically deleted when it is going out of
scope.

Differential Revision: https://phabricator.services.mozilla.com/D88455
2020-08-29 00:22:16 +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 ffcfb6dcec Bug 1651171 - Convert NS_SUBTREE_DIRTY to an inline method of nsIFrame. r=jfkthame
This is a straightforward conversion except that
`NS_SUBTREE_DIRTY(this)` can be written terser as `IsSubtreeDirty()`.

Differential Revision: https://phabricator.services.mozilla.com/D82811
2020-07-09 18:29:15 +00:00
Kagami Sascha Rosylight 987d11319c Bug 1647525 - Use HasAnyStateBits() in nsFieldSetFrame r=emilio
Depends on D81099

Differential Revision: https://phabricator.services.mozilla.com/D81100
2020-06-25 14:10:40 +00:00
Glenn Watson 31dabce5a8 Bug 1632409 - Separate image mask API from the generic clip API in WR. r=kats
Separating out the generic clip definition API into image masks
(and other types in future) makes the serialized data smaller. More
importantly, it will allow us to simplify some of the WR clip internals
in future and optimize the performance spent in clip chain handling.

Differential Revision: https://phabricator.services.mozilla.com/D72125
2020-04-23 20:44:21 +00:00
Botond Ballo 33dd332030 Bug 1629732 - Fix non-unified build errors in layout/forms. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70977

--HG--
extra : moz-landing-system : lando
2020-04-15 04:29:46 +00:00
Ting-Yu Lin afe9123179 Bug 1622008 Part 3 - Remove nsPresContext* and PresShell* from the argument list of some continuing-frame-creation methods. r=dholbert
Both PresShell() and PresContext() are cached in nsIFrame. This
simplifies the setup for the callers to
nsCSSFrameConstructor::CreateContinuingFrame().

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

--HG--
extra : moz-landing-system : lando
2020-03-12 21:50:23 +00:00
Mats Palmgren a53a9a89f5 Bug 1617753 - Avoid using our DEBUG version of RemoveFrame() which is supposed to never be called. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64206

--HG--
extra : moz-landing-system : lando
2020-02-25 22:43:51 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Savo 49746857e4 Bug 1341018 - Create enum class LegendAlignValue to replace NS_STYLE_TEXT_ALIGN_* and NS_STYLE_VERTICAL_ALIGN_* in legend code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48285

--HG--
extra : moz-landing-system : lando
2020-01-23 03:10:03 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Mats Palmgren 782a58f0b1 Bug 1600207 - Make GetInner()/GetLegend() robust also in presence of additional continuations on the principal child list. r=TYLin
Also, don't drain OverflowList unless we need to.
And make EnsureChildContinuation deal with continuations going from being
normal continuations to overflow-continuations (and vice versa) better.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 11:24:50 +00:00
Mats Palmgren 4928207161 Bug 1600367 - Check that the available space is constrained before setting Incomplete status. r=TYLin
The testcase doesn't have a fragmentainer at all so we should
never set Incomplete status in this case.  I added an assertion
that would have caught this.  I also made the baseline methods
deal with a null inner frame for good measure.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 16:43:06 +00:00
Mats Palmgren 9d05fc8f63 Bug 471015 - [css-break] Implement <fieldset> fragmentation. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D53709

--HG--
extra : moz-landing-system : lando
2019-11-25 21:45:22 +00:00
Brindusan Cristian a79348dd80 Backed out changeset 0186165ee1d8 (bug 471015) for reftest failures at box-shadow/611574-1.html. CLOSED TREE 2019-11-25 21:40:19 +02:00
Mats Palmgren 84b1973502 Bug 471015 - [css-break] Implement <fieldset> fragmentation. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D53709

--HG--
extra : moz-landing-system : lando
2019-11-25 18:05:16 +00:00
Emilio Cobos Álvarez 457aabd5d0 Bug 1581467 - Use DisplayInside() / DisplayOutside() a bit more. r=mats
And remove some unused display values from the C++ bindings.

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

--HG--
extra : moz-landing-system : lando
2019-10-07 12:27:27 +00:00
Andrew Osmond fce484c34f Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-14 16:17:04 +00:00
Ciure Andrei a4046ec458 Backed out 6 changesets (bug 1574493) for causing nested-sticky-2.html to perma fail CLOSED TREE
Backed out changeset 358746636448 (bug 1574493)
Backed out changeset 34aef5498237 (bug 1574493)
Backed out changeset 1f88e2031c76 (bug 1574493)
Backed out changeset 07c588b5ea10 (bug 1574493)
Backed out changeset 0685e8d3510e (bug 1574493)
Backed out changeset 15d4390220c4 (bug 1574493)
2019-09-13 19:26:50 +03:00
Andrew Osmond 25866edb78 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 14:03:23 +00:00
Ciure Andrei 8c3feea58a Backed out 6 changesets (bug 1574493) for causing nested-sticky-1.html to perma fail CLOSED TREE
Backed out changeset fdc25a90b0ef (bug 1574493)
Backed out changeset 0ce3c48c1f79 (bug 1574493)
Backed out changeset 326b9f96614b (bug 1574493)
Backed out changeset b0817c0aee77 (bug 1574493)
Backed out changeset 70d99c264df9 (bug 1574493)
Backed out changeset e5217ab4b668 (bug 1574493)
2019-09-13 16:17:47 +03:00
Andrew Osmond b2d4e121cb Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 10:48:31 +00:00
Gurzau Raul fe4bb6d539 Backed out 6 changesets (bug 1574493) for wrench failures at stacking-context-clip.yaml on a CLOSED TREE.
Backed out changeset 8a8736ac4e25 (bug 1574493)
Backed out changeset 4a3294e88823 (bug 1574493)
Backed out changeset 0c26ecdc1ddc (bug 1574493)
Backed out changeset 11257f7b3ad3 (bug 1574493)
Backed out changeset dcedc286ad9d (bug 1574493)
Backed out changeset 87f216e0753d (bug 1574493)
2019-09-12 18:34:07 +03:00
Andrew Osmond 320cbbf828 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 12:42:41 +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
Andrew Osmond e501ee889d Bug 1409773 - Use WebRender instead of fallback for border raster images. r=jrmuizel
Before this patch, we would use fallback for all border images. Now for
all but vector images we will use the WebRender border images
primitives. Vector images are an exception because the fallback is
clever in that it upscales the vector image and clips to only draw the
region it requires. This avoids artifacting but to do something similar
for WebRender as it is currently defined, we would increase our CPU and
memory footprint as we would need to produce the entire vector image
upscaled, not just the parts we need. In the future we should change
WebRender to accept different image resources for each of the segments.

Differential Revision: https://phabricator.services.mozilla.com/D37093
2019-07-08 12:54:44 -04:00
Gurzau Raul 5f41be0510 Backed out changeset 9ad9e16d94d9 (bug 1409773) for crashtest failures at 640272.html 2019-07-06 23:36:12 +03:00
Andrew Osmond d20b5cb84b Bug 1409773 - Use WebRender instead of fallback for border raster images. r=jrmuizel
Before this patch, we would use fallback for all border images. Now for
all but vector images we will use the WebRender border images
primitives. Vector images are an exception because the fallback is
clever in that it upscales the vector image and clips to only draw the
region it requires. This avoids artifacting but to do something similar
for WebRender as it is currently defined, we would increase our CPU and
memory footprint as we would need to produce the entire vector image
upscaled, not just the parts we need. In the future we should change
WebRender to accept different image resources for each of the segments.

Differential Revision: https://phabricator.services.mozilla.com/D37093
2019-07-06 14:20:48 -04:00
Ting-Yu Lin 3a4933eb98 Bug 1549267 Part 1 - Remove NS_INTRINSICSIZE and NS_AUTOHEIGHT. r=mats
This patch is generated by the following steps.

1) Manually delete NS_INTRINSICSIZE and NS_AUTOHEIGHT in LayoutConstants.

2) Run the following script.
```
  #!/bin/bash
  function rename() {
      find .\
           -type f\
           ! -path "./obj*"\
           ! -path "./.git"\
           ! -path "./.hg"\
           \( -name "*.cpp" -or\
              -name "*.h" \)\
              -exec sed -i -e "s/$1/$2/g" "{}" \;
  }

  rename NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
  rename NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
```

3) ./mach clang-format

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

--HG--
extra : moz-landing-system : lando
2019-06-04 23:41:20 +00:00
Matt Woodrow 1f9adb1ed4 Bug 1409114 - Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop. r=miko
This helps for the next patch, since some of the table backgrounds items want to compute this without position:relative taken into account.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:15:54 +00:00
Matt Woodrow 7ddcc024a6 Bug 1409114 - Part 3: Add helpers for box shadow creation. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D29274

--HG--
extra : moz-landing-system : lando
2019-05-20 23:14:52 +00:00
Emilio Cobos Álvarez 987519e4da Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547

--HG--
extra : moz-landing-system : lando
2019-05-16 23:04:32 +00:00
Ciure Andrei 00a73f5055 Backed out 17 changesets (bug 1550554, bug 1549593, bug 1551991, bug 1529002) for failing multiple Android tests and Windows 2012 bustages CLOSED TREE
Backed out changeset 3bb3fafa62e2 (bug 1551991)
Backed out changeset e12a979de502 (bug 1551991)
Backed out changeset d81e4aa6bf0c (bug 1551991)
Backed out changeset c354e61f2a34 (bug 1551991)
Backed out changeset 37fd602bebc2 (bug 1551991)
Backed out changeset 6c1f00cc30ca (bug 1551991)
Backed out changeset 8a7a0329bdc3 (bug 1551991)
Backed out changeset 86159475ddd3 (bug 1551991)
Backed out changeset 35f91a9ea82a (bug 1529002)
Backed out changeset 6798155e71dc (bug 1529002)
Backed out changeset b90c2cf5b8c5 (bug 1550554)
Backed out changeset 882ab9868c95 (bug 1550554)
Backed out changeset b28a48e2ed21 (bug 1550554)
Backed out changeset 2c31fe18eefd (bug 1550554)
Backed out changeset 57f2362aa538 (bug 1550554)
Backed out changeset 45f171b26e95 (bug 1550554)
Backed out changeset 2e4b263c9410 (bug 1549593)
2019-05-16 13:17:10 +03:00
Emilio Cobos Álvarez 0fe081bb39 Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547
2019-05-16 16:24:28 +02:00
Miko Mynttinen 2c5cb1519c Bug 1549751 - Part 2: Add nsPaintedDisplayItem r=mattwoodrow
Move ApplyOpacity(), CanApplyOpacity(), Paint() and PaintWithClip() methods to nsPaintedDisplayItem

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

--HG--
extra : moz-landing-system : lando
2019-05-08 13:49:56 +00:00