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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
62 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 62 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; |
63 | 63 |
64 private: | 64 private: |
65 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart); | 65 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart); |
66 | 66 |
67 virtual void computePreferredLogicalWidths() OVERRIDE; | 67 virtual void computePreferredLogicalWidths() OVERRIDE; |
68 | 68 |
69 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 69 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
70 | 70 |
| 71 // Have all padding getters return 0. The important point here is to avoid r
esolving percents |
| 72 // against the containing block, since scroll bar corners don't always have
one (so it would |
| 73 // crash). Scroll bar corners are not actually laid out, and they don't have
child content, so |
| 74 // what we return here doesn't really matter. |
| 75 virtual LayoutUnit paddingTop() const OVERRIDE { return LayoutUnit(); } |
| 76 virtual LayoutUnit paddingBottom() const OVERRIDE { return LayoutUnit(); } |
| 77 virtual LayoutUnit paddingLeft() const OVERRIDE { return LayoutUnit(); } |
| 78 virtual LayoutUnit paddingRight() const OVERRIDE { return LayoutUnit(); } |
| 79 virtual LayoutUnit paddingBefore() const OVERRIDE { return LayoutUnit(); } |
| 80 virtual LayoutUnit paddingAfter() const OVERRIDE { return LayoutUnit(); } |
| 81 virtual LayoutUnit paddingStart() const OVERRIDE { return LayoutUnit(); } |
| 82 virtual LayoutUnit paddingEnd() const OVERRIDE { return LayoutUnit(); } |
| 83 |
71 void layoutHorizontalPart(); | 84 void layoutHorizontalPart(); |
72 void layoutVerticalPart(); | 85 void layoutVerticalPart(); |
73 | 86 |
74 void computeScrollbarWidth(); | 87 void computeScrollbarWidth(); |
75 void computeScrollbarHeight(); | 88 void computeScrollbarHeight(); |
76 | 89 |
77 RenderScrollbar* m_scrollbar; | 90 RenderScrollbar* m_scrollbar; |
78 ScrollbarPart m_part; | 91 ScrollbarPart m_part; |
79 }; | 92 }; |
80 | 93 |
81 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart()); | 94 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart()); |
82 | 95 |
83 } // namespace WebCore | 96 } // namespace WebCore |
84 | 97 |
85 #endif // RenderScrollbarPart_h | 98 #endif // RenderScrollbarPart_h |
OLD | NEW |