| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 RenderScrollbarPart* RenderScrollbarPart::createAnonymous(Document* document, Re
nderScrollbar* scrollbar, ScrollbarPart part) | 50 RenderScrollbarPart* RenderScrollbarPart::createAnonymous(Document* document, Re
nderScrollbar* scrollbar, ScrollbarPart part) |
| 51 { | 51 { |
| 52 RenderScrollbarPart* renderer = new RenderScrollbarPart(scrollbar, part); | 52 RenderScrollbarPart* renderer = new RenderScrollbarPart(scrollbar, part); |
| 53 renderer->setDocumentForAnonymous(document); | 53 renderer->setDocumentForAnonymous(document); |
| 54 return renderer; | 54 return renderer; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void RenderScrollbarPart::layout() | 57 void RenderScrollbarPart::layout() |
| 58 { | 58 { |
| 59 setMayNeedInvalidation(true); |
| 59 setLocation(LayoutPoint()); // We don't worry about positioning ourselves. W
e're just determining our minimum width/height. | 60 setLocation(LayoutPoint()); // We don't worry about positioning ourselves. W
e're just determining our minimum width/height. |
| 60 if (m_scrollbar->orientation() == HorizontalScrollbar) | 61 if (m_scrollbar->orientation() == HorizontalScrollbar) |
| 61 layoutHorizontalPart(); | 62 layoutHorizontalPart(); |
| 62 else | 63 else |
| 63 layoutVerticalPart(); | 64 layoutVerticalPart(); |
| 64 | 65 |
| 65 clearNeedsLayout(); | 66 clearNeedsLayout(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void RenderScrollbarPart::layoutHorizontalPart() | 69 void RenderScrollbarPart::layoutHorizontalPart() |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 196 } |
| 196 | 197 |
| 197 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const | 198 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const |
| 198 { | 199 { |
| 199 if (!m_scrollbar) | 200 if (!m_scrollbar) |
| 200 return 0; | 201 return 0; |
| 201 return m_scrollbar->owningRenderer(); | 202 return m_scrollbar->owningRenderer(); |
| 202 } | 203 } |
| 203 | 204 |
| 204 } | 205 } |
| OLD | NEW |