Title: [121176] trunk/Source
Revision
121176
Author
[email protected]
Date
2012-06-25 12:47:57 -0700 (Mon, 25 Jun 2012)

Log Message

Source/Platform: Plumb Scrollbar button dimensions through WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <[email protected]> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

* chromium/public/win/WebThemeEngine.h:
(WebKit):
(WebThemeEngine):

Source/WebCore: Plumb Scrollbar button dimensions down to WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <[email protected]> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

No new tests, as bounds are overridden for DRT.

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/chromium/ScrollbarThemeChromiumWin.cpp:
(WebCore::ScrollbarThemeChromiumWin::buttonSize):

Source/WebKit/chromium: Plumb Scrollbar button dimensions down to WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <[email protected]> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::getThemePartSize):
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (121175 => 121176)


--- trunk/Source/Platform/ChangeLog	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/Platform/ChangeLog	2012-06-25 19:47:57 UTC (rev 121176)
@@ -1,3 +1,18 @@
+2012-06-25  Scott Graham  <[email protected]>
+
+        Plumb Scrollbar button dimensions through WebThemeEngine
+        https://bugs.webkit.org/show_bug.cgi?id=89264
+
+        Reviewed by James Robinson.
+
+        Rather than making the height of the scrollbar buttons the same as the
+        width of the scrollbar, delegate to the WebThemeEngine. This allows
+        matching the Aura theme rather than the standard Windows theme.
+
+        * chromium/public/win/WebThemeEngine.h:
+        (WebKit):
+        (WebThemeEngine):
+
 2012-06-22  Kenneth Russell  <[email protected]>
 
         Unreviewed, rolling out r121064.

Modified: trunk/Source/Platform/chromium/public/win/WebThemeEngine.h (121175 => 121176)


--- trunk/Source/Platform/chromium/public/win/WebThemeEngine.h	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/Platform/chromium/public/win/WebThemeEngine.h	2012-06-25 19:47:57 UTC (rev 121176)
@@ -83,6 +83,10 @@
     virtual void paintProgressBar(
         WebCanvas*, const WebRect& barRect, const WebRect& valueRect,
         bool determinate, double animatedSeconds) { }
+
+    // Get dimensions of a particular part. Only supports SBP_ARROWBTN
+    // currently.
+    virtual WebSize getSize(int part) = 0;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebCore/ChangeLog (121175 => 121176)


--- trunk/Source/WebCore/ChangeLog	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/WebCore/ChangeLog	2012-06-25 19:47:57 UTC (rev 121176)
@@ -1,3 +1,21 @@
+2012-06-25  Scott Graham  <[email protected]>
+
+        Plumb Scrollbar button dimensions down to WebThemeEngine
+        https://bugs.webkit.org/show_bug.cgi?id=89264
+
+        Reviewed by James Robinson.
+
+        Rather than making the height of the scrollbar buttons the same as the
+        width of the scrollbar, delegate to the WebThemeEngine. This allows
+        matching the Aura theme rather than the standard Windows theme.
+
+        No new tests, as bounds are overridden for DRT.
+
+        * platform/chromium/PlatformSupport.h:
+        (PlatformSupport):
+        * platform/chromium/ScrollbarThemeChromiumWin.cpp:
+        (WebCore::ScrollbarThemeChromiumWin::buttonSize):
+
 2012-06-25  Antti Koivisto  <[email protected]>
 
         Fast path for simple transform parsing

Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (121175 => 121176)


--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-06-25 19:47:57 UTC (rev 121176)
@@ -186,6 +186,7 @@
         GraphicsContext*, int part, int state, int classicState, const IntRect&);
     static void paintProgressBar(
         GraphicsContext*, const IntRect& barRect, const IntRect& valueRect, bool determinate, double animatedSeconds);
+    static IntSize getThemePartSize(int part);
 #elif OS(DARWIN)
     enum ThemePaintState {
         StateDisabled,

Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumWin.cpp (121175 => 121176)


--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumWin.cpp	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumWin.cpp	2012-06-25 19:47:57 UTC (rev 121176)
@@ -250,13 +250,15 @@
 
     int thickness = scrollbarThickness(scrollbar->controlSize());
 
+    int standardGirth = PlatformSupport::getThemePartSize(SBP_ARROWBTN).height();
+
     // In layout test mode, we force the button "girth" (i.e., the length of
     // the button along the axis of the scrollbar) to be a fixed size.
     // FIXME: This is retarded!  scrollbarThickness is already fixed in layout
     // test mode so that should be enough to result in repeatable results, but
     // preserving this hack avoids having to rebaseline pixel tests.
     const int kLayoutTestModeGirth = 17;
-    int girth = PlatformSupport::layoutTestMode() ? kLayoutTestModeGirth : thickness;
+    int girth = PlatformSupport::layoutTestMode() ? kLayoutTestModeGirth : standardGirth;
 
     if (scrollbar->orientation() == HorizontalScrollbar) {
         int width = scrollbar->width() < 2 * girth ? scrollbar->width() / 2 : girth;

Modified: trunk/Source/WebKit/chromium/ChangeLog (121175 => 121176)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-06-25 19:47:57 UTC (rev 121176)
@@ -1,3 +1,18 @@
+2012-06-25  Scott Graham  <[email protected]>
+
+        Plumb Scrollbar button dimensions down to WebThemeEngine
+        https://bugs.webkit.org/show_bug.cgi?id=89264
+
+        Reviewed by James Robinson.
+
+        Rather than making the height of the scrollbar buttons the same as the
+        width of the scrollbar, delegate to the WebThemeEngine. This allows
+        matching the Aura theme rather than the standard Windows theme.
+
+        * src/PlatformSupport.cpp:
+        (WebCore::PlatformSupport::getThemePartSize):
+        (WebCore):
+
 2012-06-25  Zeev Lieber  <[email protected]>
 
         [Chromium] RenderPass textures are evicted at the end of every frame

Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (121175 => 121176)


--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-06-25 19:33:07 UTC (rev 121175)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-06-25 19:47:57 UTC (rev 121176)
@@ -442,6 +442,11 @@
         gc->platformContext()->canvas(), barRect, valueRect, determinate, animatedSeconds);
 }
 
+IntSize PlatformSupport::getThemePartSize(int part)
+{
+    return WebKit::Platform::current()->themeEngine()->getSize(part);
+}
+
 #elif OS(DARWIN)
 
 void PlatformSupport::paintScrollbarThumb(
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to