Commit Graph
164 Commits
Author SHA1 Message Date
Koji Ishii c0c5c017fa Bug 1599982 [wpt PR 20495] - Add test for negative inline margin + fit-content, a=testonly
Automatic update from web-platform-tests
Add test for negative inline margin + fit-content

Also fixes a DCHECK that incorrectly hits.

Bug: 1028817
Change-Id: I43cb472031f4d3842eb302a5460e6dea047120e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1941451
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#719890}

--

wpt-commits: 8365af34b9868b4c8a3cb2b4bbf5556c9063edbb
wpt-pr: 20495
2019-12-04 12:12:36 +00:00
haozhe 629056d0ed Bug 1592285 [wpt PR 19976] - Port line-height-interpolation.html to wpt, a=testonly
Automatic update from web-platform-tests
Port line-height-interpolation.html to wpt

Chrome pass and firefox failed 4 tests
Bug report filed: https://bugzilla.mozilla.org/show_bug.cgi?id=1593813

Bug: 900581
Change-Id: I52f133b6662fda4a5342a630307cc761a922c898
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887231
Reviewed-by: Xida Chen <[email protected]>
Commit-Queue: Hao Sheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#716159}

--

wpt-commits: 801f9b561336201871727d39c11cd11a11397c53
wpt-pr: 19976
2019-11-29 10:56:41 +00:00
Koji Ishii ec3d6073b1 Bug 1592190 [wpt PR 19970] - [LayoutNG] Fix not to break after leading out-of-flow objects, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix not to break after leading out-of-flow objects

r694888 (crrev.com/c/1792467) gave a break opportunity after
OOF objects.

For leading OOF objects, there should not be a break
opportunity, but the patch gave to them too. This patch fixes
not to add a break opportunity if there were no preceding
in-flow objects.

Bug: 1018748
Change-Id: I89a8614cdfd85bed1bb8c2f3b6db892697f7add7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886130
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#710527}

--

wpt-commits: 6a912ffd3db259b1d6a133f589aa30c97f7738e4
wpt-pr: 19970

Differential Revision: https://phabricator.services.mozilla.com/D53548
2019-11-20 11:19:13 +00:00
Philip Jägenstedt 8199e4b6ff Bug 1590679 [wpt PR 19847] - Fix most remaining "TRAILING WHITESPACE" lint errors, a=testonly
Automatic update from web-platform-tests
Fix most remaining "TRAILING WHITESPACE" lint errors (#19847)

--

wpt-commits: f87822f99f72472616b0b02cde46e76b47d7ce65
wpt-pr: 19847
2019-10-31 12:16:30 +00:00
Koji Ishii 8fb5c17564 Bug 1588701 [wpt PR 19687] - [LayoutNG] Allow negative margins to stay on the line after overflow, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Allow negative margins to stay on the line after overflow

This patch allows atomic inlines to stay on the line even
when it appears after the line overflowed, if its negative
margins can bring the position back to inside of the line.

This is not a well-defined behavior in the CSS spec, but
legacy/WebKit/Gecko do this at some levels, though not really
interoperable.

Bug: 1001000
Change-Id: If8cfc5d51de14c8de6a9caa78fa10abaf6f1b5b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859424
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/master@{#705848}

--

wpt-commits: eb78a40aac4a0072fd12585c7f29efde938a2e33
wpt-pr: 19687
2019-10-24 18:03:45 +01:00
Koji Ishii ce4f346028 Bug 1588366 [wpt PR 19660] - [LayoutNG] Fix NGLineBreaker not to hang on negative margins, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix NGLineBreaker not to hang on negative margins

This patch fixes a case where |NGLineBreaker| loops
infinitely when there is a negative margin. The case was a
regression by r701601 (crrev.com/c/1826063).

Handling combinations of a) trailable items, b) empty spans,
and c) negative margins together is becoming more complex as
we fix issues. This patch revises how we handle them.

One of the complexities is open tags being ambiguous; e.g.,
this open tag is not trailable and thus breaks before it:
  <span>text
but these open tags are trailable:
  <span> text
  <span></span>text
  <span> </span>text
and it can even nest more, contain floating/out-of-flow
objects, or have negative margins.

Before this patch, |NGLineBreaker| tries to stop as early as
possible, rewind, and consume trailable items. The last part
(consuming trailable items) is scarly because rewind loops
can occur if we try to rewind again.

The new approach is to try to consume possibly trailable
items before it rewinds, and avoids consuming after rewind.

There might be cases where the new approach consumes more,
but `blink_perf.layout` is neutral:
https://pinpoint-dot-chromeperf.appspot.com/job/11fdf216c20000

In the test, case 2 and 5 fail in legacy, because the legacy
behavior is based on a bug (crbug.com/979894) or the new
behavior makes more sense, and the new behavior is
interoperable with Edge/Gecko.

Note, this change should be able to eliminate |kTrailable|
state, and that eliminate consuming after rewind completely,
but we still need it in a few places. It is for future
patches to clean them up.

