New issue
Advanced search Search tips

Issue 703403 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Missing outline around inline in some cases

Project Member Reported by wangxianzhu@chromium.org, Mar 20 2017

Issue description

<div style="position: absolute">
  <span style="outline: auto">
    <div style="width: 100px; height: 100px"></div>
  </span>
</div>

The anonymous block wrapper of the span thinks it has empty visual overflow and skips all painting, causing missing outline of the span.
 
Correction: The inner div should have position: relative or something like that to reproduce the issue.
Labels: PaintTeamTriaged-20170321 BugSource-Team
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 22 2017

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

commit 437d0b9a1fbd7345b234e54e09716f501c37ccb8
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Wed Mar 22 22:19:01 2017

Fix inline focus ring paint invalidation on continuation change

An inline element's focus ring encloses its block and inline
continuations. The previous method handled invalidation of
display item client only, not rectangles covering the changed
inlines.

Now call setMayNeedPaintInvalidation() on the inline whose block
continuations are marked needsPaintOffsetAndVisualRectUpdate().

Also noticed a focus ring painting bug ( crbug.com/703403 ) and added
a test case. Will fix later.

BUG= 704243 ,  703403 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

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

[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/inline/focus-ring-under-absolute-with-relative-continuation-expected.html
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/inline/focus-ring-under-absolute-with-relative-continuation.html
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/invalidation/focus-ring-on-continuation-move-expected.html
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/invalidation/focus-ring-on-continuation-move-expected.txt
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/invalidation/focus-ring-on-continuation-move.html
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/invalidation/focus-ring-on-inline-continuation-move-expected.html
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/paint/invalidation/focus-ring-on-inline-continuation-move.html
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/focus-ring-on-continuation-move-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/focus-ring-on-continuation-move-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/focus-enable-continuations-expected.txt
[add] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/focus-ring-on-inline-continuation-move-expected.txt
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/437d0b9a1fbd7345b234e54e09716f501c37ccb8/third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp

The problem is that when we are calculating overflow for the inline, we haven't laid out its continuations. We may need to make overflow calculation a standalone step after layout to avoid the problem.
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 31 2017

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

commit eefd3fc93296ee6b3ef9c5055d024573d8c7f63d
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Fri Mar 31 22:50:13 2017

Fix inline outline in a corner case

In the corner case, an anoymous block contains an inline which has
outline and continuation. Previously when we calculated visual overflow
of the anonymous block during layout, the layout of continuation might
not be up-to-date causing inaccurate outline visual overflow.

Now re-add visual overflow of inline children of the anonymous block
when calculating parent's overflow which happens when layout of
continuation is clean.

This CL causes addOverflowFromInlineChildren() to be called twice in
each overflow recalc or layout cycle for each block with
containsInlineWithOutlineAndContinuation(), but this keeps the change
simplest for the rare case.

BUG= 703403 

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

[add] https://crrev.com/eefd3fc93296ee6b3ef9c5055d024573d8c7f63d/third_party/WebKit/LayoutTests/fast/inline/inline-focus-ring-under-absolute-enclosing-relative-div-expected.html
[add] https://crrev.com/eefd3fc93296ee6b3ef9c5055d024573d8c7f63d/third_party/WebKit/LayoutTests/fast/inline/inline-focus-ring-under-absolute-enclosing-relative-div.html
[modify] https://crrev.com/eefd3fc93296ee6b3ef9c5055d024573d8c7f63d/third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Status: Fixed (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 27 2017

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

commit 9aca3b818102de16d10579f4f3157527ed69116a
Author: wangxianzhu <wangxianzhu@chromium.org>
Date: Thu Apr 27 03:43:45 2017

paint/inline/focus-ring-under-absolute-with-relative-continuation.html is passing

BUG= 703403 
TBR=schenney@chromium.org

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

[modify] https://crrev.com/9aca3b818102de16d10579f4f3157527ed69116a/third_party/WebKit/LayoutTests/TestExpectations

Sign in to add a comment