Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Issue 2546473003: Simplify computation of text selection top/bottom. (Closed)

Created:
4 years ago by wkorman
Modified:
4 years ago
Reviewers:
pdr., Stephen Chennney, eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify computation of text selection top/bottom. Leads to a functionality change wherein we will now see selection highlight overlap in some cases where previously we avoided it. We've already gone down this path in other cases, see for example http://crrev.com/1727113007. This change fixes two issues: 1. A paint invalidation bug that could lead to missing glyph bits. 2. A paint issue where text selection rect could be shrunk to avoid overlap with preceding line resulting in partially invisible glyph portions painted outside of the selection rect. It also removes logic around fiddling selection location, when floats are present, depending on line offset of previous/next lines. This could be a relic from selection gap days. Without problematic specific test cases to consider, we may as well remove said logic. BUG=657325 Committed: https://crrev.com/e1ac96c0207dd18057fc1f385362b1bee52bb26f Cr-Commit-Position: refs/heads/master@{#436446}

Patch Set 1 #

Patch Set 2 : Further simplification of test. #

Patch Set 3 : Add new baselines. #

Total comments: 2

Patch Set 4 : Fix up test. #

Patch Set 5 : Add add'l test expectations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -92 lines) Patch
M third_party/WebKit/LayoutTests/fast/text/selection-with-inline-padding.html View 1 2 3 1 chunk +24 lines, -26 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/text/selection-with-inline-padding-expected.html View 1 2 3 1 chunk +0 lines, -27 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/text/selection-no-clip-text.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/text/selection-with-inline-padding-expected.txt View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/paint/text/selection-no-clip-text-expected.png View 1 2 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/paint/text/selection-no-clip-text-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/text/selection-with-inline-padding-expected.txt View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/paint/text/selection-no-clip-text-expected.png View 1 2 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/paint/text/selection-no-clip-text-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/text/selection-with-inline-padding-expected.txt View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/text/selection-no-clip-text-expected.png View 1 2 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/paint/text/selection-no-clip-text-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win7/fast/text/selection-with-inline-padding-expected.png View 1 2 3 4 Binary file 0 comments Download
M third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp View 3 chunks +2 lines, -39 lines 0 comments Download

Messages

Total messages: 26 (18 generated)
wkorman
4 years ago (2016-12-01 00:12:21 UTC) #4
wkorman
Note this patch knowingly regresses behavior of fast/text/selection-with-inline-padding.html which was added in http://crrev.com/331303004. Open to ...
4 years ago (2016-12-01 01:05:31 UTC) #9
wkorman
On 2016/12/01 01:05:31, wkorman wrote: > Note this patch knowingly regresses behavior of > fast/text/selection-with-inline-padding.html ...
4 years ago (2016-12-01 20:50:27 UTC) #16
pdr.
I think this patch is an improvement. LGTM. https://codereview.chromium.org/2546473003/diff/40001/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp File third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp (left): https://codereview.chromium.org/2546473003/diff/40001/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp#oldcode404 third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp:404: // ...
4 years ago (2016-12-01 21:54:48 UTC) #17
eae
LGTM https://codereview.chromium.org/2546473003/diff/40001/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp File third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp (left): https://codereview.chromium.org/2546473003/diff/40001/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp#oldcode404 third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp:404: // This line has actually been moved further ...
4 years ago (2016-12-02 10:12:30 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2546473003/80001
4 years ago (2016-12-05 21:36:39 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-05 23:25:36 UTC) #24
commit-bot: I haz the power
4 years ago (2016-12-05 23:27:44 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e1ac96c0207dd18057fc1f385362b1bee52bb26f
Cr-Commit-Position: refs/heads/master@{#436446}

Powered by Google App Engine
This is Rietveld 408576698