| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 ScrollbarPart m_hoveredPart; | 230 ScrollbarPart m_hoveredPart; |
| 231 ScrollbarPart m_pressedPart; | 231 ScrollbarPart m_pressedPart; |
| 232 int m_pressedPos; | 232 int m_pressedPos; |
| 233 float m_scrollPos; | 233 float m_scrollPos; |
| 234 bool m_draggingDocument; | 234 bool m_draggingDocument; |
| 235 int m_documentDragPos; | 235 int m_documentDragPos; |
| 236 | 236 |
| 237 bool m_enabled; | 237 bool m_enabled; |
| 238 | 238 |
| 239 Timer<Scrollbar> m_scrollTimer; | 239 TaskRunnerTimer<Scrollbar> m_scrollTimer; |
| 240 | 240 |
| 241 float m_elasticOverscroll; | 241 float m_elasticOverscroll; |
| 242 | 242 |
| 243 private: | 243 private: |
| 244 bool isScrollbar() const override { return true; } | 244 bool isScrollbar() const override { return true; } |
| 245 | 245 |
| 246 void invalidate() override { setNeedsPaintInvalidation(AllParts); } | 246 void invalidate() override { setNeedsPaintInvalidation(AllParts); } |
| 247 void invalidateRect(const IntRect&) override { | 247 void invalidateRect(const IntRect&) override { |
| 248 setNeedsPaintInvalidation(AllParts); | 248 setNeedsPaintInvalidation(AllParts); |
| 249 } | 249 } |
| 250 | 250 |
| 251 float scrollableAreaCurrentPos() const; | 251 float scrollableAreaCurrentPos() const; |
| 252 float scrollableAreaTargetPos() const; | 252 float scrollableAreaTargetPos() const; |
| 253 bool thumbWillBeUnderMouse() const; | 253 bool thumbWillBeUnderMouse() const; |
| 254 | 254 |
| 255 int m_themeScrollbarThickness; | 255 int m_themeScrollbarThickness; |
| 256 bool m_trackNeedsRepaint; | 256 bool m_trackNeedsRepaint; |
| 257 bool m_thumbNeedsRepaint; | 257 bool m_thumbNeedsRepaint; |
| 258 }; | 258 }; |
| 259 | 259 |
| 260 DEFINE_TYPE_CASTS(Scrollbar, | 260 DEFINE_TYPE_CASTS(Scrollbar, |
| 261 Widget, | 261 Widget, |
| 262 widget, | 262 widget, |
| 263 widget->isScrollbar(), | 263 widget->isScrollbar(), |
| 264 widget.isScrollbar()); | 264 widget.isScrollbar()); |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| 267 | 267 |
| 268 #endif // Scrollbar_h | 268 #endif // Scrollbar_h |
| OLD | NEW |