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

82 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin be1519920a Bug 1661874 Part 2 - Remove the support of ColumnSetFrame being an abs.pos container. r=heycam
The support of this was added in
https://hg.mozilla.org/mozilla-central/rev/fb0790d28846

After supporting column-span, ColumnSetFrame isn't the top-level
multicol container anymore, and is not served as an abs.pos container.
Thus, we can simply the reflow code a bit.

Differential Revision: https://phabricator.services.mozilla.com/D88698
2020-08-31 03:45:15 +00:00
Ting-Yu Lin 218e47c67f Bug 1661874 Part 1 - Rename mColMaxBSize to mColBSize in ReflowConfig. r=heycam
Rename so that its naming is consistent with ReflowConfig::mColISize,
and to avoid confusion with ColumnBalanceData::mMaxBSize.

Differential Revision: https://phabricator.services.mozilla.com/D88697
2020-08-31 03:45:13 +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
Ting-Yu Lin 777470ec78 Bug 1647332 Part 2 - Output the number of columns in ColumnBalanceData, and replace nsFrameList::GetLength(). r=heycam
The motivation is to replace mFrames.GetLength() in
FindBestBalanceBSize() since it is O(N), where N is the number of
columns.

Also, counting the column number from 1 so that it matches mUsedColCount
without needing to subtract 1 at some places.

Differential Revision: https://phabricator.services.mozilla.com/D80569
2020-06-23 18:34:36 +00:00
Ting-Yu Lin 0c0de41ac8 Bug 1618646 followup - Remove the declaration of nsColumnSetFrame::GetAvailableContentBSize(). r=mats
This should've been removed in Part 1.

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

--HG--
extra : moz-landing-system : lando
2020-03-31 15:08:38 +00:00
Ting-Yu Lin 95282ce758 Bug 1618646 Part 2 - Remove mComputedBSize and mConsumedBSize in nsColumnSetFrame::ReflowConfig. r=mats
They were used when nsColumnSetFrame was still a column container, but
are not used today.

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

--HG--
extra : moz-landing-system : lando
2020-02-28 22:36:35 +00:00
Ting-Yu Lin 626ea340bc Bug 1583639 Part 4 - Stop creating more columns in column-fill:auto mode if there's still block-size left in multicol container. r=dbaron
This patch makes fragmentation in "column-fill:auto" mode possible.

Note that we only bail out of creating more column contents when
"column-fill:auto" mode is set from the styles, i.e. when mForceAuto is
false. That is because when mForceAuto is true, we usually in the case
where we have gave up balancing, and we really want to create overflow
columns.

Note: without `!aConfig.mForceAuto` check, 673770.html can generated
assertions, and the frame tree contains dangling Overflow-lines and
ExcessOverflowContainersList.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 23:36:41 +00:00
Ting-Yu Lin 771bb28447 Bug 1583639 Part 3 - Keep the optimal used numColumns in column-fill:auto mode without resetting it to INT32_MAX. r=dbaron
mUsedColCount is used in balancing mode to check whether we have created
the maximum number of columns when the content cannot fit. Similarly,
mUsedColCount can also be useful in "column-fill:auto" mode to improve
the fragmentation story in the next patch.

This patch doesn't change the behavior (yet).

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

--HG--
extra : moz-landing-system : lando
2019-09-25 06:41:10 +00:00
Ting-Yu Lin fd1d19e6aa Bug 1583639 Part 2 - Rename mBalanceColCount to mUsedColCount in nsColumnSetFrame::ReflowConfig. r=dbaron
In next patch, this variable won't be set to INT32_MAX in
"column-fill:auto" mode, and it will be used in Part 4. Hence the
rename.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 06:43: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
Ting-Yu Lin 3a4933eb98 Bug 1549267 Part 1 - Remove NS_INTRINSICSIZE and NS_AUTOHEIGHT. r=mats
This patch is generated by the following steps.

1) Manually delete NS_INTRINSICSIZE and NS_AUTOHEIGHT in LayoutConstants.

2) Run the following script.
```
  #!/bin/bash
  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 NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
  rename NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
```

3) ./mach clang-format

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

--HG--
extra : moz-landing-system : lando
2019-06-04 23:41:20 +00:00
Ting-Yu Lin 4319b2077b Bug 1545328 Part 6 - Mark some nsColumnSetFrame methods "const". r=mats
Also, move GetAvailableContentBSize() to non-public section because it's
only used by nsColumnSetFrame.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:14 +00:00
Ting-Yu Lin de008d4346 Bug 1545328 Part 5 - Move "feasible" result into ColumnBalanceData, and make reflow methods return ColumnBalanceData. r=mats
ColumnBalanceData is reset in the beginning of ReflowChildren(), so I
make ReflowChildren() return a fresh ColumnBalanceData so that it's
easier (at least for me) to understand the data is recomputed in
every reflow iteration.