Bug: 1011816
Change-Id: Ic915a26f1ee570ebe999ffbeee680659dcbd9789
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849737
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/master@{#705844}

--

wpt-commits: d36a8bac6d6d0c14fa6d7475b6f06ffd26967b25
wpt-pr: 19660
2019-10-24 18:03:45 +01:00
Xida Chen 25a6e9c692 Bug 1587877 [wpt PR 19627] - Port visibility-interpolation.html to wpt, a=testonly
Automatic update from web-platform-tests
Port visibility-interpolation.html to wpt

Bug: 900581
Change-Id: Iafa4c8d546e1de8eb540deb17d82b7c055854cf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853132
Commit-Queue: Xida Chen <[email protected]>
Reviewed-by: Yi Gu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#704729}

--

wpt-commits: 99f254c2bb9c330864fe0b08fadd9833cb083efa
wpt-pr: 19627
2019-10-24 18:03:16 +01:00
Morten Stenshorne 5aae9cf64c Bug 1587006 [wpt PR 19564] - Test removing a box before a self-collapsing block with clearance., a=testonly
Automatic update from web-platform-tests
Test removing a box before a self-collapsing block with clearance.

This broke for M77 and got fixed again after the branch point. Looks
like we had no test coverage for it, but it affected WhatsApp for web.

A phantom line [1] was also required to reproduce the bug.

[1] https://www.w3.org/TR/CSS22/visuren.html#phantom-line-box

Bug: 1003810
Change-Id: I942aea83bbf71a247cf73332dcf62af7c9343106
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845759
Commit-Queue: Morten Stenshorne <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#703899}

--

wpt-commits: 73c311708b30504eb007437234eaa64a9fc6b2bf
wpt-pr: 19564
2019-10-17 19:25:32 +00:00
Koji Ishii dcb82aae95 Bug 1586651 [wpt PR 19541] - [LayoutNG] Fix line breaking when font-size: 0, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix line breaking when `font-size: 0`

This patch fixes line breaking when break opportunities have
`font-size: 0`.

`font-size: 0` makes all characters at position 0. This
confuses when |NGLineBreaker| needs to rewind, and tries to
find the break opportunity before the current one.

This patch fixes it by using |PreviousBreakOpportunity| in
such case.

Bug: 1006127
Change-Id: I449d6f8aaba4deccd458c5e077920b1a8bf79305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1843991
Reviewed-by: Yoshifumi Inoue <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#703753}

--

wpt-commits: 7fbe6fe5fe834bf28d9171bf92d90287186020e8
wpt-pr: 19541
2019-10-17 19:25:27 +00:00
Koji Ishii 8e35786386 Bug 1586004 [wpt PR 19491] - [LayoutNG] Fix bidi reordering of lines with empty inline boxes, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix bidi reordering of lines with empty inline boxes

This patch fixes bidi reordering sometimes confused by empty
inline boxes.

These items do not have resolved bidi levels. Before this
patch, |NGInlineLayoutAlgorithm| reordered ignoring such
items. This patch changes it to assign bidi levels to such
items by copying from adjacent items and let reordering to
handle them.

Bug: 1010662, 1010641, 998872
Change-Id: I5d074143970b83b64bddbb83cd03b17551e3f521
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837435
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Auto-Submit: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#702526}

--

wpt-commits: 7cbaaf651d784a5c90fde0ff0b1aa6c029c5f2f3
wpt-pr: 19491
2019-10-14 11:23:45 +00:00
Ian Kilpatrick 28b158f88e Bug 1583577 [wpt PR 19257] - [LayoutNG] Clear layout results when the layout wasn't successful., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Clear layout results when the layout wasn't successful.

Today we can end up in a state where the layout result cache for a
LayoutBox contains a fragment tree which doesn't match the layout tree
state.

This occurs when we "abort" layout, i.e.
1) during the first pass children are positioned at a particular offset
2) a parent aborts layout due to resolving a BFC offset
3) the parent hits the layout result cache which has children at a
   different offset

Bug: 1003558
Change-Id: Iabc5dfefd74c517222ec435cea376ad000a0372f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821674
Reviewed-by: Morten Stenshorne <[email protected]>
Commit-Queue: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#702507}

--

wpt-commits: eac401e3df87f17e49b38ec2f935fd1177139e23
wpt-pr: 19257
2019-10-14 11:23:45 +00:00
Koji Ishii 9ae9c921ad Bug 1585424 [wpt PR 19452] - [LayoutNG] Fix static position of positioned objects in RTL, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix static position of positioned objects in RTL

Block-level out-of-flow objects are placed at the start edge
of the next line if preceded by in-flow inline content, or
of the current line otherwise.

Before this change, the "preceded" was determined by the
visual order. This patch fixes this by using the logical
order.

