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

Issue 208203002: Don't rely on values computed as a side effect of paint. (Closed)

Created:
6 years, 9 months ago by Ian Vollick
Modified:
6 years, 9 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, blink-layers+watch_chromium.org, jchaffraix+rendering, pdr., rune+blink
Visibility:
Public.

Description

Don't rely on values computed as a side effect of paint. Contrary to the assertions on the bug, the current code is correct. As the user changes the selection, there will naturally be a visual affordance to indicate the selection changes. By the time we scroll, RL::hasBlockSelectionGapsBounds will be current and correct. That said, the hope is that in the future paint will have no side effects at all, nor do we want layout tests to require repaints during their execution. So even if this is technically correct it's undesirable on a number of levels. This cl replaces the use of hasBlockSelectionGapsBounds with non-paint related code (in fact, that function could be removed entirely). R=abarth@chromium.org BUG=353827 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169752

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -12 lines) Patch
M LayoutTests/TestExpectations View 1 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderLayer.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderLayer.cpp View 1 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Ian Vollick
Adam, PTAL. For simplicity, I'm computing the selection rect dynamically (once per scroll update), but ...
6 years, 9 months ago (2014-03-21 13:37:50 UTC) #1
abarth-chromium
https://codereview.chromium.org/208203002/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/208203002/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode399 Source/core/rendering/RenderLayerScrollableArea.cpp:399: && layer()->renderer()->selectionRectForRepaint(0, true).isEmpty(); Why not just call selectionRect() ? ...
6 years, 9 months ago (2014-03-21 15:45:54 UTC) #2
abarth-chromium
Otherwise, LGTM
6 years, 9 months ago (2014-03-21 15:46:42 UTC) #3
Ian Vollick
The CQ bit was checked by vollick@chromium.org
6 years, 9 months ago (2014-03-21 16:58:43 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vollick@chromium.org/208203002/20001
6 years, 9 months ago (2014-03-21 16:58:49 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-21 17:00:29 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-21 17:00:29 UTC) #7
Ian Vollick
https://codereview.chromium.org/208203002/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/208203002/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode399 Source/core/rendering/RenderLayerScrollableArea.cpp:399: && layer()->renderer()->selectionRectForRepaint(0, true).isEmpty(); On 2014/03/21 15:45:54, abarth wrote: > ...
6 years, 9 months ago (2014-03-21 17:01:50 UTC) #8
Ian Vollick
The CQ bit was checked by vollick@chromium.org
6 years, 9 months ago (2014-03-21 17:07:17 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vollick@chromium.org/208203002/20001
6 years, 9 months ago (2014-03-21 17:07:24 UTC) #10
commit-bot: I haz the power
Change committed as 169752
6 years, 9 months ago (2014-03-21 18:01:00 UTC) #11
Ian Vollick
6 years, 9 months ago (2014-03-23 16:57:31 UTC) #12
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/209543002/ by vollick@chromium.org.

The reason for reverting is: Looks like this is causing ASSERTs due to calling
layout-dependent code at the wrong time:
https://code.google.com/p/chromium/issues/detail?id=355277.

Powered by Google App Engine
This is Rietveld 408576698