Also, FindBestBalanceBSize() uses ColumnBalanceData as an input to begin
its column balancing iteration. Make the argument pass by value so that
the caller's copy won't be modified.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:04 +00:00
Ting-Yu Lin 8f603f3d9c Bug 1545328 Part 4 - Replace "height" with "block-size" in comments. r=mats
I manually search "height" and replace it with "block-size" if the code
around it uses logical coordinates.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:00 +00:00
Ting-Yu Lin f8ad4e052f Bug 1545328 Part 3 - Stop exposing ClampUsedColumnWidth() in the header. r=mats
The static function is used only in nsColumnSetFrame's implementation.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:56 +00:00
Ting-Yu Lin d66a448af7 Bug 1545328 Part 2 - Remove "virtual" keywords for methods that already have "override". r=mats
Differential Revision: https://phabricator.services.mozilla.com/D28010

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:46 +00:00
Ting-Yu Lin b37f9457e7 Bug 1545328 Part 1 - Change two FindBestBalanceBSize()'s arguments to be passed by value. r=mats
No code after FindBestBalanceBSize() is interested in
aUnboundedLastColumn and aRunWasFeasible, so they don't need to be
input/output arguments.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 06:43:56 +00:00
Emilio Cobos Álvarez c028706efc Bug 1541913 - Use Servo lengths for column-width. r=boris
Depends on D26154

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

--HG--
extra : moz-landing-system : lando
2019-04-04 18:29:57 +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 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
Ting-Yu Lin 5a22a68c3c Bug 1497990 Part 2 - Do not carry block-end margin out of ColumnSetFrame. r=dbaron
Also, remove the unused NS_BLOCK_MARGIN_ROOT flag set on nsColumnSetFrame.

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

--HG--
extra : moz-landing-system : lando
2018-11-09 21:02:12 +00:00
Ting-Yu Lin fe4ef80141 Bug 1497990 Part 1 - Use mIsBalancing instead of comparison between mBalanceColCount with INT32_MAX. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D8782

--HG--
extra : moz-landing-system : lando
2018-11-09 21:02:02 +00:00
Ting-Yu Lin 8c481a151b Bug 1501145 Part 2 - Assign default values to ColumnBalanceData fields. r=mats
Depends on D9467

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

--HG--
extra : moz-landing-system : lando
2018-10-23 13:09:16 +00:00
Ting-Yu Lin 4e6b53ce88 Bug 1501145 Part 1 - Assign default values to ReflowConfig fields, and explicitly initialize them in ChooseColumnStrategy. r=mats
The original statement is neat, but one cannot easily associates the values
computed in ChooseColumnStrategy with the actually field name in ReflowConfig.

Remove the aFeasibleBSize and aInfeasibleBSize for ChooseColumnStrategy()
because they're not used.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 13:08:59 +00:00
Ting-Yu Lin 8dc290a28d Bug 1460075 - Use 1px as the minimum column width. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D3140

--HG--
extra : moz-landing-system : lando
2018-08-13 17:48:42 +00: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
L. David Baron f2ee3f6daf Bug 1432341 - Rename functions that relate to column rules to have clearer names. r=mattwoodrow
This is followup to bug 1361668, and is just cleanup in advance of the
patch to fix this bug.

MozReview-Commit-ID: 4HOKLA5WYNq

--HG--
extra : rebase_source : dc6ceb81cc6c19b5ab8a79d10812501bc0f525df
2018-01-31 07:18:49 +00: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
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
Cameron McCormack 139e81fb2f Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 086c49319d3847099614d65c8bb9d924f4e9be38
2017-06-16 17:22:33 +08:00
Sebastian Hengst 9365133d05 Backed out changeset e7ec499159f7 (bug 1364361) for bustage at nsIFrame.h:3348: bad implicit conversion constructor for 'OwnedAnonBox'. r=backout 2017-06-16 11:19:03 +02:00
Cameron McCormack b76836a0c6 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 8a6a9b88d678c52be8fa6f64b2664a08634a4a98
2017-06-16 15:32:40 +08:00
Sebastian Hengst fe67a32efc Backed out changeset 12db2d364b64 (bug 1364361) for heap write hazard. r=backout 2017-06-16 09:27:42 +02:00
Cameron McCormack eaf366ae43 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN

--HG--
extra : rebase_source : 83d5e20a9ec92a35c015386828b0c53c6c4eaeb5
2017-05-22 13:14:32 +08:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04: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
Ethan Lin 1fe274c96f Bug 1361668 - Fix the bound of nsDisplayColumnRules. r=mattwoodrow 2017-05-10 13:55:15 +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
peter chang 82b62cfc18 Bug 1344079 - Convert ColumnRule to WebRenderDisplayItemLayer, r=mattwoodrow
MozReview-Commit-ID: AmAVYi4P7nl

--HG--
extra : rebase_source : a2c7196cca088ed44e3c1dadd7ba599348ffbd29
2017-03-24 17:35:35 +08:00
Boris Zbarsky a16c017a14 Bug 1347411 part 6. Change stylo to correctly recompute style of column-content anonymous boxes. r=heycam
MozReview-Commit-ID: 2pNOSVUuLJK
2017-03-15 14:00:43 -04: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 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState 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 -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Mats Palmgren eeceb11ef1 Bug 1278080 - Make nsContainerFrame::RemoveFrame deal with overflow containers. r=dholbert 2016-06-10 02:56:23 +02:00