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

424 Коммитов

Автор SHA1 Сообщение Дата
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
Alexis Beingessner ac602e64ff Bug 1546018 - parent the legend clip chains. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D29528

--HG--
extra : moz-landing-system : lando
2019-05-01 17:35:44 +00:00
Emilio Cobos Álvarez 587c78f065 Bug 1547985 - Stop parsing the legend align's top and bottom attributes. r=mats
They do nothing, if they get parsed, they end up doing the same as text-align:
start, which is the same that we'd get out of GetLogicalAlign if the attribute
wasn't parsed in the first place.

We don't use this attribute for anything else like attribute mapping, so this
should be an idempotent patch.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 12:12:52 +00:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Ting-Yu Lin 49cfcc232c Bug 1546223 Part 4 - Mechanically replace pointer with Maybe for ReflowInput's optional containing block size. r=dholbert
There's no behavior change in this patch.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:31 +00:00
Masayuki Nakano 2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Alexis Beingessner b4a27bb58d Bug 1412179 - implement fieldsets with nonempty legends. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27350

--HG--
extra : moz-landing-system : lando
2019-04-15 23:16:13 +00:00
Coroiu Cristina 3b2b29f924 Backed out changeset fd5cb917b6eb (bug 1412179) for Wr failures at /html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html 2019-04-13 11:04:15 +03:00
Alexis Beingessner 3d93741fa9 Bug 1412179 - implement fieldsets with nonempty legends. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27350

--HG--
extra : moz-landing-system : lando
2019-04-12 18:56:19 +00:00
Matt Woodrow d99a15fae2 Bug 1539673 - Support fallible display item construction. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D25167

--HG--
extra : moz-landing-system : lando
2019-04-01 16:53:11 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00