Clear up scale factor terminology
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Aug 2011 13:43:29 +0000 (13:43 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Aug 2011 13:43:29 +0000 (13:43 +0000)
WebKit by and large deals with two scale factors: one intrinsic to the device on which the
software is running, and one that is per-Page and can be controlled via API calls. This
patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
code use those names. It should introduce no behavior changes.

Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
device scale factor

Reviewed by Simon Fraser.

Source/WebCore:

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
Removed an unused member. This is unrelated to this patch.

* css/MediaQueryEvaluator.cpp:
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:
* loader/EmptyClients.h:
* page/Chrome.cpp:
* page/Chrome.h:
* page/ChromeClient.h:
* page/DOMWindow.cpp:
* page/Frame.cpp:
* page/Frame.h:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/GraphicsLayerClient.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
* src/ChromeClientImpl.h:

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/haiku:

* WebCoreSupport/ChromeClientHaiku.cpp:
* WebCoreSupport/ChromeClientHaiku.h:

Source/WebKit/mac:

* Misc/WebNSControlExtras.m:
(-[NSControl sizeToFitAndAdjustWindowHeight]): Updated this function to use more modern
AppKit scale factor terminology. (This is unrelated to the rest of the patch.)

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.cpp:
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit/wx:

* WebKitSupport/ChromeClientWx.cpp:
* WebKitSupport/ChromeClientWx.h:

Source/WebKit2:

* Shared/UpdateInfo.cpp:
* Shared/UpdateInfo.h:
* Shared/WebPageCreationParameters.cpp:
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/efl/PageClientImpl.cpp:
* UIProcess/API/efl/PageClientImpl.h:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/BackingStore.cpp:
* UIProcess/BackingStore.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
* UIProcess/mac/BackingStoreMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/mac/WebPopupMenuProxyMac.h:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
* UIProcess/qt/WebPopupMenuProxyQt.h:
* UIProcess/win/WebPopupMenuProxyWin.h:
* UIProcess/win/WebView.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
* WebProcess/WebPage/ca/LayerTreeHostCA.h:

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

90 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/GraphicsLayerClient.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebNSControlExtras.m
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/UpdateInfo.cpp
Source/WebKit2/Shared/UpdateInfo.h
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/BackingStore.cpp
Source/WebKit2/UIProcess/BackingStore.h
Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/WebPopupMenuProxy.h
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.h
Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h
Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm
Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h
Source/WebKit2/UIProcess/win/WebView.h
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/FindController.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h

index 0657dae..f0f31b0 100644 (file)
@@ -1,3 +1,42 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+        Removed an unused member. This is unrelated to this patch.
+
+        * css/MediaQueryEvaluator.cpp:
+        * html/HTMLCanvasElement.cpp:
+        * html/HTMLCanvasElement.h:
+        * loader/EmptyClients.h:
+        * page/Chrome.cpp:
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        * page/DOMWindow.cpp:
+        * page/Frame.cpp:
+        * page/Frame.h:
+        * platform/graphics/GraphicsLayer.cpp:
+        * platform/graphics/GraphicsLayer.h:
+        * platform/graphics/GraphicsLayerClient.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        * rendering/RenderInline.cpp:
+        * rendering/RenderLayerBacking.cpp:
+        * rendering/RenderLayerBacking.h:
+        * rendering/RenderLayerCompositor.cpp:
+        * rendering/RenderLayerCompositor.h:
+        * rendering/RenderObject.cpp:
+
 2011-08-15  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
 
         Reviewed by Nikolas Zimmermann.
index ccc6f84..d709b23 100644 (file)
@@ -291,9 +291,9 @@ static bool device_aspect_ratioMediaFeatureEval(CSSValue* value, RenderStyle*, F
 static bool device_pixel_ratioMediaFeatureEval(CSSValue *value, RenderStyle*, Frame* frame, MediaFeaturePrefix op)
 {
     if (value)
-        return value->isPrimitiveValue() && compareValue(frame->page()->chrome()->scaleFactor(), static_cast<CSSPrimitiveValue*>(value)->getFloatValue(), op);
+        return value->isPrimitiveValue() && compareValue(frame->page()->chrome()->deviceScaleFactor(), static_cast<CSSPrimitiveValue*>(value)->getFloatValue(), op);
 
-    return frame->page()->chrome()->scaleFactor() != 0;
+    return frame->page()->chrome()->deviceScaleFactor() != 0;
 }
 
 static bool gridMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, MediaFeaturePrefix op)
index d6378ce..cc9cd21 100644 (file)
@@ -79,7 +79,7 @@ HTMLCanvasElement::HTMLCanvasElement(const QualifiedName& tagName, Document* doc
     , m_size(DefaultWidth, DefaultHeight)
     , m_rendererIsCanvas(false)
     , m_ignoreReset(false)
-    , m_pageScaleFactor(document->frame() ? document->frame()->page()->chrome()->scaleFactor() : 1)
+    , m_deviceScaleFactor(document->frame() ? document->frame()->page()->chrome()->deviceScaleFactor() : 1)
     , m_originClean(true)
     , m_hasCreatedImageBuffer(false)
 {
@@ -382,10 +382,10 @@ PassRefPtr<ImageData> HTMLCanvasElement::getImageData()
 IntRect HTMLCanvasElement::convertLogicalToDevice(const FloatRect& logicalRect) const
 {
     // Prevent under/overflow by ensuring the rect's bounds stay within integer-expressible range
-    int left = clampToInteger(floorf(logicalRect.x() * m_pageScaleFactor));
-    int top = clampToInteger(floorf(logicalRect.y() * m_pageScaleFactor));
-    int right = clampToInteger(ceilf(logicalRect.maxX() * m_pageScaleFactor));
-    int bottom = clampToInteger(ceilf(logicalRect.maxY() * m_pageScaleFactor));
+    int left = clampToInteger(floorf(logicalRect.x() * m_deviceScaleFactor));
+    int top = clampToInteger(floorf(logicalRect.y() * m_deviceScaleFactor));
+    int right = clampToInteger(ceilf(logicalRect.maxX() * m_deviceScaleFactor));
+    int bottom = clampToInteger(ceilf(logicalRect.maxY() * m_deviceScaleFactor));
 
     return IntRect(IntPoint(left, top), convertToValidDeviceSize(right - left, bottom - top));
 }
@@ -393,8 +393,8 @@ IntRect HTMLCanvasElement::convertLogicalToDevice(const FloatRect& logicalRect)
 IntSize HTMLCanvasElement::convertLogicalToDevice(const FloatSize& logicalSize) const
 {
     // Prevent overflow by ensuring the rect's bounds stay within integer-expressible range
-    float width = clampToInteger(ceilf(logicalSize.width() * m_pageScaleFactor));
-    float height = clampToInteger(ceilf(logicalSize.height() * m_pageScaleFactor));
+    float width = clampToInteger(ceilf(logicalSize.width() * m_deviceScaleFactor));
+    float height = clampToInteger(ceilf(logicalSize.height() * m_deviceScaleFactor));
     return convertToValidDeviceSize(width, height);
 }
 
index 664defc..0535dcf 100644 (file)
@@ -153,7 +153,7 @@ private:
     bool m_ignoreReset;
     FloatRect m_dirtyRect;
 
-    float m_pageScaleFactor;
+    float m_deviceScaleFactor;
     bool m_originClean;
 
     // m_createdImageBuffer means we tried to malloc the buffer.  We didn't necessarily get it.
index ac430a5..952507e 100644 (file)
@@ -93,7 +93,7 @@ public:
 
     virtual FloatRect pageRect() { return FloatRect(); }
 
-    virtual float scaleFactor() { return 1.f; }
+    virtual float deviceScaleFactor() { return 1.f; }
 
     virtual void focus() { }
     virtual void unfocus() { }
index 5b47f19..efec62e 100644 (file)
@@ -151,9 +151,9 @@ FloatRect Chrome::pageRect() const
     return m_client->pageRect();
 }
 
-float Chrome::scaleFactor()
+float Chrome::deviceScaleFactor()
 {
-    return m_client->scaleFactor();
+    return m_client->deviceScaleFactor();
 }
 
 void Chrome::focus() const
index 2ed6e72..67777ad 100644 (file)
@@ -97,7 +97,7 @@ namespace WebCore {
 
         FloatRect pageRect() const;
         
-        float scaleFactor();
+        float deviceScaleFactor();
 
         void focus() const;
         void unfocus() const;
index 17f7906..84c3774 100644 (file)
@@ -88,7 +88,7 @@ namespace WebCore {
         
         virtual FloatRect pageRect() = 0;
         
-        virtual float scaleFactor() = 0;
+        virtual float deviceScaleFactor() = 0;
     
         virtual void focus() = 0;
         virtual void unfocus() = 0;
index 6ca5b37..b85f1ea 100644 (file)
@@ -1342,7 +1342,7 @@ double DOMWindow::devicePixelRatio() const
     if (!page)
         return 0.0;
 
-    return page->chrome()->scaleFactor();
+    return page->chrome()->deviceScaleFactor();
 }
 
 #if ENABLE(DATABASE)
index f3aae30..c546136 100644 (file)
@@ -1064,14 +1064,14 @@ void Frame::setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor
 }
 
 #if USE(ACCELERATED_COMPOSITING)
-void Frame::pageScaleFactorChanged(float scale)
+void Frame::deviceOrPageScaleFactorChanged()
 {
     for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling())
-        child->pageScaleFactorChanged(scale);
+        child->deviceOrPageScaleFactorChanged();
 
     RenderView* root = contentRenderer();
     if (root && root->compositor())
-        root->compositor()->pageScaleFactorChanged();
+        root->compositor()->deviceOrPageScaleFactorChanged();
 }
 #endif
 
@@ -1090,7 +1090,7 @@ void Frame::scalePage(float scale, const IntPoint& origin)
         document->recalcStyle(Node::Force);
 
 #if USE(ACCELERATED_COMPOSITING)
-        pageScaleFactorChanged(scale);
+        deviceOrPageScaleFactorChanged();
 #endif
     }
 
