Commit Graph

1999 Commits

Author SHA1 Message Date
Butkovits Atila
3ba5f28067 Backed out 3 changesets (bug 1635473, bug 1531609) for reftest failures. CLOSED TREE
Backed out changeset 1e7b32808be8 (bug 1531609)
Backed out changeset e64a61869cdb (bug 1531609)
Backed out changeset 6da37d7f6dd3 (bug 1635473)
2020-07-31 23:56:54 +03:00
Mats Palmgren
6f1f514548 Bug 1531609 part 2 - Implement overflow:clip/visible combinations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73717
2020-07-31 15:31:36 +00:00
Ting-Yu Lin
ede6f9503a 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
longsonr
ba1943ecf8 Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Ting-Yu Lin
73114fe7f7 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
Ting-Yu Lin
607a6ccd92 Bug 1651202 Part 2 - Minor format tweaks for block frame's frame tree output. r=heycam
Make the following tweak so that they are consistent with others.

* Add a space before the open angle bracket. This is at the end of
`Block(div)(1)@7f10e25de5d0 ... <`

* Tweak nsLineBox format.
`line 7f10e25de808: count=1` becomes `line@7f10e25de808 count=1`.

* Tweak child list format.
`AbsoluteList 0x7f10e3c7e560` becomes `AbsoluteList@7f10e3c7e560`

Differential Revision: https://phabricator.services.mozilla.com/D82603
2020-07-08 05:37:39 +00:00
Ting-Yu Lin
3fd2263d24 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
Kagami Sascha Rosylight
93741338a8 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
a69d79b6db 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
Kagami Sascha Rosylight
0a3a447bbb Bug 1647525 - Use HasAnyStateBits() in remaining layout files r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81230
2020-06-28 01:00:19 +00:00
Kagami Sascha Rosylight
15bc552f40 Bug 1647525 - Use HasAnyStateBits() in nsBlockFrame.cpp r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81106
2020-06-25 16:12:44 +00:00
Kagami Sascha Rosylight
9e60f61edb Bug 1647525 - Use HasAllStateBits in nsBlockFrame.cpp r=emilio
Depends on D81104

Differential Revision: https://phabricator.services.mozilla.com/D81105
2020-06-25 14:48:46 +00:00
Kagami Sascha Rosylight
5f65bc06a7 Bug 1644997 - Make ShouldApplyOverflowClipping as a const member method r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D80572
2020-06-22 23:36:13 +00:00
Ting-Yu Lin
7de4e62ffb Bug 1574046 Part 5 - Prevent BlockReflowInput::ClearFloat from returning nscoord_MAX. r=dbaron
This effectively makes ClearFloat() act like it always has
DONT_CLEAR_PUSHED_FLOATS. Thus, the flag is no longer needed.

We need to add an early return condition when the block cannot fit in
ReflowBlockFrame(). Because we now don't return nscoord_MAX when floats
are pushed or split, the `availSpace.BSize(wm)` might equal to zero
rather than negative in this case. It's needed by
testing/web-platform/tests/css/CSS2/floats-clear/floats-clear-multicol-003.html
and layout/reftests/pagination/float-clear-003-print.html

Differential Revision: https://phabricator.services.mozilla.com/D74540
2020-06-16 18:33:02 +00:00
Ting-Yu Lin
d0a696d204 Bug 1574046 Part 4 - Use BlockReflowInput::ClearFloatsResult to replace coordinate comparison. r=dbaron
The rules I used when replacing the block-dir coordinates comparison
between the one passing to ClearFloats() and the one returned by
ClearFloats().

- If they are equal, check the ClearFloatsResult is equal to `BCoordNoChange`.
- If they are not equal, check the ClearFloatsResult is not equal to `BCoordNoChange`.

We want to do this conversion because in the next patch, I want to stop
ClearFloats() from returning nscoord_MAX, which is equivalent to
checking `FloatsPushedOrSplit`.

