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

Side by Side Diff: Source/core/layout/LayoutMultiColumnSpannerPlaceholder.h

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 LayoutMultiColumnSpannerPlaceholder_h 5 #ifndef LayoutMultiColumnSpannerPlaceholder_h
6 #define LayoutMultiColumnSpannerPlaceholder_h 6 #define LayoutMultiColumnSpannerPlaceholder_h
7 7
8 #include "core/layout/LayoutMultiColumnFlowThread.h" 8 #include "core/layout/LayoutMultiColumnFlowThread.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // Placeholder renderer for column-span:all elements. The column-span:all render er itself is a 12 // Placeholder renderer for column-span:all elements. The column-span:all render er itself is a
13 // descendant of the flow thread, but due to its out-of-flow nature, we need som ething on the 13 // descendant of the flow thread, but due to its out-of-flow nature, we need som ething on the
14 // outside to take care of its positioning and sizing. LayoutMultiColumnSpannerP laceholder objects 14 // outside to take care of its positioning and sizing. LayoutMultiColumnSpannerP laceholder objects
15 // are siblings of LayoutMultiColumnSet objects, i.e. direct children of the mul ticol container. 15 // are siblings of LayoutMultiColumnSet objects, i.e. direct children of the mul ticol container.
16 class LayoutMultiColumnSpannerPlaceholder final : public RenderBox { 16 class LayoutMultiColumnSpannerPlaceholder final : public LayoutBox {
17 public: 17 public:
18 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutMultiColumnSpannerPlaceholder || RenderBox::isOfType(type); } 18 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutMultiColumnSpannerPlaceholder || LayoutBox::isOfType(type); }
19 19
20 static LayoutMultiColumnSpannerPlaceholder* createAnonymous(const LayoutStyl e& parentStyle, RenderBox&); 20 static LayoutMultiColumnSpannerPlaceholder* createAnonymous(const LayoutStyl e& parentStyle, LayoutBox&);
21 21
22 LayoutFlowThread* flowThread() const { return toRenderBlockFlow(parent())->m ultiColumnFlowThread(); } 22 LayoutFlowThread* flowThread() const { return toRenderBlockFlow(parent())->m ultiColumnFlowThread(); }
23 23
24 RenderBox* rendererInFlowThread() const { return m_rendererInFlowThread; } 24 LayoutBox* rendererInFlowThread() const { return m_rendererInFlowThread; }
25 void updateMarginProperties(); 25 void updateMarginProperties();
26 26
27 protected: 27 protected:
28 virtual void willBeRemovedFromTree() override; 28 virtual void willBeRemovedFromTree() override;
29 virtual bool needsPreferredWidthsRecalculation() const override; 29 virtual bool needsPreferredWidthsRecalculation() const override;
30 virtual LayoutUnit minPreferredLogicalWidth() const override; 30 virtual LayoutUnit minPreferredLogicalWidth() const override;
31 virtual LayoutUnit maxPreferredLogicalWidth() const override; 31 virtual LayoutUnit maxPreferredLogicalWidth() const override;
32 virtual void layout() override; 32 virtual void layout() override;
33 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 33 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
34 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override; 34 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override;
35 virtual void paint(const PaintInfo&, const LayoutPoint& paintOffset) overrid e; 35 virtual void paint(const PaintInfo&, const LayoutPoint& paintOffset) overrid e;
36 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override; 36 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override;
37 virtual const char* renderName() const override; 37 virtual const char* renderName() const override;
38 38
39 private: 39 private:
40 LayoutMultiColumnSpannerPlaceholder(RenderBox*); 40 LayoutMultiColumnSpannerPlaceholder(LayoutBox*);
41 41
42 RenderBox* m_rendererInFlowThread; // The actual column-span:all renderer in side the flow thread. 42 LayoutBox* m_rendererInFlowThread; // The actual column-span:all renderer in side the flow thread.
43 }; 43 };
44 44
45 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSpannerPlaceholder, isLayoutMul tiColumnSpannerPlaceholder()); 45 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSpannerPlaceholder, isLayoutMul tiColumnSpannerPlaceholder());
46 46
47 } // namespace blink 47 } // namespace blink
48 48
49 #endif 49 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnSet.cpp ('k') | Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698