index 6486c06..d73a0a8 100644 (file)
@@ -218,7 +218,7 @@ namespace WebCore {
         void lifeSupportTimerFired(Timer<Frame>*);
 
 #if USE(ACCELERATED_COMPOSITING)
-        void pageScaleFactorChanged(float);
+        void deviceOrPageScaleFactorChanged();
 #endif
 
         HashSet<FrameDestructionObserver*> m_destructionObservers;
index 6ac2a5b..2f8a8e2 100644 (file)
@@ -224,20 +224,20 @@ void GraphicsLayer::removeFromParent()
     }
 }
 
-void GraphicsLayer::notePageScaleFactorChangedIncludingDescendants()
+void GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants()
 {
-    pageScaleFactorChanged();
+    deviceOrPageScaleFactorChanged();
 
     if (m_maskLayer)
-        m_maskLayer->pageScaleFactorChanged();
+        m_maskLayer->deviceOrPageScaleFactorChanged();
 
     if (m_replicaLayer)
-        m_replicaLayer->notePageScaleFactorChangedIncludingDescendants();
+        m_replicaLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
 
     const Vector<GraphicsLayer*>& childLayers = children();
     size_t numChildren = childLayers.size();
     for (size_t i = 0; i < numChildren; ++i)
-        childLayers[i]->notePageScaleFactorChangedIncludingDescendants();
+        childLayers[i]->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
 }
 
 void GraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer)
index 856056a..17a2fd7 100644 (file)
@@ -357,10 +357,10 @@ public:
     bool appliesPageScale() const { return m_appliesPageScale; }
 
     float pageScaleFactor() const { return m_client ? m_client->pageScaleFactor() : 1; }
-    float backingScaleFactor() const { return m_client ? m_client->backingScaleFactor() : 1; }
+    float deviceScaleFactor() const { return m_client ? m_client->deviceScaleFactor() : 1; }
 
-    virtual void pageScaleFactorChanged() { }
-    void notePageScaleFactorChangedIncludingDescendants();
+    virtual void deviceOrPageScaleFactorChanged() { }
+    void noteDeviceOrPageScaleFactorChangedIncludingDescendants();
 
     // Some compositing systems may do internal batching to synchronize compositing updates
     // with updates drawn into the window. These methods flush internal batched state on this layer
index f66b362..dbe6f6f 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
 
     // Multiplier for backing store size, related to high DPI.
-    virtual float backingScaleFactor() const { return 1; }
+    virtual float deviceScaleFactor() const { return 1; }
     // Page scale factor.
     virtual float pageScaleFactor() const { return 1; }
 
index 3779349..62527f5 100644 (file)
@@ -53,7 +53,6 @@ MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation(MediaPlayer* play
     , m_networkState(MediaPlayer::Empty)
     , m_readyState(MediaPlayer::HaveNothing)
     , m_preload(MediaPlayer::Auto)
-    , m_scaleFactor(1, 1)
     , m_cachedMaxTimeLoaded(0)
     , m_cachedMaxTimeSeekable(0)
     , m_cachedDuration(invalidTime())
index c8fae3d..2b08daa 100644 (file)
@@ -254,7 +254,6 @@ private:
 
     String m_assetURL;
     MediaPlayer::Preload m_preload;
-    FloatSize m_scaleFactor;
 
     IntSize m_cachedNaturalSize;
     mutable float m_cachedMaxTimeLoaded;
index 4d03bd3..e059e96 100644 (file)
@@ -2047,7 +2047,7 @@ void GraphicsLayerCA::updateContentsScale(float pageScaleFactor, const FloatPoin
     if (needTiledLayer != m_usingTiledLayer)
         swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
 
-    float contentsScale = clampedContentsScaleForScale(pageScaleFactor * backingScaleFactor());
+    float contentsScale = clampedContentsScaleForScale(pageScaleFactor * deviceScaleFactor());
     
     m_layer->setContentsScale(contentsScale);
     if (drawsContent())
@@ -2102,7 +2102,7 @@ bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
     if (!m_drawsContent || !m_allowTiledLayer)
         return false;
 
-    float contentsScale = pageScaleFactor * backingScaleFactor();
+    float contentsScale = pageScaleFactor * deviceScaleFactor();
 
     // FIXME: catch zero-size height or width here (or earlier)?
     return m_size.width() * contentsScale > cMaxPixelDimension || m_size.height() * contentsScale > cMaxPixelDimension;
index fbaed12..6a255ab 100644 (file)
@@ -1539,10 +1539,10 @@ void RenderInline::addDashboardRegions(Vector<DashboardRegionValue>& regions)
         region.bounds.setY(absPos.y() + region.bounds.y());
 
         if (frame()) {
-            float pageScaleFactor = frame()->page()->chrome()->scaleFactor();
-            if (pageScaleFactor != 1.0f) {
-                region.bounds.scale(pageScaleFactor);
-                region.clip.scale(pageScaleFactor);
+            float deviceScaleFactor = frame()->page()->chrome()->deviceScaleFactor();
+            if (deviceScaleFactor != 1.0f) {
+                region.bounds.scale(deviceScaleFactor);
+                region.clip.scale(deviceScaleFactor);
             }
         }
 
index aabfb13..33a280e 100644 (file)
@@ -1253,9 +1253,9 @@ float RenderLayerBacking::pageScaleFactor() const
     return compositor()->pageScaleFactor();
 }
 
-float RenderLayerBacking::backingScaleFactor() const
+float RenderLayerBacking::deviceScaleFactor() const
 {
-    return compositor()->backingScaleFactor();
+    return compositor()->deviceScaleFactor();
 }
 
 void RenderLayerBacking::didCommitChangesForLayer(const GraphicsLayer*) const
index de6db46..656069e 100644 (file)
@@ -128,7 +128,7 @@ public:
 
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip);
 
-    virtual float backingScaleFactor() const;
+    virtual float deviceScaleFactor() const;
     virtual float pageScaleFactor() const;
     virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
 
index 78cce38..c378b2a 100644 (file)
@@ -1553,7 +1553,7 @@ void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, Gr
     }
 }
 
