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

592 Коммитов

Автор SHA1 Сообщение Дата
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 dfdc727d06 Bug 1168921 - Stop cloning block direction margins for box-decoration-break:clone. r=mats
This can also fix bug 1586470.

This change basically reverts Bug 1025669 Part 1.
https://hg.mozilla.org/mozilla-central/rev/ae2fd5b2defb0df1bd30521f4793de6757d1e98b

In box-decoration-break-block-margin.html, the `height` in `.inner` is
changed to 79px so that 79px plus 7px margin top and 1px margin end,
total 87px, can be divided by 3 (columns). The modification to reference
file reflects what we currently rendered.

Co-authored-by: Mats Palmgren <mats@mozilla.com>

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

--HG--
extra : moz-landing-system : lando
2019-10-10 13:38:07 +00:00
Mats Palmgren c784db904f Bug 1557825 part 1 - Implement 'display:block ruby'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D40211

--HG--
extra : moz-landing-system : lando
2019-08-14 14:38:31 +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 64f57e5d7f Bug 1300293 - Make nsBidiPresUtils track line boxes separately for the progress of TraverseFrames and ResolveParagraph. r=jfkthame
TraverseFrames gathers a bunch of frames into an array, and then at
forced breaks or the end of the block flushes its array by running
ResolveParagraph.  ResolveParagraph can sometimes cause lines to break,
so lines recorded during TraverseFrames may no longer be accurate during
ResolveParagraph.

It may look like the lines are only needed during ResolveParagraph and
we could handle the one issue in TraverseFrames that deals with
preformatted newlines by restructuring the code a tad.  However, in the
next patch, there will be an additional caller that needs the current
line during TraverseFrames to pass to CreateContinuation, which makes
such a structure less plausible.

This will also make it easier to produce a current line for the call to
SplitInlineAncestors within ResolveParagraph, which will be done in the
patch after the next.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 18:55:56 +00:00
L. David Baron ab4b067e89 Bug 1566945 - Pass line box through to nsBlockFrame::AddFrames. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D38391

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:46 +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 57a98efc97 Bug 1565037 Part 5 - Rename aBottomEdgeOfChildren to aBEndEdgeOfChildren in methods' declaration. r=dholbert
Their definitions already use aBEndEdgeOfChildren.

Depends on D37626

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

--HG--
extra : moz-landing-system : lando
2019-07-11 18:43:48 +00:00
Ting-Yu Lin 1d40e7045d Bug 1565037 Part 4 - Rename aContentBSize to aBEndEdgeOfChildren. r=dholbert
As described in https://bugzilla.mozilla.org/show_bug.cgi?id=1562122#c5,
this precomputed argument is not our children's block-size, but is the
block-end edge of children because aState.mBCoord is initialized as our
border-padding block-start in BlockReflowInput's constructor.

I also delete the sentence "The final block-size that is used in
aMetrics will be set ..." because this is the implementation details of
this function, and is likely to become inaccurate after considering the
block split by column-span.

Depends on D37625

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

--HG--
extra : moz-landing-system : lando
2019-07-11 18:43:35 +00:00
Ting-Yu Lin 271347c543 Bug 1565037 Part 3 - Cache our children's reflow status, and use it to guide the morphing into our reflow status. r=dholbert
Because aStatus is also used as an output argument, caching aStatus as
our children's reflow status can and make the logic that morphs aStatus
to our reflow status easier to follow. And this helps the patch I'm
going to add for computing the block-size for column-span split.

Depends on D37624

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

--HG--
extra : moz-landing-system : lando
2019-07-11 18:50:14 +00:00
Ting-Yu Lin b0c5d5ce8d Bug 1565037 Part 2 - Change aStatus to a reference for ComputeFinalBSize(). r=dholbert
We usually use reference to manipulate nsReflowStatus like in Reflow().

The documentation for aStatus needs edit, and is done in next part.

Depends on D37623

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

--HG--
extra : moz-landing-system : lando
2019-07-11 18:43:23 +00:00
Ting-Yu Lin a051547c37 Bug 1565037 Part 1 - Make nsBlockFrame::ComputeFinalBSize() return the final block size. r=dholbert
ComputeFinalBSize() doesn't need to modify the final inline-size, so we
don't need to pass the entire LogicalSize into it.

Also, aReflowInput.AvailableBSize() is used multiple times. Cache it to
shorten some statements.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 18:43:14 +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
Ting-Yu Lin 8e6b2d246c Bug 1550629 - Fix comments mentioning GetAvailableSpace. r=dholbert
GetAvailableSpace was renamed to GetFloatAvailableSpace in bug 25888.

DONTBUILD because this is a comment-only change.

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

--HG--
extra : moz-landing-system : lando
2019-05-10 21:06:48 +00:00
Cameron McCormack f5b7d1380b Bug 866102 - Implement -webkit-line-clamp. r=mats,emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D20115

--HG--
extra : moz-landing-system : lando
2019-05-09 02:32:30 +00:00
Ting-Yu Lin 7a98dbcd3e Bug 1548673 Part 3 - Rename nsBlockFrame's mPrefWidth to mCachedPrefISize. r=jfkthame
Like Part 2, I choose mCachedPrefISize because grid and flex container
are using it.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:55 +00:00
Ting-Yu Lin 050bf09694 Bug 1548673 Part 2 - Rename nsBlockFrame's mMinWidth to mCachedMinISize. r=jfkthame
Instead of renaming it to mMinISize, I choose mCachedMinISize because
both grid and flex container frames use mCachedMinISize for similar
purpose.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:46 +00:00
Ting-Yu Lin 63457d2b61 Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame
This patch is generated by running the following script under layout/,
and then manually delete the FIXME comment in LayoutConstants.h

  #!/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_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:36 +00:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +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
