Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Feb 2012 00:24:11 +0000 (00:24 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Feb 2012 00:24:11 +0000 (00:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79297
<rdar://problem/10748510>

Reviewed by Beth Dakin.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
Send a message to the web process.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setDeviceScaleFactor):
Add empty stub.

* WebProcess/WebPage/DrawingArea.messages.in:
Add SetDeviceScaleFactor message.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
Call WebPage::setDeviceScaleFactor.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index 5ae70df..5aa206f 100644 (file)
@@ -1,3 +1,26 @@
+2012-02-22  Anders Carlsson  <andersca@apple.com>
+
+        Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange
+        https://bugs.webkit.org/show_bug.cgi?id=79297
+        <rdar://problem/10748510>
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
+        Send a message to the web process.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::setDeviceScaleFactor):
+        Add empty stub.
+
+        * WebProcess/WebPage/DrawingArea.messages.in:
+        Add SetDeviceScaleFactor message.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
+        Call WebPage::setDeviceScaleFactor.
+
 2012-02-22  Brady Eidson  <beidson@apple.com>
 
         <rdar://problem/10406044> and https://bugs.webkit.org/show_bug.cgi?id=79279
index 25d4e44..319bcb4 100644 (file)
@@ -53,7 +53,7 @@ TiledCoreAnimationDrawingAreaProxy::~TiledCoreAnimationDrawingAreaProxy()
 
 void TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange()
 {
-    // FIXME: Implement.
+    m_webPageProxy->process()->send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
 }
 
 void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
index 377c900..e9fa49c 100644 (file)
@@ -105,6 +105,7 @@ private:
 #if PLATFORM(MAC)
     // Used by TiledCoreAnimationDrawingArea.
     virtual void updateGeometry(const WebCore::IntSize& viewSize) { }
+    virtual void setDeviceScaleFactor(float deviceScaleFactor) { }
 #endif
 };
 
index 41a1aa3..857f872 100644 (file)
@@ -30,5 +30,6 @@ messages -> DrawingArea {
 #if PLATFORM(MAC)
     // Used by TiledCoreAnimationDrawingArea.
     UpdateGeometry(WebCore::IntSize viewSize)
+    SetDeviceScaleFactor(float deviceScaleFactor)
 #endif
 }
index b618e8a..806ead9 100644 (file)
@@ -61,6 +61,7 @@ private:
 
     // Message handlers.
     virtual void updateGeometry(const WebCore::IntSize& viewSize) OVERRIDE;
+    virtual void setDeviceScaleFactor(float) OVERRIDE;
 
     void setRootCompositingLayer(CALayer *);
 
index f99f73e..f1f8b56 100644 (file)
@@ -184,6 +184,11 @@ void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize)
     m_webPage->send(Messages::DrawingAreaProxy::DidUpdateGeometry());
 }
 
+void TiledCoreAnimationDrawingArea::setDeviceScaleFactor(float deviceScaleFactor)
+{
+    m_webPage->setDeviceScaleFactor(deviceScaleFactor);
+}
+
 void TiledCoreAnimationDrawingArea::setRootCompositingLayer(CALayer *layer)
 {
     ASSERT(!m_layerTreeStateIsFrozen);