- Revision
- 120883
- Author
- [email protected]
- Date
- 2012-06-20 16:37:47 -0700 (Wed, 20 Jun 2012)
Log Message
internals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed
https://bugs.webkit.org/show_bug.cgi?id=89274
Reviewed by James Robinson.
Source/WebCore:
Using this window.internals API causes the apple-mac port to ASSERT in
WebKit2 because WebKit2 keeps a copy of this state in the UI process.
When a test uses this internals API, the WebCore state gets out of sync
with the state in the UI process.
Tests should use setBackingScaleFactor instead.
* testing/InternalSettings.cpp:
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
LayoutTests:
* fast/hidpi/device-scale-factor-paint.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (120882 => 120883)
--- trunk/LayoutTests/ChangeLog 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/LayoutTests/ChangeLog 2012-06-20 23:37:47 UTC (rev 120883)
@@ -1,3 +1,12 @@
+2012-06-20 Adam Barth <[email protected]>
+
+ internals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed
+ https://bugs.webkit.org/show_bug.cgi?id=89274
+
+ Reviewed by James Robinson.
+
+ * fast/hidpi/device-scale-factor-paint.html:
+
2012-06-20 Csaba Osztrogonác <[email protected]>
[Qt] Unreviewed gardening, skip new failing tests.
Modified: trunk/LayoutTests/fast/hidpi/device-scale-factor-paint.html (120882 => 120883)
--- trunk/LayoutTests/fast/hidpi/device-scale-factor-paint.html 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/LayoutTests/fast/hidpi/device-scale-factor-paint.html 2012-06-20 23:37:47 UTC (rev 120883)
@@ -1,10 +1,19 @@
<!DOCTYPE html>
<html>
<script>
-if (window.internals)
- internals.settings.setDeviceScaleFactor(2);
+ function startTest() {
+ if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.setBackingScaleFactor(2, finishTest);
+ }
+ }
+
+ function finishTest() {
+ setTimeout(layoutTestController.notifyDone, 0);
+ }
</script>
-<body>
+</head>
+<body _onload_="startTest();">
<div style='position: absolute; left: 5px; top: 10px; width: 50px; height: 50px; background-color: green'>
</div>
</body>
Modified: trunk/Source/WebCore/ChangeLog (120882 => 120883)
--- trunk/Source/WebCore/ChangeLog 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/Source/WebCore/ChangeLog 2012-06-20 23:37:47 UTC (rev 120883)
@@ -1,3 +1,23 @@
+2012-06-20 Adam Barth <[email protected]>
+
+ internals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed
+ https://bugs.webkit.org/show_bug.cgi?id=89274
+
+ Reviewed by James Robinson.
+
+ Using this window.internals API causes the apple-mac port to ASSERT in
+ WebKit2 because WebKit2 keeps a copy of this state in the UI process.
+ When a test uses this internals API, the WebCore state gets out of sync
+ with the state in the UI process.
+
+ Tests should use setBackingScaleFactor instead.
+
+ * testing/InternalSettings.cpp:
+ (WebCore):
+ * testing/InternalSettings.h:
+ (InternalSettings):
+ * testing/InternalSettings.idl:
+
2012-06-20 Andrey Kosyakov <[email protected]>
Web Inspector: persist timeline panel overview mode
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (120882 => 120883)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2012-06-20 23:37:47 UTC (rev 120883)
@@ -270,12 +270,6 @@
settings()->setDeviceSupportsMouse(enabled);
}
-void InternalSettings::setDeviceScaleFactor(float scaleFactor, ExceptionCode& ec)
-{
- InternalSettingsGuardForPage();
- page()->setDeviceScaleFactor(scaleFactor);
-}
-
typedef void (Settings::*SetFontFamilyFunction)(const AtomicString&, UScriptCode);
static void setFontFamily(Settings* settings, const String& family, const String& script, SetFontFamilyFunction setter)
{
Modified: trunk/Source/WebCore/testing/InternalSettings.h (120882 => 120883)
--- trunk/Source/WebCore/testing/InternalSettings.h 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/Source/WebCore/testing/InternalSettings.h 2012-06-20 23:37:47 UTC (rev 120883)
@@ -64,7 +64,6 @@
void setTouchEventEmulationEnabled(bool enabled, ExceptionCode&);
void setDeviceSupportsTouch(bool enabled, ExceptionCode&);
void setDeviceSupportsMouse(bool enabled, ExceptionCode&);
- void setDeviceScaleFactor(float scaleFactor, ExceptionCode&);
void setShadowDOMEnabled(bool enabled, ExceptionCode&);
void setStandardFontFamily(const String& family, const String& script, ExceptionCode&);
void setSerifFontFamily(const String& family, const String& script, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/InternalSettings.idl (120882 => 120883)
--- trunk/Source/WebCore/testing/InternalSettings.idl 2012-06-20 23:36:06 UTC (rev 120882)
+++ trunk/Source/WebCore/testing/InternalSettings.idl 2012-06-20 23:37:47 UTC (rev 120883)
@@ -43,7 +43,6 @@
void setTouchEventEmulationEnabled(in boolean enabled) raises(DOMException);
void setDeviceSupportsTouch(in boolean enabled) raises(DOMException);
void setDeviceSupportsMouse(in boolean enabled) raises(DOMException);
- void setDeviceScaleFactor(in float scaleFactor) raises(DOMException);
void setShadowDOMEnabled(in boolean enabled) raises(DOMException);
void setStandardFontFamily(in DOMString family, in DOMString script) raises(DOMException);
void setSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException);