| 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 WTF_MAKE_FAST_ALLOCATED(BeginFixedPositionDisplayItem); | |
| 17 public: | 16 public: |
| 18 static PassOwnPtr<BeginFixedPositionDisplayItem> create(const DisplayItemCli
entWrapper& client) | |
| 19 { | |
| 20 return adoptPtr(new BeginFixedPositionDisplayItem(client)); | |
| 21 } | |
| 22 | |
| 23 BeginFixedPositionDisplayItem(const DisplayItemClientWrapper& client) | |
| 24 : PairedBeginDisplayItem(client, BeginFixedPosition) | |
| 25 { | |
| 26 } | |
| 27 | |
| 28 virtual void replay(GraphicsContext&) override final { } | 17 virtual void replay(GraphicsContext&) override final { } |
| 29 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; | 18 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; |
| 30 }; | 19 }; |
| 31 | 20 |
| 32 class PLATFORM_EXPORT EndFixedPositionDisplayItem : public PairedEndDisplayItem
{ | 21 class PLATFORM_EXPORT EndFixedPositionDisplayItem : public PairedEndDisplayItem
{ |
| 33 WTF_MAKE_FAST_ALLOCATED(EndFixedPositionDisplayItem); | |
| 34 public: | 22 public: |
| 35 static PassOwnPtr<EndFixedPositionDisplayItem> create(const DisplayItemClien
tWrapper& client) | |
| 36 { | |
| 37 return adoptPtr(new EndFixedPositionDisplayItem(client)); | |
| 38 } | |
| 39 | |
| 40 EndFixedPositionDisplayItem(const DisplayItemClientWrapper& client) | |
| 41 : PairedEndDisplayItem(client, EndFixedPosition) | |
| 42 { | |
| 43 } | |
| 44 | |
| 45 virtual void replay(GraphicsContext&) override final { } | 23 virtual void replay(GraphicsContext&) override final { } |
| 46 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; | 24 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override
final; |
| 47 | 25 |
| 48 private: | 26 private: |
| 49 #if ENABLE(ASSERT) | 27 #if ENABLE(ASSERT) |
| 50 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginFixedPosition; } | 28 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginFixedPosition; } |
| 51 #endif | 29 #endif |
| 52 }; | 30 }; |
| 53 | 31 |
| 54 } // namespace blink | 32 } // namespace blink |
| 55 | 33 |
| 56 #endif // FixedPositionDisplayItem_h | 34 #endif // FixedPositionDisplayItem_h |
| OLD | NEW |