Diff
Modified: branches/safari-534.53-branch/Source/WebKit/mac/ChangeLog (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit/mac/ChangeLog 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit/mac/ChangeLog 2011-11-17 01:34:16 UTC (rev 100538)
@@ -1,5 +1,23 @@
2011-11-16 Lucas Forschler <lforsch...@apple.com>
+ Merge 94247
+
+ 2011-08-31 Beth Dakin <bda...@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=67322
+ Re-name overrideBackingScaleFactor
+
+ Reviewed by John Sullivan.
+
+ _setOverrideBackingScaleFactor is now _setCustomBackingScaleFactor
+ * WebView/WebView.mm:
+ (-[WebView _setCustomBackingScaleFactor:]):
+ (-[WebView _deviceScaleFactor]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewPrivate.h:
+
+2011-11-16 Lucas Forschler <lforsch...@apple.com>
+
Merge 94122
2011-08-30 Beth Dakin <bda...@apple.com>
Modified: branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebView.mm (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebView.mm 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebView.mm 2011-11-17 01:34:16 UTC (rev 100538)
@@ -2832,14 +2832,14 @@
return view->fixedLayoutSize();
}
-- (void)_setOverrideBackingScaleFactor:(CGFloat)overrideScaleFactor
+- (void)_setCustomBackingScaleFactor:(CGFloat)customScaleFactor
{
float oldScaleFactor = [self _deviceScaleFactor];
- _private->overrideBackingScaleFactor = overrideScaleFactor;
+ _private->customDeviceScaleFactor = customScaleFactor;
if (oldScaleFactor != [self _deviceScaleFactor])
- _private->page->setDeviceScaleFactor(overrideScaleFactor);
+ _private->page->setDeviceScaleFactor(customScaleFactor);
}
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
@@ -5593,8 +5593,8 @@
- (float)_deviceScaleFactor
{
- if (_private->overrideBackingScaleFactor != 0)
- return _private->overrideBackingScaleFactor;
+ if (_private->customDeviceScaleFactor != 0)
+ return _private->customDeviceScaleFactor;
NSWindow *window = [self window];
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
Modified: branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewData.h (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewData.h 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewData.h 2011-11-17 01:34:16 UTC (rev 100538)
@@ -190,6 +190,6 @@
BOOL interactiveFormValidationEnabled;
int validationMessageTimerMagnification;
- float overrideBackingScaleFactor;
+ float customDeviceScaleFactor;
}
@end
Modified: branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewPrivate.h (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-11-17 01:34:16 UTC (rev 100538)
@@ -559,7 +559,7 @@
- (BOOL)_useFixedLayout;
- (NSSize)_fixedLayoutSize;
-- (void)_setOverrideBackingScaleFactor:(CGFloat)overrideScaleFactor;
+- (void)_setCustomBackingScaleFactor:(CGFloat)overrideScaleFactor;
// Deprecated. Use the methods in pending public above instead.
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit;
Modified: branches/safari-534.53-branch/Source/WebKit2/ChangeLog (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/ChangeLog 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/ChangeLog 2011-11-17 01:34:16 UTC (rev 100538)
@@ -1,5 +1,42 @@
2011-11-16 Lucas Forschler <lforsch...@apple.com>
+ Merge 94247
+
+ 2011-08-31 Beth Dakin <bda...@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=67322
+ Re-name overrideBackingScaleFactor
+
+ Reviewed by John Sullivan.
+
+ API is now WKPageSetCustomBackingScaleFactor() and WKPageGetBackingScaleFactor()
+ which returns the custom scale factor if one was set, and the intrinsic scale
+ factor otherwise.
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetBackingScaleFactor):
+ (WKPageSetCustomBackingScaleFactor):
+ * UIProcess/API/C/WKPage.h:
+
+ Re-named _deviceScaleFactor to _intrinsicDeviceScaleFactor since it only ever
+ refers to the intrinsic value.
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView viewDidMoveToWindow]):
+ (-[WKView _windowDidChangeResolution:]):
+ (-[WKView _intrinsicDeviceScaleFactor]):
+
+ WebPageProxy stores both the customDeviceScaleFactor and the
+ intrinsicDeviceScaleFactor. deviceScaleFactor() returns the appropriate value that
+ should be the one used.
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
+ (WebKit::WebPageProxy::deviceScaleFactor):
+ (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
+ (WebKit::WebPageProxy::creationParameters):
+ * UIProcess/WebPageProxy.h:
+
+2011-11-16 Lucas Forschler <lforsch...@apple.com>
+
Merge 94122
2011-08-30 Beth Dakin <bda...@apple.com>
Modified: branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-11-17 01:34:16 UTC (rev 100538)
@@ -259,14 +259,14 @@
return toImpl(pageRef)->textZoomFactor();
}
-double WKPageGetOverrideBackingScaleFactor(WKPageRef pageRef)
+double WKPageGetBackingScaleFactor(WKPageRef pageRef)
{
- return toImpl(pageRef)->overrideBackingScaleFactor();
+ return toImpl(pageRef)->deviceScaleFactor();
}
-void WKPageSetOverrideBackingScaleFactor(WKPageRef pageRef, double overrideScaleFactor)
+void WKPageSetCustomBackingScaleFactor(WKPageRef pageRef, double customScaleFactor)
{
- toImpl(pageRef)->setOverrideBackingScaleFactor(overrideScaleFactor);
+ toImpl(pageRef)->setCustomDeviceScaleFactor(customScaleFactor);
}
bool WKPageSupportsTextZoom(WKPageRef pageRef)
Modified: branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.h (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-11-17 01:34:16 UTC (rev 100538)
@@ -327,8 +327,8 @@
WK_EXPORT WKDataRef WKPageCopySessionState(WKPageRef page, void* context, WKPageSessionStateFilterCallback urlAllowedCallback);
WK_EXPORT void WKPageRestoreFromSessionState(WKPageRef page, WKDataRef sessionStateData);
-WK_EXPORT double WKPageGetOverrideBackingScaleFactor(WKPageRef page);
-WK_EXPORT void WKPageSetOverrideBackingScaleFactor(WKPageRef page, double overrideScaleFactor);
+WK_EXPORT double WKPageGetBackingScaleFactor(WKPageRef page);
+WK_EXPORT void WKPageSetCustomBackingScaleFactor(WKPageRef page, double customScaleFactor);
WK_EXPORT bool WKPageSupportsTextZoom(WKPageRef page);
WK_EXPORT double WKPageGetTextZoomFactor(WKPageRef page);
Modified: branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-17 01:34:16 UTC (rev 100538)
@@ -111,7 +111,7 @@
};
@interface WKView (FileInternal)
-- (float)_deviceScaleFactor;
+- (float)_intrinsicDeviceScaleFactor;
@end
@interface WKViewData : NSObject {
@@ -1789,7 +1789,7 @@
#endif
}
- _data->_page->setDeviceScaleFactor([self _deviceScaleFactor]);
+_data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
}
- (void)_windowDidBecomeKey:(NSNotification *)notification
@@ -1837,7 +1837,7 @@
- (void)_windowDidChangeResolution:(NSNotification *)notification
{
- _data->_page->setDeviceScaleFactor([self _deviceScaleFactor]);
+ _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
}
static void drawPageBackground(CGContextRef context, WebPageProxy* page, const IntRect& rect)
@@ -2572,7 +2572,7 @@
@implementation WKView (FileInternal)
-- (float)_deviceScaleFactor
+- (float)_intrinsicDeviceScaleFactor
{
NSWindow *window = [self window];
#if !defined(BUILDING_ON_SNOW_LEOPARD)
Modified: branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-11-17 01:34:16 UTC (rev 100538)
@@ -124,8 +124,8 @@
, m_textZoomFactor(1)
, m_pageZoomFactor(1)
, m_pageScaleFactor(1)
- , m_deviceScaleFactor(1)
- , m_overrideBackingScaleFactor(0)
+ , m_intrinsicDeviceScaleFactor(1)
+ , m_customDeviceScaleFactor(0)
, m_drawsBackground(true)
, m_drawsTransparentBackground(false)
, m_areMemoryCacheClientCallsEnabled(true)
@@ -1146,36 +1146,36 @@
process()->send(Messages::WebPage::ScalePage(scale, origin), m_pageID);
}
-void WebPageProxy::setDeviceScaleFactor(float scaleFactor)
+void WebPageProxy::setIntrinsicDeviceScaleFactor(float scaleFactor)
{
if (!isValid())
return;
- if (m_deviceScaleFactor == scaleFactor)
+ if (m_intrinsicDeviceScaleFactor == scaleFactor)
return;
- m_deviceScaleFactor = scaleFactor;
+ m_intrinsicDeviceScaleFactor = scaleFactor;
m_drawingArea->deviceScaleFactorDidChange();
}
float WebPageProxy::deviceScaleFactor() const
{
- if (m_overrideBackingScaleFactor)
- return m_overrideBackingScaleFactor;
- return m_deviceScaleFactor;
+ if (m_customDeviceScaleFactor)
+ return m_customDeviceScaleFactor;
+ return m_intrinsicDeviceScaleFactor;
}
-void WebPageProxy::setOverrideBackingScaleFactor(float overrideScaleFactor)
+void WebPageProxy::setCustomDeviceScaleFactor(float customScaleFactor)
{
if (!isValid())
return;
- if (m_overrideBackingScaleFactor == overrideScaleFactor)
+ if (m_customDeviceScaleFactor == customScaleFactor)
return;
float oldScaleFactor = deviceScaleFactor();
- m_overrideBackingScaleFactor = overrideScaleFactor;
+ m_customDeviceScaleFactor = customScaleFactor;
if (deviceScaleFactor() != oldScaleFactor)
m_drawingArea->deviceScaleFactorDidChange();
@@ -3026,7 +3026,7 @@
parameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID();
parameters.canRunBeforeUnloadConfirmPanel = m_uiClient.canRunBeforeUnloadConfirmPanel();
parameters.canRunModal = m_uiClient.canRunModal();
- parameters.deviceScaleFactor = m_deviceScaleFactor;
+ parameters.deviceScaleFactor = m_intrinsicDeviceScaleFactor;
#if PLATFORM(MAC)
parameters.isSmartInsertDeleteEnabled = m_isSmartInsertDeleteEnabled;
Modified: branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.h (100537 => 100538)
--- branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2011-11-17 01:33:42 UTC (rev 100537)
+++ branches/safari-534.53-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2011-11-17 01:34:16 UTC (rev 100538)
@@ -361,12 +361,10 @@
void scalePage(double scale, const WebCore::IntPoint& origin);
double pageScaleFactor() const { return m_pageScaleFactor; }
- void setDeviceScaleFactor(float);
float deviceScaleFactor() const;
+ void setIntrinsicDeviceScaleFactor(float);
+ void setCustomDeviceScaleFactor(float);
- void setOverrideBackingScaleFactor(float);
- float overrideBackingScaleFactor() const { return m_overrideBackingScaleFactor; }
-
void setUseFixedLayout(bool);
void setFixedLayoutSize(const WebCore::IntSize&);
bool useFixedLayout() const { return m_useFixedLayout; };
@@ -833,8 +831,8 @@
double m_textZoomFactor;
double m_pageZoomFactor;
double m_pageScaleFactor;
- float m_deviceScaleFactor;
- float m_overrideBackingScaleFactor;
+ float m_intrinsicDeviceScaleFactor;
+ float m_customDeviceScaleFactor;
bool m_drawsBackground;
bool m_drawsTransparentBackground;