Commit Graph
346 Commits
Author SHA1 Message Date
Oriol Brufau 78ff6818b0 Bug 1915496 [wpt PR 47849] - Obey min-block-size and max-block-size in floats, a=testonly
Automatic update from web-platform-tests
Obey `min-block-size` and `max-block-size` in floats

We were using the unclamped `box_size.block` instead of `block_size`.

Signed-off-by: Oriol Brufau <[email protected]>

--

wpt-commits: f31fb8f12a52a104ef20b28b4127638881bbc33c
wpt-pr: 47849
2024-08-30 00:57:34 +00:00
Oriol BrufauandMartin Robinson cc44378d5f Bug 1915101 [wpt PR 47806] - Respect min/max constraints in the block axis of block containers, a=testonly
Automatic update from web-platform-tests
Respect min/max constraints in the block axis of block containers

Consider a block container that establishes an inline formatting context
and has a definite `block-size` which is clamped by `min-block-size` or
`max-block-size`.

We were already sizing such container correctly, however, its contents
were resolving their percentages against the unclamped `block-size`
value.

This patch fixes the `ContainingBlock` that we pass to the contents so
that they resolve percentages correctly.

Co-authored-by: Martin Robinson <[email protected]>
Signed-off-by: Oriol Brufau <[email protected]>

--

wpt-commits: 957bc8923cd815c0519355595de3839762f5317a
wpt-pr: 47806
2024-08-28 01:32:14 +00:00
Ting-Yu Lin 54bbd58ae9 Bug 1906768 - Get floats list again after calling AppendPushedFloatChain(). r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D215995
2024-07-11 17:23:34 +00:00
Stanca Serban ef51e7129d Backed out changeset 9a0e6453ea8f (bug 1906768) for causing android wpt failures. CLOSED TREE 2024-07-10 11:30:08 +03:00
Ting-Yu Lin bb2d3e235c Bug 1906768 - Get floats list again after calling AppendPushedFloatChain(). r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D215995
2024-07-09 18:50:32 +00:00
Ting-Yu Lin 9426229a09 Bug 1904409 - Call StartRemoveFrame() before calling ContinueRemoveFrame() in nsBlockFrame::RemoveFloat(). r=dholbert
After Bug 1903141 Part 3 [1], StartRemoveFrame() does not get called when there
is no float list. We need to make sure StartRemoveFrame() is called before
calling ContinueRemoveFrame().

[1] https://hg.mozilla.org/mozilla-central/rev/c2ba52894016007c3f5c4f21241f14d3cd7bd7a3

Differential Revision: https://phabricator.services.mozilla.com/D214775
2024-06-26 20:24:58 +00:00
Martin RobinsonandRakhi Sharma 8c370398e0 Bug 1903007 [wpt PR 46782] - layout: Allocate inline box start space on segment, a=testonly
Automatic update from web-platform-tests
layout: Allocate inline box start space on segment

Instead of allocating the inline padding and border space on the line,
allocate it on the segment -- which where the inline box start goes.

Co-authored-by: Rakhi Sharma <[email protected]>

--

wpt-commits: 19cd59dfdce7392d6d6cffbfd84825207d648c39
wpt-pr: 46782
2024-06-24 07:48:43 +00:00
Oriol BrufauandMartin Robinson 87b2055740 Bug 1891144 [wpt PR 45671] - Element collapsing thru should collapse with its children, a=testonly
Automatic update from web-platform-tests
Element collapsing thru should collapse with its children

If the top and bottom margins of an element collapse through, then this
patch treats the bottom margin as collapsing with its children, even if
`height` doesn't compute to zero.

Co-authored-by: Martin Robinson <[email protected]>

--

wpt-commits: e2b6a0217ab27012c3f18477dda3f9f8ff000592
wpt-pr: 45671
2024-04-19 07:34:33 +00:00
Morten Stenshorne 2e3a676ae6 Bug 1889143 [wpt PR 45468] - Destroy leftover block-in-inline anonymous wrappers., a=testonly
Automatic update from web-platform-tests
Destroy leftover block-in-inline anonymous wrappers.

When a block-in-inline becomes floated or out-of-flow positioned, we
need to destroy the anonymous wrapper block around it (unless it has
siblings that still are in-flow blocks). Keeping such leftover wrappers
around would prevent content before and after it from being on the same
line.

It would also incorrectly prevent the block fragmentation code from
marking inline formatting context roots as non-contiguous.
Non-contiguous inline formatting context roots require some extra work
during pre-paint, to satisfy the invariant that the FragmentData and
PhysicalFragment count must match.

Bug: 329674902, 332396356
Change-Id: Ifd67d5ba35ae5b4b56e004addc27436feeb307c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5412656
Commit-Queue: Morten Stenshorne <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1281371}

