Bug 175729

Summary: [Repaint Outside Layout] Add a pref for repainting outside of layout
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Severity: Normal CC: bfulgham, dbates, simon.fraser, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch dbates: review+

Description Dave Hyatt 2017-08-18 11:28:19 PDT
Add a pref for repainting outside of layout.
Comment 1 Dave Hyatt 2017-08-18 11:29:15 PDT
Created attachment 318523 [details]
Comment 2 Daniel Bates 2017-08-18 12:00:51 PDT
Comment on attachment 318523 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=318523&action=review

> Source/WebCore/rendering/RenderElement.cpp:2191
> +    if (document().view()->needsFullRepaint() || !everHadLayout() || hasSelfPaintingLayer())
> +        return false;
> +    return !settings().repaintOutsideLayoutEnabled();

I take it you feel this reads better. I would have written this using one line without a branch:

return !document().view()->needsFullRepaint() && everHadLayout() && !hasSelfPaintingLayer() && !settings().repaintOutsideLayoutEnabled();
Comment 3 Dave Hyatt 2017-08-24 10:53:52 PDT
Landed in r221147.