Duplicated background mask for -webkit-background-clip:text |
||
Issue descriptionOpen the attached test case. Expected: All texts should be purple. Actual: There is an extra background mask for Text3 shifted to the right. Bisected to https://chromium.googlesource.com/chromium/src/+log/1dc1755b340ccf96a532a6f50e4414f59ddb9424..5c58e8edcd5bd47c926b59b541d644a49d6a03c5 (in M65)
,
Aug 31
Based on how this markup is written (<br> does not close <span>, so "Text 3" nests within the span for "Text 2"), I think duplication is to be expected (i.e no bug there AFAICT.) The offset of (one of) the "Text 3" mask is of course incorrect though (and probably, at least indirectly, an effect of the markup structure.)
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96b637071ae263682098a5f0659b67b6a2b43049 commit 96b637071ae263682098a5f0659b67b6a2b43049 Author: Fredrik Söderquist <fs@opera.com> Date: Fri Aug 31 15:54:45 2018 Handle non-image backgrounds in BoxModelObjectPainter::PaintTextClipMask When we paint a background color for a line, we don't adjust the paint offset based on the logical offset on the "virtual line", so we mustn't try to undo the adjustment in BoxModelObjectPainter::PaintTextClipMask when we're generating the mask for "(-webkit-)background-clip: text". Check the |object_has_multiple_boxes| and don't undo the adjustment if it is false. Bug: 879292 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I9ec9c5cdfeb675803e54407f2e98e39b2dc1bc6b Reviewed-on: https://chromium-review.googlesource.com/1199343 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#588038} [add] https://crrev.com/96b637071ae263682098a5f0659b67b6a2b43049/third_party/WebKit/LayoutTests/fast/backgrounds/background-clip-text-multiline-linebreak-expected.html [add] https://crrev.com/96b637071ae263682098a5f0659b67b6a2b43049/third_party/WebKit/LayoutTests/fast/backgrounds/background-clip-text-multiline-linebreak.html [modify] https://crrev.com/96b637071ae263682098a5f0659b67b6a2b43049/third_party/blink/renderer/core/paint/box_model_object_painter.cc
,
Aug 31
,
Sep 3
Able to reproduce the issue on reported chrome version build without fix #68.0.3440.106 using Ubuntu 17.10 as per comment #0. Verified fix on Ubuntu 17.10 and Mac OS 10.13.6, but could not verify on Windows as latest chrome build is not available on Windows OS. Attaching screenshots for reference. Observed all the text appears in purple. Thanks.! |
||
►
Sign in to add a comment |
||
Comment 1 by wangxianzhu@chromium.org
, Aug 30