New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 594962 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Selection newlines should be clipped by containing overflow clips or element clips

Project Member Reported by sc00335...@techmahindra.com, Mar 15 2016

Issue description

Version: 51.0.2679.0 dev 
OS: Ubuntu 12.04,14.04

What steps will reproduce the problem?
(1) Launch chrome and open devtools on any page[Ex: chrome://help]
(2) Go to profiles section >> Record Heap allocation and stop it
(3) Select some of the content in the data populated >> Now deselect it by clicking any of the selected text[Do not move mouse after clicking]  
(4) Observe traces of highlighted text at borders

Expected: On deselecting traces of highlight should not be seen
Actual: Instead traces of highlight are seen even after deselecting

This is a regression issue broken in M51.

NOTE: Issue is not seen on windows

good build:51.0.2671.0  dev (64-bit)
bad build:51.0.2672.0  dev (64-bit)

CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/5a49cbd778aef637c586a8ebae8bb2f952d30a09..93b3bb34672a3e5f4a319ba422b425eaa484a92b

Suspecting https://codereview.chromium.org/1648433002 from changelog

@dongseong.hwang: Please help in re-assigning if it is not related to your change.


 
Expected_profiles.ogv
1.9 MB Download
Actual_profiles.png
173 KB View Download
Actual_profiles.ogv
1.8 MB Download
Components: -Blink>Compositing Platform>DevTools
Labels: ReleaseBlock-Stable
Able to reproduce the issue on Linux Ubuntu 14.04 using chrome version 51.0.2679.0.Not reproducible on mac using 51.0.2679.0.

Adding blocker label as this is recent regression,please remove if not the case.
Owner: chrishtr@chromium.org
Labels: -ReleaseBlock-Stable
Removing releaseblock as the feature was reverted.
Cc: wkorman@chromium.org
Summary: Selection newlines are not always being invalidated correctly. (was: [Regression]: Unwanted traces of highlight is seen on selection and deselection in profiles of devtools)
The bug is in invalidation for selection rect newlines.
Appears to only repro for tables.
Likely reduced testcase:

<!doctype HTML>
<table>
  <tr>
    <th>
      <div style="overflow: hidden">
        newline invalidation after me is missing
      </div>
    </th>
    <th>
      test2
    </th>
  </tr>
</table>

For some reason it's hard to get it to look visually different with these examples, but
the DevTools "show layer borders" feature shows that the selection newline in the space between the two <th>es is not getting invalidated. Probably overflow:hidden is causing that selection to get
clipped.
Status: Started (was: Assigned)
The problem is that the selection invalidation rect is expanded by the width of a newline, but when that rect is mapped to the paint invalidation container by a call to mapToVisibleRectInAncestorSpace, it is clipped to the overflow:hidden bounds, which don't include the newline area.

OTOH, the painted selection rect itself is not clipped to the overflow:hidden bounds when actually painted.
This version will most likely show an artifact on Linux. It requires the newline spacer between the table cells to be across a tile, because partial raster only uses a single rect to represent invalidations in a tile.

--enable-blink-features=slimmingPaintStrictCullRectClipping also helps to exhibit the problem.

Steps to repro:
1. ctr-a
2. unselect


<!doctype HTML>
<table>
  <tr>
    <th>
      <div style="overflow: hidden">
        newline invalidation after me is mis
      </div>
    </th>
    <th>
      test2
    </th>
  </tr>
</table>

Summary: Selection newlines should be clipped by containing overflow clips or element clips (was: Selection newlines are not always being invalidated correctly.)
Cc: e...@chromium.org chrishtr@chromium.org
 Issue 538704  has been merged into this issue.
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 21 2016

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

commit 19f335aba751a0809efa94d641502e6f72249bad
Author: chrishtr <chrishtr@chromium.org>
Date: Mon Mar 21 17:17:58 2016

Always apply parent clips to selection rects when painting.

Previously, BoxClipper would try to avoid clipping if it appeared the clip had
no effect, by comparing with contentVisualOverflowRect().
Now that selections paint newline placeholders, the selection rect may
extend beyond the overflow rect. (Selection is not part of overflow, since it is
required for it not to affect layout.)

BUG= 594962 

Review URL: https://codereview.chromium.org/1817463004

Cr-Commit-Position: refs/heads/master@{#382313}

[modify] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/LayoutTests/paint/selection/resources/selection.js
[add] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/LayoutTests/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
[add] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/LayoutTests/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt
[add] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/LayoutTests/paint/selection/text-selection-newline-clipped-by-overflow.html
[modify] https://crrev.com/19f335aba751a0809efa94d641502e6f72249bad/third_party/WebKit/Source/core/paint/BoxClipper.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 21 2016

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

commit 85a135617867ebef8d264f44e70a10840ffff861
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Mon Mar 21 20:52:12 2016

Auto-rebaseline for r382313

https://chromium.googlesource.com/chromium/src/+/19f335aba

BUG= 594962 
TBR=chrishtr@chromium.org

Review URL: https://codereview.chromium.org/1824793002 .

Cr-Commit-Position: refs/heads/master@{#382384}

[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/android/fast/text/selection-rect-rounding-expected.png
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/android/fast/text/whitespace/pre-wrap-overflow-selection-expected.png
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/linux/fast/text/selection-rect-rounding-expected.png
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/linux/fast/text/whitespace/pre-wrap-overflow-selection-expected.png
[rename] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
[rename] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/selection-painted-separately-expected.png
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/mac/fast/text/selection-painted-separately-expected.png
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/win/fast/text/selection-painted-separately-expected.png
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/win/fast/text/selection-rect-rounding-expected.png
[modify] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/win/fast/text/whitespace/pre-wrap-overflow-selection-expected.png
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
[add] https://crrev.com/85a135617867ebef8d264f44e70a10840ffff861/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt

Status: Fixed (was: Started)

Sign in to add a comment