--

wpt-commits: 283b5a22e65166a6e779d7c845d625f7214909aa
wpt-pr: 45468
2024-04-10 09:25:32 +00:00
Oriol Brufau 954cb68fd6 Bug 1887182 [wpt PR 45287] - Pick the first or last baseline as appropriate, a=testonly
Automatic update from web-platform-tests
Pick the first or last baseline as appropriate

The old logic was always picking the last baseline, but this should only
happen for inline-blocks.

Since replaced elements and flex containers aren't currently setting
their baselines, this is only an improvement for inline-tables.

--

wpt-commits: 02bff6f94586fcf762a9b3623a776fe724e6a42f
wpt-pr: 45287
2024-03-28 14:09:45 +00:00
Oriol Brufau 2ed7163ec7 Bug 1887172 [wpt PR 45281] - Don't update row baseline if cell is empty, a=testonly
Automatic update from web-platform-tests
Don't update row baseline if cell is empty

Gecko, Blink and WebKit agree that the if a row only has empty cells,
its baseline should be at the bottom, not at the top.

There isn't interoperability when the cells are just empty-ish, so this
patch takes the simplest approach, aligning with Blink: any out-of-flow
or in-flow content other than collapsed whitespace counts as not empty.

--

wpt-commits: 1e23d2d783a02ecd84498d83b6b6cb07fc624f0d
wpt-pr: 45281
2024-03-28 14:09:38 +00:00
richarddushime 86483f5346 Bug 1886672 [wpt PR 45241] - Fix WPT reference no_red_3x3_monospace_table-ref.xht, a=testonly
Automatic update from web-platform-tests
Fix WPT reference no_red_3x3_monospace_table-ref.xht

--

wpt-commits: 4e447e22018bd8fa74b935ab5651dc642ae26bcb
wpt-pr: 45241
2024-03-27 10:29:58 +00:00
Martin Robinson 37952fa282 Bug 1886460 [wpt PR 45220] - layout: Take into account text-indent for justification and soft line breaking, a=testonly
Automatic update from web-platform-tests
layout: Take into account `text-indent` for justification

This change makes it so that when calculating the space added between
words for justification, text-indent is taken into account.

Fixes #31775.

--

wpt-commits: 96c57cf5d3731e8cd40562311c3d7a63cce2cfc9
wpt-pr: 45220
2024-03-27 10:29:57 +00:00
Oriol Brufau efd33cb9b4 Bug 1885224 [wpt PR 45093] - Allow finishing anonymous inline-table at the end of inline elements, a=testonly
Automatic update from web-platform-tests
Allow finishing anonymous inline-table at the end of inline elements

This avoids inserting it outside of its parent.

--

wpt-commits: 19ffb2b65f273878e09b8956dc4472016b1466d0
wpt-pr: 45093
2024-03-15 12:24:52 +00:00
Oriol Brufau 623440efe7 Bug 1885213 [wpt PR 45090] - End ongoing IFC when inserting anonymous block-level table, a=testonly
Automatic update from web-platform-tests
End ongoing IFC when inserting anonymous block-level table

So that the table appears after preceding inline-level contents.
Fixes #31603.

--

wpt-commits: 2d1637ca539586606850a4473de97ee6f19383ea
wpt-pr: 45090
2024-03-15 12:24:44 +00:00
Oriol Brufau 5c7dc0308a Bug 1885063 [wpt PR 45074] - Fix vertical alignment at the root of an IFC, a=testonly
Automatic update from web-platform-tests
Fix vertical alignment at the root of an IFC

