Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / platform / graphics / paint / FixedPositionContainerDisplayItem.h
blob8669ea9abf35e364abc3015151a4c6fffb071b5a
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
3 // found in the LICENSE file.
5 #ifndef FixedPositionContainerDisplayItem_h
6 #define FixedPositionContainerDisplayItem_h
8 #include "platform/geometry/LayoutSize.h"
9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "wtf/PassOwnPtr.h"
12 namespace blink {
14 class PLATFORM_EXPORT BeginFixedPositionContainerDisplayItem final : public PairedBeginDisplayItem {
15 public:
16 BeginFixedPositionContainerDisplayItem(const DisplayItemClientWrapper& client)
17 : PairedBeginDisplayItem(client, BeginFixedPositionContainer, sizeof(*this)) { }
19 void replay(GraphicsContext&) final { }
20 void appendToWebDisplayItemList(WebDisplayItemList*) const final;
23 class PLATFORM_EXPORT EndFixedPositionContainerDisplayItem final : public PairedEndDisplayItem {
24 public:
25 EndFixedPositionContainerDisplayItem(const DisplayItemClientWrapper& client)
26 : PairedEndDisplayItem(client, EndFixedPositionContainer, sizeof(*this)) { }
28 void replay(GraphicsContext&) final { }
29 void appendToWebDisplayItemList(WebDisplayItemList*) const final;
31 private:
32 #if ENABLE(ASSERT)
33 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return otherType == BeginFixedPositionContainer; }
34 #endif
37 } // namespace blink
39 #endif // FixedPositionContainerDisplayItem_h