Eliminate internals.setMockScrollbarsEnabled()
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 00:32:14 +0000 (00:32 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 00:32:14 +0000 (00:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132085

Reviewed by Tim Horton.

Source/WebCore:
This was essentially unused, and also didnt work.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Tools:
* DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues):
No need to reset the preference, there is no way it can change.

LayoutTests:
Remove calls, all of which were resetting it to true (which is the default, and
the only value that makes sense).

* compositing/geometry/fixed-position.html:
* compositing/geometry/horizontal-scroll-composited.html:
* compositing/geometry/vertical-scroll-composited.html:
* compositing/iframes/resources/scrollgrandchild-inner.html:
* compositing/overflow/fixed-position-ancestor-clip.html:
* compositing/resources/mock_scrollbars.js: Removed.
* css3/filters/blur-filter-page-scroll-parents.html:
* css3/filters/blur-filter-page-scroll-self.html:
* css3/filters/blur-filter-page-scroll.html:
* fast/dom/window-scroll-scaling.html:
* fast/events/touch/gesture/gesture-scrollbar.html:
* fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html:
* fast/sub-pixel/transformed-iframe-copy-on-scroll.html:
* media/video-controls-rendering.html:
* media/video-zoom.html:
* scrollingcoordinator/resources/non-fast-scrollable-region-testing.js:

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

23 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/geometry/fixed-position.html
LayoutTests/compositing/geometry/horizontal-scroll-composited.html
LayoutTests/compositing/geometry/vertical-scroll-composited.html
LayoutTests/compositing/iframes/resources/scrollgrandchild-inner.html
LayoutTests/compositing/overflow/fixed-position-ancestor-clip.html
LayoutTests/compositing/resources/mock_scrollbars.js [deleted file]
LayoutTests/css3/filters/blur-filter-page-scroll-parents.html
LayoutTests/css3/filters/blur-filter-page-scroll-self.html
LayoutTests/css3/filters/blur-filter-page-scroll.html
LayoutTests/fast/dom/window-scroll-scaling.html
LayoutTests/fast/events/touch/gesture/gesture-scrollbar.html
LayoutTests/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
LayoutTests/fast/sub-pixel/transformed-iframe-copy-on-scroll.html
LayoutTests/media/video-controls-rendering.html
LayoutTests/media/video-zoom.html
LayoutTests/scrollingcoordinator/resources/non-fast-scrollable-region-testing.js
Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm

index 1bb1b01..04212f2 100644 (file)
@@ -1,3 +1,30 @@
+2014-04-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Eliminate internals.setMockScrollbarsEnabled()
+        https://bugs.webkit.org/show_bug.cgi?id=132085
+
+        Reviewed by Tim Horton.
+
+        Remove calls, all of which were resetting it to true (which is the default, and
+        the only value that makes sense).
+
+        * compositing/geometry/fixed-position.html:
+        * compositing/geometry/horizontal-scroll-composited.html:
+        * compositing/geometry/vertical-scroll-composited.html:
+        * compositing/iframes/resources/scrollgrandchild-inner.html:
+        * compositing/overflow/fixed-position-ancestor-clip.html:
+        * compositing/resources/mock_scrollbars.js: Removed.
+        * css3/filters/blur-filter-page-scroll-parents.html:
+        * css3/filters/blur-filter-page-scroll-self.html:
+        * css3/filters/blur-filter-page-scroll.html:
+        * fast/dom/window-scroll-scaling.html:
+        * fast/events/touch/gesture/gesture-scrollbar.html:
+        * fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html:
+        * fast/sub-pixel/transformed-iframe-copy-on-scroll.html:
+        * media/video-controls-rendering.html:
+        * media/video-zoom.html:
+        * scrollingcoordinator/resources/non-fast-scrollable-region-testing.js:
+
 2014-04-23  David Hyatt  <hyatt@apple.com>
 
         [New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
index 7023ef0..94217f4 100644 (file)
@@ -5,7 +5,6 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>Position fixed</title>
-  <script src="../resources/mock_scrollbars.js"></script>
   <style type="text/css" media="screen">
     body {
       height: 1000px;
index d119b09..142cd0a 100644 (file)
@@ -5,7 +5,6 @@
     if (window.testRunner)
         testRunner.waitUntilDone();
     </script>
-    <script src="../resources/mock_scrollbars.js"></script>
 </head>
 <body style="width: 600px">
 <div style="-webkit-transform: translatez(0); width: 1000px; height: 800px; border-style: solid; border-color: Red; border-width: 3px; background-image: url(../resources/apple.jpg); background-repeat:repeat"></div>
index 03b09d5..570f4bd 100644 (file)
@@ -5,7 +5,6 @@
     if (window.testRunner)
         testRunner.waitUntilDone();
     </script>
-    <script src="../resources/mock_scrollbars.js"></script>
 </head>
 <body style="height: 600px">
 <div style="-webkit-transform: rotate3d(0,0,1,20deg); width: 800px; height: 1000px; border-style: solid; border-color: Red; border-width: 3px; background-image: url(../resources/apple.jpg); background-repeat:repeat"></div>
index 84ca34f..76ba6e2 100644 (file)
@@ -22,8 +22,6 @@
     }
   </style>
   <script>
-    if (window.internals)
-      window.internals.settings.setMockScrollbarsEnabled(true);
     if (window.testRunner) {
       testRunner.dumpAsText(true);
       testRunner.waitUntilDone();
index 259d394..95b9077 100644 (file)
@@ -34,7 +34,6 @@
       window.scrollBy(50, 50);
     }, false);
   </script>
-  <script src="../resources/mock_scrollbars.js"></script>
 </head>
 <body>
   
diff --git a/LayoutTests/compositing/resources/mock_scrollbars.js b/LayoutTests/compositing/resources/mock_scrollbars.js
deleted file mode 100644 (file)
index 71bdf70..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if (window.internals) {
-  window.internals.settings.setMockScrollbarsEnabled(true);
-}
index 079357f..361fe69 100644 (file)
@@ -12,8 +12,6 @@
                 window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
             }
         </script>