-float RenderLayerCompositor::backingScaleFactor() const
+float RenderLayerCompositor::deviceScaleFactor() const
 {
     Frame* frame = m_renderView->frameView()->frame();
     if (!frame)
@@ -1561,7 +1561,7 @@ float RenderLayerCompositor::backingScaleFactor() const
     Page* page = frame->page();
     if (!page)
         return 1;
-    return page->chrome()->scaleFactor();
+    return page->chrome()->deviceScaleFactor();
 }
 
 float RenderLayerCompositor::pageScaleFactor() const
@@ -1901,7 +1901,7 @@ bool RenderLayerCompositor::layerHas3DContent(const RenderLayer* layer) const
     return false;
 }
 
-void RenderLayerCompositor::pageScaleFactorChanged()
+void RenderLayerCompositor::deviceOrPageScaleFactorChanged()
 {
     // Start at the RenderView's layer, since that's where the scale is applied.
     RenderLayer* viewLayer = m_renderView->layer();
@@ -1909,7 +1909,7 @@ void RenderLayerCompositor::pageScaleFactorChanged()
         return;
 
     if (GraphicsLayer* rootLayer = viewLayer->backing()->graphicsLayer())
-        rootLayer->notePageScaleFactorChangedIncludingDescendants();
+        rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
 }
 
 } // namespace WebCore
index b2bc997..65decc5 100644 (file)
@@ -186,13 +186,13 @@ public:
     bool compositorShowDebugBorders() const { return m_showDebugBorders; }
     bool compositorShowRepaintCounter() const { return m_showRepaintCounter; }
 
-    virtual float backingScaleFactor() const;
+    virtual float deviceScaleFactor() const;
     virtual float pageScaleFactor() const;
     virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
     
     bool keepLayersPixelAligned() const;
 
-    void pageScaleFactorChanged();
+    void deviceOrPageScaleFactorChanged();
 
     GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
     GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
index e46108f..d6c88a0 100644 (file)
@@ -2369,10 +2369,10 @@ void RenderObject::addDashboardRegions(Vector<DashboardRegionValue>& regions)
         region.bounds.setY(absPos.y() + styleRegion.offset.top().value());
 
         if (frame()) {
-            float pageScaleFactor = frame()->page()->chrome()->scaleFactor();
-            if (pageScaleFactor != 1.0f) {
-                region.bounds.scale(pageScaleFactor);
-                region.clip.scale(pageScaleFactor);
+            float deviceScaleFactor = frame()->page()->chrome()->deviceScaleFactor();
+            if (deviceScaleFactor != 1.0f) {
+                region.bounds.scale(deviceScaleFactor);
+                region.clip.scale(deviceScaleFactor);
             }
         }
 
index f05420c..abc8ed5 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * src/ChromeClientImpl.cpp:
+        * src/ChromeClientImpl.h:
+
 2011-08-12  Fady Samuel  <fsamuel@chromium.org>
 
         Refactoring of PopupMenuChromium For Readability and Maintainability
index 0b21c9b..a07dfb5 100644 (file)
@@ -205,9 +205,9 @@ FloatRect ChromeClientImpl::pageRect()
     return windowRect();
 }
 
-float ChromeClientImpl::scaleFactor()
+float ChromeClientImpl::deviceScaleFactor()
 {
-    // This is supposed to return the scale factor of the web page. It looks like
+    // This is supposed to return the scale factor of the device. It looks like
     // the implementor of the graphics layer is responsible for doing most of the
     // operations associated with scaling. However, this value is used ins some
     // cases by WebCore. For example, this is used as a scaling factor in canvas
index 7111c4f..7139e1f 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual void setWindowRect(const WebCore::FloatRect&);
     virtual WebCore::FloatRect windowRect();
     virtual WebCore::FloatRect pageRect();
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
     virtual void focus();
     virtual void unfocus();
     virtual bool canTakeFocus(WebCore::FocusDirection);
index cfacc73..465b5fd 100755 (executable)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        * WebCoreSupport/ChromeClientEfl.h:
+
 2011-08-12  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
 
         [EFL] Fix after r91815 - restore changes from r91659.
index f7c4cd5..cadea80 100644 (file)
@@ -128,7 +128,7 @@ FloatRect ChromeClientEfl::pageRect()
     return ewk_view_page_rect_get(m_view);
 }
 
-float ChromeClientEfl::scaleFactor()
+float ChromeClientEfl::deviceScaleFactor()
 {
     notImplemented();
     return 1.0;
index 75f9f49..fc726b9 100644 (file)
@@ -45,7 +45,7 @@ public:
 
     virtual FloatRect pageRect();
 
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index fb97fe5..3e33602 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2011-08-11  Gustavo Noronha Silva  <gns@gnome.org>
 
         Add the javascript core dynamic library for gtk-doc's introspection helper.
index 71f448b..4fc790a 100644 (file)
@@ -137,7 +137,7 @@ FloatRect ChromeClient::pageRect()
     return IntRect(allocation.x, allocation.y, allocation.width, allocation.height);
 }
 
