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

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

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 #include "config.h"
6 #include "core/rendering/RenderMultiColumnSpannerSet.h"
7
8 namespace blink {
9
10 static void copyMarginProperties(RenderStyle* destination, const RenderStyle* so urce)
11 {
12 destination->setMarginTop(source->marginTop());
13 destination->setMarginBottom(source->marginBottom());
14 destination->setMarginLeft(source->marginLeft());
15 destination->setMarginRight(source->marginRight());
16 }
17
18 RenderMultiColumnSpannerSet* RenderMultiColumnSpannerSet::createAnonymous(Render MultiColumnFlowThread* flowThread, RenderStyle* parentStyle, RenderBox* renderer InFlowThread)
19 {
20 RenderMultiColumnSpannerSet* newSpanner = new RenderMultiColumnSpannerSet(fl owThread, rendererInFlowThread);
21 Document& document = flowThread->document();
22 newSpanner->setDocumentForAnonymous(&document);
23 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parentStyle, BLOCK);
24 copyMarginProperties(newStyle.get(), rendererInFlowThread->style());
25 newSpanner->setStyle(newStyle);
26 return newSpanner;
27 }
28
29 RenderMultiColumnSpannerSet::RenderMultiColumnSpannerSet(RenderMultiColumnFlowTh read* flowThread, RenderBox* rendererInFlowThread)
30 : RenderMultiColumnSet(flowThread)
31 , m_rendererInFlowThread(rendererInFlowThread)
32 {
33 }
34
35 void RenderMultiColumnSpannerSet::updateMarginProperties()
36 {
37 RefPtr<RenderStyle> newStyle = RenderStyle::clone(style());
38 copyMarginProperties(newStyle.get(), m_rendererInFlowThread->style());
39 setStyle(newStyle);
40 }
41
42 bool RenderMultiColumnSpannerSet::recalculateColumnHeight(BalancedHeightCalculat ion calculationMode)
43 {
44 return false;
45 }
46
47 void RenderMultiColumnSpannerSet::computeLogicalHeight(LayoutUnit, LayoutUnit lo gicalTop, LogicalExtentComputedValues& computedValues) const
48 {
49 computedValues.m_extent = m_rendererInFlowThread->logicalHeight();
50 computedValues.m_position = logicalTop + m_rendererInFlowThread->marginTop() ;
51 computedValues.m_margins.m_before = marginBefore();
52 computedValues.m_margins.m_after = marginAfter();
53 }
54
55 LayoutUnit RenderMultiColumnSpannerSet::pageLogicalHeight() const
56 {
57 return m_rendererInFlowThread->logicalHeight();
58 }
59
60 const char* RenderMultiColumnSpannerSet::renderName() const
61 {
62 return "RenderMultiColumnSpannerSet";
63 }
64
65 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSpannerSet.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698