New issue
Advanced search Search tips

Issue 641907 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Compat



Sign in to add a comment

Compute and apply clip-path reference boxes per-fragment

Project Member Reported by f...@opera.com, Aug 29 2016

Issue description

We currently use the bounding box of the line boxes as the reference box. Gecko appears to be using <width of bounding box> x <height of first line box> or something similar. The reference box (and clip) should probably be computed per-fragment, and possibly factor in the value of box-decoration-break. We could consider aligning with the Gecko behavior for now.

Demonstration:

https://jsfiddle.net/dgp20c7f/1/
 

Comment 1 by f...@opera.com, Aug 29 2016

Summary: Compute and apply clip-path reference boxes per-fragment (was: Clip-path reference boxes multi-line inlines may be incorrect)
Found https://lists.w3.org/Archives/Public/www-style/2014Jan/0604.html and https://bugzilla.mozilla.org/show_bug.cgi?id=988659
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10b60639752dde3f81bc82323f70eb6e99adeae5

commit 10b60639752dde3f81bc82323f70eb6e99adeae5
Author: fs <fs@opera.com>
Date: Fri Sep 02 14:52:16 2016

Align reference box computation for inline boxes with Gecko

For inline boxes, the reference box should be computed per-fragment, and
be subject to box-decoration-break. We're not quite there yet though, so
go for "local compat" for now and align with Gecko. This way we're
slightly closer to "correct" (the "single line" case ought to be fairly
correct for instance), and hopefully avoid getting sucked into a compat
"sinkhole".
Adjust css3/masking/clip-path-reference-box-inline.html to match.

BUG=641907
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2303773002
Cr-Commit-Position: refs/heads/master@{#416264}

[modify] https://crrev.com/10b60639752dde3f81bc82323f70eb6e99adeae5/third_party/WebKit/LayoutTests/css3/masking/clip-path-reference-box-inline-expected.html
[modify] https://crrev.com/10b60639752dde3f81bc82323f70eb6e99adeae5/third_party/WebKit/LayoutTests/css3/masking/clip-path-reference-box-inline.html
[modify] https://crrev.com/10b60639752dde3f81bc82323f70eb6e99adeae5/third_party/WebKit/Source/core/paint/PaintLayer.cpp

Comment 3 by f...@opera.com, Sep 5 2016

Additional demo: https://jsfiddle.net/4h6wdkde/ (column fragments)
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 5 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by f...@opera.com, Sep 5 2017

Status: Available (was: Untriaged)
Labels: -Hotlist-Recharge-Cold BugSource-Team PaintTeamTriaged-20170905
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/491395eeb3869cc3240a83a0a4024d771a31a782

commit 491395eeb3869cc3240a83a0a4024d771a31a782
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Wed Oct 03 03:30:10 2018

Align more closely with Gecko for clip-path reference box.

This changes how we calculate the reference box when the layout box is a
non-atomic inline.

It was very broken for LayoutNG; we just set the height to 0. For legacy
layout we used the width of the bounding box for all lines and the
height of the first fragment.

Instead, consistently use the size of the first fragment, in both NG and
legacy. Also get it right if writing-mode is vertical-rl.

Bug: 641907
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I652f197bc3d950fad1bf6067dc5f38c2df72a0a3
Reviewed-on: https://chromium-review.googlesource.com/c/1256808
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596110}
[modify] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[add] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-001.html
[add] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-002.html
[add] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-003.html
[modify] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/blink/renderer/core/layout/layout_inline.h
[modify] https://crrev.com/491395eeb3869cc3240a83a0a4024d771a31a782/third_party/blink/renderer/core/paint/clip_path_clipper.cc

Cc: mstensho@chromium.org
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e5300519194e45b6a24271a7f9436fea6cc9e98

commit 4e5300519194e45b6a24271a7f9436fea6cc9e98
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Thu Oct 04 09:26:28 2018

[LayoutNG] Correct clip-path reference box calculation.

We used coordinates relatively to the line box, while we were expected
by the caller to be relative to the containing block. Flipping for
writing mode was bogus for NG (but needed by legacy), since NG uses
truly physical coordinates.

Hardened tests to contain a leading line and padding, and leading
content on the first line of the clipped child.

Bug: 641907
Change-Id: I2b1b9ff4ea92a6405fcdffcf139842458b46442f
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1257913
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596554}
[modify] https://crrev.com/4e5300519194e45b6a24271a7f9436fea6cc9e98/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-001.html
[modify] https://crrev.com/4e5300519194e45b6a24271a7f9436fea6cc9e98/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-002.html
[modify] https://crrev.com/4e5300519194e45b6a24271a7f9436fea6cc9e98/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-inline-003.html
[modify] https://crrev.com/4e5300519194e45b6a24271a7f9436fea6cc9e98/third_party/blink/renderer/core/layout/layout_inline.cc

Sign in to add a comment