-float ChromeClient::scaleFactor()
+float ChromeClient::deviceScaleFactor()
 {
     // Not implementable
     return 1.0;
index 754ba95..e58a7cd 100644 (file)
@@ -48,7 +48,7 @@ namespace WebKit {
 
         virtual WebCore::FloatRect pageRect();
 
-        virtual float scaleFactor();
+        virtual float deviceScaleFactor();
 
         virtual void focus();
         virtual void unfocus();
index 02a5f00..356abde 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/ChromeClientHaiku.cpp:
+        * WebCoreSupport/ChromeClientHaiku.h:
+
 2011-08-03  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: remove Node parameter from the InspectorClient::highlight
index 81e5a80..224869b 100644 (file)
@@ -78,7 +78,7 @@ FloatRect ChromeClientHaiku::pageRect()
     return FloatRect(0, 0, 200, 200);
 }
 
-float ChromeClientHaiku::scaleFactor()
+float ChromeClientHaiku::deviceScaleFactor()
 {
     notImplemented();
     return 1.0;
index a88b825..eb2c4ef 100644 (file)
@@ -51,7 +51,7 @@ namespace WebCore {
 
         virtual FloatRect pageRect();
 
-        virtual float scaleFactor();
+        virtual float deviceScaleFactor();
 
         virtual void focus();
         virtual void unfocus();
index 7412935..1f1123a 100644 (file)
@@ -1,3 +1,24 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * Misc/WebNSControlExtras.m:
+        (-[NSControl sizeToFitAndAdjustWindowHeight]): Updated this function to use more modern
+        AppKit scale factor terminology. (This is unrelated to the rest of the patch.)
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+
 2011-08-13  Dan Bernstein  <mitz@apple.com>
 
         Changed the value of WebKitShowsToolTipOverTruncatedTextPreferenceKey to match the naming everywhere else.
index dc91e23..6edf84f 100644 (file)
     NSWindow *window = [self window];
     NSRect windowFrame = [window frame];
 
-    CGFloat userSpaceScaleFactor;
+    CGFloat backingScaleFactor;
 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
-    userSpaceScaleFactor = [window backingScaleFactor];
+    backingScaleFactor = [window backingScaleFactor];
 #else
-    userSpaceScaleFactor = [window userSpaceScaleFactor];
+    backingScaleFactor = [window userSpaceScaleFactor];
 #endif
 
-    windowFrame.size.height += heightDelta * userSpaceScaleFactor;
+    windowFrame.size.height += heightDelta * backingScaleFactor;
     [window setFrame:windowFrame display:NO];
 }
 
index cdc8049..bd95d47 100644 (file)
@@ -45,7 +45,7 @@ public:
 
     virtual WebCore::FloatRect pageRect();
 
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index 438ab58..a495ce2 100644 (file)
@@ -176,7 +176,7 @@ FloatRect WebChromeClient::pageRect()
     return [m_webView frame];
 }
 
-float WebChromeClient::scaleFactor()
+float WebChromeClient::deviceScaleFactor()
 {
     NSWindow *window = [m_webView window];
 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
index ed6c578..040a471 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        * WebCoreSupport/ChromeClientQt.h:
+
 2011-08-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
 
         [Qt] Add test for correct order of load signals in QWebPage
index 5e367ad..fd7b910 100644 (file)
@@ -146,7 +146,7 @@ FloatRect ChromeClientQt::pageRect()
     return FloatRect(QRectF(QPointF(0, 0), m_webPage->viewportSize()));
 }
 
-float ChromeClientQt::scaleFactor()
+float ChromeClientQt::deviceScaleFactor()
 {
     if (!m_webPage)
         return 1;
index db36f6e..1fd3cd2 100644 (file)
@@ -68,7 +68,7 @@ public:
 
     virtual FloatRect pageRect();
 
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index 607fb7a..6e1d832 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        * WebCoreSupport/WebChromeClient.h:
+
 2011-08-13  Dan Bernstein  <mitz@apple.com>
 
         Changed the value of WebKitShowsToolTipOverTruncatedTextPreferenceKey to match the naming everywhere else.
index 9d34dc6..a7053f2 100644 (file)
@@ -118,7 +118,7 @@ FloatRect WebChromeClient::pageRect()
     return rect;
 }
 
-float WebChromeClient::scaleFactor()
+float WebChromeClient::deviceScaleFactor()
 {
     // Windows doesn't support UI scaling.
     return 1.0;
index 68a095b..0e222b8 100644 (file)
@@ -49,7 +49,7 @@ public:
     
     virtual WebCore::FloatRect pageRect();
     
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index 7260dda..5a6701a 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/ChromeClientWinCE.cpp:
+        * WebCoreSupport/ChromeClientWinCE.h:
+
 2011-08-03  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: remove Node parameter from the InspectorClient::highlight
index ff262ac..8fb32a3 100644 (file)
@@ -70,7 +70,7 @@ FloatRect ChromeClientWinCE::pageRect()
     return windowRect();
 }
 
-float ChromeClientWinCE::scaleFactor()
+float ChromeClientWinCE::deviceScaleFactor()
 {
     return 1.0;
 }
index 8d35ec0..03f72f0 100644 (file)
@@ -43,7 +43,7 @@ public:
 
     virtual WebCore::FloatRect pageRect();
 
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index 146c828..893bfd4 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * WebKitSupport/ChromeClientWx.cpp:
+        * WebKitSupport/ChromeClientWx.h:
+
 2011-08-05  Anders Carlsson  <andersca@apple.com>
 
         Remove PluginHalter
index 7996951..345a6e3 100644 (file)
@@ -107,7 +107,7 @@ FloatRect ChromeClientWx::pageRect()
     return FloatRect();
 }
 
