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

148 Коммитов

Автор SHA1 Сообщение Дата
Philipp Zech 3d4be168ae Bug 1648938 - Convert writing-modes #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D84016
2020-07-23 21:31:23 +00:00
Simon Giesecke d017d73cd9 Bug 1652022 - Remove unnecessary includes from WritingModes.h. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D83113
2020-07-15 13:56:31 +00:00
Mats Palmgren 3622105887 Bug 1607954 part 2 - [css-grid][css-align] Implement Masonry layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67062
2020-04-28 01:18:47 +00:00
L. David Baron f3b1d5a5c9 Bug 1631941 - Add writing mode assertions for mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71886
2020-04-22 23:43:56 +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 fd0206f269 Bug 1631941 - Add writing mode assertions for mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71886
2020-04-22 18:00:07 +00: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 55714ecb54 Bug 1631941 - Add writing mode assertions for mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71886
2020-04-22 15:56:09 +00: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
Ting-Yu Lin 9306d8b5ef Bug 1624684 Part 2 - Let LogicalMargin::ApplySkipSides return a reference to itself, and convert some callers. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D69758

--HG--
extra : moz-landing-system : lando
2020-04-07 18:44:17 +00:00
Emilio Cobos Álvarez 279cb1fda5 Bug 1618601 - Add non-const accessors to StyleRect. r=hiro
Just minor convenience. Though I don't love the code duplication, oh well.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 20:58:00 +00:00
Daniel Holbert a4b224a290 Bug 1541095: Remove an unnecessary static_cast in WritingModes.h. r=TYLin
The variables involved in the bitwise arithmetic are all of type uint8_t, so
we end up with that type automatically (no need to bother with a static_cast).

Note that we *do* need to declare the type (we can't use `auto`, or else
the compiler wants to upgrade the local variable to have a wider type --
"int", I think -- and that then produces an build warning when we pass
that variable as a uint8_t param further down).

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

--HG--
extra : moz-landing-system : lando
2020-02-07 00:39:28 +00:00
Ting-Yu Lin f044523b82 Bug 1610670 - Add AllLogicalSides() to support range-based for loops. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D60754

--HG--
extra : moz-landing-system : lando
2020-02-04 01:55:39 +00:00
Ting-Yu Lin 8b11ffdb9e Bug 1155772 Part 9 - Convert FlexItem::mMargin to LogicalMargin. r=mats
Note that I return LogicalMargin by value for GetMargin(). It is
considered a suboptimal practice to return a constant reference to a
member variable. We won't gain performance by returning a reference
because the compiler can optimize the return value. If it were assigned
to a new variable, the copy/move constructor is called anyway.

As noted in FIXME(TYLin), the AxisOrientationType argument in
GetMarginBorderPaddingSizeInMainAxis() and many other methods can be
removed. However, to make the patch size manageable, I'll remove them in
a later part.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 23:00:35 +00:00
Csoregi Natalia ae7cb7cc70 Backed out 16 changesets (bug 1155772) for bustage on WritingModes.h. CLOSED TREE
Backed out changeset 21ab70ca4496 (bug 1155772)
Backed out changeset 2a2e5970cf88 (bug 1155772)
Backed out changeset 1e9c57134aae (bug 1155772)
Backed out changeset 3cd8558625a2 (bug 1155772)
Backed out changeset ad2edd6baa2f (bug 1155772)
Backed out changeset a5cb718ed15d (bug 1155772)
Backed out changeset 6cc7c04bf567 (bug 1155772)
Backed out changeset 981e290de2af (bug 1155772)
Backed out changeset 7c92f5b6d190 (bug 1155772)
Backed out changeset 83da4fc71357 (bug 1155772)
Backed out changeset 32f209c8856c (bug 1155772)
Backed out changeset b3b3dfa8ac4e (bug 1155772)
Backed out changeset abc7f4471cbf (bug 1155772)
Backed out changeset ce108df4d23c (bug 1155772)
Backed out changeset 11f020664664 (bug 1155772)
Backed out changeset 7677362c44b3 (bug 1155772)
2020-01-21 22:25:02 +02:00
Ting-Yu Lin ffc0b745ed Bug 1155772 Part 9 - Convert FlexItem::mMargin to LogicalMargin. r=mats
Note that I return LogicalMargin by value for GetMargin(). It is
considered a suboptimal practice to return a constant reference to a
member variable. We won't gain performance by returning a reference
because the compiler can optimize the return value. If it were assigned
to a new variable, the copy/move constructor is called anyway.

