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

Issue 265703012: Separate repaint and layout requirements of StyleDifference (Step 4) (Closed)

Created:
6 years, 7 months ago by Xianzhu
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, dsinclair, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Visibility:
Public.

Description

Separate repaint and layout requirements of StyleDifference (Step 4) In this step RenderStyle::visualInvalidationDiff() sets both needsFullLayout and needsRepaintObject if diffNeedsFullLayoutAndRepaint. For now, all previous diffNeedsFullLayout cases become diffNeedsFullLayoutRepaint. In RenderObject, if both needsFullLayout and needsRepaint[Object] are set, we set shouldDoFullRepaintAfterLayout(), and removed the condition that needsSelfLayout always triggering shouldDoFullRepaintAfterLayout. Previous RenderObject::setNeedsLayoutAndFullRepaint() still triggers full repaint. Added back setNeedsLayout() to allow scheduling layout without triggering full repaint. With this change, we can do the following optimizations in next steps: 1. Repaint on RenderView resize (crbug.com/258219): - set FrameView::m_doFullRepaint only when needed; - use the flag to trigger full repaint of RenderView; - change renderView->setNeedsLayoutAndFullRepaint() in FrameView to renderView->setNeedsLayout() if no full repaint of RenderView is needed; 2. Repaint on style change needing full layout (e.g. crbug.com/339940): - move conditions not always needing repaint from RenderStyle::diffNeedsFullLayoutAndRepaint() into RenderStyle::diffNeedsFullLayout(); - for above conditions that still may need repaint in some cases, correctly handle repaints of them during renderer layout. 3. Repaint on other RenderObject::setNeedsLayoutAndFullRepaint(): - examine each caller of RenderObject::setNeedsLayoutAndFullRepaint() whether full repaint is actually always needed; - if not, change the call to RenderObject::setNeedsLayout() and correctly handle repaints during renderer layout if needed. BUG=358460 TEST=existing layout tests Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174401

Patch Set 1 #

Total comments: 19

Patch Set 2 : opt-in style #

Patch Set 3 : Rebase #

Total comments: 2

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -36 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-child-move-after-scroll-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-child-of-fixed-move-after-scroll-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-child-of-transformed-move-after-scroll-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/fixed-move-after-scroll-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/layer-visibility-expected.txt View 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/repaint/transform-rotate-and-remove-expected.txt View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 4 chunks +15 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 5 chunks +16 lines, -17 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.cpp View 1 2 3 3 chunks +17 lines, -1 line 0 comments Download
M Source/core/rendering/style/SVGRenderStyle.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/style/SVGRenderStyle.cpp View 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Xianzhu
6 years, 7 months ago (2014-05-02 18:01:01 UTC) #1
Xianzhu
ping...
6 years, 7 months ago (2014-05-05 23:26:44 UTC) #2
Xianzhu
jchaffraix@ could you PTAL? Also added leviw@ and dsinclair@ for reviewing the changed usage of ...
6 years, 7 months ago (2014-05-06 21:33:35 UTC) #3
Julien - ping for review
not lgtm, this change is confused and confusing. There are some good parts but I ...
6 years, 7 months ago (2014-05-07 00:24:31 UTC) #4
Xianzhu
https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.h#newcode1318 Source/core/rendering/RenderObject.h:1318: } On 2014/05/07 00:24:32, Julien Chaffraix - PST wrote: ...
6 years, 7 months ago (2014-05-07 00:39:22 UTC) #5
Xianzhu
More explanations: - I've run all layout tests and it only changes the expectations of ...
6 years, 7 months ago (2014-05-07 01:17:30 UTC) #6
Xianzhu
Julien, do you still think this CL is crazy? I believe it doesn't change the ...
6 years, 7 months ago (2014-05-08 00:51:50 UTC) #7
Julien - ping for review
> Julien, do you still think this CL is crazy? I believe it doesn't change ...
6 years, 7 months ago (2014-05-08 21:03:48 UTC) #8
Xianzhu
On 2014/05/08 21:03:48, Julien Chaffraix - PST wrote: > > Julien, do you still think ...
6 years, 7 months ago (2014-05-08 21:39:15 UTC) #9
Xianzhu
https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.h#newcode1318 Source/core/rendering/RenderObject.h:1318: } On 2014/05/08 21:03:49, Julien Chaffraix - PST wrote: ...
6 years, 7 months ago (2014-05-08 21:52:54 UTC) #10
Xianzhu
On 2014/05/08 21:39:15, Xianzhu wrote: > InvalidationIncremental is not for selfNeedsLayout(). selfNeedsLayout() always > causes ...
6 years, 7 months ago (2014-05-08 22:46:07 UTC) #11
Xianzhu
Let me explain the change with graphics (RAL mode; non-RAL mode is different but similar): ...
6 years, 7 months ago (2014-05-09 05:55:29 UTC) #12
Xianzhu
On 2014/05/09 05:55:29, Xianzhu wrote: > Let me explain the change with graphics Sorry, not ...
6 years, 7 months ago (2014-05-09 05:56:35 UTC) #13
Julien - ping for review
Xianzhu was kind enough to walk me through the change and removed a lot of ...
6 years, 7 months ago (2014-05-12 15:08:46 UTC) #14
Xianzhu
Thanks Julien for review! To avoid too big CL, I created a separate CL (https://codereview.chromium.org/280633002/) ...
6 years, 7 months ago (2014-05-12 17:58:04 UTC) #15
Xianzhu
https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/265703012/diff/1/Source/core/rendering/RenderObject.cpp#newcode2043 Source/core/rendering/RenderObject.cpp:2043: if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && needsLayout()) On 2014/05/12 15:08:46, Julien Chaffraix ...
6 years, 7 months ago (2014-05-12 21:31:50 UTC) #16
Xianzhu
jchaffraix@ are you back? Could you PTAL?
6 years, 7 months ago (2014-05-19 16:11:23 UTC) #17
Julien - ping for review
lgtm https://chromiumcodereview.appspot.com/265703012/diff/1/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://chromiumcodereview.appspot.com/265703012/diff/1/Source/core/rendering/RenderObject.cpp#newcode2043 Source/core/rendering/RenderObject.cpp:2043: if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && needsLayout()) On 2014/05/12 21:31:51, Xianzhu ...
6 years, 7 months ago (2014-05-20 16:33:29 UTC) #18
Xianzhu
https://chromiumcodereview.appspot.com/265703012/diff/60001/Source/core/rendering/RenderObject.h File Source/core/rendering/RenderObject.h (right): https://chromiumcodereview.appspot.com/265703012/diff/60001/Source/core/rendering/RenderObject.h#newcode1350 Source/core/rendering/RenderObject.h:1350: setShouldDoFullRepaintAfterLayout(true); On 2014/05/20 16:33:30, Julien Chaffraix - CET wrote: ...
6 years, 7 months ago (2014-05-20 16:47:08 UTC) #19
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 7 months ago (2014-05-20 16:59:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/265703012/80001
6 years, 7 months ago (2014-05-20 16:59:51 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-20 18:24:33 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-20 19:59:07 UTC) #23
Message was sent while issue was closed.
Change committed as 174401

Powered by Google App Engine
This is Rietveld 408576698