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

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

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix ref in test. Tables don't do subpixel, and that made a difference on Windows and Mac. Created 6 years, 2 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
(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 isOfType(RenderObjectType type) const override { return type == RenderObjectRenderMultiColumnSpannerSet || RenderMultiColumnSet::isOfType(type) ; }
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderMultiColumnSpannerSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698