As noted in FIXME(TYLin), the AxisOrientationType argument in
GetMarginBorderPaddingSizeInMainAxis() and many other methods can be
removed. However, to make the patch size manageable, I'll remove them in
a later part.

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

--HG--
extra : moz-landing-system : lando
2020-01-18 00:20:26 +00:00
Emilio Cobos Álvarez afe05cb6a5 Bug 1602421 - Move logical side definitions to WritingModes.h. r=jfkthame
Depends on D56350

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

--HG--
extra : moz-landing-system : lando
2019-12-09 20:41:03 +00:00
Emilio Cobos Álvarez 4a3be9604a Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 03:32:28 +00:00
Ting-Yu Lin fec63b8556 Bug 1596339 Part 4 - Implement operator<< for LogicalPoint and LogicalMargin. r=dholbert
I'm not aware of any usage of LogicalPoint and LogicalPoint in frame
tree dump, but I still want to implement them for the sake of
completeness.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 03:52:05 +00:00
Ting-Yu Lin e5ffc03d4b Bug 1596339 Part 3 - Implement operator<< for LogicalSize, and use it in frame tree dump. r=dholbert
Note: The output format of BaseSize is "3 x 5", so a pair of parentheses
is added around %s in "logical-size=(%s)" to make it looks better.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 04:49:27 +00:00
Ting-Yu Lin 9b33cffdf0 Bug 1596339 Part 2 - Implement operator<< for LogicalRect, and use it in frame tree dump. r=dholbert
This change uses parentheses, i.e. '(' and ')', to enclose the dimension
of LogicalRect. This match the output of BaseRect's operator<<.

Note: This introduces inconsistency in the frame tree dump because some
of the output format still use braces to enclose the data. But in later
patches, I'll gradually change the format to use parentheses.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 03:51:56 +00:00
Ting-Yu Lin 198f20c438 Bug 1596339 Part 1 - Implement operator<< for WritingMode, and use it in frame tree dump. r=dholbert
WritingMode.h already depends on ostream header implicitly via
nsBidiUtils.h -> nsString.h. For completeness, I still add #include
<ostream>.

While I'm here, I make the format of debug prints in nsLineBox more
consistent with the counter-part in nsFrame. Some of them will be
revised in the later patches.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 03:51:54 +00:00
Ting-Yu Lin cfa677a4cc Bug 1591546 Part 2 - Add WritingMode::IsPhysicalRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50772

--HG--
extra : moz-landing-system : lando
2019-10-28 18:22:05 +00:00
Ting-Yu Lin d0f336a7a6 Bug 1591546 Part 1 - Add WritingMode::IsBidiRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50771

--HG--
extra : moz-landing-system : lando
2019-10-28 09:33:05 +00:00
Ting-Yu Lin 03c5d676c0 Bug 1587645 Part 2 - Add WritingMode::IsPhysicalLTR(). r=jfkthame
I discovered this while improving `ScrollFrameHelper::IsPhysicalLTR()`
in Part 1. Our code base needs a notion of physical direction. Let's add
it to WritingMode.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 20:01:46 +00:00
Ting-Yu Lin 977a6275d1 Bug 1582224 - Split SIDEWAYS bit in WritingMode. r=jfkthame,emilio
Currently, there's no way to tell whether the SIDEWAYS bit is set from
`writing-mode:sideways-*` or `writing-mode:vertical-*; text-orientation:sideways;`.
To be able to tell them apart, split SIDEWAYS bits into VERTICAL_SIDEWAYS
and TEXT_SIDEWAYS. This is needed by my proposed solution in bug 1102175.