-        <!-- Make sure the mock scrollbars are enabled after the call to overridePreference, otherwise the setting will be overwritten. -->
-        <script src="../../compositing/resources/mock_scrollbars.js"></script>
         <style>
             body {
                 margin: 0px;
index d9349a1..5d0e2ac 100644 (file)
@@ -12,8 +12,6 @@
                 window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
             }
         </script>
-        <!-- Make sure the mock scrollbars are enabled after the call to overridePreference, otherwise the setting will be overwritten. -->
-        <script src="../../compositing/resources/mock_scrollbars.js"></script>
         <style>
             body {
                 margin: 0px;
index d9d0045..05e23b2 100644 (file)
@@ -12,8 +12,6 @@
                 window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
             }
         </script>
-        <!-- Make sure the mock scrollbars are enabled after the call to overridePreference, otherwise the setting will be overwritten. -->
-        <script src="../../compositing/resources/mock_scrollbars.js"></script>
         <style>
             body {
                 margin: 0px;
index b28c9e5..09a836c 100644 (file)
@@ -4,9 +4,6 @@
     <script>
         description("This test ensures that document content width (height) as reported by scrollWidth (scrollHeight) is invariant to changes in page scale factor.");
 
-        if (window.internals)
-            window.internals.settings.setMockScrollbarsEnabled(true);
-
         var body = document.body;
 
         // According to CSSOM (http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth)
index fa5b081..ca25a48 100644 (file)
@@ -64,7 +64,6 @@ function exitIfNecessary()
 
 function runTest()
 {
-    internals.settings.setMockScrollbarsEnabled(true);
     if (window.eventSender) {
         description('This tests scroll gesture events on a scroll bar. ' +
             'The scrollable div below should be slightly scrolled down ' +
index ab5528c..0f29889 100644 (file)
 </style>
 <script src="../repaint/resources/repaint.js" type="text/javascript"></script>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
   testRunner.waitUntilDone();
-  internals.settings.setMockScrollbarsEnabled(true);
-}
 
 function setupIframes() {
   setupIframe(document.getElementById('iframe1').contentWindow.document);
index 69e08db..a2d26e0 100644 (file)
 </style>
 <script src="../repaint/resources/repaint.js" type="text/javascript"></script>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
   testRunner.waitUntilDone();
-  internals.settings.setMockScrollbarsEnabled(true);
-}
 
 function setupIframes() {
   setupIframe(document.getElementById('iframe1').contentWindow.document);
index d9b7aee..0ef5084 100644 (file)
@@ -12,8 +12,6 @@
     <video controls style="position: absolute; width: 320px;"></video>
 </div>
 <script>
-if (window.internals)
-    window.internals.settings.setMockScrollbarsEnabled(true);
 init();
 setSrcByTagName('video', findMediaFile('video', 'content/test'));
 </script>
index 2fe261d..f81f721 100644 (file)
@@ -3,9 +3,6 @@
     <style> video { zoom: 150%; border: 3px solid red; } </style>
     <script src=media-file.js></script>
     <script>
-        if (window.internals)
-            window.internals.settings.setMockScrollbarsEnabled(true);
-
         function init()
         {
             setSrcByTagName("video", findMediaFile("video", "content/test"));
index cad179a..eb9492c 100644 (file)
@@ -1,6 +1,5 @@
 function runNonFastScrollableRegionTest(scale) {
     var invScale;
-    window.internals.settings.setMockScrollbarsEnabled(true);
     if (scale != undefined) {
         window.internals.setPageScaleFactor(scale, 0, 0);
         // FIXME: This is a hack for applyPageScaleFactorInCompositor() == false.
index 1b30a40..61d71d5 100644 (file)
@@ -1,3 +1,18 @@
+2014-04-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Eliminate internals.setMockScrollbarsEnabled()
+        https://bugs.webkit.org/show_bug.cgi?id=132085
+
+        Reviewed by Tim Horton.
+
+        This was essentially unused, and also didnt work.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
 2014-04-23  Anders Carlsson  <andersca@apple.com>
 
         Don't migrate the WKView.h header from WebCore to WebKit
index 31bd30c..178c885 100644 (file)
@@ -135,7 +135,6 @@ void InternalSettings::Backup::restoreTo(Settings& settings)
 #endif
     settings.setMediaTypeOverride(m_originalMediaTypeOverride);
     settings.setCanvasUsesAcceleratedDrawing(m_originalCanvasUsesAcceleratedDrawing);
-    settings.setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled);
     RuntimeEnabledFeatures::sharedFeatures().setLangAttributeAwareFormControlUIEnabled(m_langAttributeAwareFormControlUIEnabled);
     settings.setImagesEnabled(m_imagesEnabled);
     settings.setMinDOMTimerInterval(m_minimumTimerInterval);
@@ -210,12 +209,6 @@ Settings* InternalSettings::settings() const
     return &page()->settings();
 }
 
-void InternalSettings::setMockScrollbarsEnabled(bool enabled, ExceptionCode& ec)
-{
-    InternalSettingsGuardForSettings();
-    settings()->setMockScrollbarsEnabled(enabled);
-}
-
 void InternalSettings::setTouchEventEmulationEnabled(bool enabled, ExceptionCode& ec)
 {
 #if ENABLE(TOUCH_EVENTS)
index 7307383..39e35b7 100644 (file)
@@ -100,7 +100,6 @@ public:
     virtual ~InternalSettings();
     void resetToConsistentState();
 
-    void setMockScrollbarsEnabled(bool enabled, ExceptionCode&);
     void setUsesOverlayScrollbars(bool enabled, ExceptionCode&);
     void setTouchEventEmulationEnabled(bool enabled, ExceptionCode&);
     void setStandardFontFamily(const String& family, const String& script, ExceptionCode&);
index 1dd6fa7..a7fed2b 100644 (file)
@@ -27,7 +27,6 @@
     NoInterfaceObject,
     JSGenerateToJSObject
 ] interface InternalSettings : InternalSettingsGenerated {
-    [RaisesException] void setMockScrollbarsEnabled(boolean enabled);
     [RaisesException] void setTouchEventEmulationEnabled(boolean enabled);
     [RaisesException] void setStandardFontFamily(DOMString family, DOMString script);
     [RaisesException] void setSerifFontFamily(DOMString family, DOMString script);
index 5379cbc..3091644 100644 (file)
@@ -1,3 +1,13 @@
+2014-04-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Eliminate internals.setMockScrollbarsEnabled()
+        https://bugs.webkit.org/show_bug.cgi?id=132085
+
+        Reviewed by Tim Horton.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues):
+        No need to reset the preference, there is no way it can change.
+
 2014-04-23  James Craig  <jcraig@apple.com>
 
         Unreviewed. Moving myself from Contributors to Committers list.
index 4630870..2f7ffa2 100644 (file)
@@ -881,7 +881,7 @@ static void resetWebPreferencesToConsistentValues()
     [preferences setCSSGridLayoutEnabled:NO];
     [preferences setUsePreHTML5ParserQuirks:NO];
     [preferences setAsynchronousSpellCheckingEnabled:NO];
-    [preferences setMockScrollbarsEnabled:YES];
+    ASSERT([preferences mockScrollbarsEnabled]);
 
 #if ENABLE(WEB_AUDIO)
     [preferences setWebAudioEnabled:YES];