OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef RenderMultiColumnSpannerSet_h |
| 6 #define RenderMultiColumnSpannerSet_h |
| 7 |
| 8 #include "core/rendering/RenderMultiColumnSet.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // "Column" set for column-span:all elements. Positions the portion of the flow
thread that a |
| 13 // spanner takes up. The actual renderer that sets column-span all is laid out a
s part of flow |
| 14 // thread layout (although it cannot use the flow thread width when calculating
its own with; it has |
| 15 // to pretend that the containing block is the multicol container, not the flow |
| 16 // thread). RenderMultiColumnSpannerSet just makes sure that it's positioned cor
rectly among other |
| 17 // column sets, within the multicol container. |
| 18 // |
| 19 // FIXME: should consider not inheriting from RenderMultiColumnSet (but rather f
rom some common base |
| 20 // class). Most of what's in RenderMultiColumnSet is of no interest to us. |
| 21 class RenderMultiColumnSpannerSet FINAL : public RenderMultiColumnSet { |
| 22 public: |
| 23 virtual bool isRenderMultiColumnSpannerSet() const OVERRIDE { return true; } |
| 24 |
| 25 static RenderMultiColumnSpannerSet* createAnonymous(RenderMultiColumnFlowThr
ead*, RenderStyle* parentStyle, RenderBox*); |
| 26 |
| 27 RenderBox* rendererInFlowThread() const { return m_rendererInFlowThread; } |
| 28 |
| 29 // Copy margin properties from the column-span:all renderer to this spanner
set. Block direction |
| 30 // margins on column spanners are not to collapse with anything in the adjac
ent columns. Having |
| 31 // to worry about that in general block layout code inside the flow thread w
ould be complex and |
| 32 // messy, so they are applied on the spanner set instead, and ignored on the
actual |
| 33 // column-span:all renderer during flow thread layout. |
| 34 void updateMarginProperties(); |
| 35 |
| 36 protected: |
| 37 virtual bool recalculateColumnHeight(BalancedHeightCalculation) OVERRIDE; |
| 38 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
| 39 virtual LayoutUnit pageLogicalHeight() const OVERRIDE; |
| 40 virtual const char* renderName() const OVERRIDE; |
| 41 |
| 42 private: |
| 43 RenderMultiColumnSpannerSet(RenderMultiColumnFlowThread*, RenderBox*); |
| 44 |
| 45 RenderBox* m_rendererInFlowThread; // The actual column-span:all renderer in
side the flow thread. |
| 46 }; |
| 47 |
| 48 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSpannerSet, isRenderMultiColumn
SpannerSet()); |
| 49 |
| 50 } // namespace blink |
| 51 |
| 52 #endif |
OLD | NEW |