At the root of an inline formatting context, we used its vertical-align
in order to compute the strut. That was wrong, since vertical-align
on a block container shouldn't affect the contents, it should only
affect the alignment of the block container (if it's inline-level)
within the parent IFC.

This was only working well if the block container was block-level, since
effective_vertical_align_for_inline_layout returned `baseline` for
block-level boxes.

Instead of the outer display type, this patch changes the logic to check
whether we are at the root of the IFC.

--

wpt-commits: 8771a8f4bdc91fe78ca440faa346249c2173c3a6
wpt-pr: 45074
2024-03-15 12:24:32 +00:00
Sam Sneddon 3bc76ed71b Bug 1881563 [wpt PR 44732] - Replace old CSS2 color parsing tests with JS, a=testonly
Automatic update from web-platform-tests
Replace old CSS2 color parsing tests with JS

There are over a thousand near identical tests testing parsing of
<color> values across various properties; these cumulatively end up
taking several minutes to run which is almost certainly not worthwhile.

Instead, have a single testharness.js test that checks we get the
specified value we expect for all the various combinations of
property/value.

Note this does keep *-129.xht of each of these to maintain coverage that
we do, in fact, render the specified color for each property.

--

wpt-commits: 1e8deece435c7e98b72c948d8cc980f04c998e81
wpt-pr: 44732
2024-03-04 09:26:22 +00:00
Myles C. Maxfield 6fd904bd93 Bug 1881772 [wpt PR 44747] - CSS word-spacing property does not obey percentages, a=testonly
Automatic update from web-platform-tests
CSS word-spacing property does not obey percentages

Export from https://bugs.webkit.org/show_bug.cgi?id=126674 / https://commits.webkit.org/144704@main

Reviewed by Simon Fraser.

One change between CSS2.1 and CSS3 is that the word-spacing CSS property can
take percentages (of the width of the space character) in CSS3.

* css2.1/20110323/c541-word-sp-001-expected.html:
* css2.1/20110323/c541-word-sp-001.htm: Updated to not disregard percentages

--

wpt-commits: 5d77beb8f936413bcc757fcadf59b195ec52e005
wpt-pr: 44747
2024-03-01 20:09:57 +00:00
Sam Sneddon a2eeaac1e3 Bug 1881538 [wpt PR 44730] - Convert CSS2 visual tests into reftests where an existing ref matches, a=testonly
Automatic update from web-platform-tests
Convert CSS2 visual tests into reftests where an existing ref matches

This is based on running the visual tests in Chrome/Firefox/Safari, and
comparing the screenshots to those of existing refs.

--

wpt-commits: ea47935039dd3e2ca2abfbadf8f87c33221077d3
wpt-pr: 44730
2024-03-01 20:09:47 +00:00
Boris Chiou 3899bc85aa Bug 1805727 - Part 4: Implement transition-behavior for properties with discrete animation type. r=emilio
The implementation is straight-forward. We have to check
if `transition-behavior` is `allow-discrete` when trying to create a new
transition and when checking if we have to cancel a running transition.

Also, the test case is out-of-date, so I tweak it a little bit and add
more general test cases for transtiion-behavior. Besides, I enable the
preference in the WPT folders which use `transition-behavior` (but
those tests may be passed already or failed due to reasons other than
`transition-behavior`).

Differential Revision: https://phabricator.services.mozilla.com/D201864
2024-02-23 21:41:49 +00:00
Koji Ishii 0ef5c4dbf1 Bug 1878259 [wpt PR 44376] - [LineBreaker] Add a test for crbug.com/1520442, a=testonly
Automatic update from web-platform-tests
[LineBreaker] Add a test for crbug.com/1520442

This patch adds a test, which was accidentally lost while
renaming in PS8 of crrev.com/c/5251158. The content is the
same as the one in PS7.

Bug: 1520442
Change-Id: Ie9b72f63a9560b803f7cd3120c45cc3071302405
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5261043
Reviewed-by: Morten Stenshorne <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Auto-Submit: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1255506}

--

wpt-commits: 5a5bd1e6635142b99fe27a5ea731fba9385d2b90
wpt-pr: 44376
2024-02-05 09:00:06 +00:00
Koji Ishii 6ffe47ca9c Bug 1877673 [wpt PR 44316] - [LineBreaker] Remove parallel flow break tokens when rewinding floats, a=testonly
Automatic update from web-platform-tests
[LineBreaker] Remove parallel flow break tokens when rewinding floats

When crrev.com/c/5052124 started rewinding floats, its
associated parallel flow break tokens should also be reset,
but it didn't. This patch fixes it.

The 3 tests are for the same cause, but may produce different
crash points. The `1` and `2` variants are more minimized and
easier to understand, but they produce different symptoms than
the original case that they may not always spot this issue as
the code evolves.

Bug: 1520442
Change-Id: I3546dba37d0dd2324804ad6c6a408ed162934663
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5251158
Commit-Queue: Koji Ishii <[email protected]>
Auto-Submit: Koji Ishii <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1255473}

--

wpt-commits: 6e5d9709e7fad47ff9078649e1317aec36d3f982
wpt-pr: 44316
2024-02-05 09:00:05 +00:00
Koji Ishii 639a0bc2d2 Bug 1865982 [wpt PR 43302] - [LineBreaker] Support rewinding floats in nowrap, a=testonly
Automatic update from web-platform-tests
[LineBreaker] Support rewinding floats in `nowrap`

This patch supports rewinding floats in `nowrap` or `pre`.

In Blink, when NG was first implemented, rewinding floats
was harder, as it had separated lists for floats. So rewinding
stopped at the last float. This wasn't really correct, but it
passed all existing tests.

This patch changes `Rewind()` to actually rewind positioned
floats when necessary.

The spec isn't very clear about this case. When Gecko fixed
their reported cases 5 years ago[1], they filed a spec
issue[2] and added several tests[3].

