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 box->setCustomScrollbarThicknessChanged(true); |
208 box->setChildNeedsLayout(); | 209 box->setChildNeedsLayout(); |
| 210 } |
209 } | 211 } |
210 } | 212 } |
211 | 213 |
212 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) | 214 static PseudoId pseudoForScrollbarPart(ScrollbarPart part) |
213 { | 215 { |
214 switch (part) { | 216 switch (part) { |
215 case BackButtonStartPart: | 217 case BackButtonStartPart: |
216 case ForwardButtonStartPart: | 218 case ForwardButtonStartPart: |
217 case BackButtonEndPart: | 219 case BackButtonEndPart: |
218 case ForwardButtonEndPart: | 220 case ForwardButtonEndPart: |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 int RenderScrollbar::minimumThumbLength() | 360 int RenderScrollbar::minimumThumbLength() |
359 { | 361 { |
360 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 362 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
361 if (!partRenderer) | 363 if (!partRenderer) |
362 return 0; | 364 return 0; |
363 partRenderer->layout(); | 365 partRenderer->layout(); |
364 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 366 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
365 } | 367 } |
366 | 368 |
367 } | 369 } |
OLD | NEW |