-float ChromeClientWx::scaleFactor()
+float ChromeClientWx::deviceScaleFactor()
 {
     notImplemented();
     return 1.0;
index b5d4c10..981b18d 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     virtual FloatRect pageRect();
 
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
 
     virtual void focus();
     virtual void unfocus();
index 2bb75c9..55fd883 100644 (file)
@@ -1,3 +1,56 @@
+2011-08-10  Adam Roben  <aroben@apple.com>
+
+        Clear up scale factor terminology
+
+        WebKit by and large deals with two scale factors: one intrinsic to the device on which the
+        software is running, and one that is per-Page and can be controlled via API calls. This
+        patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
+        code use those names. It should introduce no behavior changes.
+
+        Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
+        device scale factor
+
+        Reviewed by Simon Fraser.
+
+        * Shared/UpdateInfo.cpp:
+        * Shared/UpdateInfo.h:
+        * Shared/WebPageCreationParameters.cpp:
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/API/C/WKPage.cpp:
+        * UIProcess/API/efl/PageClientImpl.cpp:
+        * UIProcess/API/efl/PageClientImpl.h:
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        * UIProcess/BackingStore.cpp:
+        * UIProcess/BackingStore.h:
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/WebPopupMenuProxy.h:
+        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
+        * UIProcess/gtk/WebPopupMenuProxyGtk.h:
+        * UIProcess/mac/BackingStoreMac.mm:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        * UIProcess/mac/WebPopupMenuProxyMac.h:
+        * UIProcess/mac/WebPopupMenuProxyMac.mm:
+        * UIProcess/qt/WebPopupMenuProxyQt.h:
+        * UIProcess/win/WebPopupMenuProxyWin.h:
+        * UIProcess/win/WebView.h:
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        * WebProcess/WebPage/DrawingAreaImpl.cpp:
+        * WebProcess/WebPage/FindController.cpp:
+        * WebProcess/WebPage/WebPage.cpp:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
+        * WebProcess/WebPage/ca/LayerTreeHostCA.h:
+
 2011-08-13  Sam Weinig  <sam@webkit.org>
 
         Remove unused variables from WKFullScreenWindowController.h
index 61ba62d..36a1c63 100644 (file)
@@ -33,7 +33,7 @@ namespace WebKit {
 void UpdateInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
 {
     encoder->encode(viewSize);
-    encoder->encode(scaleFactor);
+    encoder->encode(deviceScaleFactor);
     encoder->encode(scrollRect);
     encoder->encode(scrollOffset);
     encoder->encode(updateRectBounds);
@@ -45,7 +45,7 @@ bool UpdateInfo::decode(CoreIPC::ArgumentDecoder* decoder, UpdateInfo& result)
 {
     if (!decoder->decode(result.viewSize))
         return false;
-    if (!decoder->decode(result.scaleFactor))
+    if (!decoder->decode(result.deviceScaleFactor))
         return false;
     if (!decoder->decode(result.scrollRect))
         return false;
index 485145d..3017bbe 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     // The size of the web view.
     WebCore::IntSize viewSize;
-    float scaleFactor;
+    float deviceScaleFactor;
 
     // The rect and delta to be scrolled.
     WebCore::IntRect scrollRect;
index c5dff58..574b205 100644 (file)
@@ -51,7 +51,7 @@ void WebPageCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) const
     encoder->encode(highestUsedBackForwardItemID);
     encoder->encode(canRunBeforeUnloadConfirmPanel);
     encoder->encode(canRunModal);
-    encoder->encode(userSpaceScaleFactor);
+    encoder->encode(deviceScaleFactor);
 
 #if PLATFORM(MAC)
     encoder->encode(isSmartInsertDeleteEnabled);
@@ -100,7 +100,7 @@ bool WebPageCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, WebPag
         return false;
     if (!decoder->decode(parameters.canRunModal))
         return false;
-    if (!decoder->decode(parameters.userSpaceScaleFactor))
+    if (!decoder->decode(parameters.deviceScaleFactor))
         return false;
 
 #if PLATFORM(MAC)
index 5fb152f..b5559b2 100644 (file)
@@ -71,7 +71,7 @@ struct WebPageCreationParameters {
     bool canRunBeforeUnloadConfirmPanel;
     bool canRunModal;
 
-    float userSpaceScaleFactor;
+    float deviceScaleFactor;
 
 #if PLATFORM(MAC)
     bool isSmartInsertDeleteEnabled;
index 0de10ef..94e87b9 100644 (file)
@@ -286,12 +286,12 @@ void WKPageSetPageAndTextZoomFactors(WKPageRef pageRef, double pageZoomFactor, d
 
 void WKPageSetScaleFactor(WKPageRef pageRef, double scale, WKPoint origin)
 {
-    toImpl(pageRef)->scaleWebView(scale, toIntPoint(origin));
+    toImpl(pageRef)->scalePage(scale, toIntPoint(origin));
 }
 
 double WKPageGetScaleFactor(WKPageRef pageRef)
 {
-    return toImpl(pageRef)->viewScaleFactor();
+    return toImpl(pageRef)->pageScaleFactor();
 }
 
 void WKPageSetUseFixedLayout(WKPageRef pageRef, bool fixed)
index 769dcd6..3dde2eb 100644 (file)
@@ -255,7 +255,7 @@ void PageClientImpl::countStringMatchesInCustomRepresentation(const String&, Fin
     notImplemented();
 }
 
-float PageClientImpl::userSpaceScaleFactor() const
+float PageClientImpl::deviceScaleFactor() const
 {
     return 0.0;
 }
index fe6b573..8858540 100644 (file)
@@ -98,7 +98,7 @@ private:
     virtual void findStringInCustomRepresentation(const String&, FindOptions, unsigned);
     virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned);
 
-    virtual float userSpaceScaleFactor() const;
+    virtual float deviceScaleFactor() const;
 
 private:
     RefPtr<WebPageProxy> m_page;
index 61bab4d..7696869 100644 (file)
@@ -84,7 +84,7 @@ private:
     virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut);
     virtual void didChangeScrollbarsForMainFrame() const;
     virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
-    virtual float userSpaceScaleFactor() const { return 1; }
+    virtual float deviceScaleFactor() const { return 1; }
     virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&);
     virtual void findStringInCustomRepresentation(const String&, FindOptions, unsigned);
     virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned);
index dc1ada1..056469b 100644 (file)
@@ -120,7 +120,7 @@ private:
     virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel);
     virtual void recordAutocorrectionResponse(WebCore::EditorClient::AutocorrectionResponseType, const String& replacedString, const String& replacementString);
 
-    virtual float userSpaceScaleFactor() const;
+    virtual float deviceScaleFactor() const;
     
     virtual WKView* wkView() const { return m_wkView; }
 
index e2dda2a..b12d0e8 100644 (file)
@@ -462,7 +462,7 @@ void PageClientImpl::recordAutocorrectionResponse(EditorClient::AutocorrectionRe
 #endif
 }
 