This patch changes the rendering of `float-nowrap-4.html`, one
of the tests by Mozilla, so this patch adds a new reference.
PS18 can fix this issue without changing the behavior for
`float-nowrap-4.html`, but logically speaking, this behavior
looks more correct.

The change is under a runtime flag `RewindFloats`, enabled by
default as a kill-switch in case this change turned out to be
not web-compatible.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=488725#c38
[2] https://github.com/w3c/csswg-drafts/issues/3038
[3] https://wpt.fyi/results/css/CSS2/floats?label=master&label=experimental&aligned&q=float-nowrap-

Bug: 1499290
Change-Id: I9f07fb487eaecf322c43df17e240afc5bc085560
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5052124
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Auto-Submit: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1235470}

--

wpt-commits: bab94cec8a1fe684992ddb86f6b9fc0b5d3fa777
wpt-pr: 43302
2023-12-14 09:32:17 +00:00
Martin Robinson ddc48c3632 Bug 1865023 [wpt PR 43197] - Stop sending " " to linebreaker for replaced content, a=testonly
Automatic update from web-platform-tests
Stop sending " " to linebreaker for replaced content

We previously sent a " " to the linebreaker in order to ensure that the
next text had a soft wrap opportunity at the start. Calling `next(" ")`
without waiting until the returned index was 1, violated some
invariants of linebreaker ultimately causing a panic.

Instead of using the linebreaker for this, simply keep a flag in the
IFC layout state, which avoids the problem entirely.

Fixes #30703.

--

