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

Issue 2709693003: Repaint selection when element with ::selection style is recalculated. (Closed)

Created:
3 years, 10 months ago by rune
Modified:
3 years, 10 months ago
CC:
chromium-reviews, szager+layoutwatch_chromium.org, blink-reviews-style_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Repaint selection when element with ::selection style is recalculated. Selection was not repainted unless the selected text was repainted due to other style changes. Now, if the ComputedStyle is recalculated for an element and either the old or the new ComputedStyle had a bit set for PseudoIdSelection, schedule paint invalidation for the selection leaf children of that element. Note that we don't need to traverse down the descendants because the current implementation of ::selection in Blink only affects direct children. The selection state is only propagated to containing block ancestor, which is why we look for a containing block to check if any of the children is selected. R=mstensho@opera.com BUG=685174 Review-Url: https://codereview.chromium.org/2709693003 Cr-Commit-Position: refs/heads/master@{#451992} Committed: https://chromium.googlesource.com/chromium/src/+/eff357ef3a21515a5bfaa487b687d7d7353024f2

Patch Set 1 #

Total comments: 11

Patch Set 2 : Make DCHECK an if-test instead. #

Patch Set 3 : Fixed review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint-expected.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 2 chunks +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleDifference.h View 1 2 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
rune
ptal
3 years, 10 months ago (2017-02-21 12:22:41 UTC) #2
mstensho (USE GERRIT)
https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html File third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html (right): https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html#newcode12 third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html:12: <span id="t1">GREEN<span> RED </span>GREEN</span> The fact that "RED" is ...
3 years, 10 months ago (2017-02-21 21:03:54 UTC) #6
rune
https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html File third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html (right): https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html#newcode12 third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html:12: <span id="t1">GREEN<span> RED </span>GREEN</span> On 2017/02/21 21:03:54, mstensho wrote: ...
3 years, 10 months ago (2017-02-21 21:42:00 UTC) #7
rune
https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html File third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html (right): https://codereview.chromium.org/2709693003/diff/1/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html#newcode12 third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-background-repaint.html:12: <span id="t1">GREEN<span> RED </span>GREEN</span> On 2017/02/21 21:42:00, rune wrote: ...
3 years, 10 months ago (2017-02-21 22:34:57 UTC) #8
mstensho (USE GERRIT)
lgtm
3 years, 10 months ago (2017-02-22 09:49:58 UTC) #13
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/2709693003/40001
3 years, 10 months ago (2017-02-22 09:51:26 UTC) #15
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 11:14:35 UTC) #18
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/eff357ef3a21515a5bfaa487b687...

Powered by Google App Engine
This is Rietveld 408576698