[Repaint Outside Layout] Add a pref for repainting outside of layout
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2017 17:53:33 +0000 (17:53 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2017 17:53:33 +0000 (17:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175729

Reviewed by Daniel Bates.

* page/Settings.in:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::checkForRepaintDuringLayout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221147 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebCore/rendering/RenderElement.cpp

index 7934362..7b1cc21 100644 (file)
@@ -1,3 +1,14 @@
+2017-08-22  Dave Hyatt  <hyatt@apple.com>
+
+        [Repaint Outside Layout] Add a pref for repainting outside of layout
+        https://bugs.webkit.org/show_bug.cgi?id=175729
+
+        Reviewed by Daniel Bates.
+
+        * page/Settings.in:
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::checkForRepaintDuringLayout):
+
 2017-08-22  Darin Adler  <darin@apple.com>
 
         REGRESSION (r220052): ASSERTION FAILED: !frame().isMainFrame() || !needsStyleRecalcOrLayout()  in WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive()
index 6a773a7..9c35418 100644 (file)
@@ -248,6 +248,8 @@ newBlockInsideInlineModelEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
 
 deferredCSSParserEnabled initial=false
 
+repaintOutsideLayoutEnabled initial=false
+
 httpEquivEnabled initial=true
 
 # Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the response includes the
index 8da668d..ec76fce 100644 (file)
@@ -2187,7 +2187,9 @@ bool RenderElement::hasSelfPaintingLayer() const
 
 bool RenderElement::checkForRepaintDuringLayout() const
 {
-    return !document().view()->needsFullRepaint() && everHadLayout() && !hasSelfPaintingLayer();
+    if (document().view()->needsFullRepaint() || !everHadLayout() || hasSelfPaintingLayer())
+        return false;
+    return !settings().repaintOutsideLayoutEnabled();
 }
 
 RespectImageOrientationEnum RenderElement::shouldRespectImageOrientation() const