Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (94246 => 94247)
--- trunk/Source/WebKit/mac/ChangeLog 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-08-31 23:32:22 UTC (rev 94247)
@@ -1,3 +1,17 @@
+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-08-30 Dan Bernstein <m...@apple.com>
<rdar://problem/9281695> Add text search API for getting the DOM range of a text match
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (94246 => 94247)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2011-08-31 23:32:22 UTC (rev 94247)
@@ -2803,14 +2803,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
@@ -5548,8 +5548,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: trunk/Source/WebKit/mac/WebView/WebViewData.h (94246 => 94247)
--- trunk/Source/WebKit/mac/WebView/WebViewData.h 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h 2011-08-31 23:32:22 UTC (rev 94247)
@@ -194,6 +194,6 @@
BOOL interactiveFormValidationEnabled;
int validationMessageTimerMagnification;
- float overrideBackingScaleFactor;
+ float customDeviceScaleFactor;
}
@end
Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (94246 => 94247)
--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-08-31 23:32:22 UTC (rev 94247)
@@ -550,7 +550,7 @@
- (BOOL)_useFixedLayout;
- (NSSize)_fixedLayoutSize;
-- (void)_setOverrideBackingScaleFactor:(CGFloat)overrideScaleFactor;
+- (void)_setCustomBackingScaleFactor:(CGFloat)overrideScaleFactor;
// Deprecated. Use the methods in pending public above instead.
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit;
Modified: trunk/Source/WebKit2/ChangeLog (94246 => 94247)
--- trunk/Source/WebKit2/ChangeLog 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/ChangeLog 2011-08-31 23:32:22 UTC (rev 94247)
@@ -1,3 +1,36 @@
+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-08-31 Anders Carlsson <ander...@apple.com>
REGRESSION(r93902): Can't open external links on gmail
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (94246 => 94247)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-08-31 23:32:22 UTC (rev 94247)
@@ -258,14 +258,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: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (94246 => 94247)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-08-31 23:32:22 UTC (rev 94247)
@@ -349,8 +349,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: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (94246 => 94247)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-08-31 23:32:22 UTC (rev 94247)
@@ -110,7 +110,7 @@
};
@interface WKView ()
-- (float)_deviceScaleFactor;
+- (float)_intrinsicDeviceScaleFactor;
- (void)_setDrawingAreaSize:(NSSize)size;
- (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;
- (void)_disableComplexTextInputIfNecessary;
@@ -1858,7 +1858,7 @@
#endif
}
- _data->_page->setDeviceScaleFactor([self _deviceScaleFactor]);
+ _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
}
- (void)_windowDidBecomeKey:(NSNotification *)notification
@@ -1906,7 +1906,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)
@@ -2064,7 +2064,7 @@
}
}
-- (float)_deviceScaleFactor
+- (float)_intrinsicDeviceScaleFactor
{
NSWindow *window = [self window];
#if !defined(BUILDING_ON_SNOW_LEOPARD)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (94246 => 94247)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-08-31 23:32:22 UTC (rev 94247)
@@ -144,8 +144,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)
@@ -1107,36 +1107,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();
@@ -2992,7 +2992,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: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (94246 => 94247)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-08-31 23:16:27 UTC (rev 94246)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-08-31 23:32:22 UTC (rev 94247)
@@ -386,12 +386,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; };
@@ -862,8 +860,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;