| 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 static void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect); | |
| 122 | |
| 123 bool shouldCenterOnThumb(const PlatformMouseEvent&); | 121 bool shouldCenterOnThumb(const PlatformMouseEvent&); |
| 124 bool shouldSnapBackToDragOrigin(const PlatformMouseEvent&); | 122 bool shouldSnapBackToDragOrigin(const PlatformMouseEvent&); |
| 125 | 123 |
| 126 // The position of the thumb relative to the track. | 124 // The position of the thumb relative to the track. |
| 127 int thumbPosition(); | 125 int thumbPosition(); |
| 128 // The length of the thumb along the axis of the scrollbar. | 126 // The length of the thumb along the axis of the scrollbar. |
| 129 int thumbLength(); | 127 int thumbLength(); |
| 130 // The position of the track relative to the scrollbar. | 128 // The position of the track relative to the scrollbar. |
| 131 int trackPosition(); | 129 int trackPosition(); |
| 132 // The length of the track along the axis of the scrollbar. | 130 // The length of the track along the axis of the scrollbar. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 virtual bool isScrollbar() const override { return true; } | 178 virtual bool isScrollbar() const override { return true; } |
| 181 | 179 |
| 182 float scrollableAreaCurrentPos() const; | 180 float scrollableAreaCurrentPos() const; |
| 183 }; | 181 }; |
| 184 | 182 |
| 185 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); | 183 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr
ollbar()); |
| 186 | 184 |
| 187 } // namespace blink | 185 } // namespace blink |
| 188 | 186 |
| 189 #endif // Scrollbar_h | 187 #endif // Scrollbar_h |
| OLD | NEW |