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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 return; | 98 return; |
99 | 99 |
100 ASSERT(m_scrollableArea); | 100 ASSERT(m_scrollableArea); |
101 if (m_orientation == VerticalScrollbar) | 101 if (m_orientation == VerticalScrollbar) |
102 m_animator->willRemoveVerticalScrollbar(this); | 102 m_animator->willRemoveVerticalScrollbar(this); |
103 else | 103 else |
104 m_animator->willRemoveHorizontalScrollbar(this); | 104 m_animator->willRemoveHorizontalScrollbar(this); |
105 #endif | 105 #endif |
106 } | 106 } |
107 | 107 |
108 void Scrollbar::setFrameRect(const IntRect& frameRect) | |
109 { | |
110 if (frameRect != this->frameRect()) { | |
Julien - ping for review
2015/02/25 01:43:36
We prefer early return whenever possible.
Xianzhu
2015/02/25 01:57:09
Done.
| |
111 invalidate(); | |
chrishtr
2015/02/24 22:38:42
Is this because widgets don't obey the standard wa
Xianzhu
2015/02/24 23:01:56
Yes. They are not LayoutObjects, so the normal pre
| |
112 Widget::setFrameRect(frameRect); | |
113 invalidate(); | |
114 } | |
115 } | |
116 | |
108 ScrollbarOverlayStyle Scrollbar::scrollbarOverlayStyle() const | 117 ScrollbarOverlayStyle Scrollbar::scrollbarOverlayStyle() const |
109 { | 118 { |
110 return m_scrollableArea ? m_scrollableArea->scrollbarOverlayStyle() : Scroll barOverlayStyleDefault; | 119 return m_scrollableArea ? m_scrollableArea->scrollbarOverlayStyle() : Scroll barOverlayStyleDefault; |
111 } | 120 } |
112 | 121 |
113 void Scrollbar::getTickmarks(Vector<IntRect>& tickmarks) const | 122 void Scrollbar::getTickmarks(Vector<IntRect>& tickmarks) const |
114 { | 123 { |
115 if (m_scrollableArea) | 124 if (m_scrollableArea) |
116 m_scrollableArea->getTickmarks(tickmarks); | 125 m_scrollableArea->getTickmarks(tickmarks); |
117 } | 126 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
555 | 564 |
556 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y(); | 565 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y(); |
557 } | 566 } |
558 | 567 |
559 DisplayItemClient Scrollbar::displayItemClient() const | 568 DisplayItemClient Scrollbar::displayItemClient() const |
560 { | 569 { |
561 return m_scrollableArea->displayItemClient(); | 570 return m_scrollableArea->displayItemClient(); |
562 } | 571 } |
563 | 572 |
564 } // namespace blink | 573 } // namespace blink |
OLD | NEW |