Also, provide convenience methods related to sideways writing-mode, and replace
obscure checks in the codebase.

Note that we don't have the use cases to distinguish vertical-rl from
sideways-rl in layout, but for the completeness, IsSidewaysLR() is still
defined.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 02:37:14 +00:00
Cameron McCormack 7052f624b5 Bug 1578147 - Align the Rust and C++ representations of WritingMode. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44412

--HG--
extra : moz-landing-system : lando
2019-09-09 04:49:55 +00:00
Emilio Cobos Álvarez ac2f80304e Bug 1568536 - Don't propagate viewport styles from display: none or display: contents elements. r=dholbert
Resolution is at:

 * https://github.com/w3c/csswg-drafts/issues/3779#issuecomment-481762912

Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974,
I'll make sure to wait until they're in the tree and ensure they're passing.

Note that we need to ensure in the frame constructor that the document element
is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves
duplicated work (since ResolveStyleLazily throws away the style).

ResolveStyleLazily already returns out of date styles, unless the element is not
styled yet, or is in a `display: none` subtree, in which case it computes and
returns a new (up-to-date) style.

So the switch to the FFI call only should change behavior for the display: none
subtree case (since we ensure the unstyled case isn't hit by styling the
document earlier). But that case is one of the cases we're interested in
changing, conveniently.

Depends on D40080

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

--HG--
extra : moz-landing-system : lando
2019-08-16 11:43:36 +00:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Emilio Cobos Álvarez b1ca51fe1e Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 12:44:44 +02:00
Cosmin Sabou 2fa2a56685 Backed out 3 changesets (bug 1561738) for causing build bustages on nsGridContainerFrame.cpp CLOSED TREE
Backed out changeset 98f100abc2ba (bug 1561738)
Backed out changeset 9ed20d0fb9ba (bug 1561738)
Backed out changeset 483b1e134ace (bug 1561738)
2019-06-28 13:27:09 +03:00
Emilio Cobos Álvarez e023916761 Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

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

--HG--
extra : moz-landing-system : lando
2019-06-28 09:46:26 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Jeff Gilbert 373563b0ec Bug 1540357 - Fix implicit int conversions in dom/canvas's layout/* includes. r=dholbert
nsUnicodeProperties.h includes into ICU, which has implicit int
truncation, so quarantine this include out of problematic headers.

Depends on D25498

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:49 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Hiroyuki Ikezoe 2fcc3c784e Bug 1532477 - Return BEnd() from LogicalRect::YMost() in the case of non vertical. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D22035

--HG--
extra : moz-landing-system : lando
2019-03-05 01:22:06 +00:00
Sylvestre Ledru e0c61dafa5 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01: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 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01: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
Boris Chiou e3e3d6b80a Bug 1500627 - Fix some potential bugs of sizing properties for keywords in the block axis r=mats
1. Drop {Width|MinWidth|MaxWidh}DependsOnContainer() and
   {Height|MinHeight|MaxHeight}DependsOnContainer() because they are bogus
   after introducing the writing mode. Dropping these functions needs
   update nsLineLayout because it is the only one who still use
   these functions.
2. There are still some potential assertions and bugs on handling keywords
   in the block size, so we should update them as well.

Depends on D9438

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

--HG--
extra : moz-landing-system : lando
2018-10-29 22:56:42 +00:00
Emilio Cobos Álvarez adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Emilio Cobos Álvarez bbc6f5b7f2 Bug 1476054: Fixes and cleanups for Servo PR #21139. r=me
Logical floats don't appear in the computed style objects, so there's no need to
check for them.

MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-17 10:15:46 +02:00