Bug: 1005149, 1005433, 1002479
Change-Id: I8589d0daa24021a8106d98770e83629ff9f02c57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833366
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: Aleks Totic <[email protected]>
Cr-Commit-Position: refs/heads/master@{#701741}

--

wpt-commits: bd731e3cdaccb828eeb8deed9970ecee5cbda2d4
wpt-pr: 19452
2019-10-14 11:23:26 +00:00
Morten Stenshorne 00abfd9cea Bug 1585318 [wpt PR 19442] - Set up inline continuations correctly when not inserting a new child., a=testonly
Automatic update from web-platform-tests
Set up inline continuations correctly when not inserting a new child.

LayoutInline::ChildBecameNonInline() is called when a child of an inline
becomes in-flow block-level (e.g. when its position changes from
absolute to static) and we need to set up a continuation chain because
of this. Part of this operation is to wrap the in-flow block-level child
inside a new anonymous containing block.

AddChildIgnoringContinuation(), which is what we call when inserting new
children, did a few nice things to such anonymous containing blocks,
which ChildBecameNonInline() didn't do, most crucially, setting the
position of the anonymous containing block to relative if the inline is
relatively positioned (to contain absolutely positioned descendants). So
if the continuation was set up as a reaction to something becoming
block-level, rather than being set up as part of inserting new children,
the anonymous containing block of block-level children of the inline
didn't get position:relative, which made any absolutely positioned
children escape its relatively positioned inline parent, and find a
containing block further up (the viewport, in the included testcase).

To fix this, break out the code that sets up such an anonymous block
into a separate method, and have ChildBecameNonInline() call it.

Bug: 732397
Change-Id: I06b120c3173403ba6db3b93019e95a66575ba0e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833581
Reviewed-by: Emil A Eklund <[email protected]>
Reviewed-by: Aleks Totic <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#701646}

--

wpt-commits: 4da059cdc29ce8ca2b717c53ab7f5a68a4cb7583
wpt-pr: 19442
2019-10-14 11:23:22 +00:00
Ian Kilpatrick bb9902374e Bug 1583390 [wpt PR 19235] - [LayoutNG] Allow floats to be placed "before" other floats of the same type., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Allow floats to be placed "before" other floats of the same type.

Floats have some "interesting" behaviour which allows a left (or right)
float to be placed left (or right) of a previous float. This typically
isn't allowed.

This occurs when a float has "negative size" e.g. it has a large
negative margin, which is larger than its width. E.g.
<div style="width: 50px; margin-left: -150px; float: left;"></div>

In such cases the float doesn't respect the normal rules, and is
placed in a typically invalid area.

This patch also changes "const LogicalSize& minimum_size" to
"const LayoutUnit minimum_inline_size" for "FindLayoutOpportunity".

Bug: 1005437
Change-Id: I4c91a53911b2651346487f71c4b31ec6e0240202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819356
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#699390}

--

wpt-commits: 38028a8b9d38b369952c27f5b5addc2ef5b5bff9
wpt-pr: 19235
2019-09-26 20:26:18 +00:00
Ian Kilpatrick 4372ff3fa8 Bug 1582661 [wpt PR 19179] - [LayoutNG] Ignore margins when determining if a new-fc will fit in a layout opportunity., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Ignore margins when determining if a new-fc will fit in a layout opportunity.

Previously we calculated layout opportunities by shrinking the available
child space by the child's margins.

This resulted in layout opportunities which were too small, and would
push the new formatting context down to the next opportunity.

This logic now allows margins to "overhang" a layout opportunity.

At the same time I refactored a lot of the code, as we were
adding/subtracting margins for different calculations. Hopefully this
is more readable!

Bug: 1003193
Change-Id: I6c05b050332afe9880ca7d9a5b426b4b94fde3f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808661
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#698954}

--

wpt-commits: 3a5b1d12606ad979bc063ad1902fd44046cb7f10
wpt-pr: 19179
2019-09-26 20:26:03 +00:00
Morten Stenshorne 5070f2082d Bug 1581767 [wpt PR 19115] - [LayoutNG] Correct overflow inside anonymous blocks inside %-insets., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Correct overflow inside anonymous blocks inside %-insets.

NGPhysicalLineBoxFragment::ScrollableOverflow() compared the computed
style passed as container_style to the computed style of each child,
and it would calculate the child's relative offset only if they
differed. All element nodes have their own computed style, so this only
mattered for text nodes. However, if the container was an anonymous
block, they'd always differ, since the computed style of a text node
is the same as that of the parent DOM node. This is an implementation
detail; we save some memory by letting text nodes share computed style
objects with their containing DOM node. But that also means that extra
care is required when working with ComputedStyle objects associated
with text nodes: basically, treat all non-inherited-by-default
properties (such as 'position', 'top' and 'left') as if they were set
to their initial value.

Bug: 1002485
Change-Id: If77d79e45c2aa55ac30dc239c738e2a40f8326f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807813
Reviewed-by: Aleks Totic <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#697324}

--

wpt-commits: 3472889e27404a9b3c893845156848a0c5fbda9b
wpt-pr: 19115
2019-09-20 21:49:53 +00:00
Morten Stenshorne 260cf267df Bug 1581087 [wpt PR 19043] - [LayoutNG] Use BoxLayoutExtraInput when calculating overflow., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Use BoxLayoutExtraInput when calculating overflow.

This will set temporary proper override sizes.

We already use this mechanism in NGBlockNode::RunLegacyLayout(), but
that one only has an effect for things that are done from within legacy
layout (LayoutObject::Layout()). Overflow calculation happens after
layout, and is done by the legacy engine, even for NG objects.

Bug: 908083
Change-Id: I2b4e88c096f138aa820856e3c79e1ddcef07a3da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1801770
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Christian Biesinger <[email protected]>
Reviewed-by: Aleks Totic <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#696752}

--

wpt-commits: 149354218b0d2f62f1907d9fe8becfc94a8d138f
wpt-pr: 19043
2019-09-18 23:38:22 +00:00
Morten Stenshorne 534ea9a89d Bug 1580472 [wpt PR 18993] - [LayoutNG] Auto block-size shouldn't prevent child margin propagation., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Auto block-size shouldn't prevent child margin propagation.

The block-end margin strut of a child can collapse with the block-end
margin strut of the parent if the computed block-size of the child is
auto. This includes unresolvable percentages (e.g. if the child has a
percentage block-size, but its containing block has auto block-size).

Update BlockLengthUnresolvable() to consider 'auto' as unresolvable.
Also include 'min-content', 'max-content', 'fit-content' and 'none'
(for max-block-size), since that seems correct, and also allows for
simplifying code at call-sites.

Bug: 1001663
Change-Id: I28decd41ca8f8340581fc68e0a4fe709d7389af8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796372
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: David Grogan <[email protected]>
Reviewed-by: Christian Biesinger <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#696253}

--

wpt-commits: 908a7ed5a5d7f82eedeee4fef0b3505faf01308e
wpt-pr: 18993
2019-09-18 23:38:04 +00:00
Koji Ishii 70857d3fb9 Bug 1580121 [wpt PR 18956] - [LayoutNG] Fix vertical-align: top and bottom, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix `vertical-align: top` and `bottom`

This patch fixes `vertical-align: top` and `bottom` when
they are applied to a box that has children with `text-top`
or `text-bottom`.

In LayoutNG, `vertical-align` is handled in 3 different
timings.
1. `top` and `bottom` are added to the pending list of the
   line box, or to the nearest ancestor box that has `top` or
   `bottom`.
2. `text-bop` and `text-bottom` are added to the pending list
   of the parent box.
3. Other values are computed when the box is closed.

When a box has both 1 and 2, this patch changes to compute 1
(`top` and `bottom`) after 2. Before this patch, both 1 and 2
are computed at the same time for each box. 3 test cases out
of 20 in this test fails without this patch.

Bug: 1001664
Change-Id: I0e7746447f5e401837c2c28e308171f0987eba35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792396
Reviewed-by: Emil A Eklund <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#695194}

--
Load ahem as web font and wait for fonts ready

--
Try waiting for fonts with explicit_done as well

--

wpt-commits: 87ca5381205f4c5f8a6e612de66e4534aed95a9f, a168a60a8501863172476a102fcf0f2dacef0139, 2ed1d147346f000f197e96ae9e8ff5558e751ada
wpt-pr: 18956
2019-09-18 23:37:58 +00:00
Koji Ishii 35926a895e Bug 1580306 [wpt PR 18974] - [LayoutNG] Fix vertical-align: top/bottom with leading, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix `vertical-align: top/bottom` with leading

This patch fixes non-culled inline boxes to take the
`line-height` property into account when computing top or
bottom of inline boxes in the line for `vertical-align:
top` or `bottom`.

Bug: 1001418
Change-Id: Ia53b9894dd81e70e17588bc284f0df4bc4f5c382
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795535
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#695443}

--
Load ahem as a web font

--

wpt-commits: d597e2891e7236a77bc4ccb2ee2a61b4c83ecf50, 503deeec59e2ccc4e7fb321c1addb197557379b8
wpt-pr: 18974
2019-09-14 08:52:21 +00:00
Koji Ishii 1d6dff3393 Bug 1579972 [wpt PR 18942] - [LayoutNG] Fix line breaking behavior after out-of-flow objects, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix line breaking behavior after out-of-flow objects

This patch changes line breaking behavior after out-of-flow
objects to match to ICU, assuming the out-of-flow object is
an object replacement character.

The behavior is not well-defined, and not all cases are
interoperable across existing implementations. Legacy/WebKit
resets the prior context so that text after out-of-flow
objects behave as if it is at the top of the line. Gecko and
Edge seem to allow break in most cases, even when NBSP
follows, but not when the line overflows.

The behavior implemented in this patch is interoperable for
all tests that pass on existing 4 implementations, but not
exactly same as legacy when implementations do not agree.

Bug: 1001438
Change-Id: I4c7077d2c287a6e897175b29a73ce1c308f29f4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792467
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: Aleks Totic <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#694888}

--
Load ahem as a webfont to fix lint error.

--

wpt-commits: 0dba391be24cebb9bbbd22d63df729193e502902, 992be2f9e48c9a8cab93ef3b393d548f3beea4ef
wpt-pr: 18942
2019-09-14 08:52:04 +00:00
Luke Zielinski 07324495d8 Bug 1579194 [wpt PR 18877] - Lint rule for using Ahem as a web font., a=testonly
Automatic update from web-platform-tests
Lint rule for using Ahem as a web font. (#18877)

Add a lint rule to check for tests that use the Ahem font but do not
include the /fonts/ahem.css stylesheet (which loads this font as a web
font). This prevents tests from assuming that Ahem is installed as a
system font. Also includes some unit tests.

There are a few tests that are incorrectly flagged as violating this
rule, these were added to lint.whitelist.

A bunch of other tests were fixed to load Ahem as a web font.
--

wpt-commits: c66230eebbea3bce8c086572869eb0835fb183b5
wpt-pr: 18877
2019-09-14 08:51:32 +00:00
Koji Ishii 690f5ea686 Bug 1578153 [wpt PR 18784] - LayoutVideo should not mark NeedsLayout in layout, a=testonly
Automatic update from web-platform-tests
LayoutVideo should not mark NeedsLayout in layout

This patch fixes |LayoutVideo| not to mark |NeedsLayout|
even when intrinsic size was changed, if it is during the
layout. Layout clears |NeedsLayout| of its inline ancestors
that doing this can leave them |NeedsLayout| set after the
layout was complete.

This is probably an old issue, but there were no code path
to hit it, unitl r684192 (crrev.com/c/1703540) changed the
intrinsic size computations.

yosin@ pointed out that |intrinsic_size_| is not used at all
when |ShouldApplySizeContainment()| since r684192, so we can
probably skip |LayoutVideo::UpdateIntrinsicSize()|. This
should fix the problem and also is supposed to improve the
performance a bit. This patch takes more conservative
approach to ensure we never |SetNeedsLayout| of inline
ancestors during the layout.

Bug: 998395
Change-Id: I735780bbc3b65321796d217934b57c6be2d2adbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1780986
Reviewed-by: Yoshifumi Inoue <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#692541}

--

wpt-commits: b86e07e58522387be6929b72b4c50ba01bc15ce9
wpt-pr: 18784
2019-09-09 11:54:29 +01:00
Ian Kilpatrick 0f99b142cf Bug 1577648 [wpt PR 18760] - [LayoutNG] Bottom half-leading shouldn't contribute to layout overflow., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Bottom half-leading shouldn't contribute to layout overflow.

Previously we included the total line-box size in the layout overflow
calculation.

With this patch we only consider the children, and the inline-size
of the line-box.

This has the effect of ignoring the bottom half-leading of the linebox.

Bug: 996847
Change-Id: I65386ad564a4472a67606cd3410af558d5d01328
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774314
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#691934}

--

wpt-commits: 779a3b3486363ab515247d00380e9e598f4f9985
wpt-pr: 18760
2019-09-03 14:23:31 +00:00
Mats Palmgren 86df939137 Bug 1576821 - [css-lists-3] Make 'none' invalid as a <counter-style> in counter()/counters(). r=emilio
CSSWG resolution:
https://github.com/w3c/csswg-drafts/issues/4163#issuecomment-521331100

Spec:
https://drafts.csswg.org/css-lists-3/#counter-functions

Differential Revision: https://phabricator.services.mozilla.com/D43893
2019-08-30 00:15:37 +00:00
Charlie Marlow c424652bbb Bug 1572800: Part 0: Add text-decoration-skip-ink: none to currently failing test cases r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D41880
2019-08-14 17:14:20 +00:00
Ian Kilpatrick 37d282da02 Bug 1570790 [wpt PR 18243] - [LayoutNG] Allow clearance as a valid value in the new-fc DCHECK., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Allow clearance as a valid value in the new-fc DCHECK.

Patch:
https://chromium-review.googlesource.com/c/chromium/src/+/1692627

Made us consider inline-level OOF-positioned nodes as adjoining, as
their static-position depends on where other floats are placed.

During the first pass the BFC block-offset gets resolved here:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc?l=986&rcl=e6157bb7afb778d5c15bb2bb09a457d9632151da

This aborts as it has an adjoining inline-OOF, and *doesn't* resolve
the BFC block-offset at |child_bfc_offset_estimate| instead applying
clearance.

Upon the second pass we now hit the DCHECK as neither of the options
has clearance applied.

Bug: 987004
Change-Id: I2634d56726a4664c869b2ecfa1e7a8a13458e78f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731917
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#684426}

--

wpt-commits: 4365c77bd40351dfe7c5511c58059cd2a624d7c9
wpt-pr: 18243
2019-08-09 20:31:28 +00:00
Ian Kilpatrick e5dd10620c Bug 1569808 [wpt PR 18158] - [LayoutNG] Fix placing floats within zero available space., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix placing floats within zero available space.

There was special logic added for zero width inlines in:
https://chromium-review.googlesource.com/c/chromium/src/+/870950/

This logic allowed for zero-width layout opportunities beside floats for
inline-level content.

This also added a TODO saying this was probably wrong for floats.

.... it turned out this was wrong for floats. :)

This adds a flag to switch between these two behaviours.

Bug: 988505
Change-Id: I2db5e0b9cb6f90cb131821ad205728289d9098ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725309
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Commit-Queue: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#682265}

--

wpt-commits: 179f0011944fe49e83669ef7931605a1bbf827ef
wpt-pr: 18158
2019-08-05 14:50:37 +00:00
Koji Ishii a479e0ca03 Bug 1566170 [wpt PR 17841] - [LayoutNG] Make Block and inline-block have the same baseline when overflow: hidden, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Make Block and inline-block have the same baseline when `overflow: hidden`

CSS2 defines[1] the baseline of an 'inline-block' is the
bottom margin edge if its `overflow` property is other than
`visible`.

Legacy, Gecko, and WebKit apply this rule to `block` too.
This patch matches to these engines.

Edge fails these tests, but MSN serves different page for
Edge (no gear icon) and that this problem does not appear.

[1] https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

Bug: 983822
Change-Id: I2c6c9ea7cb629a61720c9aeec9979341ce86360e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1701618
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Emil A Eklund <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#677461}

--

wpt-commits: b91110463d121e6b4ba6749df1fe5f54e9540d92
wpt-pr: 17841
2019-07-24 13:34:34 +01:00
Ian Kilpatrick e4f557733b Bug 1564572 [wpt PR 17733] - [LayoutNG] Ensure self-collapsing block relayout when ancestor resolves., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Ensure self-collapsing block relayout when ancestor resolves.

This bug was a combination of older code before we had "forced" BFC
block-offsets.

We didn't correctly detect when we had a self-collapsing block (which
had floats within it) that needed relayout if the initial estimate
was wrong.

