| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 * | 7 * |
| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 ScrollbarThemeOverlay::ScrollbarThemeOverlay(int thumbThickness, | 53 ScrollbarThemeOverlay::ScrollbarThemeOverlay(int thumbThickness, |
| 54 int scrollbarMargin, | 54 int scrollbarMargin, |
| 55 HitTestBehavior allowHitTest) | 55 HitTestBehavior allowHitTest) |
| 56 : ScrollbarTheme(), | 56 : ScrollbarTheme(), |
| 57 m_thumbThickness(thumbThickness), | 57 m_thumbThickness(thumbThickness), |
| 58 m_scrollbarMargin(scrollbarMargin), | 58 m_scrollbarMargin(scrollbarMargin), |
| 59 m_allowHitTest(allowHitTest), | 59 m_allowHitTest(allowHitTest), |
| 60 m_useSolidColor(false) {} | 60 m_useSolidColor(false) {} |
| 61 | 61 |
| 62 bool ScrollbarThemeOverlay::shouldRepaintAllPartsOnInvalidation() const { |
| 63 return false; |
| 64 } |
| 65 |
| 66 ScrollbarPart ScrollbarThemeOverlay::invalidateOnThumbPositionChange( |
| 67 const ScrollbarThemeClient&, |
| 68 float oldPosition, |
| 69 float newPosition) const { |
| 70 return NoPart; |
| 71 } |
| 72 |
| 73 ScrollbarPart ScrollbarThemeOverlay::invalidateOnEnabledChange() const { |
| 74 return NoPart; |
| 75 } |
| 76 |
| 62 int ScrollbarThemeOverlay::scrollbarThickness( | 77 int ScrollbarThemeOverlay::scrollbarThickness( |
| 63 ScrollbarControlSize controlSize) { | 78 ScrollbarControlSize controlSize) { |
| 64 return m_thumbThickness + m_scrollbarMargin; | 79 return m_thumbThickness + m_scrollbarMargin; |
| 65 } | 80 } |
| 66 | 81 |
| 67 int ScrollbarThemeOverlay::scrollbarMargin() const { | 82 int ScrollbarThemeOverlay::scrollbarMargin() const { |
| 68 return m_scrollbarMargin; | 83 return m_scrollbarMargin; |
| 69 } | 84 } |
| 70 | 85 |
| 71 bool ScrollbarThemeOverlay::usesOverlayScrollbars() const { | 86 bool ScrollbarThemeOverlay::usesOverlayScrollbars() const { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style); | 231 Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style); |
| 217 } | 232 } |
| 218 theme = new ScrollbarThemeOverlay( | 233 theme = new ScrollbarThemeOverlay( |
| 219 style.thumbThickness, style.scrollbarMargin, | 234 style.thumbThickness, style.scrollbarMargin, |
| 220 ScrollbarThemeOverlay::DisallowHitTest, Color(style.color)); | 235 ScrollbarThemeOverlay::DisallowHitTest, Color(style.color)); |
| 221 } | 236 } |
| 222 return *theme; | 237 return *theme; |
| 223 } | 238 } |
| 224 | 239 |
| 225 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |