| 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 19 matching lines...) Expand all Loading... |
| 30 #include "platform/PlatformGestureEvent.h" | 30 #include "platform/PlatformGestureEvent.h" |
| 31 #include "platform/PlatformMouseEvent.h" | 31 #include "platform/PlatformMouseEvent.h" |
| 32 #include "platform/geometry/FloatRect.h" | 32 #include "platform/geometry/FloatRect.h" |
| 33 #include "platform/graphics/paint/CullRect.h" | 33 #include "platform/graphics/paint/CullRect.h" |
| 34 #include "platform/scroll/ScrollAnimatorBase.h" | 34 #include "platform/scroll/ScrollAnimatorBase.h" |
| 35 #include "platform/scroll/ScrollableArea.h" | 35 #include "platform/scroll/ScrollableArea.h" |
| 36 #include "platform/scroll/ScrollbarTheme.h" | 36 #include "platform/scroll/ScrollbarTheme.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 RawPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, ScrollbarOri
entation orientation, ScrollbarControlSize size, HostWindow* hostWindow) | |
| 41 { | |
| 42 return new Scrollbar(scrollableArea, orientation, size, hostWindow); | |
| 43 } | |
| 44 | |
| 45 RawPtr<Scrollbar> Scrollbar::createForTesting(ScrollableArea* scrollableArea, Sc
rollbarOrientation orientation, ScrollbarControlSize size, ScrollbarTheme* theme
) | |
| 46 { | |
| 47 return new Scrollbar(scrollableArea, orientation, size, nullptr, theme); | |
| 48 } | |
| 49 | |
| 50 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, HostWindow* hostWindow, ScrollbarTheme*
theme) | 40 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, HostWindow* hostWindow, ScrollbarTheme*
theme) |
| 51 : m_scrollableArea(scrollableArea) | 41 : m_scrollableArea(scrollableArea) |
| 52 , m_orientation(orientation) | 42 , m_orientation(orientation) |
| 53 , m_controlSize(controlSize) | 43 , m_controlSize(controlSize) |
| 54 , m_theme(theme ? *theme : ScrollbarTheme::theme()) | 44 , m_theme(theme ? *theme : ScrollbarTheme::theme()) |
| 55 , m_hostWindow(hostWindow) | 45 , m_hostWindow(hostWindow) |
| 56 , m_visibleSize(0) | 46 , m_visibleSize(0) |
| 57 , m_totalSize(0) | 47 , m_totalSize(0) |
| 58 , m_currentPos(0) | 48 , m_currentPos(0) |
| 59 , m_dragOrigin(0) | 49 , m_dragOrigin(0) |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 invalidParts = AllParts; | 590 invalidParts = AllParts; |
| 601 if (invalidParts & ~ThumbPart) | 591 if (invalidParts & ~ThumbPart) |
| 602 m_trackNeedsRepaint = true; | 592 m_trackNeedsRepaint = true; |
| 603 if (invalidParts & ThumbPart) | 593 if (invalidParts & ThumbPart) |
| 604 m_thumbNeedsRepaint = true; | 594 m_thumbNeedsRepaint = true; |
| 605 if (m_scrollableArea) | 595 if (m_scrollableArea) |
| 606 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); | 596 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); |
| 607 } | 597 } |
| 608 | 598 |
| 609 } // namespace blink | 599 } // namespace blink |
| OLD | NEW |