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

702 Коммитов

Автор SHA1 Сообщение Дата
Miko Mynttinen 978b3d9089 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-22 02:37:31 +00:00
Alexandru Michis ae4456b8b6 Backed out 3 changesets (bug 1697979) for causing reftest failures in retained-dl-displayport-1.html
Backed out changeset e4248d811360 (bug 1697979)
Backed out changeset db3882cc536c (bug 1697979)
Backed out changeset ea7ce38abaab (bug 1697979)
2022-01-21 04:01:27 +02:00
Miko Mynttinen 07449db71e 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-21 00:43:34 +00:00
Noemi Erli 2bfdec7254 Backed out 3 changesets (bug 1697979) for causing reftest failures CLOSED TREE
Backed out changeset 4edb10a45d13 (bug 1697979)
Backed out changeset 456b57492294 (bug 1697979)
Backed out changeset 1cb3b14f2f6c (bug 1697979)
2022-01-20 22:25:00 +02:00
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
Morgan Reschenberg 1f72fbb6eb Bug 1680840: Fire table styling changed event when style changes that may affect data/layout table classification r=emilio,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D103254
2021-02-04 20:50:05 +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
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 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 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 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 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
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
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
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
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 2cf7e52582 Bug 1591219 - [css-align] Synthesize a baseline from the content edges for empty table cells. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D50711

--HG--
extra : moz-landing-system : lando
2019-11-12 15:31:57 +00:00
L. David Baron 99fc596f62 Bug 1547759 - Ensure that we call ApplyRelativePositioning after the frame's new size has been set so it works correctly for RTL. r=jfkthame,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D40568

--HG--
extra : moz-landing-system : lando
2019-08-08 20:04:40 +00:00
L. David Baron c923b062b3 Bug 1547759 - Pass ReflowInput to FinishReflowChild in almost all cases. r=jfkthame
At first glance, it might look like this would change behavior, since
FinishReflowChild passes aReflowInput to DidReflow, which in turn
notifies aReflowInput's mPercentBSizeObserver.  However, if you examine
how the mPercentBSizeObserver is propagated, it can only be set for the
anonymous block wrapping the children of table cells, the children of
table cells, or additionally a child of a table wrapper frame that has
it set (i.e., a table or its caption, when logically a child of a table
cell).  Since all of the frames for which this is being changed are
either internal table elements that are inside of the table, or are
things that can never be a descendant of a table at all, there should be
no change in behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 11:52:19 +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 85d61d1a95 Bug 1571249 - Remove the IsTableCell() function. r=TYLin
It was made pointless by the previous patch.

This replaces callers that had a frame type for another reason with the
frame type check that IsTableCell did, and callers that needed to call
Type() with an IsTableCellFrame call.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:12 +00:00
L. David Baron 5afb94be01 Bug 1571249 - Remove BCTableCell as a distinct frame type. r=TYLin
There are two existing callers of IsTableCellFrame that both appear to want to
include BCTableCell frames, but don't.  A patch in bug 1547759 will add a
third that wants the same.

The existing users of frame types all have to work around it being a distinct
type, and none appear to want the distinction.  This removes that complexity.

If any callers want to make the distinction, they could implement QueryFrame
for BCTableCellFrame and use it.  (It's not implemented now, though!)

In a little more detail, prior to this patch (in my debug build, at least):
  * nsQueryFrame::ClassID::nsMathMLmtdFrame_id was 46
  * nsQueryFrame::ClassID::nsTableCellFrame_id was 47
  * nsQueryFrame::ClassID::nsBCTableCellFrame_id was 65
and entries 46 and 47 in sLayoutFrameTypes were
mozilla::LayoutFrameType::TableCell while entry 65 was
mozilla::LayoutFrameType::BCTableCell.

With this patch:
  * nsQueryFrame::ClassID::nsBCTableCellFrame_id is 40
  * nsQueryFrame::ClassID::nsMathMLmtdFrame_id is 41
  * nsQueryFrame::ClassID::nsTableCellFrame_id is 42
and entries 40 through 42 in sLayoutFrameTypes are
mozilla::LayoutFrameType::TableCell.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:10 +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
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
Matt Woodrow 1b955945aa Bug 1409114 - Part 2: Get rid of generic table painting code, and handle each class separately. r=dbaron
Most of the code in DisplayGenericTablePart was all within a per-class if statement, so it doesn't add much value, and makes the control flow harder to understand.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:14:45 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +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
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Ryan Hunt b936c00a65 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115

--HG--
extra : rebase_source : 4d65c07d8822f3a54ac881b5d0f55468ce884554
2019-02-25 16:09:24 -06:00
Emilio Cobos Álvarez e9ae3b0907 Bug 1527410 - Use Rust sizes for flex-basis, width, height, and their min/max properties. r=jwatt
Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
2019-02-15 03:59:31 +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
Emilio Cobos Álvarez c89256299a Bug 957915 - Handle calc(%) on tables. r=mats
This patch makes us handle calc with percentages when we can convert to
percentages the same way we handle plain percentages in table layout.

We still treat length + percentage as auto (this matches Blink / WebKit as
well). There's one case we differ with Blink / WebKit, which is calc(% + 0px),
which they'd treat as auto instead of a percentage.

I think this is a bug on them (or at least worth some spec clarification). I
filed https://github.com/w3c/csswg-drafts/issues/3482 for that.

In practice what that'd means for us if the WG decides that Blink / WebKit is
right in that case is that we'd need to keep track of whether the calc()
specifies lengths, and return false from ConvertsToPercent if so.

In any case, nothing that would massively change this patch, and I think enough
of an edge case that is not worth blocking on the CSSWG decision here. Though I
could be convinced otherwise of course.

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

--HG--
extra : moz-landing-system : lando
2019-01-15 19:39:23 +00:00
Cameron McCormack 1db3f9da78 Bug 1512716 - Re-indent NS_QUERYFRAME macros after clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13995

--HG--
extra : moz-landing-system : lando
2018-12-07 20:00:18 +00: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
Jean-Luc Bonnafoux 31f0693d4a Bug 1491639 - rename function IS_TABLE_CELL r=dbaron
rename function IS_TABLE_CELL

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

--HG--
extra : moz-landing-system : lando
2018-09-18 01:29:19 +00:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00