Title: [151804] trunk/Source
Revision
151804
Author
[email protected]
Date
2013-06-20 14:28:20 -0700 (Thu, 20 Jun 2013)

Log Message

FrameView needs to initialize paintsEntireContents on creation
https://bugs.webkit.org/show_bug.cgi?id=117844

Source/WebCore:

Reviewed by Anders Carlsson.

In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.

* page/ChromeClient.h:
(WebCore::ChromeClient::shouldPaintEntireContents):
* page/FrameView.cpp:
(WebCore::FrameView::init):

Source/WebKit/mac:

Reviewed by Anders Carlsson.

In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::shouldPaintEntireContents):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151803 => 151804)


--- trunk/Source/WebCore/ChangeLog	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebCore/ChangeLog	2013-06-20 21:28:20 UTC (rev 151804)
@@ -1,5 +1,24 @@
 2013-06-20  Simon Fraser  <[email protected]>
 
+        FrameView needs to initialize paintsEntireContents on creation
+        https://bugs.webkit.org/show_bug.cgi?id=117844
+
+        Reviewed by Anders Carlsson.
+
+        In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
+        In this mode, FrameView::paintsEntireContents() is true. However,
+        we would only call setPaintsEntireContents(true) on the FrameView
+        when the view's layer-backed status changes. FrameView also needs
+        to fetch this state when it is initialized, because we may be creating
+        a new FrameView for an already layer-backed WebHTMLView.
+
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::shouldPaintEntireContents):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::init):
+
+2013-06-20  Simon Fraser  <[email protected]>
+
         Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
         https://bugs.webkit.org/show_bug.cgi?id=117819
 

Modified: trunk/Source/WebCore/page/ChromeClient.h (151803 => 151804)


--- trunk/Source/WebCore/page/ChromeClient.h	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebCore/page/ChromeClient.h	2013-06-20 21:28:20 UTC (rev 151804)
@@ -238,6 +238,8 @@
         
     virtual void elementDidFocus(const Node*) { };
     virtual void elementDidBlur(const Node*) { };
+    
+    virtual bool shouldPaintEntireContents() const { return false; }
 
 #if USE(ACCELERATED_COMPOSITING)
     // Allows ports to customize the type of graphics layers created by this page.

Modified: trunk/Source/WebCore/page/FrameView.cpp (151803 => 151804)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-06-20 21:28:20 UTC (rev 151804)
@@ -356,6 +356,10 @@
         if (marginHeight != -1)
             setMarginHeight(marginHeight);
     }
+
+    Page* page = frame() ? frame()->page() : 0;
+    if (page && page->chrome().client()->shouldPaintEntireContents())
+        setPaintsEntireContents(true);
 }
     
 void FrameView::prepareForDetach()

Modified: trunk/Source/WebKit/mac/ChangeLog (151803 => 151804)


--- trunk/Source/WebKit/mac/ChangeLog	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-06-20 21:28:20 UTC (rev 151804)
@@ -1,3 +1,21 @@
+2013-06-20  Simon Fraser  <[email protected]>
+
+        FrameView needs to initialize paintsEntireContents on creation
+        https://bugs.webkit.org/show_bug.cgi?id=117844
+
+        Reviewed by Anders Carlsson.
+        
+        In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
+        In this mode, FrameView::paintsEntireContents() is true. However,
+        we would only call setPaintsEntireContents(true) on the FrameView
+        when the view's layer-backed status changes. FrameView also needs
+        to fetch this state when it is initialized, because we may be creating
+        a new FrameView for an already layer-backed WebHTMLView.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::shouldPaintEntireContents):
+
 2013-06-19  Benjamin Poulain  <[email protected]>
 
         Use the PlatformEvent timestamp when creating a DOM Event

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (151803 => 151804)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h	2013-06-20 21:28:20 UTC (rev 151804)
@@ -145,6 +145,8 @@
     virtual void elementDidFocus(const WebCore::Node*) OVERRIDE;
     virtual void elementDidBlur(const WebCore::Node*) OVERRIDE;
 
+    virtual bool shouldPaintEntireContents() const OVERRIDE;
+
 #if USE(ACCELERATED_COMPOSITING)
     virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) OVERRIDE;
     virtual void setNeedsOneShotDrawingSynchronization() OVERRIDE;

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (151803 => 151804)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2013-06-20 21:28:15 UTC (rev 151803)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2013-06-20 21:28:20 UTC (rev 151804)
@@ -843,6 +843,12 @@
     return adoptRef(new SearchPopupMenuMac(client));
 }
 
+bool WebChromeClient::shouldPaintEntireContents() const
+{
+    NSView *documentView = [[[m_webView mainFrame] frameView] documentView];
+    return [documentView layer];
+}
+
 #if USE(ACCELERATED_COMPOSITING)
 
 void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to