Commit graph

719 commits

Author SHA1 Message Date
Miko Mynttinen
3882f995d9 Bug 1697979 - Part 1: Reuse previously built stacking context display items without merging r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D128413
2022-01-20 18:38:59 +00:00
Jonathan Kew
c77084245d Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-11-09 15:55:54 +00:00
Norisz Fay
489e82dcc1 Backed out 2 changesets (bug 1732674) for line iterator crashes (bug 1733047) a=backout
Backed out changeset 730555699380 (bug 1732674)
Backed out changeset f529288a6dde (bug 1732674)
2021-10-20 12:24:14 +03:00
Jonathan Kew
a6be3734b3 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-10-19 09:29:13 +00:00
criss
55677726ee Backed out changeset ce929d9e000a (bug 1732674) for causing nsLineIterator::FindLineContaining crashes (bug 1733047) . a=aryx 2021-10-16 12:46:38 +03:00
Jonathan Kew
a66831cb8c Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-10-15 13:13:04 +00:00
Alexandru Michis
e912fb2466 Backed out changeset a4ebb978f792 (bug 1732674) for causing layout crashes (bug 1733047). a=backout 2021-09-30 17:38:15 +03:00
Jonathan Kew
6d191d1715 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-09-29 17:55:44 +00:00
Cristian Tuns
9285106fbd Backed out changeset 43d9f690a94f (bug 1732674) to fix nsLineIterator crashes (bug 1733047). CLOSED TREE 2021-09-29 03:45:51 -04:00
Jonathan Kew
7fe40d2b21 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-09-28 11:34:02 +00:00
Jonathan Kew
e8d5080a53 Bug 1732355 - Eliminate the nsILineIterator::GetNextSiblingOnLine virtual method, whose only implementations are trivial. r=layout-reviewers,emilio
Depends on D126532

Differential Revision: https://phabricator.services.mozilla.com/D126533
2021-09-24 14:20:07 +00:00
Simon Giesecke
9ab4b4f5d3 Bug 1693001 - Remove redundant nullptr checks of return value of infallible new in layout/. r=emilio
Depends on D105289

Differential Revision: https://phabricator.services.mozilla.com/D105290
2021-02-16 15:52:09 +00:00
Akshat Dixit
a53e597f51 Bug 1674610 - Remove a useless else after break in nsTableRowGroupFrame.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100488
2020-12-26 20:52:46 +00:00
Emilio Cobos Álvarez
92bd3ac8f5 Bug 1677917 - Change BlockReflowInput's skipsides setup to be sane. r=mats,TYLin
Precomputing the skipBEnd bit is odd / wrong. Using the PreReflow
version causes no regression, and allows us to simplify the code.

It also reverts the test annotations added to bug 1675376 which were
caused by the extra argument to GetLogicalSkipSides() somehow.

Differential Revision: https://phabricator.services.mozilla.com/D97418
2020-11-30 17:49:04 +00:00
Mats Palmgren
4959a2c086 Bug 1678758 - Reset the overflow areas too after changing our desired height (sic). r=emilio
We have existing table reftests that fails without this fix
when the pref layout.display-list.improve-fragmentation is
enabled.

Differential Revision: https://phabricator.services.mozilla.com/D97831
2020-11-21 23:23:01 +00:00
Razvan Maries
00226db676 Backed out changeset b2da4b644dd9 (bug 1677917) for perma failures on break-at-end-container-edge-000.html. CLOSED TREE 2020-11-21 19:23:33 +02:00
Emilio Cobos Álvarez
d570280e88 Bug 1677917 - Change BlockReflowInput's skipsides setup to be sane. r=mats,TYLin
Precomputing the skipBEnd bit is odd / wrong. Using the PreReflow
version causes no regression, and allows us to simplify the code.

It also reverts the test annotations added to bug 1675376 which were
caused by the extra argument to GetLogicalSkipSides() somehow.

Differential Revision: https://phabricator.services.mozilla.com/D97418
2020-11-21 15:53:16 +00:00
Emilio Cobos Álvarez
2892508f9b Bug 1675376 - Pass consumed bsize to ApplySkipSides when during reflow. r=mats
The caller has it, so let's pass it down so that we don't need to compute it on
demand.

Differential Revision: https://phabricator.services.mozilla.com/D97356
2020-11-18 11:04:27 +00:00
Bogdan Tara
a051dd1b28 Backed out 3 changesets (bug 1675376) for asan crashtest failures CLOSED TREE
Backed out changeset b276c591ea2d (bug 1675376)
Backed out changeset 20d5c7217304 (bug 1675376)
Backed out changeset e3aa6fb62422 (bug 1675376)
2020-11-18 08:00:38 +02:00
Emilio Cobos Álvarez
433b2ca30a Bug 1675376 - Pass consumed bsize to ApplySkipSides when during reflow. r=mats
The caller has it, so let's pass it down so that we don't need to compute it on
demand.

