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

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

Issue 869583002: [New Multicolumn] Support dynamic insertion and removal of multicol content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 #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)
(...skipping 16 matching lines...) Expand all
27 newSpanner->setStyle(newStyle); 27 newSpanner->setStyle(newStyle);
28 return newSpanner; 28 return newSpanner;
29 } 29 }
30 30
31 RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder(RenderB ox* rendererInFlowThread) 31 RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder(RenderB ox* rendererInFlowThread)
32 : RenderBox(0) 32 : RenderBox(0)
33 , m_rendererInFlowThread(rendererInFlowThread) 33 , m_rendererInFlowThread(rendererInFlowThread)
34 { 34 {
35 } 35 }
36 36
37 void RenderMultiColumnSpannerPlaceholder::spannerWillBeRemoved()
38 {
39 ASSERT(m_rendererInFlowThread);
40 RenderBox* renderer = m_rendererInFlowThread;
41 m_rendererInFlowThread = 0;
42 flowThread()->flowThreadDescendantWillBeRemoved(renderer);
43 // |this| should be destroyed by now.
44 }
45
46 void RenderMultiColumnSpannerPlaceholder::updateMarginProperties() 37 void RenderMultiColumnSpannerPlaceholder::updateMarginProperties()
47 { 38 {
48 RefPtr<RenderStyle> newStyle = RenderStyle::clone(style()); 39 RefPtr<RenderStyle> newStyle = RenderStyle::clone(style());
49 copyMarginProperties(newStyle.get(), m_rendererInFlowThread->style()); 40 copyMarginProperties(newStyle.get(), m_rendererInFlowThread->style());
50 setStyle(newStyle); 41 setStyle(newStyle);
51 } 42 }
52 43
53 void RenderMultiColumnSpannerPlaceholder::willBeRemovedFromTree() 44 void RenderMultiColumnSpannerPlaceholder::willBeRemovedFromTree()
54 { 45 {
55 if (m_rendererInFlowThread) 46 if (m_rendererInFlowThread)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 { 98 {
108 return !m_rendererInFlowThread->hasSelfPaintingLayer() && m_rendererInFlowTh read->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, actio n); 99 return !m_rendererInFlowThread->hasSelfPaintingLayer() && m_rendererInFlowTh read->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, actio n);
109 } 100 }
110 101
111 const char* RenderMultiColumnSpannerPlaceholder::renderName() const 102 const char* RenderMultiColumnSpannerPlaceholder::renderName() const
112 { 103 {
113 return "RenderMultiColumnSpannerPlaceholder"; 104 return "RenderMultiColumnSpannerPlaceholder";
114 } 105 }
115 106
116 } 107 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSpannerPlaceholder.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698