wpt-commits: 1a220a92434b68e5545ba312d8337b583e44b3d9
wpt-pr: 43197
2023-12-12 10:28:18 +00:00
Cristian Tuns c37b575338 Backed out 84 changesets (bug 1867831, bug 1866599, bug 1867730, bug 1867449, bug 1866804, bug 1866855, bug 1863808, bug 1867538, bug 1867417, bug 1867136, bug 1867713, bug 1867149, bug 1867362, bug 1867330, bug 1866721, bug 1867508, bug 1867116, bug 1867747, bug 1867172, bug 1867517, bug 1867925, bug 1865327, bug 1867351, bug 1866970, bug 1867856, bug 1867395, bug 1865204, bug 1867179, bug 1867705, bug 1864206, bug 1867380, bug 1867316, bug 1867748, bug 1863677, bug 1866757, bug 1867678, bug 1866807, bug 1867231, bug 1867484, bug 1867681, bug 1867492, bug 1867858, bug 1867567, bug 1867824, bug 1867661, bug 1867615, bug 1861547, bug 1867540, bug 1867039, bug 1867456, bug 1820190, bug 1861263, bug 1867151, bug 1865023, bug 1865324, bug 1867347, bug 1867337, bug 1867200, bug 1867750) for causing wpt failures in inline-module-order.html CLOSED TREE
Backed out changeset ac180edc8013 (bug 1867925)
Backed out changeset e3328d438504 (bug 1867856)
Backed out changeset 2313652944ac (bug 1867678)
Backed out changeset 690dec8952f4 (bug 1867678)
Backed out changeset e69cd88067f1 (bug 1867748)
Backed out changeset ae4ef1f80ad3 (bug 1867417)
Backed out changeset 3ba69869667a (bug 1867417)
Backed out changeset d9ae9f177285 (bug 1867858)
Backed out changeset 01d4a386dccc (bug 1867747)
Backed out changeset 50128b7bd46c (bug 1867831)
Backed out changeset 809edc62c731 (bug 1867831)
Backed out changeset c1d64c3254c8 (bug 1863808)
Backed out changeset 8d1e5f5c3bf8 (bug 1863808)
Backed out changeset c8e33aee2c0a (bug 1866807)
Backed out changeset 6b2113cb0cd8 (bug 1867824)
Backed out changeset c6cfccd4b38d (bug 1867713)
Backed out changeset 2f4f576f443b (bug 1864206)
Backed out changeset ec0a033fb504 (bug 1867750)
Backed out changeset d6f4f8253e2f (bug 1867567)
Backed out changeset f064d55091b0 (bug 1866804)
Backed out changeset 64e1ca36ceaf (bug 1867380)
Backed out changeset 4180774f162f (bug 1867380)
Backed out changeset a6cfda4a3399 (bug 1867730)
Backed out changeset 5ec5dfe0cd70 (bug 1867484)
Backed out changeset 8a9a1277195f (bug 1867484)
Backed out changeset 9e9e00045713 (bug 1867681)
Backed out changeset 92450ca4e19a (bug 1867705)
Backed out changeset 982a34078a79 (bug 1867705)
Backed out changeset 06da1b0c210e (bug 1867538)
Backed out changeset 56a689b03bce (bug 1867538)
Backed out changeset f85735e01de6 (bug 1863677)
Backed out changeset 6024446737e6 (bug 1863677)
Backed out changeset 6169934ea444 (bug 1867347)
Backed out changeset 5ec0c691df8e (bug 1867661)
Backed out changeset 68053773b45e (bug 1867615)
Backed out changeset 336068e783bf (bug 1867615)
Backed out changeset 3d91aaf6dde3 (bug 1866970)
Backed out changeset 5a6d84b529ae (bug 1866970)
Backed out changeset 75827404c9e6 (bug 1861547)
Backed out changeset 224ecf406e06 (bug 1861547)
Backed out changeset 2b473eb31c3f (bug 1867151)
Backed out changeset 535fb3a55e85 (bug 1867492)
Backed out changeset a86d28ce52c7 (bug 1867456)
Backed out changeset 5139f5dead8b (bug 1867456)
Backed out changeset 06da19643638 (bug 1867540)
Backed out changeset a7895c89848b (bug 1865023)
Backed out changeset 68e6449d6802 (bug 1867231)
Backed out changeset 5b4a3a306c9b (bug 1867231)
Backed out changeset 04f5a8e8b5e2 (bug 1867508)
Backed out changeset 48d3bceb9144 (bug 1867508)
Backed out changeset 1148d1387a8c (bug 1867517)
Backed out changeset fdb4314a7244 (bug 1867517)
Backed out changeset 03fbbf40e90a (bug 1865324)
Backed out changeset 36affad26a4d (bug 1865204)
Backed out changeset 546593d881ef (bug 1867449)
Backed out changeset c129db22937b (bug 1867200)
Backed out changeset e37319c765ba (bug 1867200)
Backed out changeset 09980f645ef7 (bug 1867395)
Backed out changeset 708c3ad89012 (bug 1865327)
Backed out changeset b80e22c0d453 (bug 1865327)
Backed out changeset 80fc3d33455f (bug 1820190)
Backed out changeset dfdfcdecdfae (bug 1820190)
Backed out changeset b306f6a1e433 (bug 1867116)
Backed out changeset 0311c301db3f (bug 1867116)
Backed out changeset 857bb2d9ef8e (bug 1867351)
Backed out changeset cdd81f1e64db (bug 1867351)
Backed out changeset f4fa3c208be2 (bug 1867179)
Backed out changeset 174ed3d1c0d7 (bug 1867172)
Backed out changeset 6c5493725f01 (bug 1867172)
Backed out changeset f4b9483ca1bb (bug 1867149)
Backed out changeset 49a97c1a09ec (bug 1867337)
Backed out changeset 60bfe4861521 (bug 1867362)
Backed out changeset ee7a763049d5 (bug 1867330)
Backed out changeset 101735e0eff7 (bug 1866721)
Backed out changeset 35ecbc70ca43 (bug 1861263)
Backed out changeset 89a49fcc083a (bug 1861263)
Backed out changeset 53c395665877 (bug 1867039)
Backed out changeset 408b7fa25a60 (bug 1867316)
Backed out changeset 59e507b478d0 (bug 1866855)
Backed out changeset d3df81529f40 (bug 1866855)
Backed out changeset 2b8edee80068 (bug 1866599)
Backed out changeset cd0ef1be400d (bug 1866599)
Backed out changeset 4c937625f18e (bug 1866757)
Backed out changeset 8e39ef0c2451 (bug 1867136)
2023-12-04 06:00:03 -05:00
Martin Robinson 4d8077bca8 Bug 1865023 [wpt PR 43197] - Stop sending " " to linebreaker for replaced content, a=testonly
Automatic update from web-platform-tests
Stop sending " " to linebreaker for replaced content

We previously sent a " " to the linebreaker in order to ensure that the
next text had a soft wrap opportunity at the start. Calling `next(" ")`
without waiting until the returned index was 1, violated some
invariants of linebreaker ultimately causing a panic.

Instead of using the linebreaker for this, simply keep a flag in the
IFC layout state, which avoids the problem entirely.

Fixes #30703.

--

wpt-commits: 1a220a92434b68e5545ba312d8337b583e44b3d9
wpt-pr: 43197
2023-12-04 08:29:08 +00:00
Martin RobinsonandOriol Brufau d85e7dfdeb Bug 1859754 [wpt PR 42598] - Anonymous boxes that wrap inlines should not inherit overflow, a=testonly
Automatic update from web-platform-tests
Anonymous boxes that wrap inlines should not inherit overflow

In legacy layout, anonymous text wrappers were inheriting the `overflow`
and `text-overflow` properties. This results in the creation of extra
clipping for these anonymous wrappers which could clip away floats. We
will likely implement `text-overflow` differently in non-legacy layout.

