Changeset 151804 in webkit


Ignore:
Timestamp:
Jun 20, 2013, 2:28:20 PM (12 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151803 r151804  
     12013-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        FrameView needs to initialize paintsEntireContents on creation
     4        https://bugs.webkit.org/show_bug.cgi?id=117844
     5
     6        Reviewed by Anders Carlsson.
     7
     8        In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
     9        In this mode, FrameView::paintsEntireContents() is true. However,
     10        we would only call setPaintsEntireContents(true) on the FrameView
     11        when the view's layer-backed status changes. FrameView also needs
     12        to fetch this state when it is initialized, because we may be creating
     13        a new FrameView for an already layer-backed WebHTMLView.
     14
     15        * page/ChromeClient.h:
     16        (WebCore::ChromeClient::shouldPaintEntireContents):
     17        * page/FrameView.cpp:
     18        (WebCore::FrameView::init):
     19
    1202013-06-20  Simon Fraser  <simon.fraser@apple.com>
    221
  • trunk/Source/WebCore/page/ChromeClient.h

    r151221 r151804  
    239239    virtual void elementDidFocus(const Node*) { };
    240240    virtual void elementDidBlur(const Node*) { };
     241   
     242    virtual bool shouldPaintEntireContents() const { return false; }
    241243
    242244#if USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/page/FrameView.cpp

    r151803 r151804  
    357357            setMarginHeight(marginHeight);
    358358    }
     359
     360    Page* page = frame() ? frame()->page() : 0;
     361    if (page && page->chrome().client()->shouldPaintEntireContents())
     362        setPaintsEntireContents(true);
    359363}
    360364   
  • trunk/Source/WebKit/mac/ChangeLog

    r151757 r151804  
     12013-06-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        FrameView needs to initialize paintsEntireContents on creation
     4        https://bugs.webkit.org/show_bug.cgi?id=117844
     5
     6        Reviewed by Anders Carlsson.
     7       
     8        In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
     9        In this mode, FrameView::paintsEntireContents() is true. However,
     10        we would only call setPaintsEntireContents(true) on the FrameView
     11        when the view's layer-backed status changes. FrameView also needs
     12        to fetch this state when it is initialized, because we may be creating
     13        a new FrameView for an already layer-backed WebHTMLView.
     14
     15        * WebCoreSupport/WebChromeClient.h:
     16        * WebCoreSupport/WebChromeClient.mm:
     17        (WebChromeClient::shouldPaintEntireContents):
     18
    1192013-06-19  Benjamin Poulain  <bpoulain@apple.com>
    220
  • trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h

    r150353 r151804  
    146146    virtual void elementDidBlur(const WebCore::Node*) OVERRIDE;
    147147
     148    virtual bool shouldPaintEntireContents() const OVERRIDE;
     149
    148150#if USE(ACCELERATED_COMPOSITING)
    149151    virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) OVERRIDE;
  • trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm

    r151530 r151804  
    844844}
    845845
     846bool WebChromeClient::shouldPaintEntireContents() const
     847{
     848    NSView *documentView = [[[m_webView mainFrame] frameView] documentView];
     849    return [documentView layer];
     850}
     851
    846852#if USE(ACCELERATED_COMPOSITING)
    847853
Note: See TracChangeset for help on using the changeset viewer.