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 FixedPositionDisplayItem_h | 5 #ifndef FixedPositionDisplayItem_h |
6 #define FixedPositionDisplayItem_h | 6 #define FixedPositionDisplayItem_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/FastAllocBase.h" | 10 #include "wtf/FastAllocBase.h" |
11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class PLATFORM_EXPORT BeginFixedPositionDisplayItem : public PairedBeginDisplayI
tem { | 15 class PLATFORM_EXPORT BeginFixedPositionDisplayItem : public PairedBeginDisplayI
tem { |
16 public: | 16 public: |
17 BeginFixedPositionDisplayItem(const DisplayItemClientWrapper& client) | 17 BeginFixedPositionDisplayItem(const DisplayItemClientWrapper& client) |
18 : PairedBeginDisplayItem(client, BeginFixedPosition) { } | 18 : PairedBeginDisplayItem(client, BeginFixedPosition) { } |
19 | 19 |
20 virtual void replay(GraphicsContext&) override final { } | 20 void replay(GraphicsContext&) final { } |
21 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; | 21 void appendToWebDisplayItemList(WebDisplayItemList*) const final; |
22 }; | 22 }; |
23 | 23 |
24 class PLATFORM_EXPORT EndFixedPositionDisplayItem : public PairedEndDisplayItem
{ | 24 class PLATFORM_EXPORT EndFixedPositionDisplayItem : public PairedEndDisplayItem
{ |
25 public: | 25 public: |
26 EndFixedPositionDisplayItem(const DisplayItemClientWrapper& client) | 26 EndFixedPositionDisplayItem(const DisplayItemClientWrapper& client) |
27 : PairedEndDisplayItem(client, EndFixedPosition) { } | 27 : PairedEndDisplayItem(client, EndFixedPosition) { } |
28 | 28 |
29 virtual void replay(GraphicsContext&) override final { } | 29 void replay(GraphicsContext&) final { } |
30 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; | 30 void appendToWebDisplayItemList(WebDisplayItemList*) const final; |
31 | 31 |
32 private: | 32 private: |
33 #if ENABLE(ASSERT) | 33 #if ENABLE(ASSERT) |
34 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginFixedPosition; } | 34 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginFixedPosition; } |
35 #endif | 35 #endif |
36 }; | 36 }; |
37 | 37 |
38 } // namespace blink | 38 } // namespace blink |
39 | 39 |
40 #endif // FixedPositionDisplayItem_h | 40 #endif // FixedPositionDisplayItem_h |
OLD | NEW |