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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 10 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 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/RenderMultiColumnSpannerPlaceholder.h" 6 #include "core/rendering/RenderMultiColumnSpannerPlaceholder.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 static void copyMarginProperties(RenderStyle* placeholderStyle, const RenderStyl e* spannerStyle) 10 static void copyMarginProperties(RenderStyle* placeholderStyle, const RenderStyl e* spannerStyle)
11 { 11 {
12 // We really only need the block direction margins, but there are no setters for that in 12 // We really only need the block direction margins, but there are no setters for that in
13 // RenderStyle. Just copy all margin sides. The inline ones don't matter any way. 13 // RenderStyle. Just copy all margin sides. The inline ones don't matter any way.
14 placeholderStyle->setMarginLeft(spannerStyle->marginLeft()); 14 placeholderStyle->setMarginLeft(spannerStyle->marginLeft());
15 placeholderStyle->setMarginRight(spannerStyle->marginRight()); 15 placeholderStyle->setMarginRight(spannerStyle->marginRight());
16 placeholderStyle->setMarginTop(spannerStyle->marginTop()); 16 placeholderStyle->setMarginTop(spannerStyle->marginTop());
17 placeholderStyle->setMarginBottom(spannerStyle->marginBottom()); 17 placeholderStyle->setMarginBottom(spannerStyle->marginBottom());
18 } 18 }
19 19
20 RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::create Anonymous(RenderStyle* parentStyle, RenderBox* rendererInFlowThread) 20 RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::create Anonymous(const RenderStyle* parentStyle, RenderBox* rendererInFlowThread)
21 { 21 {
22 RenderMultiColumnSpannerPlaceholder* newSpanner = new RenderMultiColumnSpann erPlaceholder(rendererInFlowThread); 22 RenderMultiColumnSpannerPlaceholder* newSpanner = new RenderMultiColumnSpann erPlaceholder(rendererInFlowThread);
23 Document& document = rendererInFlowThread->document(); 23 Document& document = rendererInFlowThread->document();
24 newSpanner->setDocumentForAnonymous(&document); 24 newSpanner->setDocumentForAnonymous(&document);
25 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parentStyle, BLOCK); 25 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parentStyle, BLOCK);
26 copyMarginProperties(newStyle.get(), rendererInFlowThread->style()); 26 copyMarginProperties(newStyle.get(), rendererInFlowThread->style());
27 newSpanner->setStyle(newStyle); 27 newSpanner->setStyle(newStyle);
28 return newSpanner; 28 return newSpanner;
29 } 29 }
30 30
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 { 108 {
109 return !m_rendererInFlowThread->hasSelfPaintingLayer() && m_rendererInFlowTh read->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, actio n); 109 return !m_rendererInFlowThread->hasSelfPaintingLayer() && m_rendererInFlowTh read->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, actio n);
110 } 110 }
111 111
112 const char* RenderMultiColumnSpannerPlaceholder::renderName() const 112 const char* RenderMultiColumnSpannerPlaceholder::renderName() const
113 { 113 {
114 return "RenderMultiColumnSpannerPlaceholder"; 114 return "RenderMultiColumnSpannerPlaceholder";
115 } 115 }
116 116
117 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698