| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 LayoutUnit LayoutMultiColumnSpannerPlaceholder::maxPreferredLogicalWidth() const | 85 LayoutUnit LayoutMultiColumnSpannerPlaceholder::maxPreferredLogicalWidth() const |
| 86 { | 86 { |
| 87 return m_layoutObjectInFlowThread->maxPreferredLogicalWidth(); | 87 return m_layoutObjectInFlowThread->maxPreferredLogicalWidth(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void LayoutMultiColumnSpannerPlaceholder::layout() | 90 void LayoutMultiColumnSpannerPlaceholder::layout() |
| 91 { | 91 { |
| 92 ASSERT(needsLayout()); | 92 ASSERT(needsLayout()); |
| 93 | 93 |
| 94 // The placeholder, like any other block level object, has its logical top c
alculated and set |
| 95 // before layout. Copy this to the actual column-span:all object before layi
ng it out, so that |
| 96 // it gets paginated correctly, in case we have an enclosing fragmentation c
ontext. |
| 97 m_layoutObjectInFlowThread->setLogicalTop(logicalTop()); |
| 98 |
| 94 // Lay out the actual column-span:all element. | 99 // Lay out the actual column-span:all element. |
| 95 m_layoutObjectInFlowThread->layoutIfNeeded(); | 100 m_layoutObjectInFlowThread->layoutIfNeeded(); |
| 96 | 101 |
| 97 // The spanner has now been laid out, so its height is known. Time to update
the placeholder's | 102 // The spanner has now been laid out, so its height is known. Time to update
the placeholder's |
| 98 // height as well, so that we take up the correct amount of space in the mul
ticol container. | 103 // height as well, so that we take up the correct amount of space in the mul
ticol container. |
| 99 updateLogicalHeight(); | 104 updateLogicalHeight(); |
| 100 | 105 |
| 101 // Take the overflow from the spanner, so that it gets | 106 // Take the overflow from the spanner, so that it gets |
| 102 // propagated to the multicol container and beyond. | 107 // propagated to the multicol container and beyond. |
| 103 m_overflow.clear(); | 108 m_overflow.clear(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 127 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) | 132 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) |
| 128 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); | 133 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); |
| 129 } | 134 } |
| 130 | 135 |
| 131 bool LayoutMultiColumnSpannerPlaceholder::nodeAtPoint(HitTestResult& result, con
st HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, H
itTestAction action) | 136 bool LayoutMultiColumnSpannerPlaceholder::nodeAtPoint(HitTestResult& result, con
st HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, H
itTestAction action) |
| 132 { | 137 { |
| 133 return !m_layoutObjectInFlowThread->hasSelfPaintingLayer() && m_layoutObject
InFlowThread->nodeAtPoint(result, locationInContainer, accumulatedOffset, action
); | 138 return !m_layoutObjectInFlowThread->hasSelfPaintingLayer() && m_layoutObject
InFlowThread->nodeAtPoint(result, locationInContainer, accumulatedOffset, action
); |
| 134 } | 139 } |
| 135 | 140 |
| 136 } | 141 } |
| OLD | NEW |