Differential Revision: https://phabricator.services.mozilla.com/D74539
2020-06-03 00:11:13 +00:00
Ting-Yu Lin
eb55439c0f Bug 1574046 Part 3 - Make BlockReflowInput::ClearFloats() return ClearFloatsResults. r=dbaron
This change doesn't change the behavior yet. It just changes all the
callers by having them catch the ClearFloatsResults.

Some of the callers will be revised in next patch by utilizing the
returned results. Some of the return values are not being used, and may
produce warnings, they will be suppressed in the next patch, too.

Differential Revision: https://phabricator.services.mozilla.com/D74538
2020-06-03 00:14:55 +00:00
Ting-Yu Lin
67b9888968 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
Shishir Jaiswal
9d326df010 Bug 1634911 - Simplify loops over lines in block layout to use ranged for. r=emilio
- Fixed wrong 'line' comparison
- Fixed clang-tidy warning
- Addressed the final review comments.
- Fixed the build failures happening in DEBUG mode. Had to revert the range based for loop usage at one place.

Differential Revision: https://phabricator.services.mozilla.com/D75673
2020-05-20 10:38:40 +00:00
Ting-Yu Lin
8ea67dbb28 Bug 1638928 Part 3 - Remove redundant "nsIFrame::" prefix from ChildLists() calls. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75894
2020-05-19 12:37:41 +00:00
Ting-Yu Lin
1bcc656a6a Bug 1638928 Part 2 - Rename nsIFrame's GetChildLists() to ChildLists(). r=mats
This patch is generated by using my editor's rename functionality.

In the next patch, `nsIFrame::` prefix is going to be removed manually
from all the ChildLists() calls.

Differential Revision: https://phabricator.services.mozilla.com/D75893
2020-05-19 12:37:37 +00:00
Dorel Luca
ac1c2045e3 Backed out changeset 39dff7adfc30 (bug 1634911) for build bustage in layout/generic/nsBlockFrame.cpp. CLOSED TREE 2020-05-19 20:10:12 +03:00
Shishir Jaiswal
34bc8520ca Bug 1634911 - Simplify loops over lines in block layout to use ranged for. r=emilio
- Fixed clang-tidy warning
- Addressed the final review comments.
- Fixed the build failures happening in DEBUG mode. Had to revert the range based for loop usage at one place.

Differential Revision: https://phabricator.services.mozilla.com/D75673
2020-05-19 16:54:02 +00:00
Ting-Yu Lin
8732dad5c0 Bug 1635319 Part 1 - Add nsIFrame::GetChildLists(), and use range-based for loops instead of ChildListIterator in layout/generic/. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75652
2020-05-18 01:09:34 +00:00
Miko Mynttinen
48bc12eb2c Bug 1554499 - Part 4: Remove index from nsDisplaySolidColor r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74083
2020-05-11 16:56:20 +00:00
Sylvestre Ledru
f3c69f480a Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D73347
2020-05-09 14:51:53 +00:00
Emilio Cobos Álvarez
1f640d4918 Bug 1634743 - Fix caret baseline on a line with only inlines to account for line-height properly. r=jfkthame
While I'm looking at this code... This fixes the case described in
comment 46.

Differential Revision: https://phabricator.services.mozilla.com/D73465
2020-05-02 19:18:27 +00:00
Emilio Cobos Álvarez
973da1f7ab Bug 1634543 - Followup: Remove one too many consts to unbust the build.
MANUAL PUSH: Bustage fix on a CLOSED TREE
2020-05-01 18:45:37 +02:00
Emilio Cobos Álvarez
ccb29ae2dc Bug 1634543 - Fix caret baseline of a block with only empty lines. r=jfkthame
Even with the fix above, we get the caret baseline wrong because the
line is non-empty, but the baseline is all the way to the top.

Maybe an alternative to this would be to move the line-height hack to
the beginning of layout but that sounds a bit more fishy.

Otherwise we should do this more often, I suspect. I added one test that
fails because of nsInlineFrame... Anyhow probably follow-up material?

Depends on D73362

Differential Revision: https://phabricator.services.mozilla.com/D73363
2020-05-01 14:34:11 +00:00
Emilio Cobos Álvarez
5181ad86a2 Bug 1634543 - Make emptiness check for contenteditable also account for empty frames. r=jfkthame
Like abspos and other out of flows. Seems to match more what other browsers do.

