OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef FixedPositionContainerDisplayItem_h | 5 #ifndef FixedPositionContainerDisplayItem_h |
6 #define FixedPositionContainerDisplayItem_h | 6 #define FixedPositionContainerDisplayItem_h |
7 | 7 |
8 #include "platform/geometry/LayoutSize.h" | 8 #include "platform/geometry/LayoutSize.h" |
9 #include "platform/graphics/paint/DisplayItem.h" | 9 #include "platform/graphics/paint/DisplayItem.h" |
10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class PLATFORM_EXPORT BeginFixedPositionContainerDisplayItem final : public Pair
edBeginDisplayItem { | 14 class PLATFORM_EXPORT BeginFixedPositionContainerDisplayItem final : public Pair
edBeginDisplayItem { |
15 public: | 15 public: |
16 BeginFixedPositionContainerDisplayItem(const DisplayItemClientWrapper& clien
t) | 16 BeginFixedPositionContainerDisplayItem(const DisplayItemClient& client) |
17 : PairedBeginDisplayItem(client, BeginFixedPositionContainer, sizeof(*th
is)) { } | 17 : PairedBeginDisplayItem(client, BeginFixedPositionContainer, sizeof(*th
is)) { } |
18 | 18 |
19 void replay(GraphicsContext&) const final { } | 19 void replay(GraphicsContext&) const final { } |
20 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal; | 20 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal; |
21 }; | 21 }; |
22 | 22 |
23 class PLATFORM_EXPORT EndFixedPositionContainerDisplayItem final : public Paired
EndDisplayItem { | 23 class PLATFORM_EXPORT EndFixedPositionContainerDisplayItem final : public Paired
EndDisplayItem { |
24 public: | 24 public: |
25 EndFixedPositionContainerDisplayItem(const DisplayItemClientWrapper& client) | 25 EndFixedPositionContainerDisplayItem(const DisplayItemClient& client) |
26 : PairedEndDisplayItem(client, EndFixedPositionContainer, sizeof(*this))
{ } | 26 : PairedEndDisplayItem(client, EndFixedPositionContainer, sizeof(*this))
{ } |
27 | 27 |
28 void replay(GraphicsContext&) const final { } | 28 void replay(GraphicsContext&) const final { } |
29 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal; | 29 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f
inal; |
30 | 30 |
31 private: | 31 private: |
32 #if ENABLE(ASSERT) | 32 #if ENABLE(ASSERT) |
33 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginFixedPositionContainer; } | 33 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginFixedPositionContainer; } |
34 #endif | 34 #endif |
35 }; | 35 }; |
36 | 36 |
37 } // namespace blink | 37 } // namespace blink |
38 | 38 |
39 #endif // FixedPositionContainerDisplayItem_h | 39 #endif // FixedPositionContainerDisplayItem_h |
OLD | NEW |