This change marks all legacy layout pseudo elements as "legacy" and also
adds a new pseudo element for non-legacy layout that does not inherit
`overflow`.

Fixes #30562.

Co-authored-by: Oriol Brufau <[email protected]>

--

wpt-commits: 070bbdb666b78e99d41d4b986a2a44958b8bc324
wpt-pr: 42598
2023-10-31 13:59:06 +00:00
Ian Kilpatrick e14a8ae4bf Bug 1858586 [wpt PR 42498] - [layout] Fix/implement round-tripping of auto-margins in block layout, a=testonly
Automatic update from web-platform-tests
[layout] Fix/implement round-tripping of auto-margins in block layout

After crrev.com/c/4712468 we stopped correctly reporting auto margins
for new formatting contexts within block layout (instead returning
0px).

This patch implements round-tripping like servo (setting the value
will result in the layout not changing). This means that margin:auto
may have different values on the inline-start/inline-end sides.

Bug: 1486977
Change-Id: I7f767869a56ed7a7b8256b0990902474976cc93b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4930440
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1208883}

--

wpt-commits: 8e795451aed024f9f4cd639fb13ea48fa5bb4cc0
wpt-pr: 42498
2023-10-26 08:58:04 +00:00
Oriol Brufau 4c8178b2ad Bug 1851210 [wpt PR 41765] - Fix PlacementAmongFloats to avoid missing some bands, a=testonly
Automatic update from web-platform-tests
Fix PlacementAmongFloats to avoid missing some bands

PlacementAmongFloats would stop iterating when current_bands would be
empty, even if next_band wasn't at infinity.

Then the BFC root or replaced block was placed after all the floats,
even if it could fit next to some of them.

This patch moves the next_band into current_bands so that the loop
keeps considering bands.

--

wpt-commits: e357f7f93f5728b630ab44991258b9b690f4f109
wpt-pr: 41765
2023-09-13 11:39:23 +00:00
Oriol Brufau e4cb762b74 Bug 1850395 [wpt PR 41667] - Avoid crash in PlacementAmongFloats, a=testonly
Automatic update from web-platform-tests
Avoid crash in PlacementAmongFloats

PlacementAmongFloats was assuming that there would always be a FloatBand
at a position smaller than or equal to the given ceiling, but this was
not the case for negative ceilings.

The reason is that the FloatContext initialized the FloatBandTree with
a band at 0, and another at +∞.

This patch changes the initial bands to −∞ and +∞. This seems more
consistent and matches the expectation of PlacementAmongFloats.

--

wpt-commits: 2282bf0b4da0f4596641d9fc15793d1d861ab56d
wpt-pr: 41667
2023-09-13 11:38:25 +00:00
Oriol Brufau c28ec1b983 Bug 1847934 [wpt PR 41397] - Handle inline margins when avoiding floats, a=testonly
Automatic update from web-platform-tests
Handle inline margins when avoiding floats

--

wpt-commits: fc0729f841e6e47657d2b591f18a97c5de827d3c
wpt-pr: 41397
2023-08-17 21:35:09 +00:00
Oriol Brufau e03182611f Bug 1846856 [wpt PR 41302] - Never resolve margin-left:auto to a negative amount, a=testonly
Automatic update from web-platform-tests
Never resolve margin-left:auto to a negative amount

With direction:ltr (and we don't support direction:rtl yet), the rules
from https://drafts.csswg.org/css2/#blockwidth imply that margin-left
shouldn't resolve auto to a negative amount.

This aligns Servo with Gecko and Blink. WebKit may resolve to a negative
amount in some cases.

--

wpt-commits: ad817de630b4c6a27f3895c6eabefaab408887df
wpt-pr: 41302
2023-08-10 14:59:31 +00:00
Xiaocheng Hu ba750544b3 Bug 1836566 [wpt PR 40370] - Stop re-absolutization of out of flow insets for getComputedStyle(), a=testonly
Automatic update from web-platform-tests
Stop re-absolutization of out of flow insets for getComputedStyle()

When we `getComputedStyle()` of an inset property of an out-of-flow
element, if the value is 'auto', percent or calc, we currently redo
the absolutization from the ComputedStyle. This is error-prone, has
known failures in WPT, and makes it impossible to work with anchor
positioning (and especially position fallback).

As we have already absolutized these values during layout, this patch
simply caches them on LayoutResult to be passed to getComputedStyle().
To minimize memory overhead, this patch makes NGLayoutResult to
unconditionally store the resolved insets (+8 bytes per box), plus
creating RareData if the box's offset in container doesn't match the
resolved insets.

Fixed: 867616
Fixed: 1423493
Fixed: 1451020
Change-Id: Ib31f17304179d5e5b91c9d91c3e97386b904d0a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4583533
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1162636}

--

