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

Side by Side Diff: Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h

Issue 879483002: [New Multicolumn] Intrinsic/preferred logical width calculation for spanners. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final code review Created 5 years, 11 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
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 RenderMultiColumnSpannerPlaceholder_h 5 #ifndef RenderMultiColumnSpannerPlaceholder_h
6 #define RenderMultiColumnSpannerPlaceholder_h 6 #define RenderMultiColumnSpannerPlaceholder_h
7 7
8 #include "core/rendering/RenderMultiColumnFlowThread.h" 8 #include "core/rendering/RenderMultiColumnFlowThread.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. RenderMultiColumnSpannerP laceholder objects 14 // outside to take care of its positioning and sizing. RenderMultiColumnSpannerP laceholder objects
15 // are siblings of RenderMultiColumnSet objects, i.e. direct children of the mul ticol container. 15 // are siblings of RenderMultiColumnSet objects, i.e. direct children of the mul ticol container.
16 class RenderMultiColumnSpannerPlaceholder final : public RenderBox { 16 class RenderMultiColumnSpannerPlaceholder final : public RenderBox {
17 public: 17 public:
18 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectRenderMultiColumnSpannerPlaceholder || RenderBox::isOfType(type); } 18 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectRenderMultiColumnSpannerPlaceholder || RenderBox::isOfType(type); }
19 19
20 static RenderMultiColumnSpannerPlaceholder* createAnonymous(RenderStyle* par entStyle, RenderBox*); 20 static RenderMultiColumnSpannerPlaceholder* createAnonymous(RenderStyle* par entStyle, RenderBox*);
21 21
22 RenderFlowThread* flowThread() const { return toRenderBlockFlow(parent())->m ultiColumnFlowThread(); } 22 RenderFlowThread* flowThread() const { return toRenderBlockFlow(parent())->m ultiColumnFlowThread(); }
23 23
24 RenderBox* rendererInFlowThread() const { return m_rendererInFlowThread; } 24 RenderBox* 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;
31 virtual LayoutUnit maxPreferredLogicalWidth() const override;
30 virtual void layout() override; 32 virtual void layout() override;
31 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 33 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
32 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override; 34 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override;
33 virtual void paint(const PaintInfo&, const LayoutPoint& paintOffset) overrid e; 35 virtual void paint(const PaintInfo&, const LayoutPoint& paintOffset) overrid e;
34 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;
35 virtual const char* renderName() const override; 37 virtual const char* renderName() const override;
36 38
37 private: 39 private:
38 RenderMultiColumnSpannerPlaceholder(RenderBox*); 40 RenderMultiColumnSpannerPlaceholder(RenderBox*);
39 41
40 RenderBox* m_rendererInFlowThread; // The actual column-span:all renderer in side the flow thread. 42 RenderBox* m_rendererInFlowThread; // The actual column-span:all renderer in side the flow thread.
41 }; 43 };
42 44
43 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSpannerPlaceholder, isRenderMul tiColumnSpannerPlaceholder()); 45 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSpannerPlaceholder, isRenderMul tiColumnSpannerPlaceholder());
44 46
45 } // namespace blink 47 } // namespace blink
46 48
47 #endif 49 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnFlowThread.cpp ('k') | Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698