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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 visitor->trace(m_owner); | 86 visitor->trace(m_owner); |
87 visitor->trace(m_owningFrame); | 87 visitor->trace(m_owningFrame); |
88 #endif | 88 #endif |
89 Scrollbar::trace(visitor); | 89 Scrollbar::trace(visitor); |
90 } | 90 } |
91 | 91 |
92 LayoutBox* LayoutScrollbar::owningRenderer() const | 92 LayoutBox* LayoutScrollbar::owningRenderer() const |
93 { | 93 { |
94 if (m_owningFrame) | 94 if (m_owningFrame) |
95 return m_owningFrame->ownerLayoutObject(); | 95 return m_owningFrame->ownerLayoutObject(); |
96 return m_owner && m_owner->renderer() ? m_owner->renderer()->enclosingBox()
: 0; | 96 return m_owner && m_owner->layoutObject() ? m_owner->layoutObject()->enclosi
ngBox() : 0; |
97 } | 97 } |
98 | 98 |
99 void LayoutScrollbar::setParent(Widget* parent) | 99 void LayoutScrollbar::setParent(Widget* parent) |
100 { | 100 { |
101 Scrollbar::setParent(parent); | 101 Scrollbar::setParent(parent); |
102 if (!parent) { | 102 if (!parent) { |
103 // Destroy all of the scrollbar's LayoutBoxes. | 103 // Destroy all of the scrollbar's LayoutBoxes. |
104 updateScrollbarParts(true); | 104 updateScrollbarParts(true); |
105 } | 105 } |
106 } | 106 } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 int LayoutScrollbar::minimumThumbLength() | 346 int LayoutScrollbar::minimumThumbLength() |
347 { | 347 { |
348 LayoutScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 348 LayoutScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
349 if (!partRenderer) | 349 if (!partRenderer) |
350 return 0; | 350 return 0; |
351 partRenderer->layout(); | 351 partRenderer->layout(); |
352 return orientation() == HorizontalScrollbar ? partRenderer->size().width() :
partRenderer->size().height(); | 352 return orientation() == HorizontalScrollbar ? partRenderer->size().width() :
partRenderer->size().height(); |
353 } | 353 } |
354 | 354 |
355 } | 355 } |
OLD | NEW |