| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 RenderBox* RenderScrollbar::owningRenderer() const | 81 RenderBox* RenderScrollbar::owningRenderer() const |
| 82 { | 82 { |
| 83 if (m_owningFrame) { | 83 if (m_owningFrame) { |
| 84 RenderBox* currentRenderer = m_owningFrame->ownerRenderer(); | 84 RenderBox* currentRenderer = m_owningFrame->ownerRenderer(); |
| 85 return currentRenderer; | 85 return currentRenderer; |
| 86 } | 86 } |
| 87 return m_owner && m_owner->renderer() ? m_owner->renderer()->enclosingBox()
: 0; | 87 return m_owner && m_owner->renderer() ? m_owner->renderer()->enclosingBox()
: 0; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void RenderScrollbar::setParent(ScrollView* parent) | 90 void RenderScrollbar::setParent(Widget* parent) |
| 91 { | 91 { |
| 92 Scrollbar::setParent(parent); | 92 Scrollbar::setParent(parent); |
| 93 if (!parent) { | 93 if (!parent) { |
| 94 // Destroy all of the scrollbar's RenderBoxes. | 94 // Destroy all of the scrollbar's RenderBoxes. |
| 95 updateScrollbarParts(true); | 95 updateScrollbarParts(true); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 void RenderScrollbar::setEnabled(bool e) | 99 void RenderScrollbar::setEnabled(bool e) |
| 100 { | 100 { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 int RenderScrollbar::minimumThumbLength() | 350 int RenderScrollbar::minimumThumbLength() |
| 351 { | 351 { |
| 352 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 352 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
| 353 if (!partRenderer) | 353 if (!partRenderer) |
| 354 return 0; | 354 return 0; |
| 355 partRenderer->layout(); | 355 partRenderer->layout(); |
| 356 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 356 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
| 357 } | 357 } |
| 358 | 358 |
| 359 } | 359 } |
| OLD | NEW |