wpt-commits: 1f802e3c6e578f60e06dfd41cdcce51c915b4bc9
wpt-pr: 40370
2023-07-12 07:53:23 +00:00
Oriol Brufau 346feafa94 Bug 1840349 [wpt PR 40747] - Fix clearance on replaced elements, a=testonly
Automatic update from web-platform-tests
Fix clearance on replaced elements

--

wpt-commits: 386b80f5661a00d53b530774e271f9bdb73e197b
wpt-pr: 40747
2023-07-12 07:53:21 +00:00
Martin Robinson e3ad3060fe Bug 1839841 [wpt PR 40693] - Fix positioning of statically positioned fixed child of absolutes, a=testonly
Automatic update from web-platform-tests
Fix positioning of statically positioned fixed child of absolutes

--

wpt-commits: 2bfe2f4b9e643c673db9455a31743b2aa586c148
wpt-pr: 40693
2023-07-12 07:53:11 +00:00
Martin Robinson 25b3ed3b32 Bug 1839840 [wpt PR 40692] - Fix positioning of statically positioned absolute child of inline box, a=testonly
Automatic update from web-platform-tests
Fix positioning of statically positioned absolute child of inline box

--

wpt-commits: 1c82dcd178f4b1f0a6b55f6dddea189e7187e8ef
wpt-pr: 40692
2023-07-06 08:20:54 +00:00
Martin Robinson cd8203413a Bug 1839565 [wpt PR 40665] - Properly position absolutes with static insets that are children of floats, a=testonly
Automatic update from web-platform-tests
Properly position absolutes with static insets that are children of floats

Previously, final float positions were calculated when their parents
were positioned. This prevented proper positioning of absolute children
of floats with static insets, because they accumulate offsets as they
are hoisted up the tree.

This change moves the final float positioning to
`PlacementState::place_fragment` for the float itself so that it happens
before any insets are updated for hoisted descendants. In addition to
simplifying the code, this makes it a bit more efficient. Finally,
floats are taken into account when updating static insets of hoisted
boxes.

Fixes #29826.

--

wpt-commits: 15c79860822aefec1618cdbd556109e909798deb
wpt-pr: 40665
2023-06-28 09:47:48 +00:00
Martin Robinson 0d02e69212 Bug 1837590 [wpt PR 40471] - Layout 2020: Properly handle negative margins in floats, a=testonly
Automatic update from web-platform-tests
Layout 2020: Properly handle negative block margins in floats

If a float has negative block margins, it should be pushed upward, but
shouldn't affect the positioning of any floats that came before it. It
should lower the ceiling though when it still has some non-negative
block contribution. In order to implement this behavior, we should only
place the float considering its non-negative block length contribution. If
the float is pushed up completely past it's "natural" position, it
should be placed like a float with zero block size.

--

wpt-commits: 67a14f64b7b481a3c6956f8bee2af331029bb1c7
wpt-pr: 40471
2023-06-21 14:34:33 +00:00
Emilio Cobos Álvarez fc38392bdf Bug 1838045 - Make <link rel=stylesheet> load event scheduling saner. r=smaug
The spec asks to post a task, see html.spec.whatwg.org/#update-a-style-block

What we were doing is quite crazy. Unifying the scheduling between
<style> and <link rel=stylesheet> on the patch above causes failures on
some mochitests.

Some of them aren't really related to these and are a pre-existing bug,
see bug 1838346.