This makes sure we give ourselves enough information to detect these
cases.

Bug: 980803
Change-Id: Id1ea5e10d819cb4509fd7664564b75b876f0f7cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1690720
Commit-Queue: Ian Kilpatrick <[email protected]>
Commit-Queue: Emil A Eklund <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#675729}

--

wpt-commits: 137960cfe6ce5b4dfb7a6d0bad126d517e03e009
wpt-pr: 17733
2019-07-24 13:33:38 +01:00
Koji Ishii 6bb69f7d9b Bug 1565139 [wpt PR 17685] - [LayoutNG] Do not use out-of-flow cache if in inline container, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Do not use out-of-flow cache if in inline container

This patch changes |NGOutOfFlowLayoutPart::LayoutCandidate()|
not to use a cached result if it has an inline container.

|NGLayoutResult::OutOfFlowPositionedOffset()| has an offset
relative to the inline formatting context block. When an out-
of-flow object has inline contianer, this offset may change
without setting |NeedsLayout()| to the out-of-flow object.

Bug: 981686
Change-Id: Ib8376f791af0b95f6c2b6e5c2361b6a887c74e69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692107
Commit-Queue: Emil A Eklund <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#675686}

--

wpt-commits: e2d6701e64fbf664b53a4db86c53bffadd9fb9cf
wpt-pr: 17685
2019-07-24 13:33:34 +01:00
Koji Ishii 9b89192bf5 Bug 1564805 [wpt PR 17669] - Defer laying out atomic inline while traversing inline children, a=testonly
Automatic update from web-platform-tests
Defer laying out atomic inline while traversing inline children

