2011-01-14 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jan 2011 01:31:09 +0000 (01:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jan 2011 01:31:09 +0000 (01:31 +0000)
        Reviewed by Dan Bernstein.

        Add a new PageClient::displayView function and expose it on WebPageProxy
        https://bugs.webkit.org/show_bug.cgi?id=52500

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::displayView):
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::displayView):
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::displayView):
        * UIProcess/WebPageProxy.h:
        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::displayView):
        * UIProcess/win/WebView.h:

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

WebKit2/ChangeLog
WebKit2/UIProcess/API/mac/PageClientImpl.h
WebKit2/UIProcess/API/mac/PageClientImpl.mm
WebKit2/UIProcess/API/qt/qwkpage.cpp
WebKit2/UIProcess/API/qt/qwkpage_p.h
WebKit2/UIProcess/PageClient.h
WebKit2/UIProcess/WebPageProxy.cpp
WebKit2/UIProcess/WebPageProxy.h
WebKit2/UIProcess/win/WebView.cpp
WebKit2/UIProcess/win/WebView.h

index 013432f..4e44c7e 100644 (file)
@@ -1,5 +1,26 @@
 2011-01-14  Anders Carlsson  <andersca@apple.com>
 
+        Reviewed by Dan Bernstein.
+
+        Add a new PageClient::displayView function and expose it on WebPageProxy
+        https://bugs.webkit.org/show_bug.cgi?id=52500
+
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::displayView):
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPagePrivate::displayView):
+        * UIProcess/API/qt/qwkpage_p.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::displayView):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::displayView):
+        * UIProcess/win/WebView.h:
+
+2011-01-14  Anders Carlsson  <andersca@apple.com>
+
         Reviewed by Sam Weinig.
 
         Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
index 609039f..8322465 100644 (file)
@@ -50,7 +50,8 @@ private:
 
     virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
     virtual void setViewNeedsDisplay(const WebCore::IntRect&);
-    
+    virtual void displayView();
+
     virtual WebCore::IntSize viewSize();
     virtual bool isViewWindowActive();
     virtual bool isViewFocused();
index ae59eba..c37b641 100644 (file)
@@ -128,6 +128,11 @@ void PageClientImpl::setViewNeedsDisplay(const WebCore::IntRect& rect)
     [m_wkView setNeedsDisplayInRect:rect];
 }
 
+void PageClientImpl::displayView()
+{
+    [m_wkView displayIfNeeded];
+}
+
 IntSize PageClientImpl::viewSize()
 {
     return IntSize([m_wkView bounds].size);
index a03d896..638d9e3 100644 (file)
@@ -142,6 +142,11 @@ void QWKPagePrivate::setViewNeedsDisplay(const WebCore::IntRect& rect)
     view->update(QRect(rect));
 }
 
+void QWKPagePrivate::displayView()
+{
+    // FIXME: Implement.
+}
+
 WebCore::IntSize QWKPagePrivate::viewSize()
 {
     // FIXME: Implement.
index c844151..85135c2 100644 (file)
@@ -46,6 +46,7 @@ public:
     // PageClient
     virtual PassOwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
     virtual void setViewNeedsDisplay(const WebCore::IntRect&);
+    virtual void displayView();
 
     virtual WebCore::IntSize viewSize();
     virtual bool isViewWindowActive();
index f413342..5767b3c 100644 (file)
@@ -55,6 +55,9 @@ public:
     // Tell the view to invalidate the given rect. The rect is in view coordinates.
     virtual void setViewNeedsDisplay(const WebCore::IntRect&) = 0;
 
+    // Tell the view to immediately display its invalid rect.
+    virtual void displayView() = 0;
+
     // Return the size of the view the page is associated with.
     virtual WebCore::IntSize viewSize() = 0;
 
index 4be0a17..650bd57 100644 (file)
@@ -468,6 +468,11 @@ void WebPageProxy::setViewNeedsDisplay(const IntRect& rect)
     m_pageClient->setViewNeedsDisplay(rect);
 }
 
+void WebPageProxy::displayView()
+{
+    m_pageClient->displayView();
+}
+
 void WebPageProxy::viewStateDidChange(ViewStateFlags flags)
 {
     if (!isValid())
index f0b4ce6..74678ca 100644 (file)
@@ -171,6 +171,7 @@ public:
     void setWindowResizerSize(const WebCore::IntSize&);
 
     void setViewNeedsDisplay(const WebCore::IntRect&);
+    void displayView();
 
     enum {
         ViewWindowIsActive = 1 << 0,
index 831392c..4b3992c 100644 (file)
@@ -586,6 +586,11 @@ void WebView::setViewNeedsDisplay(const WebCore::IntRect& rect)
     ::InvalidateRect(m_window, &r, false);
 }
 
+void WebView::displayView()
+{
+    ::UpdateWindow(m_window);
+}
+
 WebCore::IntSize WebView::viewSize()
 {
     RECT clientRect;
index 8bf8a5c..c80334e 100644 (file)
@@ -106,6 +106,8 @@ private:
     // PageClient
     virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
     virtual void setViewNeedsDisplay(const WebCore::IntRect&);
+    virtual void displayView();
+    
     virtual WebCore::IntSize viewSize();
     virtual bool isViewWindowActive();
     virtual bool isViewFocused();