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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return s_styleResolveScrollbar; | 142 return s_styleResolveScrollbar; |
143 } | 143 } |
144 | 144 |
145 ScrollbarPart RenderScrollbar::partForStyleResolve() | 145 ScrollbarPart RenderScrollbar::partForStyleResolve() |
146 { | 146 { |
147 return s_styleResolvePart; | 147 return s_styleResolvePart; |
148 } | 148 } |
149 | 149 |
150 PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
artType, PseudoId pseudoId) | 150 PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
artType, PseudoId pseudoId) |
151 { | 151 { |
152 if (!m_owner) | 152 if (!owningRenderer()) |
153 return 0; | 153 return 0; |
154 | 154 |
155 s_styleResolvePart = partType; | 155 s_styleResolvePart = partType; |
156 s_styleResolveScrollbar = this; | 156 s_styleResolveScrollbar = this; |
157 RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(pseudo
Id, owningRenderer()->style()); | 157 RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(pseudo
Id, owningRenderer()->style()); |
158 s_styleResolvePart = NoPart; | 158 s_styleResolvePart = NoPart; |
159 s_styleResolveScrollbar = 0; | 159 s_styleResolveScrollbar = 0; |
160 | 160 |
161 // Scrollbars for root frames should always have background color | 161 // Scrollbars for root frames should always have background color |
162 // unless explicitly specified as transparent. So we force it. | 162 // unless explicitly specified as transparent. So we force it. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 int RenderScrollbar::minimumThumbLength() | 357 int RenderScrollbar::minimumThumbLength() |
358 { | 358 { |
359 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 359 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
360 if (!partRenderer) | 360 if (!partRenderer) |
361 return 0; | 361 return 0; |
362 partRenderer->layout(); | 362 partRenderer->layout(); |
363 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 363 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
364 } | 364 } |
365 | 365 |
366 } | 366 } |
OLD | NEW |