This patch reverts [1] so that, when in full layout mode, it
prevents |LayoutInlineChildren()| from doing any layout in
its |InlineWalker| loop.

The crash occurs because |DirtyLineBoxesForObject()| can
destroy |InlineTextBox| without unlinking them from the list,
assuming the tree was already destroyed. We could either:
a. Change |DirtyLineBoxesForObject()| to unlink |InlineBox|es
   it destroys.
b. Prevent laying out any children in this loop.
This patch chooses the optoin b.

Laying out atomic inline in the descendant traversal loop of
|LayoutInlineChildren()| was delayed after the loop in [2],
then it was changed to use a temporary list in [3].

The temporary list was removed in [1] because the original
test (fast/block/inline-children-root-linebox-crash.html) no
longer crashes. But laying out in the descendant traversal
loop should still be avoided.

[1] r390765 https://codereview.chromium.org/1933633002
[2] https://trac.webkit.org/changeset/118248/webkit
[3] https://trac.webkit.org/changeset/125810/webkit

Bug: 981602
Change-Id: Ie37a611aa7f6dc9b015d449ac75570c356ce654e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1690379
Reviewed-by: Emil A Eklund <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#675479}

--

wpt-commits: 7b1ce62b0f9796d78a30d2765189e42a1d0616e6
wpt-pr: 17669
2019-07-24 13:33:26 +01:00
Gérard Talbot bfdb2758e6 Bug 1564734 [wpt PR 17592] - Corrected 'padding-left: auto' in c412-blockw-000.xht test, a=testonly
Automatic update from web-platform-tests
Corrected 'padding-left: auto' in c412-blockw-000.xht test (#17592)

--

wpt-commits: 388f953018d3f0ffd0d955e07ee04ec452643849
wpt-pr: 17592
2019-07-24 13:32:48 +01:00
Koji Ishii 20bd3390bb Bug 1564708 [wpt PR 17612] - [LayoutNG] Include negative margin beyond the right edge, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Include negative margin beyond the right edge

This patch changes the line breaking behavior so that a
negative inline margin beyond the right edge can be included
in the line. Before this change, negative margins could move
the position back only when it's within the available width.

Legacy and WebKit don't do this, while Edge and Gecko do.
However, LayoutNG cannot render a page legacy and WebKit
render the same as other browser due to a bug in min-content.
Instead of copying the min-content bug in LayoutNG, this
patch fixes the page by matching to Edge and Gecko.

Bug: 979894
Change-Id: I07eedbb75f5c3b43e48b826bef18d95f1af872c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1684243
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#674177}

--

wpt-commits: 9aacd72c9f396544fc93a1419fa8c9bfe02c015a
wpt-pr: 17612
2019-07-24 13:32:35 +01:00
Morten Stenshorne 3fd81703b7 Bug 1564695 [wpt PR 17587] - [LayoutNG] Resolve auto inline margins on root., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Resolve auto inline margins on root.

The root HTML element is in a unique situation in LayoutNG, in that its
parent is a regular block container that is laid out by the legacy
engine. In legacy, block container layout expects the children to set
their own margin. Make sure that we do this.

Bug: 978702
Change-Id: I84b8e36bd706e3c01096cd9bd75a0747ddf265ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1683973
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#673733}

--

wpt-commits: 16680001ee64a84651c44311a605cc7b2bcc18bf
wpt-pr: 17587
2019-07-24 13:32:23 +01:00
Gérard Talbot caa69fdc66 Bug 1561449 [wpt PR 17514] - Added a link to spec in 6 CSS2/values tests, a=testonly
Automatic update from web-platform-tests
Added a link to spec in 6 CSS2/values tests (#17514)

--

wpt-commits: a3f623801e5fef0bb8a806fbc8119c32d57240d1
wpt-pr: 17514
2019-07-24 13:31:58 +01:00
Gérard Talbot 5949d37b3a Bug 1561446 [wpt PR 17513] - Added a link to spec in 13 CSS2/values tests, a=testonly
Automatic update from web-platform-tests
Added a link to spec in 13 CSS2/values tests (#17513)

--

wpt-commits: 4c26654f77551d686bbc255cee95089b12aa6907
wpt-pr: 17513
2019-07-24 13:31:57 +01:00
Gérard Talbot 0db56c9460 Bug 1561439 [wpt PR 17512] - Added a link to spec to numbers-units-00[5-6] tests, a=testonly
Automatic update from web-platform-tests
Added a link to spec to numbers-units-00[5-6] tests (#17512)

--

wpt-commits: 95a1d50e544d1894110449e207f8e8cc92324dc8
wpt-pr: 17512
2019-07-24 13:31:56 +01:00
Gérard Talbot 52092ca5a3 Bug 1561437 [wpt PR 17510] - Added a link to spec to numbers-units-00[2-3] tests, a=testonly
Automatic update from web-platform-tests
Added a link to spec to numbers-units-00[2-3] tests (#17510)

--

wpt-commits: 78f9cce31d3a905598773b0486f9567e8a4e6193
wpt-pr: 17510
2019-07-24 13:31:55 +01:00
Gérard Talbot ea454a0d96 Bug 1561433 [wpt PR 17508] - Added a link to spec to numbers-units-004 test, a=testonly
Automatic update from web-platform-tests
Added a link to spec to numbers-units-004 test (#17508)

--

wpt-commits: 288514517e5012ad4459c63e8b37e6dcff3fd561
wpt-pr: 17508
2019-07-24 13:31:54 +01:00
Gérard Talbot 265cc18031 Bug 1561430 [wpt PR 17507] - Added another link to spec to numbers-units-001 test, a=testonly
Automatic update from web-platform-tests
Added another link to spec to anumbers-units-001 test (#17507)

--

wpt-commits: 73f28194f388630a856827e63e286883e6c42a12
wpt-pr: 17507
2019-07-24 13:31:54 +01:00
Koji Ishii 779fcf71bd Bug 1564661 [wpt PR 17544] - [LayoutNG] Fix hit-testing on floats in line box, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix hit-testing on floats in line box

This patch fixes hit-testing floats when they are included in
a line box, and extend the height of the line box.

LayoutNG places floats within a line box, and make its bounds
to include floats. Hit-testing code checks floating objects
only if foreground hit-testing did not succeeded.

This patch changes foreground hit-testing on line box to fail
if there's a float at the location. It should be ok because
line box does not have foreground objects, but this is not
the most efficient way to fix this problem. We might want to
revisit either where to put such floats, or how to hit-test
floats.

Bug: 977856
Change-Id: I687dd44ddfbf7ebcb25b38a9d90470ea939cb053
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1680074
Commit-Queue: Emil A Eklund <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#672911}

--

wpt-commits: 7baea31d05c76d6d37975bb08304088f7f50d480
wpt-pr: 17544
2019-07-24 13:31:48 +01:00
Sam Sneddon dcdcd2f42f Bug 1558809 [wpt PR 17292] - Add ahem.css to many more tests, a=testonly
Automatic update from web-platform-tests
Merge pull request #17292 from gsnedders/ahem-part2b

Add ahem.css to many more tests
--

wpt-commits: daf75e3bc7829fc4de06bff7136009210aafe3e5
wpt-pr: 17292
2019-07-24 13:31:10 +01:00
Ian Kilpatrick 2ed98c2777 Bug 1560890 [wpt PR 17391] - [LayoutNG] Fix inserting exclusion crash., a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix inserting exclusion crash.

When placing a new area into the closed area list there is almost
always an area at LayoutUnit::Min().

However if there was a float placed at LayoutUnit::Min() it is possible
to get into a state where this isn't the case.

Bug: 972904
Change-Id: I1c787ea8e4f5d87ae97023efd9cdb994c2b065ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664930
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#670726}

--

wpt-commits: 9a183439c7fd1a22298c49a86be1e293d460ea75
wpt-pr: 17391
2019-07-24 13:30:26 +01:00
Koji Ishii 111b5f03f1 Bug 1560867 [wpt PR 17375] - [LayoutNG] Fix |Reset()| to reset unpositioned list marker, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix |Reset()| to reset unpositioned list marker

This patch fixes |NGLineBoxFragmentBuilder::Reset()| to reset
unpositioned list marker.

Bug: 967997
Change-Id: Ic776ac0881db2261da8e9a443c251c42554a39cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662984
Commit-Queue: Koji Ishii <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#670049}

--

wpt-commits: 41df32dcf0ab90f62fff00b3af2a81fc5018edd6
wpt-pr: 17375
2019-07-24 13:30:03 +01:00
Koji Ishii e5cbcb14ba Bug 1560851 [wpt PR 17356] - [LayoutNG] Fix negative margins on inline boxes, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix negative margins on inline boxes

This patch fixes computing size of inline boxes that have
negative inline margins.

It looks like we didn't have enough test coverage when
`NGFragmentGeometry` was introduced.

Bug: 971622
Change-Id: Icd0f5300ef76a873ec25b8d96756884da954d184
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662249
Reviewed-by: Aleks Totic <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#669699}

--

wpt-commits: c81dc02d6b1b4a5a5925d6cb27f16af7b897cb59
wpt-pr: 17356
2019-07-24 13:29:54 +01:00
Jonathan Kew ee745352ec Bug 1567098 - Add a WPT reftest where no content fits onto the shortened line beside a float. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D38535
2019-07-18 19:07:36 +00:00
Luke Zielinski 84fd4a5e5e Bug 1556841 [wpt PR 17173] - Load Ahem as a webfont everywhere (part 2), a=testonly
Automatic update from web-platform-tests
 Load Ahem as a webfont everywhere (part 2) (#17173)

This change updates a large number of reftests to link to the
`/fonts/ahem.css` stylesheet. Each file contains a single additional
line before the first `<style>` element:
```
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
```
--

wp5At-commits: 9c780585758acf5e9ac6d17ad9bd03c83404c7e6
wpt-pr: 17173
2019-06-19 11:06:58 -07:00
Koji Ishii 8bbe90710a Bug 1558263 [wpt PR 17247] - [LayoutNG] Fix negative margin in RTL, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Fix negative margin in RTL

When there're negative inline margins, |ResolveInlineMargins|
computes incorrect inline-end margin, which affects line
offset in RTL. The inline-end margin computed here is not
used for layout in LTR that the problem was visible only in
RTL.

Bug: 971403
Change-Id: I8cfc6e303649d66b91c95ed1f7a30295c67bcad6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647907
Commit-Queue: Emil A Eklund <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#667647}

--

wp5At-commits: 2d92aacd195e4ee7822151efde6083c221d6bd57
wpt-pr: 17247
2019-06-19 11:06:55 -07:00
Chris Harrelson a5247e0525 Bug 1556565 [wpt PR 17153] - Mark subtree of a scroller as having dirty compositing inputs after scroll., a=testonly
Automatic update from web-platform-tests
Mark subtree of a scroller as having dirty compositing inputs after scroll.

This is because the overlap-testing rects depend on scroll offset.

Bug: 950154

Change-Id: Iacb3d373fe1b9be315701a55d604e44edb88f040
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638620
Commit-Queue: Chris Harrelson <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/master@{#666480}

--

wp5At-commits: da9264974d2cb05537302778e7c34838560722ed
wpt-pr: 17153
2019-06-19 11:06:43 -07:00