Title: [129394] trunk/Source/WebCore
Revision
129394
Author
[email protected]
Date
2012-09-24 11:42:22 -0700 (Mon, 24 Sep 2012)

Log Message

Android's mock scrollbars shows up as a difference in layout test results
https://bugs.webkit.org/show_bug.cgi?id=96382

Reviewed by Adam Barth.

Remove the exceptions made for layout tests in Android's scrollbar theme.
This will make our actual scrollbars show up in layout test pixel results,
bringing the tests closer to what we actually ship.

An important difference with other platforms is that scrollbars do not
take any width on Android, they're rendered on top of the content. Therefore
each test that has a visible scrollbar does not just need a new pixel
result, but will also need a new text result. This will be handled as part
of a larger rebaselining process.

Will be exercised by every layout test that has a scrollbar.

* platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
(WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
(WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
(WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
* platform/chromium/ScrollbarThemeChromiumAndroid.h:
(ScrollbarThemeChromiumAndroid):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129393 => 129394)


--- trunk/Source/WebCore/ChangeLog	2012-09-24 18:39:24 UTC (rev 129393)
+++ trunk/Source/WebCore/ChangeLog	2012-09-24 18:42:22 UTC (rev 129394)
@@ -1,3 +1,29 @@
+2012-09-24  Peter Beverloo  <[email protected]>
+
+        Android's mock scrollbars shows up as a difference in layout test results
+        https://bugs.webkit.org/show_bug.cgi?id=96382
+
+        Reviewed by Adam Barth.
+
+        Remove the exceptions made for layout tests in Android's scrollbar theme.
+        This will make our actual scrollbars show up in layout test pixel results,
+        bringing the tests closer to what we actually ship.
+
+        An important difference with other platforms is that scrollbars do not
+        take any width on Android, they're rendered on top of the content. Therefore
+        each test that has a visible scrollbar does not just need a new pixel
+        result, but will also need a new text result. This will be handled as part
+        of a larger rebaselining process.
+
+        Will be exercised by every layout test that has a scrollbar.
+
+        * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
+        (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
+        (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
+        (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
+        * platform/chromium/ScrollbarThemeChromiumAndroid.h:
+        (ScrollbarThemeChromiumAndroid):
+
 2012-09-24  Sean Wang  <[email protected]>
 
         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser

Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.cpp (129393 => 129394)


--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.cpp	2012-09-24 18:39:24 UTC (rev 129393)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.cpp	2012-09-24 18:42:22 UTC (rev 129394)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "ScrollbarThemeChromiumAndroid.h"
 
-#include "LayoutTestSupport.h"
 #include "PlatformContextSkia.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformSupport.h"
@@ -50,21 +49,12 @@
 
 int ScrollbarThemeChromiumAndroid::scrollbarThickness(ScrollbarControlSize controlSize)
 {
-    if (isRunningLayoutTest()) {
-        // Match Chromium-Linux for DumpRenderTree, so the layout test results
-        // can be shared. The width of scrollbar down arrow should equal the
-        // width of the vertical scrollbar.
-        IntSize scrollbarSize = PlatformSupport::getThemePartSize(PlatformSupport::PartScrollbarDownArrow);
-        return scrollbarSize.width();
-    }
-
     return scrollbarWidth + scrollbarMargin;
 }
 
 bool ScrollbarThemeChromiumAndroid::usesOverlayScrollbars() const
 {
-    // In layout test mode, match Chromium-Linux.
-    return !isRunningLayoutTest();
+    return true;
 }
 
 int ScrollbarThemeChromiumAndroid::thumbPosition(ScrollbarThemeClient* scrollbar)
@@ -92,8 +82,7 @@
 
 bool ScrollbarThemeChromiumAndroid::hasThumb(ScrollbarThemeClient* scrollbar)
 {
-    // In layout test mode, match Chromium-Linux.
-    return !isRunningLayoutTest();
+    return true;
 }
 
 IntRect ScrollbarThemeChromiumAndroid::backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool)
@@ -157,12 +146,4 @@
     fillSmoothEdgedRect(context, thumbRect, Color(128, 128, 128, 128));
 }
 
-void ScrollbarThemeChromiumAndroid::paintScrollbarBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar)
-{
-    // Paint black background in DumpRenderTree, otherwise the pixels in the scrollbar area depend
-    // on their previous state, which makes the dumped result undetermined.
-    if (isRunningLayoutTest())
-        context->fillRect(scrollbar->frameRect(), Color::black, ColorSpaceDeviceRGB);
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.h (129393 => 129394)


--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.h	2012-09-24 18:39:24 UTC (rev 129393)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.h	2012-09-24 18:42:22 UTC (rev 129394)
@@ -46,7 +46,6 @@
     virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
 
     virtual void paintThumb(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
-    virtual void paintScrollbarBackground(GraphicsContext*, ScrollbarThemeClient*);
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to