OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 int oldThickness = isHorizontal ? height() : width(); | 188 int oldThickness = isHorizontal ? height() : width(); |
189 int newThickness = 0; | 189 int newThickness = 0; |
190 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); | 190 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); |
191 if (part) { | 191 if (part) { |
192 part->layout(); | 192 part->layout(); |
193 newThickness = isHorizontal ? part->height() : part->width(); | 193 newThickness = isHorizontal ? part->height() : part->width(); |
194 } | 194 } |
195 | 195 |
196 if (newThickness != oldThickness) { | 196 if (newThickness != oldThickness) { |
197 setFrameRect(IntRect(x(), y(), isHorizontal ? width() : newThickness, is
Horizontal ? newThickness : height())); | 197 setFrameRect(IntRect(x(), y(), isHorizontal ? width() : newThickness, is
Horizontal ? newThickness : height())); |
198 owningRenderer()->setChildNeedsLayout(true); | 198 if (RenderBox* box = owningRenderer()) |
| 199 box->setChildNeedsLayout(true); |
199 } | 200 } |
200 } | 201 } |
201 | 202 |
202 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) | 203 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) |
203 { | 204 { |
204 switch (part) { | 205 switch (part) { |
205 case BackButtonStartPart: | 206 case BackButtonStartPart: |
206 case ForwardButtonStartPart: | 207 case ForwardButtonStartPart: |
207 case BackButtonEndPart: | 208 case BackButtonEndPart: |
208 case ForwardButtonEndPart: | 209 case ForwardButtonEndPart: |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 int RenderScrollbar::minimumThumbLength() | 358 int RenderScrollbar::minimumThumbLength() |
358 { | 359 { |
359 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
360 if (!partRenderer) | 361 if (!partRenderer) |
361 return 0; | 362 return 0; |
362 partRenderer->layout(); | 363 partRenderer->layout(); |
363 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
364 } | 365 } |
365 | 366 |
366 } | 367 } |
OLD | NEW |