Index: Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h |
diff --git a/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h b/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d821815d4cf4b05d96068f35d100ef7c7d0b61fe |
--- /dev/null |
+++ b/Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h |
@@ -0,0 +1,45 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef RenderMultiColumnSpannerPlaceholder_h |
+#define RenderMultiColumnSpannerPlaceholder_h |
+ |
+#include "core/rendering/RenderMultiColumnFlowThread.h" |
+ |
+namespace blink { |
+ |
+// Placeholder renderer for column-span:all elements. The column-span:all renderer itself is a |
+// descendant of the flow thread, but due to its out-of-flow nature, we need something on the |
+// outside to take care of its positioning and sizing. RenderMultiColumnSpannerPlaceholder objects |
+// are siblings of RenderMultiColumnSet objects, i.e. direct children of the multicol container. |
+class RenderMultiColumnSpannerPlaceholder final : public RenderBox { |
+public: |
+ virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectRenderMultiColumnSpannerPlaceholder || RenderBox::isOfType(type); } |
+ |
+ static RenderMultiColumnSpannerPlaceholder* createAnonymous(RenderStyle* parentStyle, RenderBox*); |
+ |
+ RenderFlowThread* flowThread() const { return toRenderBlockFlow(parent())->multiColumnFlowThread(); } |
+ |
+ RenderBox* rendererInFlowThread() const { return m_rendererInFlowThread; } |
+ void setRendererInFlowThread(RenderBox* renderer) { m_rendererInFlowThread = renderer; } |
+ void spannerWillBeRemoved(); |
+ |
+protected: |
+ virtual void willBeRemovedFromTree() override; |
+ virtual bool needsPreferredWidthsRecalculation() const override; |
+ virtual void layout() override; |
+ virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override; |
+ virtual const char* renderName() const override; |
+ |
+private: |
+ RenderMultiColumnSpannerPlaceholder(RenderBox*); |
+ |
+ RenderBox* m_rendererInFlowThread; // The actual column-span:all renderer inside the flow thread. |
+}; |
+ |
+DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSpannerPlaceholder, isRenderMultiColumnSpannerPlaceholder()); |
+ |
+} // namespace blink |
+ |
+#endif |