| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 total_size_ = total_size; | 151 total_size_ = total_size; |
| 152 | 152 |
| 153 SetNeedsPaintInvalidation(kAllParts); | 153 SetNeedsPaintInvalidation(kAllParts); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void Scrollbar::Paint(GraphicsContext& context, | 156 void Scrollbar::Paint(GraphicsContext& context, |
| 157 const CullRect& cull_rect) const { | 157 const CullRect& cull_rect) const { |
| 158 if (!cull_rect.IntersectsCullRect(FrameRect())) | 158 if (!cull_rect.IntersectsCullRect(FrameRect())) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 if (!GetTheme().Paint(*this, context, cull_rect)) | 161 GetTheme().Paint(*this, context, cull_rect); |
| 162 FrameViewBase::Paint(context, cull_rect); | |
| 163 } | 162 } |
| 164 | 163 |
| 165 void Scrollbar::AutoscrollTimerFired(TimerBase*) { | 164 void Scrollbar::AutoscrollTimerFired(TimerBase*) { |
| 166 AutoscrollPressedPart(GetTheme().AutoscrollTimerDelay()); | 165 AutoscrollPressedPart(GetTheme().AutoscrollTimerDelay()); |
| 167 } | 166 } |
| 168 | 167 |
| 169 bool Scrollbar::ThumbWillBeUnderMouse() const { | 168 bool Scrollbar::ThumbWillBeUnderMouse() const { |
| 170 int thumb_pos = GetTheme().TrackPosition(*this) + | 169 int thumb_pos = GetTheme().TrackPosition(*this) + |
| 171 GetTheme().ThumbPosition(*this, ScrollableAreaTargetPos()); | 170 GetTheme().ThumbPosition(*this, ScrollableAreaTargetPos()); |
| 172 int thumb_length = GetTheme().ThumbLength(*this); | 171 int thumb_length = GetTheme().ThumbLength(*this); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 invalid_parts = kAllParts; | 640 invalid_parts = kAllParts; |
| 642 if (invalid_parts & ~kThumbPart) | 641 if (invalid_parts & ~kThumbPart) |
| 643 track_needs_repaint_ = true; | 642 track_needs_repaint_ = true; |
| 644 if (invalid_parts & kThumbPart) | 643 if (invalid_parts & kThumbPart) |
| 645 thumb_needs_repaint_ = true; | 644 thumb_needs_repaint_ = true; |
| 646 if (scrollable_area_) | 645 if (scrollable_area_) |
| 647 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation()); | 646 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation()); |
| 648 } | 647 } |
| 649 | 648 |
| 650 } // namespace blink | 649 } // namespace blink |
| OLD | NEW |