Differential Revision: https://phabricator.services.mozilla.com/D73362
2020-05-01 15:05:34 +00:00
Botond Ballo
5c0157d407 Bug 1629732 - Fix non-unified build errors in layout/generic. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D71122
2020-04-16 00:52:02 +00:00
Ting-Yu Lin
0b0ceb3609 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
2020-04-15 18:31:25 +00:00
Emilio Cobos Álvarez
4f98e12b31 Bug 1628770 - Restrict "empty editable block" bits to contenteditable roots. r=jfkthame
This is what other UAs do.

Differential Revision: https://phabricator.services.mozilla.com/D70423
2020-04-10 09:20:51 +00:00
Ting-Yu Lin
7cabd86cc4 Bug 1627398 Part 1 - Convert nsIFrame::List flags to EnumSet. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D69914
2020-04-08 00:22:19 +00:00
Sylvestre Ledru
3ce73036e5 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D67574
2020-04-05 13:34:58 +00:00
Ting-Yu Lin
f0ebbc363d Bug 1625559 Part 2 - Use BlockReflowInput::ContentBEnd() to replace undocumented mBEndEdge. r=jfkthame
ContentBEnd() is equivalent to mBEndEdge except when ContentBSize() is
unconstrained because ContentBEnd() can overflow. However, according to
ContentBEnd()'s documentation, the user shouldn't use ContentBEnd() when
ContentBSize() is constrained, so I add an assertion in ContentBEnd() as
a reminder.

Differential Revision: https://phabricator.services.mozilla.com/D68624
2020-03-30 18:03:49 +00:00
Emilio Cobos Álvarez
4d908b94ad Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586
2020-03-30 17:20:06 +00:00
Cosmin Sabou
c210c5db5b Backed out 2 changesets (bug 1098151) for refrest failures on overflow.html. CLOSED TREE
Backed out changeset 1893ec9ff2de (bug 1098151)
Backed out changeset 66e5251cc1e2 (bug 1098151)
2020-03-30 19:10:13 +03:00
Emilio Cobos Álvarez
4eddabee9c Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586
2020-03-30 13:50:04 +00:00
Emilio Cobos Álvarez
a6b4209566 Bug 1624655 - Don't backplate over themed backgrounds. r=morgan
data:text/html,<input type=submit> is white-on-white when depressed with
backplating enabled on the GTK light theme, because even though the computed
background-color is white, the actual button background is themed and the color
is not white instead.

This causes problems with the unthemed appearance anyway (<input type=submit
style="-webkit-appearance: none"> and so on), but this is probably worth it
anyway.

Differential Revision: https://phabricator.services.mozilla.com/D68063
2020-03-25 15:45:21 +00:00
Chris Fronk
5f4d7b6abf Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-17 12:42:12 +00:00
Simon Giesecke
e613597e90 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016
2020-03-17 09:38:32 +00:00
Ting-Yu Lin
807ebe1c6c 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
2020-03-12 21:50:23 +00:00
shindli
acf53819f5 Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE 2020-03-11 14:30:54 +02:00
Chris Fronk
3949093799 Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-11 12:18:13 +00:00
Emilio Cobos Álvarez
9850f6ee73 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

Differential Revision: https://phabricator.services.mozilla.com/D63793
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez
c7c1186c47 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
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez
096deac0e1 Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

Differential Revision: https://phabricator.services.mozilla.com/D61755
2020-02-06 00:13:38 +00:00
Emilio Cobos Álvarez
79768ff848 Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857
2020-01-24 11:46:14 +00:00
Morgan Reschenberg
95ac48d043 Bug 1609581: Ensure backplates inherit color from nearest non-transparent frame to correctly color select multiple's. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60099
2020-01-21 21:01:32 +00:00
Mihai Alexandru Michis
0ffcb1b4be Backed out changeset e91a005196d1 (bug 1609581) for causing reftest failures in backplate-bg-image-009.html
CLOSED TREE
2020-01-21 22:54:43 +02:00