Differential Revision: https://phabricator.services.mozilla.com/D97356
2020-11-18 03:08:06 +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
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
Alex Henrie
40234649bd Bug 1673370 - Simplify nsTableRowGroupFrame::GetBCBorderWidth. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94730
2020-10-27 02:33:25 +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
d89dc7f8cc Bug 1663822 Part 5 - Move ReflowInputFlags from SizeComputationInput to ReflowInput. r=dholbert
In previous part, we changed SizeComputationInput::InitOffsets to take a
ComputeSizeFlags parameter instead of ReflowInputFlags. Now there's no
reason to put ReflowInputFlags under SizeComputationInput.

Also rename it to `Flags` because it now lives in `ReflowInput`.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D89544
2020-09-11 17:59:13 +00:00
Ting-Yu Lin
1308ebb070 Bug 1412687 Part 1 - Make const-cast clearer in nsTableRowGroupFrame::Reflow(). r=dholbert
ReflowInputFlags is a struct of bitfields, so we cannot use AutoRestore to
restore its member bitfield.

Differential Revision: https://phabricator.services.mozilla.com/D87629
2020-08-20 22:24:58 +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
Kagami Sascha Rosylight
f4c2e30310 Bug 1652188 - Return struct from nsILineIterator::GetLine() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83215
2020-07-13 18:36:30 +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
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
191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
L. David Baron
b4556207cc Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 23:52:08 +00:00
Stefan Hindli
ed13e122ee Backed out 3 changesets (bug 1631941) for mass build bustages CLOSED TREE
Backed out changeset 8a7e21f2b5f9 (bug 1631941)
Backed out changeset 6a53d6f1ec95 (bug 1631941)
Backed out changeset 91ac0b7e571b (bug 1631941)
2020-04-23 02:14:30 +03:00
L. David Baron
129af7be9b Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 17:54:28 +00:00
Stefan Hindli
145ea7c2cf Backed out 3 changesets (bug 1631941) for causing valgrind bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/WritingModes CLOSED TREE
Backed out changeset 17391a8c2a05 (bug 1631941)
Backed out changeset b0b425ffb6e9 (bug 1631941)
Backed out changeset f4c1d7dcca50 (bug 1631941)
2020-04-22 20:13:06 +03:00
L. David Baron
304574d922 Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 15:55:54 +00:00
Mirko Brodesser
9d47d3f4c6 Bug 1626665: part 11) Declare nsILineIterator::GetNumLines const. r=hsivonen
Depends on D70015

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:07 +00:00
Mirko Brodesser
b872cdb707 Bug 1626665: part 10) Declare nsILineIterator::FindFrameAt const. r=hsivonen
Depends on D70014

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:00 +00:00
Mirko Brodesser
177f4f9fb2 Bug 1626665: part 9) Declare more methods around nsTable* const. r=hsivonen
Depends on D70013

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:56:57 +00:00
Mirko Brodesser
68794c6bc5 Bug 1626665: part 8) Declare nsLineIterator::GetNextSiblingOnLine const. r=hsivonen
Depends on D70012

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:55:41 +00:00
Mirko Brodesser
6533647d1c Bug 1626665: part 7) Declare nsILineIterator::GetLine const. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D70012

--HG--
extra : moz-landing-system : lando
2020-04-08 06:50:57 +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
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
Emilio Cobos Álvarez
c5c0ef9787 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Daniel Holbert
bf616e9f11 Bug 1613198: Move inline impls for nsIFrame::GetNormalPosition and GetLogicalNormalPosition into nsIFrameInlines.h. r=jfkthame
Also, add an nsIFrameInlines.h include to all .cpp files who call these APIs
and who don't yet have an include for this header.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 09:52:35 +00:00
Emilio Cobos Álvarez
a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
jeffin143
8f714c8f81 Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56140

--HG--
extra : moz-landing-system : lando
2019-12-13 05:34:38 +00:00
Mats Palmgren
31ae0a85ac Bug 1427141 - Request a break before the row-group if its first row doesn't fit. r=TYLin
FTR, the origin of the Reset() call in the else-branch I'm removing
is bug 397428.  I think this is before we had a break-before status,
or at least before our table code knew how to deal with it, so it
might have been correct to change an INCOMPLETE status into COMPLETE
in those days.  It seems the intent was to push the row-group:
https://bugzilla.mozilla.org/show_bug.cgi?id=397428#c14
"... and they all set aStatus to NS_FRAME_COMPLETE, which is logical
because we want to push this entire rowgroup to a new page and try
to reflow the row again..."

Nowadays though, returning a break-before status is the correct
way to do that.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 10:21:16 +00:00
Mats Palmgren
d141f0d8ad Bug 1017137 - Don't report Complete status in table-row-group fragmentation if it still has more rows to flow after filling the availble size. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D55397

--HG--
extra : moz-landing-system : lando
2019-12-02 16:40:47 +00:00