| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 void invalidateParts() | 112 void invalidateParts() |
| 113 { | 113 { |
| 114 invalidatePart(BackTrackPart); | 114 invalidatePart(BackTrackPart); |
| 115 invalidatePart(ThumbPart); | 115 invalidatePart(ThumbPart); |
| 116 invalidatePart(ForwardTrackPart); | 116 invalidatePart(ForwardTrackPart); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void invalidatePart(ScrollbarPart); | 119 void invalidatePart(ScrollbarPart); |
| 120 | 120 |
| 121 bool shouldCenterOnThumb(const PlatformMouseEvent&); | |
| 122 bool shouldSnapBackToDragOrigin(const PlatformMouseEvent&); | |
| 123 | |
| 124 // The position of the thumb relative to the track. | 121 // The position of the thumb relative to the track. |
| 125 int thumbPosition(); | 122 int thumbPosition(); |
| 126 // The length of the thumb along the axis of the scrollbar. | 123 // The length of the thumb along the axis of the scrollbar. |
| 127 int thumbLength(); | 124 int thumbLength(); |
| 128 // The position of the track relative to the scrollbar. | 125 // The position of the track relative to the scrollbar. |
| 129 int trackPosition(); | 126 int trackPosition(); |
| 130 // The length of the track along the axis of the scrollbar. | 127 // The length of the track along the axis of the scrollbar. |
| 131 int trackLength(); | 128 int trackLength(); |
| 132 | 129 |
| 133 IntRect trackRect(); | 130 IntRect trackRect(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 virtual bool isScrollbar() const override { return true; } | 175 virtual bool isScrollbar() const override { return true; } |
| 179 | 176 |
| 180 float scrollableAreaCurrentPos() const; | 177 float scrollableAreaCurrentPos() const; |
| 181 }; | 178 }; |
| 182 | 179 |
| 183 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 180 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
| 184 | 181 |
| 185 } // namespace blink | 182 } // namespace blink |
| 186 | 183 |
| 187 #endif // Scrollbar_h | 184 #endif // Scrollbar_h |
| OLD | NEW |