-float PageClientImpl::userSpaceScaleFactor() const
+float PageClientImpl::deviceScaleFactor() const
 {
     NSWindow *window = [m_wkView window];
 #if !defined(BUILDING_ON_SNOW_LEOPARD)
index 093f6cc..30ec8e6 100644 (file)
@@ -33,14 +33,14 @@ using namespace WebCore;
 
 namespace WebKit {
 
-PassOwnPtr<BackingStore> BackingStore::create(const IntSize& size, float scaleFactor, WebPageProxy* webPageProxy)
+PassOwnPtr<BackingStore> BackingStore::create(const IntSize& size, float deviceScaleFactor, WebPageProxy* webPageProxy)
 {
-    return adoptPtr(new BackingStore(size, scaleFactor, webPageProxy));
+    return adoptPtr(new BackingStore(size, deviceScaleFactor, webPageProxy));
 }
 
-BackingStore::BackingStore(const IntSize& size, float scaleFactor, WebPageProxy* webPageProxy)
+BackingStore::BackingStore(const IntSize& size, float deviceScaleFactor, WebPageProxy* webPageProxy)
     : m_size(size)
-    , m_scaleFactor(scaleFactor)
+    , m_deviceScaleFactor(deviceScaleFactor)
     , m_webPageProxy(webPageProxy)
 {
     ASSERT(!m_size.isEmpty());
@@ -60,7 +60,7 @@ void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
 
 #if !ASSERT_DISABLED
     IntSize updateSize = updateInfo.updateRectBounds.size();
-    updateSize.scale(m_scaleFactor);
+    updateSize.scale(m_deviceScaleFactor);
     ASSERT(bitmap->size() == updateSize);
 #endif
     
index cc8dd15..08409b1 100644 (file)
@@ -60,11 +60,11 @@ class BackingStore {
     WTF_MAKE_NONCOPYABLE(BackingStore);
 
 public:
-    static PassOwnPtr<BackingStore> create(const WebCore::IntSize&, float scaleFactor, WebPageProxy*);
+    static PassOwnPtr<BackingStore> create(const WebCore::IntSize&, float deviceScaleFactor, WebPageProxy*);
     ~BackingStore();
 
     const WebCore::IntSize& size() const { return m_size; }
-    float scaleFactor() const { return m_scaleFactor; }
+    float deviceScaleFactor() const { return m_deviceScaleFactor; }
 
 #if PLATFORM(MAC)
     typedef CGContextRef PlatformGraphicsContext;
@@ -80,13 +80,13 @@ public:
     void incorporateUpdate(const UpdateInfo&);
 
 private:
-    BackingStore(const WebCore::IntSize&, float scaleFactor, WebPageProxy*);
+    BackingStore(const WebCore::IntSize&, float deviceScaleFactor, WebPageProxy*);
 
     void incorporateUpdate(ShareableBitmap*, const UpdateInfo&);
     void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
 
     WebCore::IntSize m_size;
-    float m_scaleFactor;
+    float m_deviceScaleFactor;
     WebPageProxy* m_webPageProxy;
 
 #if PLATFORM(MAC)
index 352fb1d..09fbe38 100644 (file)
@@ -205,7 +205,7 @@ void DrawingAreaProxyImpl::didUpdateBackingStoreState(uint64_t backingStoreState
 #endif
 
     // If we have a backing store the right size, reuse it.
-    if (m_backingStore && (m_backingStore->size() != updateInfo.viewSize || m_backingStore->scaleFactor() != updateInfo.scaleFactor))
+    if (m_backingStore && (m_backingStore->size() != updateInfo.viewSize || m_backingStore->deviceScaleFactor() != updateInfo.deviceScaleFactor))
         m_backingStore = nullptr;
     incorporateUpdate(updateInfo);
 }
@@ -242,7 +242,7 @@ void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
         return;
 
     if (!m_backingStore)
-        m_backingStore = BackingStore::create(updateInfo.viewSize, updateInfo.scaleFactor, m_webPageProxy);
+        m_backingStore = BackingStore::create(updateInfo.viewSize, updateInfo.deviceScaleFactor, m_webPageProxy);
 
     m_backingStore->incorporateUpdate(updateInfo);
 
index 7156295..88ddb31 100644 (file)
@@ -186,7 +186,7 @@ public:
     virtual void findStringInCustomRepresentation(const String&, FindOptions, unsigned maxMatchCount) = 0;
     virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned maxMatchCount) = 0;
 
-    virtual float userSpaceScaleFactor() const = 0;
+    virtual float deviceScaleFactor() const = 0;
 };
 
 } // namespace WebKit
index a9728eb..104a68c 100644 (file)
@@ -152,7 +152,7 @@ WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr<WebProcessProxy> p
     , m_backForwardList(WebBackForwardList::create(this))
     , m_textZoomFactor(1)
     , m_pageZoomFactor(1)
-    , m_viewScaleFactor(1)
+    , m_pageScaleFactor(1)
     , m_drawsBackground(true)
     , m_drawsTransparentBackground(false)
     , m_areMemoryCacheClientCallsEnabled(true)
@@ -1206,12 +1206,12 @@ void WebPageProxy::setPageAndTextZoomFactors(double pageZoomFactor, double textZ
     process()->send(Messages::WebPage::SetPageAndTextZoomFactors(m_pageZoomFactor, m_textZoomFactor), m_pageID); 
 }
 
-void WebPageProxy::scaleWebView(double scale, const IntPoint& origin)
+void WebPageProxy::scalePage(double scale, const IntPoint& origin)
 {
     if (!isValid())
         return;
 
-    process()->send(Messages::WebPage::ScaleWebView(scale, origin), m_pageID);
+    process()->send(Messages::WebPage::ScalePage(scale, origin), m_pageID);
 }
 
 void WebPageProxy::setUseFixedLayout(bool fixed)
@@ -1240,9 +1240,9 @@ void WebPageProxy::setFixedLayoutSize(const IntSize& size)
     process()->send(Messages::WebPage::SetFixedLayoutSize(size), m_pageID);
 }
 
-void WebPageProxy::viewScaleFactorDidChange(double scaleFactor)
+void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
 {
-    m_viewScaleFactor = scaleFactor;
+    m_pageScaleFactor = scaleFactor;
 }
 
 void WebPageProxy::setMemoryCacheClientCallsEnabled(bool memoryCacheClientCallsEnabled)
@@ -2387,7 +2387,7 @@ void WebPageProxy::showPopupMenu(const IntRect& rect, uint64_t textDirection, co
 
     RefPtr<WebPopupMenuProxy> protectedActivePopupMenu = m_activePopupMenu;
 
-    protectedActivePopupMenu->showPopupMenu(rect, static_cast<TextDirection>(textDirection), m_viewScaleFactor, items, data, selectedIndex);
+    protectedActivePopupMenu->showPopupMenu(rect, static_cast<TextDirection>(textDirection), m_pageScaleFactor, items, data, selectedIndex);
     protectedActivePopupMenu->invalidate();
     protectedActivePopupMenu = 0;
 }
@@ -3081,7 +3081,7 @@ WebPageCreationParameters WebPageProxy::creationParameters() const
     parameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID();
     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient.canRunBeforeUnloadConfirmPanel();
     parameters.canRunModal = m_uiClient.canRunModal();
-    parameters.userSpaceScaleFactor = m_pageClient->userSpaceScaleFactor();
+    parameters.deviceScaleFactor = m_pageClient->deviceScaleFactor();
 
 #if PLATFORM(MAC)
     parameters.isSmartInsertDeleteEnabled = m_isSmartInsertDeleteEnabled;
index e0e25ed..b7ff1fc 100644 (file)
@@ -383,8 +383,8 @@ public:
     void setPageZoomFactor(double);
     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
 
-    void scaleWebView(double scale, const WebCore::IntPoint& origin);
-    double viewScaleFactor() const { return m_viewScaleFactor; }
+    void scalePage(double scale, const WebCore::IntPoint& origin);
+    double pageScaleFactor() const { return m_pageScaleFactor; }
 
     void setUseFixedLayout(bool);
     void setFixedLayoutSize(const WebCore::IntSize&);
@@ -407,7 +407,7 @@ public:
     void makeFirstResponder();
 #endif
 
-    void viewScaleFactorDidChange(double);
+    void pageScaleFactorDidChange(double);
 
     void setMemoryCacheClientCallsEnabled(bool);
 
@@ -858,7 +858,7 @@ private:
 
     double m_textZoomFactor;
     double m_pageZoomFactor;
-    double m_viewScaleFactor;
+    double m_pageScaleFactor;
 
     bool m_drawsBackground;
     bool m_drawsTransparentBackground;
