| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 void Scrollbar::paint(GraphicsContext& context, const CullRect& cullRect) const | 156 void Scrollbar::paint(GraphicsContext& context, const CullRect& cullRect) const |
| 157 { | 157 { |
| 158 if (!cullRect.intersectsCullRect(frameRect())) | 158 if (!cullRect.intersectsCullRect(frameRect())) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 if (!theme().paint(*this, context, cullRect)) | 161 if (!theme().paint(*this, context, cullRect)) |
| 162 Widget::paint(context, cullRect); | 162 Widget::paint(context, cullRect); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void Scrollbar::autoscrollTimerFired(Timer<Scrollbar>*) | 165 void Scrollbar::autoscrollTimerFired(TimerBase*) |
| 166 { | 166 { |
| 167 autoscrollPressedPart(theme().autoscrollTimerDelay()); | 167 autoscrollPressedPart(theme().autoscrollTimerDelay()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool Scrollbar::thumbWillBeUnderMouse() const | 170 bool Scrollbar::thumbWillBeUnderMouse() const |
| 171 { | 171 { |
| 172 int thumbPos = theme().trackPosition(*this) + theme().thumbPosition(*this, s
crollableAreaTargetPos()); | 172 int thumbPos = theme().trackPosition(*this) + theme().thumbPosition(*this, s
crollableAreaTargetPos()); |
| 173 int thumbLength = theme().thumbLength(*this); | 173 int thumbLength = theme().thumbLength(*this); |
| 174 return pressedPos() >= thumbPos && pressedPos() < thumbPos + thumbLength; | 174 return pressedPos() >= thumbPos && pressedPos() < thumbPos + thumbLength; |
| 175 } | 175 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 invalidParts = AllParts; | 590 invalidParts = AllParts; |
| 591 if (invalidParts & ~ThumbPart) | 591 if (invalidParts & ~ThumbPart) |
| 592 m_trackNeedsRepaint = true; | 592 m_trackNeedsRepaint = true; |
| 593 if (invalidParts & ThumbPart) | 593 if (invalidParts & ThumbPart) |
| 594 m_thumbNeedsRepaint = true; | 594 m_thumbNeedsRepaint = true; |
| 595 if (m_scrollableArea) | 595 if (m_scrollableArea) |
| 596 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); | 596 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); |
| 597 } | 597 } |
| 598 | 598 |
| 599 } // namespace blink | 599 } // namespace blink |
| OLD | NEW |