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

276 Коммитов

Автор SHA1 Сообщение Дата
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 358c2f9ef1 Bug 1651202 Part 1 - Extract nsBlockFrame's printing child lists logic to a helper methods. r=heycam
`ListChildLists` lives in nsContainerFrame because I'm going to use it
to improve nsContainerFrame::List() in a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D82602
2020-07-08 00:59:02 +00:00
Ting-Yu Lin cd61c7d575 Bug 1645549 Part 1 - Move GetFirstNonAnonBoxDescendant() to nsContainerFrame. r=dholbert
Also, rename it to GetFirstNonAnonBoxInSubtree() to reflect its
functionality more precisely that it can return the argument aFrame
itself.

Differential Revision: https://phabricator.services.mozilla.com/D81000
2020-07-01 02:33:11 +00:00
Kagami Sascha Rosylight 91d8e0a89a Bug 1647525 - Use HasAnyStateBits() in nsContainerFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81199
2020-06-27 14:07:43 +00:00
Ting-Yu Lin 883f8f5f85 Bug 1405813 - Move prev-in-flow's EOC list to this container frame's OC list in NormalizeChildLists(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D78848
2020-06-12 19:03:49 +00:00
Ting-Yu Lin 1022daa063 Bug 1643173 Part 1 - Convert enum nsIFrame::DISPLAY_CHILD_* to enum class. r=dholbert
The modifications are all straightforward conversion except the one in
nsMathMLContainerFrame, where it is simplified by calling the equivalent
BuildDisplayListForInline() helper.

Differential Revision: https://phabricator.services.mozilla.com/D78166
2020-06-05 02:52:05 +00:00
Ting-Yu Lin 5ca75861f1 Bug 1343948 - Merge overflow container children to next-in-flow's OverflowContainersProperty() if the property already exists. r=mats
This is to prevent the assertion at the beginning of
DrainExcessOverflowContainersList().

The invariant is described in the comment revised in this patch. That
is, "only one overflow containers list exists for a given frame: either
its own OverflowContainersProperty or its prev-in-flow's
ExcessOverflowContainersProperty, not both."

Differential Revision: https://phabricator.services.mozilla.com/D77328
2020-06-02 02:37:28 +00:00
Razvan Maries a90b180cd2 Backed out changeset 7925ab748617 (bug 1343948) for perma failures on 1343606.html. CLOSED TREE 2020-06-02 03:02:10 +03:00
Ting-Yu Lin 197bb3cfff Bug 1642038 Part 2 - Mark [[nodiscard]] for StealOverflowFrames() and RemovePropTableFrames(). r=emilio
StealOverflowFrames() and RemovePropTableFrames() use TakeProperty() to
remove the property, and transfer the ownership to the caller. Since
TakeProperty() is already marked as [[nodiscard]], so should they.

Differential Revision: https://phabricator.services.mozilla.com/D77567
2020-06-01 19:02:25 +00:00
Ting-Yu Lin e49672dd8f Bug 1642038 Part 1 - Move the definition of helpers manipulating overflow list to their declarations. r=emilio
SetOverflowFrames() is simplified a bit. Other methods are moved
verbatim.

Differential Revision: https://phabricator.services.mozilla.com/D77566
2020-06-01 19:02:22 +00:00
Ting-Yu Lin 4bdc6951d6 Bug 1343948 - Merge overflow container children to next-in-flow's OverflowContainersProperty() if the property already exists. r=mats
This is to prevent the assertion at the beginning of
DrainExcessOverflowContainersList().

The invariant is described in the comment revised in this patch. That
is, "only one overflow containers list exists for a given frame: either
its own OverflowContainersProperty or its prev-in-flow's
ExcessOverflowContainersProperty, not both."

Differential Revision: https://phabricator.services.mozilla.com/D77328
2020-06-01 21:18:21 +00:00
Ting-Yu Lin fae28a9fe1 Bug 1640275 Part 1 - Move some nsGridContainerFrame's helper methods to nsContainerFrame. r=mats
In the next part, I'll extend these helpers, and use them in
nsFlexContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D77203
2020-05-28 18:03:11 +00:00
Kagami Sascha Rosylight b77454b2ee Bug 1630704 - Part 6: Move helper methods to nsContainerFrame r=emilio
Those methods are only used in subclasses of nsContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D75070
2020-05-13 18:09:32 +00:00
Ting-Yu Lin b510e66915 Bug 1622935 Part 2 - Move nsGridContainerFrame's NormalizeChildLists() and related helpers to nsContainerFrame. r=mats
Also, add relevant bits to be able to use them in the flex container.

Differential Revision: https://phabricator.services.mozilla.com/D73166
2020-05-01 23:34:22 +00:00
Ting-Yu Lin 7323697f18 Bug 1625362 Part 3 - Extract grid container's PushIncompleteChildren logic, and move it to nsContainerFrame. r=mats
I left all the bits that related to grid container, such as setting
aStatus, NS_STATE_GRID_DID_PUSH_ITEMS, and aState.mIter in
nsGridContainerFrame::ReflowRowsInFragmentainer().

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

--HG--
extra : moz-landing-system : lando
2020-04-15 18:31:35 +00:00
Ting-Yu Lin a2e0d00564 Bug 1625362 Part 2 - Move some helpers manipulating overflow lists from nsGridContainerFrame to nsContainerFrame. r=mats
We can utilize these helpers to implement flex item fragmentation.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 18:31:33 +00:00
Ting-Yu Lin 97c3b1d8cb Bug 1625362 Part 1 - Move ReparentFrame and ReparentFrames into nsContainerFrame. r=mats
We have duplicated ReparentFrame and ReparentFrames define in both
nsBlockFrame and nsGridContainerFrame. We should move them into
nsContainerFrame.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 18:31:25 +00:00
Emily McDonough a076865928 Bug 1628837 - Add subgrid property address to nsGridContainerFrame frame dump output r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70436

--HG--
extra : moz-landing-system : lando
2020-04-09 21:25:12 +00:00
Ting-Yu Lin 5610a9711b Bug 1627398 Part 1 - Convert nsIFrame::List flags to EnumSet. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D69914

--HG--
extra : moz-landing-system : lando
2020-04-08 00:22:19 +00:00
Ting-Yu Lin c64c145dd4 Bug 1620749 - Adjust FinishReflowChild()'s relative positioning conversion, to make it a writing-mode-agnostic API. r=dholbert
Currently, when using ReflowChildFlags::ApplyRelativePositioning flag in
FinishReflowChild(), we (implicitly) force the callers to pass aWM and
aPos in the same writing-mode as the reflow input, i.e. the child's
writing-mode. This results in an unintuitive LogicalPoint conversion
`mContainerSize - mMetrics.PhysicalSize()` in
nsBlockReflowContext::PlaceBlock().

We should allow the callers to use their preferred aWM and aPos (either
in parent's wm or child's wm), and do the necessary conversion in
FinishReflowChild() (like we did to convert aDesiredSize from
ReflowOutput's wm to aWM).

Also, correct the documentation for aWM in ReflowChild() and
FinishReflowChild(). aWM doesn't need to be the containing frame's
writing-mode. It can be any as long as it is the writing-mode that aPos
is used.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 18:15:48 +00:00
James Teh c604c6018c Bug 1616078: Don't use HTMLListBulletAccessible for CSS ::marker content. r=eeejay,emilio,MarcoZ
::marker content gets handled like text from any other CSS pseudo-class.
Therefore, using HTMLListBulletAccessible ends up duplicating the content already exposed in the a11y tree.
Now, we only use HTMLListBulletAccessible for nsBulletFrames instead of all marker frames.

As part of this, remove nsContainerFrame::GetSpokenMarkerContent, since we no longer need it to retrieve ::marker content.
The bulk of its other work was done by nsBulletFrame::GetSpokenContent, which we now call directly.
It also handled producing a default bullet character for list-style-image, but it makes sense for this to live in the a11y code.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 01:23:37 +00:00
Ting-Yu Lin e50292bfb5 Bug 1613732 Part 1 - Revise documentation for ReflowChildFlags, ReflowChild(), and FinishReflowChild(). r=dholbert
The entire comment deleted in nsContainerFrame.cpp belongs to
FinishReflowChild(), which is already documented in the header.

Change `aChildFrame` to `aKidFrame` for ReflowChild() to match its
implementation.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:30 +00:00
Emilio Cobos Álvarez bba367ec8f Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 00:13:38 +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
Xidorn Quan 3bb05cef1c Bug 1606192 - Remove some unused nsresult return value in layout code. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D58342

--HG--
extra : moz-landing-system : lando
2019-12-28 03:27:13 +00:00
Ting-Yu Lin dee8773f2c Bug 1602407 - Update documents with wiki.m.o continuation model link added. r=dbaron
DONTBUILD because this is a comment-only change.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 23:57:11 +00:00
Mats Palmgren 53321dfa54 Bug 1105868 part 4 - Accessibility support for inline list-items. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39833

--HG--
extra : moz-landing-system : lando
2019-08-14 14:37:16 +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
L. David Baron bb277e6cb2 Bug 1474771 - Revert all changes from bug 1459937 since they are no longer needed. r=dholbert
(The single line that made them active was commented out in the previous patch.)

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:58:35 +00:00
Cameron McCormack 00bc6ad52c Bug 1552098 - Add "Matched CSS Rules" command to the layout debugger. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D31397

--HG--
extra : moz-landing-system : lando
2019-05-16 23:11:50 +00:00
Masayuki Nakano f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Mats Palmgren bff6f8a4d5 Bug 288704 part 3 - Make nsBulletFrame use the built-in 'list-item' CSS counter and remove the old implementation. r=emilio 2019-03-24 23:13:53 +01:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Gerald Squelart 4b4619bb45 Bug 1459937 - Mark pulled floats (from pulled lines) dirty - r=dbaron
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.

If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.

MozReview-Commit-ID: KKrwtzeQMrI

--HG--
extra : rebase_source : ec99f380c978c6d28135490401beb0bb54c8e2b3
2018-07-10 11:36:33 +10:00
Andreea Pavel 10d4df5aa9 Backed out 3 changesets (bug 1459937) for failing crashtest with Assertion failure: (IndexInFlow(aOldParent) < IndexInFlow(aNewParent)) on a CLOSED TREE
Backed out changeset 2cff5c67d000 (bug 1459937)
Backed out changeset fb3fba19e615 (bug 1459937)
Backed out changeset bd4bd8ac335c (bug 1459937)
2018-07-15 10:06:23 +03:00
Gerald Squelart 1c1d2d71b5 Bug 1459937 - Mark pulled floats (from pulled lines) dirty - r=dbaron
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.

If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.

MozReview-Commit-ID: KKrwtzeQMrI

--HG--
extra : rebase_source : 2b1abb27e9a6ef248a90254b8b56c05207ae25e6
2018-07-10 11:36:33 +10:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Xidorn Quan 0f0bb7e74c Bug 1404179 - Prepend rather than append frames from overflow list of prev-in-flow for ruby frames. r=dholbert
MozReview-Commit-ID: 1xUEf1S6GEK

--HG--
extra : rebase_source : d4aba39066b147ce0bcbe736b6e936676861c7db
2017-10-03 16:19:41 +11:00
Xidorn Quan 06ddedaf53 Bug 1401420 part 4 - Have ruby frames only push children to overflow list, and reparent floats when adopting children from prev-in-flow. r=dholbert
MozReview-Commit-ID: JmAhY4WnHRV

--HG--
extra : source : 2e38f77752cdbd96c41b39dfac858057aca38924
2017-09-29 08:36:36 +10:00
Xidorn Quan 49586f2e2e Bug 1401420 part 3 - Add nsContainerFrame::PushChildrenToOverflow. r=dholbert
MozReview-Commit-ID: 80kFIJEQjLC

--HG--
extra : source : 8a9c4d3546e36b16b0519c3e171eaf7f395f0a25
2017-09-29 08:36:36 +10:00