index a9f505a..06d0e2a 100644 (file)
@@ -135,7 +135,7 @@ messages -> WebPageProxy {
     ComputedPagesCallback(Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
     ValidateCommandCallback(WTF::String command, bool isEnabled, int32_t state, uint64_t callbackID)
 
-    ViewScaleFactorDidChange(double scaleFactor)
+    PageScaleFactorDidChange(double scaleFactor)
 
 #if PLATFORM(GTK)
     # Support for GTK+ platform keybindings
index 0af8880..bcb1cf4 100644 (file)
@@ -59,7 +59,7 @@ public:
     {
     }
 
-    virtual void showPopupMenu(const WebCore::IntRect& rect, WebCore::TextDirection, double scaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData&, int32_t selectedIndex) = 0;
+    virtual void showPopupMenu(const WebCore::IntRect& rect, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData&, int32_t selectedIndex) = 0;
     virtual void hidePopupMenu() = 0;
 
     void invalidate() { m_client = 0; }
index 73e49e2..18bd038 100644 (file)
@@ -64,7 +64,7 @@ GtkAction* WebPopupMenuProxyGtk::createGtkActionForMenuItem(const WebPopupItem&
     return action;
 }
 
-void WebPopupMenuProxyGtk::showPopupMenu(const IntRect& rect, TextDirection textDirection, double scaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData& data, int32_t selectedIndex)
+void WebPopupMenuProxyGtk::showPopupMenu(const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData& data, int32_t selectedIndex)
 {
     if (m_popup)
         m_popup->clear();
index 9f41706..9399ec1 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
     ~WebPopupMenuProxyGtk();
 
-    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double scaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
     virtual void hidePopupMenu();
 
 private:
index 4d9a2dc..646962f 100644 (file)
@@ -109,7 +109,7 @@ void BackingStore::incorporateUpdate(ShareableBitmap* bitmap, const UpdateInfo&
         IntRect srcRect = updateRect;
         srcRect.move(-updateRectLocation.x(), -updateRectLocation.y());
 
-        bitmap->paint(graphicsContext, updateInfo.scaleFactor, updateRect.location(), srcRect);
+        bitmap->paint(graphicsContext, updateInfo.deviceScaleFactor, updateRect.location(), srcRect);
     }
 }
 
index 00522e1..cebddbc 100644 (file)
@@ -318,7 +318,7 @@ void WebPageProxy::setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled)
 
 void WebPageProxy::didPerformDictionaryLookup(const String& text, const DictionaryPopupInfo& dictionaryPopupInfo)
 {
-    m_pageClient->didPerformDictionaryLookup(text, m_viewScaleFactor, dictionaryPopupInfo);
+    m_pageClient->didPerformDictionaryLookup(text, m_pageScaleFactor, dictionaryPopupInfo);
 }
     
 void WebPageProxy::registerWebProcessAccessibilityToken(const CoreIPC::DataReference& data)
index fda5219..ad22e0a 100644 (file)
@@ -44,7 +44,7 @@ public:
     }
     ~WebPopupMenuProxyMac();
 
-    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double scaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
     virtual void hidePopupMenu();
 
 private:
index d13a2a7..30e2e20 100644 (file)
@@ -90,12 +90,12 @@ void WebPopupMenuProxyMac::populate(const Vector<WebPopupItem>& items, NSFont *f
     }
 }
 
-void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection textDirection, double scaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData& data, int32_t selectedIndex)
+void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData& data, int32_t selectedIndex)
 {
     NSFont *font;
     if (data.fontInfo.fontAttributeDictionary) {
         NSFontDescriptor *fontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:(NSDictionary *)data.fontInfo.fontAttributeDictionary.get()];
-        font = [NSFont fontWithDescriptor:fontDescriptor size:((scaleFactor != 1) ? [fontDescriptor pointSize] * scaleFactor : 0)];
+        font = [NSFont fontWithDescriptor:fontDescriptor size:((pageScaleFactor != 1) ? [fontDescriptor pointSize] * pageScaleFactor : 0)];
     } else
         font = [NSFont menuFontOfSize:0];
 
index e7197d5..9230deb 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
     ~WebPopupMenuProxyQt();
 
-    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double scaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
     virtual void hidePopupMenu();
 
 private:
index c225c27..b7c4d6d 100644 (file)
@@ -48,7 +48,7 @@ public:
     }
     ~WebPopupMenuProxyWin();
 
-    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double scaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
     virtual void hidePopupMenu();
 
     bool setFocusedIndex(int index, bool hotTracking = false);
index 57900e8..90ae604 100644 (file)
@@ -173,7 +173,7 @@ private:
     virtual void displayView();
     virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
     virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
-    virtual float userSpaceScaleFactor() const { return 1; }
+    virtual float deviceScaleFactor() const { return 1; }
     
     virtual WebCore::IntSize viewSize();
     virtual bool isViewWindowActive();
index 30e0d22..9f19733 100644 (file)
@@ -183,7 +183,7 @@ void WKBundlePageSetPageZoomFactor(WKBundlePageRef pageRef, double zoomFactor)
 
 void WKBundlePageSetScaleAtOrigin(WKBundlePageRef pageRef, double scale, WKPoint origin)
 {
-    toImpl(pageRef)->scaleWebView(scale, toIntPoint(origin));
+    toImpl(pageRef)->scalePage(scale, toIntPoint(origin));
 }
 
 WKBundleBackForwardListRef WKBundlePageGetBackForwardList(WKBundlePageRef pageRef)
index c2c93bb..a92d5a7 100644 (file)
@@ -116,9 +116,9 @@ FloatRect WebChromeClient::pageRect()
     return FloatRect(FloatPoint(), m_page->size());
 }
 
-float WebChromeClient::scaleFactor()
+float WebChromeClient::deviceScaleFactor()
 {
-    return m_page->userSpaceScaleFactor();
+    return m_page->deviceScaleFactor();
 }
 
 void WebChromeClient::focus()
index 638c6a3..9420b14 100644 (file)
@@ -57,7 +57,7 @@ private:
     
     virtual WebCore::FloatRect pageRect();
     
-    virtual float scaleFactor();
+    virtual float deviceScaleFactor();
     
     virtual void focus();
     virtual void unfocus();
index 3bc8ad2..336c229 100644 (file)
@@ -444,7 +444,7 @@ void WebFrameLoaderClient::dispatchDidCommitLoad()
     // Only restore the scale factor for standard frame loads (of the main frame).
     if (m_frame->isMainFrame() && m_frame->coreFrame()->loader()->loadType() == FrameLoadTypeStandard) {
         if (m_frame->coreFrame()->pageScaleFactor() != 1)
-            webPage->scaleWebView(1, IntPoint());
+            webPage->scalePage(1, IntPoint());
     }
 }
 
