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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return scrollable_area_ && scrollable_area_->IsActive(); | 114 return scrollable_area_ && scrollable_area_->IsActive(); |
115 } | 115 } |
116 | 116 |
117 bool Scrollbar::IsLeftSideVerticalScrollbar() const { | 117 bool Scrollbar::IsLeftSideVerticalScrollbar() const { |
118 if (orientation_ == kVerticalScrollbar && scrollable_area_) | 118 if (orientation_ == kVerticalScrollbar && scrollable_area_) |
119 return scrollable_area_->ShouldPlaceVerticalScrollbarOnLeft(); | 119 return scrollable_area_->ShouldPlaceVerticalScrollbarOnLeft(); |
120 return false; | 120 return false; |
121 } | 121 } |
122 | 122 |
123 void Scrollbar::OffsetDidChange() { | 123 void Scrollbar::OffsetDidChange() { |
124 ASSERT(scrollable_area_); | 124 DCHECK(scrollable_area_); |
125 | 125 |
126 float position = ScrollableAreaCurrentPos(); | 126 float position = ScrollableAreaCurrentPos(); |
127 if (position == current_pos_) | 127 if (position == current_pos_) |
128 return; | 128 return; |
129 | 129 |
130 float old_position = current_pos_; | 130 float old_position = current_pos_; |
131 int old_thumb_position = GetTheme().ThumbPosition(*this); | 131 int old_thumb_position = GetTheme().ThumbPosition(*this); |
132 current_pos_ = position; | 132 current_pos_ = position; |
133 | 133 |
134 ScrollbarPart invalid_parts = | 134 ScrollbarPart invalid_parts = |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 invalid_parts = kAllParts; | 637 invalid_parts = kAllParts; |
638 if (invalid_parts & ~kThumbPart) | 638 if (invalid_parts & ~kThumbPart) |
639 track_needs_repaint_ = true; | 639 track_needs_repaint_ = true; |
640 if (invalid_parts & kThumbPart) | 640 if (invalid_parts & kThumbPart) |
641 thumb_needs_repaint_ = true; | 641 thumb_needs_repaint_ = true; |
642 if (scrollable_area_) | 642 if (scrollable_area_) |
643 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation()); | 643 scrollable_area_->SetScrollbarNeedsPaintInvalidation(Orientation()); |
644 } | 644 } |
645 | 645 |
646 } // namespace blink | 646 } // namespace blink |
OLD | NEW |