Differential Revision: https://phabricator.services.mozilla.com/D180895
2023-06-14 21:42:31 +00:00
Gérard Talbot e01cce9bb8 Bug 1834136 [wpt PR 40109] - Removing text-align-white-space-003.xht Issue 40092, a=testonly
Automatic update from web-platform-tests
Removing text-align-white-space-003.xht Issue 40092 (#40109)

--

wpt-commits: 3fe787cb19c75b35e606f7dde275462f820b449b
wpt-pr: 40109
2023-06-13 07:14:10 +00:00
Tim Nguyen 45d6c8e959 Bug 1834427 [wpt PR 40148] - Replace w3c.github.io/csswg-drafts links with drafts.csswg.org, a=testonly
Automatic update from web-platform-tests
Replace w3c.github.io/csswg-drafts links with drafts.csswg.org (#40148)

--

wpt-commits: 57c5006103146974adb3af50d325c3b6ce7153d0
wpt-pr: 40148
2023-06-09 09:24:03 +00:00
Emilio Cobos Álvarez b656621253 Bug 1835066 - Remove some WPTs which aren't valid in presence of nesting. r=dholbert
These WPTs pass in Chrome and Safari because they implement the older
version of the spec where you needed:

div {
  & span {
  }
}

(or :is(span)) instead of:

div {
  span {
  }
}

Replace them by a nesting test for this case.

Differential Revision: https://phabricator.services.mozilla.com/D179686
2023-06-04 10:22:28 +00:00
Xianzhu Wang 149ff70fe3 Bug 1830402 [wpt PR 39717] - [CompositeBackgroundAttachmentFixed] Don't use for fieldset and table parts, a=testonly
Automatic update from web-platform-tests
[CompositeBackgroundAttachmentFixed] Don't use for fieldset and table parts

Fieldset and table parts paint backgrounds specially. For example, table
row paints background per cell, so the background clip method for
composited background-attachment:fixed doesn't work for it.

Bug: 1413872
Change-Id: I3c017955e34b3c574033075c31a5142a43069079
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4477773
Reviewed-by: Philip Rogers <[email protected]>
Commit-Queue: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1136730}

--

wpt-commits: 94984bd4f121b2766fe52b735c31970cf2ca5478
wpt-pr: 39717
2023-05-21 22:43:11 +00:00
Gérard Talbot 18a7feb2b3 Bug 1829978 [wpt PR 39704] - Corrected declarations in border-conflict-element-00[1-2].xht, a=testonly
Automatic update from web-platform-tests
Corrected declarations in border-conflict-element-00[1-2].xht (#39704)

--

wpt-commits: d6f251db794615701adfce827879dfebb77a70fb
wpt-pr: 39704
2023-05-21 22:42:57 +00:00
Ting-Yu Lin 3cc1614e96 Bug 1833238 Part 2 - Always pull back floats from pushed floats list to floats list when reflowing a block. r=emilio
When balancing columns, if a block frame doesn't have enough available
block-size for a float's continuation, we move the float continuation into the
block's pushed floats list.

Typically, the float's continuation is expected to be pulled by the block's next
continuation and reflow there. However, if the block happens to be in the *last*
column, the float continuation will stay in the pushed float list until we
reflow its block again in the next column balancing loop. In this case, we
should pull it from the pushed floats list regardless of whether the
continuation has a previous continuation or not. Otherwise, it will not be
reflowed if it remains in the pushed floats list.

Differential Revision: https://phabricator.services.mozilla.com/D178141
2023-05-16 20:55:33 +00:00
Delan Azabani 698a7f2448 Bug 1827564 [wpt PR 39488] - Handle min/max sizes in non-replaced positioned boxes, a=testonly
Automatic update from web-platform-tests
Handle min/max sizes in non-replaced positioned boxes

--

wpt-commits: dca730d002f78ee7b215cadd3b1e625255da8077
wpt-pr: 39488
2023-04-18 09:10:14 +00:00
Joey Arhar c3e78da9fd Bug 1824849 [wpt PR 39232] - CSSTransitionDiscrete: Add tests part 4, a=testonly
Automatic update from web-platform-tests
CSSTransitionDiscrete: Add tests part 4

Bug: 1399631
Change-Id: I235bf94cb793fb2979b69cc77f5ba5005a57320b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375500
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Auto-Submit: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1124837}

--

wpt-commits: 96559d4ccc3ba5d4209fe1ee15384c16cdedf84e
wpt-pr: 39232
2023-04-14 11:15:06 +00:00
Joey Arhar 774b0ba2b9 Bug 1824770 [wpt PR 39218] - CSSTransitionDiscrete: Add tests part 2, a=testonly
Automatic update from web-platform-tests
CSSTransitionDiscrete: Add tests part 2

Bug: 1399631, 1413556
Change-Id: I668c36e18d1c758c7fd6cd6fada9eca93725fc08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4374059
Auto-Submit: Joey Arhar <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1122619}

--

wpt-commits: 02ed58b490bdc783aff49616e69ebf297920a274
wpt-pr: 39218
2023-04-12 11:21:47 +00:00
Joey Arhar bcf04c7379 Bug 1824054 [wpt PR 39153] - CSSTransitionDiscrete: Add tests part 1, a=testonly
Automatic update from web-platform-tests
CSSTransitionDiscrete: Add tests part 1

Bug: 1399631, 1413556
Change-Id: I012950e8cdcd0b3e5d881002f2dcab5e828a4486
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4363162
Commit-Queue: Joey Arhar <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1122583}

--

wpt-commits: b71817b9298930c5ff1aed90206ab77853e346bf
wpt-pr: 39153
2023-04-12 11:21:44 +00:00
David Shin 4f3be3641c Bug 1819266: Ensure block-direction collapsed border does not extend beyond its row. r=dholbert
If `border-collapse` is set and `border` is set for `td` but there's an empty
`tr`, the collapsed border was pushed out wrongly by the empty `tr`.
Columns borders cannot collapse like row borders as you can't define an empty
column without defining a cell.

Differential Revision: https://phabricator.services.mozilla.com/D173031
2023-03-30 18:11:40 +00:00