@@ -1060,7 +1060,7 @@ void WebFrameLoaderClient::restoreViewState()
 {
     // Inform the UI process of the scale factor.
     double scaleFactor = m_frame->coreFrame()->loader()->history()->currentItem()->pageScaleFactor();
-    m_frame->page()->send(Messages::WebPageProxy::ViewScaleFactorDidChange(scaleFactor));
+    m_frame->page()->send(Messages::WebPageProxy::PageScaleFactorDidChange(scaleFactor));
 
     // FIXME: This should not be necessary. WebCore should be correctly invalidating
     // the view on restores from the back/forward cache.
index 731d7ae..d1ee278 100644 (file)
@@ -357,7 +357,7 @@ void DrawingAreaImpl::sendDidUpdateBackingStoreState()
 
     if (m_isPaintingSuspended || m_layerTreeHost) {
         updateInfo.viewSize = m_webPage->size();
-        updateInfo.scaleFactor = m_webPage->userSpaceScaleFactor();
+        updateInfo.deviceScaleFactor = m_webPage->deviceScaleFactor();
 
         if (m_layerTreeHost) {
             layerTreeContext = m_layerTreeHost->layerTreeContext();
@@ -464,7 +464,7 @@ void DrawingAreaImpl::exitAcceleratedCompositingMode()
     UpdateInfo updateInfo;
     if (m_isPaintingSuspended) {
         updateInfo.viewSize = m_webPage->size();
-        updateInfo.scaleFactor = m_webPage->userSpaceScaleFactor();
+        updateInfo.deviceScaleFactor = m_webPage->deviceScaleFactor();
     } else
         display(updateInfo);
 
@@ -615,13 +615,13 @@ void DrawingAreaImpl::display(UpdateInfo& updateInfo)
         return;
 
     updateInfo.viewSize = m_webPage->size();
-    updateInfo.scaleFactor = m_webPage->userSpaceScaleFactor();
+    updateInfo.deviceScaleFactor = m_webPage->deviceScaleFactor();
 
     IntRect bounds = m_dirtyRegion.bounds();
     ASSERT(m_webPage->bounds().contains(bounds));
 
     IntSize bitmapSize = bounds.size();
-    bitmapSize.scale(m_webPage->userSpaceScaleFactor());
+    bitmapSize.scale(m_webPage->deviceScaleFactor());
     RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(bitmapSize, ShareableBitmap::SupportsAlpha);
     if (!bitmap)
         return;
@@ -644,7 +644,7 @@ void DrawingAreaImpl::display(UpdateInfo& updateInfo)
     m_scrollOffset = IntSize();
 
     OwnPtr<GraphicsContext> graphicsContext = createGraphicsContext(bitmap.get());
-    graphicsContext->scale(FloatSize(m_webPage->userSpaceScaleFactor(), m_webPage->userSpaceScaleFactor()));
+    graphicsContext->scale(FloatSize(m_webPage->deviceScaleFactor(), m_webPage->deviceScaleFactor()));
 
     updateInfo.updateRectBounds = bounds;
 
index 3003db5..02d84ac 100644 (file)
@@ -177,7 +177,7 @@ bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOve
     selectedFrame->selection()->getClippedVisibleTextRectangles(textRects);
 
     IntSize backingStoreSize = selectionRect.size();
-    backingStoreSize.scale(m_webPage->userSpaceScaleFactor());
+    backingStoreSize.scale(m_webPage->deviceScaleFactor());
 
     // Create a backing store and paint the find indicator text into it.
     RefPtr<ShareableBitmap> findIndicatorTextBackingStore = ShareableBitmap::createShareable(backingStoreSize, ShareableBitmap::SupportsAlpha);
@@ -185,7 +185,7 @@ bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOve
         return false;
     
     OwnPtr<GraphicsContext> graphicsContext = findIndicatorTextBackingStore->createGraphicsContext();
-    graphicsContext->scale(FloatSize(m_webPage->userSpaceScaleFactor(), m_webPage->userSpaceScaleFactor()));
+    graphicsContext->scale(FloatSize(m_webPage->deviceScaleFactor(), m_webPage->deviceScaleFactor()));
 
     IntRect paintRect = selectionRect;
     paintRect.move(selectedFrame->view()->frameRect().x(), selectedFrame->view()->frameRect().y());
@@ -212,7 +212,7 @@ bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOve
         textRectsInSelectionRectCoordinates.append(textRectInSelectionRectCoordinates);
     }            
     
-    m_webPage->send(Messages::WebPageProxy::SetFindIndicator(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, m_webPage->userSpaceScaleFactor(), handle, !isShowingOverlay));
+    m_webPage->send(Messages::WebPageProxy::SetFindIndicator(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, m_webPage->deviceScaleFactor(), handle, !isShowingOverlay));
     m_isShowingFindIndicator = true;
 
     return true;
@@ -224,7 +224,7 @@ void FindController::hideFindIndicator()
         return;
 
     ShareableBitmap::Handle handle;
-    m_webPage->send(Messages::WebPageProxy::SetFindIndicator(FloatRect(), Vector<FloatRect>(), m_webPage->userSpaceScaleFactor(), handle, false));
+    m_webPage->send(Messages::WebPageProxy::SetFindIndicator(FloatRect(), Vector<FloatRect>(), m_webPage->deviceScaleFactor(), handle, false));
     m_isShowingFindIndicator = false;
 }
 
index 2ee184f..542db5f 100644 (file)
@@ -186,7 +186,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     , m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
     , m_canRunModal(parameters.canRunModal)
     , m_isRunningModal(false)
-    , m_userSpaceScaleFactor(parameters.userSpaceScaleFactor)
+    , m_deviceScaleFactor(parameters.deviceScaleFactor)
     , m_cachedMainFrameIsPinnedToLeftSide(false)
     , m_cachedMainFrameIsPinnedToRightSide(false)
     , m_isShowingContextMenu(false)
@@ -769,17 +769,17 @@ void WebPage::setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFa
     return frame->setPageAndTextZoomFactors(static_cast<float>(pageZoomFactor), static_cast<float>(textZoomFactor));
 }
 
-void WebPage::scaleWebView(double scale, const IntPoint& origin)
+void WebPage::scalePage(double scale, const IntPoint& origin)
 {
     Frame* frame = m_mainFrame->coreFrame();
     if (!frame)
         return;
     frame->scalePage(scale, origin);
 
-    send(Messages::WebPageProxy::ViewScaleFactorDidChange(scale));
+    send(Messages::WebPageProxy::PageScaleFactorDidChange(scale));
 }
 
-double WebPage::viewScaleFactor() const
+double WebPage::pageScaleFactor() const
 {
     Frame* frame = m_mainFrame->coreFrame();
     if (!frame)
index 95f4dc7..78ab530 100644 (file)
@@ -241,8 +241,8 @@ public:
     void setPageZoomFactor(double);
     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
 
-    void scaleWebView(double scale, const WebCore::IntPoint& origin);
-    double viewScaleFactor() const;
+    void scalePage(double scale, const WebCore::IntPoint& origin);
+    double pageScaleFactor() const;
 
     void setUseFixedLayout(bool);
     void setFixedLayoutSize(const WebCore::IntSize&);
@@ -409,7 +409,7 @@ public:
 
     void runModal();
 
-    float userSpaceScaleFactor() const { return m_userSpaceScaleFactor; }
+    float deviceScaleFactor() const { return m_deviceScaleFactor; }
 
     void setMemoryCacheMessagesEnabled(bool);
 
@@ -664,7 +664,7 @@ private:
     bool m_canRunModal;
     bool m_isRunningModal;
 
-    float m_userSpaceScaleFactor;
+    float m_deviceScaleFactor;
 
     bool m_cachedMainFrameIsPinnedToLeftSide;
     bool m_cachedMainFrameIsPinnedToRightSide;
index 022e5b9..3b49e1e 100644 (file)
@@ -111,7 +111,7 @@ messages -> WebPage {
     SetPageZoomFactor(double zoomFactor)
     SetTextZoomFactor(double zoomFactor)
 
-    ScaleWebView(double scale, WebCore::IntPoint origin)
+    ScalePage(double scale, WebCore::IntPoint origin)
 
     SetUseFixedLayout(bool fixed)
     SetFixedLayoutSize(WebCore::IntSize size)
index d564196..135a1d0 100644 (file)
@@ -206,9 +206,9 @@ bool LayerTreeHostCA::showRepaintCounter() const
     return m_webPage->corePage()->settings()->showRepaintCounter();
 }
 
-float LayerTreeHostCA::backingScaleFactor() const
+float LayerTreeHostCA::deviceScaleFactor() const
 {
-    return m_webPage->userSpaceScaleFactor();
+    return m_webPage->deviceScaleFactor();
 }
 
 void LayerTreeHostCA::performScheduledLayerFlush()
index c9b6652..ee75b45 100644 (file)
@@ -74,7 +74,7 @@ private:
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
     virtual bool showDebugBorders() const;
     virtual bool showRepaintCounter() const;
-    virtual float backingScaleFactor() const;
+    virtual float deviceScaleFactor() const;
     virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const { }
 
     // LayerTreeHostCA