Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Unified Diff: Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h

Issue 789433006: [New Multicolumn] Let a spanner's containing block be the multicol container. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Compiling release: paint invalidation state is cleared in the super class anyway. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698