New issue
Advanced search Search tips

Issue 910643 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Painted outline rects are sometimes not in correct physical coordinates

Project Member Reported by wangxianzhu@chromium.org, Nov 30

Issue description

For the attached test case, the focus ring is incorrect because the outline rect for the overflowing child is not correctly flipped into physical coordinates.

We should also use physical coordinates where we call AddOutlineRects() or AddElementVisualOverflowRects() in painting code.
 
outline-vrl.html
312 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 30

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

commit 7fab23cfec47f1478d169b70db06f61cbdf76f26
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Fri Nov 30 21:17:52 2018

[PE] LayoutObject::PhysicalOutlineRects()

Previously when painting outlines we used LayoutObject::AddOutlineRects()
which adds outline rects in flipped blocks direction. The previous
flipping code in ObjectPainter::PaintOutline() was incomplete, and we
also missed the flipping in other places.

Add LayoutObject::PhysicalOutlineRects() which flips the outline rects
correctly.

Remove internals.outlineRects and internals.focusRingRects and convert
the layout tests using them into unit tests.

Bug:  910643 

Change-Id: Ib8b3e0c7cd646e60378c09955ba26334f0f7f9e9
Reviewed-on: https://chromium-review.googlesource.com/c/1352503
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612786}
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/html/anchor_element_metrics.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/layout/layout_inline_test.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/paint/block_painter.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/paint/object_painter.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/testing/internals.cc
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/testing/internals.h
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/renderer/core/testing/internals.idl
[modify] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[delete] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/third_party/blink/web_tests/fast/css/focus-ring-recursive-continuations-expected.txt
[delete] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/third_party/blink/web_tests/fast/css/focus-ring-recursive-continuations.html
[delete] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/third_party/blink/web_tests/fast/css/focus-ring-recursive-inlines-expected.txt
[delete] https://crrev.com/a4e4bb73dba61a56ee3c8fda1bcdacffec4ec7a8/third_party/blink/web_tests/fast/css/focus-ring-recursive-inlines.html
[add] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/web_tests/fast/css/focus-ring-vrl-overflow-expected.html
[add] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/web_tests/fast/css/focus-ring-vrl-overflow.html
[add] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/web_tests/svg/custom/focus-ring-vrl-expected.svg
[add] https://crrev.com/7fab23cfec47f1478d169b70db06f61cbdf76f26/third_party/blink/web_tests/svg/custom/focus-ring-vrl.svg

Status: Fixed (was: Assigned)

Sign in to add a comment