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

294 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 156c710d50 Bug 1667501 - Add an nsIFrame::IsFrameOfType bit to say whether frames support aspect-ratio. r=TYLin
aspect-ratio applies to all elements except inline boxes and internal ruby or
table boxes. So we should return false for inline frames, table internal frames
(i.e. except nsTableFrame and nsTableWrapperFrame), and ruby internal frames.

Also, we can drop ComputeSizeFlags::SkipAspectRatio because this frame
bit can replace this flag.

Note: it seems nsRubyBaseContainerFrame and nsRubyTextContainerFrame are
inline, so we return false for them.

This will be very useful when computing the intrinsic size because
IntrinsicForAxis() computes the intrinsic size for all descendant frames and
some of descendants may not support aspect-ratio. It's pretty hard to achieve
this by just adding a flag for this function.

Differential Revision: https://phabricator.services.mozilla.com/D104296
2021-02-11 00:19:58 +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 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
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
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
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 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 9f39c7b608 Bug 1409114 - Part 8: Create column and column group background display items as part of the cell's BuildDisplayList. r=dbaron
This is the main performance improvement, and means that we no longer have to iterate all the cells for each column.

It has a couple of behaviour changes:

The first is that we no longer apply stacking context effects (like opacity) to column and column group backgrounds.
I believe this is correct as per both CSS2.1 Appendix E, and css-tables-3 (quoted in nsTableColFrame::BuildDisplayList).
This matches the behaviour of blink and WebKit.

We also previously created items in column,row ordering, whereas now they will be in row,column. In cases where two cells
overlap (using rowspan and colspan to extend multiple neighbours in to the same place) this can render backgrounds in a
different order, but the new behaviour matches blink and WebKit.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:16:09 +00:00
Matt Woodrow 8bf47621c6 Bug 1409114 - Part 6: Store column and column group backgrounds separately, and then append then before the rest of the table contents. r=dbaron
This also changes behaviour a bit, previously we interleaved column and column group backgrounds. where we now put all the column group backgrounds behind all columns.
I believe this is the correct ordering as per CSS2.2 Appendix E.

Column backgrounds can overlap when using 'span', and we now render this in a different order, but this matches what other browsers do.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:15:39 +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 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
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
Sylvestre Ledru ext:(%20and%20Karl%20Tomlinson%20%3Ckarlt%2B%40karlt.net%3E) c7b59395f2 Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam
Differential Revision: https://phabricator.services.mozilla.com/D13125

--HG--
extra : moz-landing-system : lando
2018-12-21 03:07:05 +00:00
Cameron McCormack a9c935c355 Bug 1511854 - Part 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13686

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:03 +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
Cosmin Sabou 0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Sylvestre Ledru 9ea4a3d5c0 Bug 1508472 - Part 3: Third batch of comment fix-ups in preparation for the tree reformat (layout/) r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D13125

--HG--
extra : moz-landing-system : lando
2018-11-27 21:39:24 +00:00
L. David Baron aad8d26078 Bug 1479859 patch 3 - Add an nsIFrame::IsFrameOfType bit to say whether frames support contain:layout and contain:paint. r=dholbert
This is needed for patch 4.

This is based both on the wording in the spec and the discussion in
https://github.com/w3c/csswg-drafts/issues/2987, and also doesn't
support them for nsMathMLContainerFrame, which is similar to inlines and
ruby.

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

--HG--
extra : rebase_source : b7e23fb248fa34957ca2d539134e872f5a03f5a8
2018-08-07 15:02:07 -07:00
Matt Woodrow 8eb6516c62 Bug 1443380 - Don't mark all descendant frames modified for display list building when invalidating a frame subtree since marking just the root is sufficient. r=miko 2018-04-04 16:15:49 +12: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 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
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
Ya-Chieh Wu ce1be4b4eb Bug 895096 - Part 1: Round border-collapsed table borders to device pixels rather than CSS pixels, as for other borders, and store them (as BCPixelSize) as device pixels rather than CSS pixels. r=dbaron
MozReview-Commit-ID: 3yqj8gAAGYv
2017-09-12 19:48:00 -04:00
Matt Woodrow 40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst 8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Mats Palmgren ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
Morris Tseng c09ed5d520 Bug 929484 - Remove nsTableBorderBackground displayitem and nsTablePainter. r=mstange
MozReview-Commit-ID: 1HmfGyBqWnf
2017-05-05 14:30:15 +08:00
Carsten "Tomcat" Book 44f55ecb9b Backed out changeset 3dc8c2aea9bf (bug 929484) 2017-05-04 16:59:59 +02:00
Morris Tseng 087ad6539a Bug 929484 - Remove nsTableBorderBackground displayitem and nsTablePainter. r=mstange
MozReview-Commit-ID: 1HmfGyBqWnf
2017-05-04 17:32:08 +08:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Neerja Pancholi ee17cb9c09 Bug 1285874 - Maintain a map of removed table-rows and use it to lazily recalculate row indices. r=dbaron
MozReview-Commit-ID: Jt6QJTp0YGe
2017-03-02 15:09:30 -08:00
Mats Palmgren e8c6fd3388 Bug 1342801 - Store the 'writing-mode' used value on nsIFrame and make GetWritingMode non-virtual. r=jfkthame
MozReview-Commit-ID: HPhuxjDbOdh
2017-02-28 18:58:30 +01:00
Mats Palmgren 562b840a02 Bug 1312379 part 3 - [css-align][css-tables] Add methods for CSS Alignment first/last baseline of the table container. r=dholbert 2016-12-20 23:56:35 +01:00
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

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 "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 5246b4bf71 Bug 1277129 Part 3b - Rename nsTableReflowState, nsRowGroupReflowState, and nsTableCellReflowState. r=dbaron
This patch is generated by the following script:

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 nsTableReflowState TableReflowInput
rename nsRowGroupReflowState TableRowGroupReflowInput
rename nsTableCellReflowState TableCellReflowInput

MozReview-Commit-ID: HN2E6utaxL8

--HG--
extra : rebase_source : 19767e6f88125f008f857116c607b3fc4faebda7
2016-07-21 18:36:36 +08:00