Bug 175729 - [Repaint Outside Layout] Add a pref for repainting outside of layout
Summary: [Repaint Outside Layout] Add a pref for repainting outside of layout
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-18 11:28 PDT by Dave Hyatt
Modified: 2017-08-24 10:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.86 KB, patch)
2017-08-18 11:29 PDT, Dave Hyatt
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Patch
Comment 2 Daniel Bates 2017-08-18 12:00:51 PDT
Comment on attachment 318523 [details]
Patch

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.