| OLD | NEW |
| 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/layout/LayoutMultiColumnSpannerPlaceholder.h" | 6 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 static void copyMarginProperties(ComputedStyle& placeholderStyle, const Computed
Style& spannerStyle) | 10 static void copyMarginProperties(ComputedStyle& placeholderStyle, const Computed
Style& spannerStyle) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 LayoutMultiColumnSpannerPlaceholder* newSpanner = new LayoutMultiColumnSpann
erPlaceholder(&layoutObjectInFlowThread); | 22 LayoutMultiColumnSpannerPlaceholder* newSpanner = new LayoutMultiColumnSpann
erPlaceholder(&layoutObjectInFlowThread); |
| 23 Document& document = layoutObjectInFlowThread.document(); | 23 Document& document = layoutObjectInFlowThread.document(); |
| 24 newSpanner->setDocumentForAnonymous(&document); | 24 newSpanner->setDocumentForAnonymous(&document); |
| 25 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parentStyle, BLOCK); | 25 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parentStyle, BLOCK); |
| 26 copyMarginProperties(*newStyle, layoutObjectInFlowThread.styleRef()); | 26 copyMarginProperties(*newStyle, layoutObjectInFlowThread.styleRef()); |
| 27 newSpanner->setStyle(newStyle); | 27 newSpanner->setStyle(newStyle); |
| 28 return newSpanner; | 28 return newSpanner; |
| 29 } | 29 } |
| 30 | 30 |
| 31 LayoutMultiColumnSpannerPlaceholder::LayoutMultiColumnSpannerPlaceholder(LayoutB
ox* layoutObjectInFlowThread) | 31 LayoutMultiColumnSpannerPlaceholder::LayoutMultiColumnSpannerPlaceholder(LayoutB
ox* layoutObjectInFlowThread) |
| 32 : LayoutBox(0) | 32 : LayoutBox(nullptr) |
| 33 , m_layoutObjectInFlowThread(layoutObjectInFlowThread) | 33 , m_layoutObjectInFlowThread(layoutObjectInFlowThread) |
| 34 { | 34 { |
| 35 } | 35 } |
| 36 | 36 |
| 37 void LayoutMultiColumnSpannerPlaceholder::updateMarginProperties() | 37 void LayoutMultiColumnSpannerPlaceholder::updateMarginProperties() |
| 38 { | 38 { |
| 39 RefPtr<ComputedStyle> newStyle = ComputedStyle::clone(styleRef()); | 39 RefPtr<ComputedStyle> newStyle = ComputedStyle::clone(styleRef()); |
| 40 copyMarginProperties(*newStyle, m_layoutObjectInFlowThread->styleRef()); | 40 copyMarginProperties(*newStyle, m_layoutObjectInFlowThread->styleRef()); |
| 41 setStyle(newStyle); | 41 setStyle(newStyle); |
| 42 } | 42 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) | 103 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) |
| 104 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); | 104 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool LayoutMultiColumnSpannerPlaceholder::nodeAtPoint(HitTestResult& result, con
st HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, H
itTestAction action) | 107 bool LayoutMultiColumnSpannerPlaceholder::nodeAtPoint(HitTestResult& result, con
st HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, H
itTestAction action) |
| 108 { | 108 { |
| 109 return !m_layoutObjectInFlowThread->hasSelfPaintingLayer() && m_layoutObject
InFlowThread->nodeAtPoint(result, locationInContainer, accumulatedOffset, action
); | 109 return !m_layoutObjectInFlowThread->hasSelfPaintingLayer() && m_layoutObject
InFlowThread->nodeAtPoint(result, locationInContainer, accumulatedOffset, action
); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } | 112 } |
| OLD | NEW |