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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 protected: | 84 protected: |
85 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) override; | 85 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) override; |
86 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; | 86 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; |
87 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; | 87 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; |
88 | 88 |
89 private: | 89 private: |
90 LayoutScrollbarPart(ScrollableArea*, LayoutScrollbar*, ScrollbarPart); | 90 LayoutScrollbarPart(ScrollableArea*, LayoutScrollbar*, ScrollbarPart); |
91 | 91 |
92 void computePreferredLogicalWidths() override; | 92 void computePreferredLogicalWidths() override; |
93 | 93 |
94 // Have all padding getters return 0. The important point here is to avoid res
olving percents | 94 // Have all padding getters return 0. The important point here is to avoid |
95 // against the containing block, since scroll bar corners don't always have on
e (so it would | 95 // resolving percents against the containing block, since scroll bar corners |
96 // crash). Scroll bar corners are not actually laid out, and they don't have c
hild content, so | 96 // don't always have one (so it would crash). Scroll bar corners are not |
97 // what we return here doesn't really matter. | 97 // actually laid out, and they don't have child content, so what we return |
| 98 // here doesn't really matter. |
98 LayoutUnit paddingTop() const override { return LayoutUnit(); } | 99 LayoutUnit paddingTop() const override { return LayoutUnit(); } |
99 LayoutUnit paddingBottom() const override { return LayoutUnit(); } | 100 LayoutUnit paddingBottom() const override { return LayoutUnit(); } |
100 LayoutUnit paddingLeft() const override { return LayoutUnit(); } | 101 LayoutUnit paddingLeft() const override { return LayoutUnit(); } |
101 LayoutUnit paddingRight() const override { return LayoutUnit(); } | 102 LayoutUnit paddingRight() const override { return LayoutUnit(); } |
102 LayoutUnit paddingBefore() const override { return LayoutUnit(); } | 103 LayoutUnit paddingBefore() const override { return LayoutUnit(); } |
103 LayoutUnit paddingAfter() const override { return LayoutUnit(); } | 104 LayoutUnit paddingAfter() const override { return LayoutUnit(); } |
104 LayoutUnit paddingStart() const override { return LayoutUnit(); } | 105 LayoutUnit paddingStart() const override { return LayoutUnit(); } |
105 LayoutUnit paddingEnd() const override { return LayoutUnit(); } | 106 LayoutUnit paddingEnd() const override { return LayoutUnit(); } |
106 | 107 |
107 void layoutHorizontalPart(); | 108 void layoutHorizontalPart(); |
108 void layoutVerticalPart(); | 109 void layoutVerticalPart(); |
109 | 110 |
110 void computeScrollbarWidth(); | 111 void computeScrollbarWidth(); |
111 void computeScrollbarHeight(); | 112 void computeScrollbarHeight(); |
112 | 113 |
113 void setNeedsPaintInvalidation(); | 114 void setNeedsPaintInvalidation(); |
114 | 115 |
115 bool allowsOverflowClip() const override { return false; } | 116 bool allowsOverflowClip() const override { return false; } |
116 | 117 |
117 UntracedMember<ScrollableArea> m_scrollableArea; | 118 UntracedMember<ScrollableArea> m_scrollableArea; |
118 UntracedMember<LayoutScrollbar> m_scrollbar; | 119 UntracedMember<LayoutScrollbar> m_scrollbar; |
119 ScrollbarPart m_part; | 120 ScrollbarPart m_part; |
120 }; | 121 }; |
121 | 122 |
122 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutScrollbarPart, isLayoutScrollbarPart()); | 123 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutScrollbarPart, isLayoutScrollbarPart()); |
123 | 124 |
124 } // namespace blink | 125 } // namespace blink |
125 | 126 |
126 #endif // LayoutScrollbarPart_h | 127 #endif // LayoutScrollbarPart_h |
OLD | NEW |