Title: [92319] trunk/Source/WebCore
- Revision
- 92319
- Author
- [email protected]
- Date
- 2011-08-03 15:42:46 -0700 (Wed, 03 Aug 2011)
Log Message
Chromium Mac: Fix position of search tickmarks
https://bugs.webkit.org/show_bug.cgi?id=65575
This change adjusts the position of search tickmarks so that they are correctly centered.
Also, insetting the tickmark rect by 5 pixels caused tickmarks on the overlay scrollbar to look very small. I changed this to inset by 4 pixels instead. The tickmark is the same width as the overlay scrollbar which looks much better.
Patch by Sailesh Agrawal <[email protected]> on 2011-08-03
Reviewed by James Robinson.
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::paint):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92318 => 92319)
--- trunk/Source/WebCore/ChangeLog 2011-08-03 22:36:35 UTC (rev 92318)
+++ trunk/Source/WebCore/ChangeLog 2011-08-03 22:42:46 UTC (rev 92319)
@@ -1,5 +1,19 @@
2011-08-03 Sailesh Agrawal <[email protected]>
+ Chromium Mac: Fix position of search tickmarks
+ https://bugs.webkit.org/show_bug.cgi?id=65575
+
+ This change adjusts the position of search tickmarks so that they are correctly centered.
+
+ Also, insetting the tickmark rect by 5 pixels caused tickmarks on the overlay scrollbar to look very small. I changed this to inset by 4 pixels instead. The tickmark is the same width as the overlay scrollbar which looks much better.
+
+ Reviewed by James Robinson.
+
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::paint):
+
+2011-08-03 Sailesh Agrawal <[email protected]>
+
Chromium Mac: Make sure scrollbars flash when web page loads
https://bugs.webkit.org/show_bug.cgi?id=65586
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (92318 => 92319)
--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-03 22:36:35 UTC (rev 92318)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-03 22:42:46 UTC (rev 92319)
@@ -491,9 +491,15 @@
scrollbar->frameRect());
IntRect tickmarkTrackRect(IntPoint(), trackRect(scrollbar, false).size());
- // Inset by 2 on the left and 3 on the right.
- tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
- tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 3);
+ if (tickmarkTrackRect.width() <= 10) {
+ // For narrow scrollbars inset by 1 on the left and 3 on the right.
+ tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 4);
+ } else {
+ // For wide scrollbars inset by 2 on the left and 3 on the right.
+ tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
+ }
paintTickmarks(context, scrollbar, tickmarkTrackRect);
wkScrollbarPainterPaintKnob(scrollbarPainter);
@@ -566,7 +572,7 @@
tickmarkTrackRect.inflateY(-tickmarkTrackRect.width());
// Inset by 2 on the left and 3 on the right.
tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
- tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 3);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
paintTickmarks(drawingContext, scrollbar, tickmarkTrackRect);
if (hasThumb(scrollbar)) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes