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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 ~LayoutScrollbarPart() override; | 43 ~LayoutScrollbarPart() override; |
44 | 44 |
45 const char* name() const override { return "LayoutScrollbarPart"; } | 45 const char* name() const override { return "LayoutScrollbarPart"; } |
46 | 46 |
47 PaintLayerType layerTypeRequired() const override { return NoPaintLayer; } | 47 PaintLayerType layerTypeRequired() const override { return NoPaintLayer; } |
48 | 48 |
49 void layout() override; | 49 void layout() override; |
50 | 50 |
51 // Scrollbar parts needs to be rendered at device pixel boundaries. | 51 // Scrollbar parts needs to be rendered at device pixel boundaries. |
52 LayoutRectOutsets marginBoxOutsets() const override { | 52 LayoutRectOutsets marginBoxOutsets() const override { |
53 ASSERT(isIntegerValue(LayoutBlock::marginBoxOutsets().top())); | 53 DCHECK(isIntegerValue(LayoutBlock::marginBoxOutsets().top())); |
54 return LayoutBlock::marginBoxOutsets(); | 54 return LayoutBlock::marginBoxOutsets(); |
55 } | 55 } |
56 LayoutUnit marginTop() const override { | 56 LayoutUnit marginTop() const override { |
57 ASSERT(isIntegerValue(LayoutBlock::marginTop())); | 57 DCHECK(isIntegerValue(LayoutBlock::marginTop())); |
58 return LayoutBlock::marginTop(); | 58 return LayoutBlock::marginTop(); |
59 } | 59 } |
60 LayoutUnit marginBottom() const override { | 60 LayoutUnit marginBottom() const override { |
61 ASSERT(isIntegerValue(LayoutBlock::marginBottom())); | 61 DCHECK(isIntegerValue(LayoutBlock::marginBottom())); |
62 return LayoutBlock::marginBottom(); | 62 return LayoutBlock::marginBottom(); |
63 } | 63 } |
64 LayoutUnit marginLeft() const override { | 64 LayoutUnit marginLeft() const override { |
65 ASSERT(isIntegerValue(LayoutBlock::marginLeft())); | 65 DCHECK(isIntegerValue(LayoutBlock::marginLeft())); |
66 return LayoutBlock::marginLeft(); | 66 return LayoutBlock::marginLeft(); |
67 } | 67 } |
68 LayoutUnit marginRight() const override { | 68 LayoutUnit marginRight() const override { |
69 ASSERT(isIntegerValue(LayoutBlock::marginRight())); | 69 DCHECK(isIntegerValue(LayoutBlock::marginRight())); |
70 return LayoutBlock::marginRight(); | 70 return LayoutBlock::marginRight(); |
71 } | 71 } |
72 | 72 |
73 bool isOfType(LayoutObjectType type) const override { | 73 bool isOfType(LayoutObjectType type) const override { |
74 return type == LayoutObjectLayoutScrollbarPart || | 74 return type == LayoutObjectLayoutScrollbarPart || |
75 LayoutBlock::isOfType(type); | 75 LayoutBlock::isOfType(type); |
76 } | 76 } |
77 LayoutObject* scrollbarStyleSource() const; | 77 LayoutObject* scrollbarStyleSource() const; |
78 | 78 |
79 // Must call setStyleWithWritingModeOfParent() instead. | 79 // Must call setStyleWithWritingModeOfParent() instead. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 UntracedMember<ScrollableArea> m_scrollableArea; | 120 UntracedMember<ScrollableArea> m_scrollableArea; |
121 UntracedMember<LayoutScrollbar> m_scrollbar; | 121 UntracedMember<LayoutScrollbar> m_scrollbar; |
122 ScrollbarPart m_part; | 122 ScrollbarPart m_part; |
123 }; | 123 }; |
124 | 124 |
125 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutScrollbarPart, isLayoutScrollbarPart()); | 125 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutScrollbarPart, isLayoutScrollbarPart()); |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
128 | 128 |
129 #endif // LayoutScrollbarPart_h | 129 #endif // LayoutScrollbarPart_h |
OLD | NEW |