| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2008, 2009 Google Inc. | 3 * Copyright (C) 2008, 2009 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/platform/ScrollbarThemeNonMacCommon.h" | 28 #include "core/platform/ScrollbarThemeNonMacCommon.h" |
| 29 | 29 |
| 30 #include "core/platform/PlatformMouseEvent.h" | 30 #include "core/platform/PlatformMouseEvent.h" |
| 31 #include "core/platform/ScrollableArea.h" | 31 #include "core/platform/ScrollableArea.h" |
| 32 #include "core/platform/Scrollbar.h" | |
| 33 #include "core/platform/ScrollbarTheme.h" | 32 #include "core/platform/ScrollbarTheme.h" |
| 34 #include "core/platform/graphics/GraphicsContextStateSaver.h" | 33 #include "core/platform/graphics/GraphicsContextStateSaver.h" |
| 34 #include "platform/scroll/ScrollbarThemeClient.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 bool ScrollbarThemeNonMacCommon::hasThumb(ScrollbarThemeClient* scrollbar) | 38 bool ScrollbarThemeNonMacCommon::hasThumb(ScrollbarThemeClient* scrollbar) |
| 39 { | 39 { |
| 40 // This method is just called as a paint-time optimization to see if | 40 // This method is just called as a paint-time optimization to see if |
| 41 // painting the thumb can be skipped. We don't have to be exact here. | 41 // painting the thumb can be skipped. We don't have to be exact here. |
| 42 return thumbLength(scrollbar) > 0; | 42 return thumbLength(scrollbar) > 0; |
| 43 } | 43 } |
| 44 | 44 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 FloatRect tickRect(rect.x(), yPos, rect.width(), 3); | 121 FloatRect tickRect(rect.x(), yPos, rect.width(), 3); |
| 122 context->fillRect(tickRect); | 122 context->fillRect(tickRect); |
| 123 | 123 |
| 124 context->setFillColor(Color(0xFF, 0xDD, 0x00, 0xFF)); | 124 context->setFillColor(Color(0xFF, 0xDD, 0x00, 0xFF)); |
| 125 FloatRect tickStroke(rect.x(), yPos + 1, rect.width(), 1); | 125 FloatRect tickStroke(rect.x(), yPos + 1, rect.width(), 1); |
| 126 context->fillRect(tickStroke); | 126 context->fillRect(tickStroke); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace WebCore | 130 } // namespace WebCore |
| OLD | NEW |