Changeset 142423 in webkit
- Timestamp:
- Feb 10, 2013 6:54:14 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142419 r142423 1 2013-02-10 Alexandre Elias <aelias@chromium.org> 2 3 [chromium] Fix Android scrollbar size 4 https://bugs.webkit.org/show_bug.cgi?id=109374 5 6 Reviewed by James Robinson. 7 8 This shrinks scrollbars to 3 device-independent pixels (usually 6 9 physical pixels) and deletes the edge fade. Although the Android 10 system theme does have an edge fade, it's a much sharper cliff 11 than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0) 12 and I can't perceive any difference compared with no fade at all. 13 14 No new tests (due for rewrite in a week anyway). 15 16 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: 17 (WebCore): 18 (WebCore::ScrollbarThemeChromiumAndroid::paintThumb): 19 1 20 2013-02-04 Kentaro Hara <haraken@chromium.org> 2 21 -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.cpp
r129837 r142423 38 38 namespace WebCore { 39 39 40 static const int scrollbarWidth = 8;41 static const int scrollbarMargin = 5;40 static const int scrollbarWidth = 3; 41 static const int scrollbarMargin = 4; 42 42 43 43 ScrollbarTheme* ScrollbarTheme::nativeTheme() … … 105 105 } 106 106 107 static void fillSmoothEdgedRect(GraphicsContext* context, const IntRect& rect, const Color& color)108 {109 Color halfColor(color.red(), color.green(), color.blue(), color.alpha() / 2);110 111 IntRect topRect = rect;112 topRect.inflateX(-1);113 topRect.setHeight(1);114 context->fillRect(topRect, halfColor, ColorSpaceDeviceRGB);115 116 IntRect leftRect = rect;117 leftRect.inflateY(-1);118 leftRect.setWidth(1);119 context->fillRect(leftRect, halfColor, ColorSpaceDeviceRGB);120 121 IntRect centerRect = rect;122 centerRect.inflate(-1);123 context->fillRect(centerRect, color, ColorSpaceDeviceRGB);124 125 IntRect rightRect = rect;126 rightRect.inflateY(-1);127 rightRect.setX(centerRect.maxX());128 rightRect.setWidth(1);129 context->fillRect(rightRect, halfColor, ColorSpaceDeviceRGB);130 131 IntRect bottomRect = rect;132 bottomRect.inflateX(-1);133 bottomRect.setY(centerRect.maxY());134 bottomRect.setHeight(1);135 context->fillRect(bottomRect, halfColor, ColorSpaceDeviceRGB);136 }137 138 107 void ScrollbarThemeChromiumAndroid::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) 139 108 { … … 143 112 else 144 113 thumbRect.setWidth(thumbRect.width() - scrollbarMargin); 145 fillSmoothEdgedRect(context, thumbRect, Color(128, 128, 128, 128));114 context->fillRect(thumbRect, Color(128, 128, 128, 128), ColorSpaceDeviceRGB); 146 115 } 147 116
Note: See TracChangeset
for help on using the changeset viewer.