Title: [102513] branches/safari-534.53-branch/Source/WebKit2

Diff

Modified: branches/safari-534.53-branch/Source/WebKit2/ChangeLog (102512 => 102513)


--- branches/safari-534.53-branch/Source/WebKit2/ChangeLog	2011-12-10 02:35:35 UTC (rev 102512)
+++ branches/safari-534.53-branch/Source/WebKit2/ChangeLog	2011-12-10 02:42:06 UTC (rev 102513)
@@ -1,3 +1,27 @@
+2011-12-09  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 98588
+
+    2011-10-27  Adam Roben  <aro...@apple.com>
+
+            Add WKBundlePageGetBackingScaleFactor
+
+            Fixes <http://webkit.org/b/71025> <rdar://problem/10355037> REGRESSION (r97191): Clients
+            can't reliably determine the scale factor of snapshots returned via
+            WKBundlePageCreateSnapshot* API
+
+            Reviewed by Sam Weinig.
+
+            * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+            (WKBundlePageGetBackingScaleFactor):
+            * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+            Added. Calls through to WebPage::deviceScaleFactor.
+
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::deviceScaleFactor):
+            * WebProcess/WebPage/WebPage.h:
+            Added. Calls through to Page::deviceScaleFactor.
+
 2011-12-08  Lucas Forschler  <lforsch...@apple.com>
 
     Merge 101719

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (102512 => 102513)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2011-12-10 02:35:35 UTC (rev 102512)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2011-12-10 02:42:06 UTC (rev 102513)
@@ -255,6 +255,11 @@
     return toAPI(webImage.release().leakRef());
 }
 
+double WKBundlePageGetBackingScaleFactor(WKBundlePageRef pageRef)
+{
+    return toImpl(pageRef)->deviceScaleFactor();
+}
+
 #if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
 WKBundleInspectorRef WKBundlePageGetInspector(WKBundlePageRef pageRef)
 {

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h (102512 => 102513)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2011-12-10 02:35:35 UTC (rev 102512)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2011-12-10 02:42:06 UTC (rev 102513)
@@ -320,6 +320,8 @@
 WK_EXPORT WKImageRef WKBundlePageCreateSnapshotInDocumentCoordinates(WKBundlePageRef page, WKRect rect, WKImageOptions options);
 WK_EXPORT WKImageRef WKBundlePageCreateScaledSnapshotInDocumentCoordinates(WKBundlePageRef page, WKRect rect, double scaleFactor, WKImageOptions options);
 
+WK_EXPORT double WKBundlePageGetBackingScaleFactor(WKBundlePageRef page);
+
 #if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
 WK_EXPORT WKBundleInspectorRef WKBundlePageGetInspector(WKBundlePageRef page);
 #endif

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (102512 => 102513)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-12-10 02:35:35 UTC (rev 102512)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-12-10 02:42:06 UTC (rev 102513)
@@ -803,6 +803,11 @@
     }
 }
 
+float WebPage::deviceScaleFactor() const
+{
+    return m_page->deviceScaleFactor();
+}
+
 void WebPage::setUseFixedLayout(bool fixed)
 {
     Frame* frame = m_mainFrame->coreFrame();

Modified: branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (102512 => 102513)


--- branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2011-12-10 02:35:35 UTC (rev 102512)
+++ branches/safari-534.53-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2011-12-10 02:42:06 UTC (rev 102513)
@@ -400,6 +400,7 @@
     void runModal();
 
     void setDeviceScaleFactor(float);
+    float deviceScaleFactor() const;
 
     void setMemoryCacheMessagesEnabled(bool);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to