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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 int oldThickness = isHorizontal ? height() : width(); | 197 int oldThickness = isHorizontal ? height() : width(); |
198 int newThickness = 0; | 198 int newThickness = 0; |
199 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); | 199 RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart); |
200 if (part) { | 200 if (part) { |
201 part->layout(); | 201 part->layout(); |
202 newThickness = isHorizontal ? part->height() : part->width(); | 202 newThickness = isHorizontal ? part->height() : part->width(); |
203 } | 203 } |
204 | 204 |
205 if (newThickness != oldThickness) { | 205 if (newThickness != oldThickness) { |
206 setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThi
ckness, isHorizontal ? newThickness : height()))); | 206 setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThi
ckness, isHorizontal ? newThickness : height()))); |
207 if (RenderBox* box = owningRenderer()) | 207 if (RenderBox* box = owningRenderer()) { |
| 208 if (box->isRenderBlock()) |
| 209 toRenderBlock(box)->notifyScrollbarThicknessChanged(); |
208 box->setChildNeedsLayout(); | 210 box->setChildNeedsLayout(); |
| 211 } |
209 } | 212 } |
210 } | 213 } |
211 | 214 |
212 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) | 215 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) |
213 { | 216 { |
214 switch (part) { | 217 switch (part) { |
215 case BackButtonStartPart: | 218 case BackButtonStartPart: |
216 case ForwardButtonStartPart: | 219 case ForwardButtonStartPart: |
217 case BackButtonEndPart: | 220 case BackButtonEndPart: |
218 case ForwardButtonEndPart: | 221 case ForwardButtonEndPart: |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 int RenderScrollbar::minimumThumbLength() | 361 int RenderScrollbar::minimumThumbLength() |
359 { | 362 { |
360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 363 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
361 if (!partRenderer) | 364 if (!partRenderer) |
362 return 0; | 365 return 0; |
363 partRenderer->layout(); | 366 partRenderer->layout(); |
364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 367 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
365 } | 368 } |
366 | 369 |
367 } | 370 } |
OLD | NEW |