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