Ting-Yu Lin f49d08722a Bug 1543571 Part 1 - Replace "reflow state" with "reflow input". r=dholbert
This patch is generated by the following script on Linux:

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 "reflow state" "reflow input"

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:27:37 +00:00
Mats Palmgren a24fcc8d2b Bug 1539656 - Allow a11y to get list-item ordinal values even when the counter list is dirty without asserting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26598

--HG--
extra : amend_source : 1e5bb99c8769b038ce1ee63202191e885f846b18
2019-04-08 21:49:20 +02:00
Mats Palmgren be049c79d6 Bug 205202 part 4 - [css-lists][css-pseudo] Rename various uses of bullet with marker to avoid any misleading association with nsBulletFrame (idempotent patch). r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren 4b5f164752 Bug 205202 part 3 - [css-lists][css-pseudo] Add support for the 'content' CSS property on ::marker pseudo elements. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren 53f517142f Bug 205202 part 1 - [css-lists][css-pseudo] Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser. r=emilio 2019-03-24 23:13:53 +01: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
Ting-Yu Lin d373ed0def Bug 1526097 - Remove nsIFrame::eBlockFrame flag. r=dholbert
Only nsBlockFrame and its subclasses recognize the nsIFrame::eBlockFrame
flag, so we can replace the usage of the flag with either
nsIFrame::IsBlockFrameOrSubclass() or a do_QueryFrame().

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

--HG--
extra : moz-landing-system : lando
2019-02-20 21:18:14 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +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
Daniel Holbert 3cee4428b6 Bug 1525133: Explicitly skip orthogonal-flow children when determining last-baseline of a block from its children. r=mats
Without the check that I'm adding in this patch, we'd violate the
"parallel writing mode" expectation of some baseline accessors
that we use in the now-guarded code. And we'd produce bogus layout
as a result.

The added assertions are just for good measure. The included testcase
causes us to fail both assertions, in a build that's missing the fix.

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

--HG--
extra : moz-landing-system : lando
2019-02-05 19:45:46 +00:00
Miko Mynttinen aafa85ee9d Bug 1512251 - Remove unused render only selection code r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D13829

--HG--
extra : moz-landing-system : lando
2018-12-06 19:40:50 +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
Ting-Yu Lin 1d9848a22a Bug 916972 - Eliminate nsIFrame::GetSplittableType() completely. r=mats,dholbert
Currently, GetSplittableType() is called only in
nsCSSFrameConstructor::CreateContinuingFrame(). The splittable concrete frames
should inherit from nsSplittableFrame, and must explicitly create continuing
frame in CreateContinuingFrame(). Thus, no need to maintain GetSplittableType().

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

--HG--
extra : moz-landing-system : lando
2018-11-05 19:11:12 +00:00
Ting-Yu Lin fb26f86deb Bug 1486602 Part 3 - Create bullet frame for block frames in nsCSSFrameConstructor::ConstructBlock() instead of in their SetInitialSingleChild() r=mats
nsCSSFrameConstructor::FindDisplayData() guarantees a block with "display:
list-item" will be constructed by ConstructBlock() (either through
ConstructScrollableBlock() or ConstructNonScrollableBlock()).

This is also a preparation to fix bug 1491915 since we want to control
bullet frame creation under column hierarchy.

Depends on D6840

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

--HG--
extra : moz-landing-system : lando
2018-09-26 20:55:26 +00:00
Ting-Yu Lin 1235a26fba Bug 1486602 Part 1 - Remove arguments of nsBlockFrame::CreateBulletFrameForListItem() r=mats
Those arguments were added in bug 591737 to create a triangle for the
summary frame, but <summary> has been re-implemented by using "list-item"
since then. Now the only caller is nsBlockFrame itself, so there's no need
to expose those arguments.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 23:13:37 +00:00
Mats Palmgren 0e1ec1a9f1 Bug 1487221 - Add memory reporting for nsLineBox::mFrames. r=bz 2018-09-19 05:27:18 +02:00
Zhang Junzhi e081858ecc Bug 1490611 - physical to logical name refactor: DISPLAY_*_WIDTH to DISPLAY_*_INLINE_SIZE(as well as the relevant struct in the macro contents) r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5657

--HG--
extra : moz-landing-system : lando
2018-09-12 12:35:47 +00: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
Brad Werth 6e44ec2131 Bug 1466231 Part 1: Change nsBlockFrame::PlaceLine to accept an nsFlowAreaRect and update flags if it shrinks the area due to a float. r=dbaron
MozReview-Commit-ID: 4stQQfboUl7

--HG--
extra : rebase_source : c27e886d61d53435a40831f5e527a893f91e57bf
2018-06-06 12:02:36 -07:00
Cosmin Sabou 5a87ab1364 Backed out 5 changesets (bug 1466231) for reftest failures on float-retry-push-image.html.
Backed out changeset 8141b2848c2c (bug 1466231)
Backed out changeset 2250da9a0dd0 (bug 1466231)
Backed out changeset 012e16dcc677 (bug 1466231)
Backed out changeset 332453c76ec7 (bug 1466231)
Backed out changeset f926e605d5a9 (bug 1466231)
2018-06-16 01:45:26 +03:00
Brad Werth 31b77c9374 Bug 1466231 Part 1: Change nsBlockFrame::PlaceLine to accept an nsFlowAreaRect and update flags if it shrinks the area due to a float. r=dbaron
MozReview-Commit-ID: 4stQQfboUl7

--HG--
extra : rebase_source : c27e886d61d53435a40831f5e527a893f91e57bf
2018-06-06 12:02:36 -07:00
Boris Zbarsky 30e5cc5d8b Bug 1387143 part 24. Remove nsISelection::ContainsNode. r=mats 2018-05-08 13:52:42 -04: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
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +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