| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "sky/engine/platform/PlatformGestureEvent.h" | 29 #include "sky/engine/platform/PlatformGestureEvent.h" |
| 30 #include "sky/engine/platform/PlatformMouseEvent.h" | 30 #include "sky/engine/platform/PlatformMouseEvent.h" |
| 31 #include "sky/engine/platform/graphics/GraphicsContext.h" | 31 #include "sky/engine/platform/graphics/GraphicsContext.h" |
| 32 #include "sky/engine/platform/scroll/ScrollAnimator.h" | 32 #include "sky/engine/platform/scroll/ScrollAnimator.h" |
| 33 #include "sky/engine/platform/scroll/ScrollableArea.h" | 33 #include "sky/engine/platform/scroll/ScrollableArea.h" |
| 34 #include "sky/engine/platform/scroll/Scrollbar.h" | 34 #include "sky/engine/platform/scroll/Scrollbar.h" |
| 35 #include "sky/engine/public/platform/Platform.h" | 35 #include "sky/engine/public/platform/Platform.h" |
| 36 #include "sky/engine/public/platform/WebPoint.h" | 36 #include "sky/engine/public/platform/WebPoint.h" |
| 37 #include "sky/engine/public/platform/WebRect.h" | 37 #include "sky/engine/public/platform/WebRect.h" |
| 38 #include "sky/engine/public/platform/WebThemeEngine.h" | |
| 39 | 38 |
| 40 // The position of the scrollbar thumb affects the appearance of the steppers, s
o | 39 // The position of the scrollbar thumb affects the appearance of the steppers, s
o |
| 41 // when the thumb moves, we have to invalidate them for painting. | 40 // when the thumb moves, we have to invalidate them for painting. |
| 42 #define THUMB_POSITION_AFFECTS_BUTTONS | 41 #define THUMB_POSITION_AFFECTS_BUTTONS |
| 43 | 42 |
| 44 namespace blink { | 43 namespace blink { |
| 45 | 44 |
| 46 static const int kThumbThickness = 3; | 45 static const int kThumbThickness = 3; |
| 47 static const int kScrollbarMargin = 3; | 46 static const int kScrollbarMargin = 3; |
| 48 | 47 |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 thumbRect.setWidth(thumbRect.width() - kScrollbarMargin); | 585 thumbRect.setWidth(thumbRect.width() - kScrollbarMargin); |
| 587 if (isLeftSideVerticalScrollbar()) | 586 if (isLeftSideVerticalScrollbar()) |
| 588 thumbRect.setX(thumbRect.x() + kScrollbarMargin); | 587 thumbRect.setX(thumbRect.x() + kScrollbarMargin); |
| 589 } | 588 } |
| 590 | 589 |
| 591 DEFINE_STATIC_LOCAL(Color, color, (128, 128, 128, 128)); | 590 DEFINE_STATIC_LOCAL(Color, color, (128, 128, 128, 128)); |
| 592 context->fillRect(thumbRect, color); | 591 context->fillRect(thumbRect, color); |
| 593 } | 592 } |
| 594 | 593 |
| 595 } // namespace blink | 594 } // namespace blink |
| OLD | NEW |