| 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 "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 5 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 static void copyMarginProperties(ComputedStyle& placeholderStyle, const Computed
Style& spannerStyle) | 9 static void copyMarginProperties(ComputedStyle& placeholderStyle, const Computed
Style& spannerStyle) |
| 10 { | 10 { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 } | 112 } |
| 113 | 113 |
| 114 void LayoutMultiColumnSpannerPlaceholder::computeLogicalHeight(LayoutUnit, Layou
tUnit logicalTop, LogicalExtentComputedValues& computedValues) const | 114 void LayoutMultiColumnSpannerPlaceholder::computeLogicalHeight(LayoutUnit, Layou
tUnit logicalTop, LogicalExtentComputedValues& computedValues) const |
| 115 { | 115 { |
| 116 computedValues.m_extent = m_layoutObjectInFlowThread->logicalHeight(); | 116 computedValues.m_extent = m_layoutObjectInFlowThread->logicalHeight(); |
| 117 computedValues.m_position = logicalTop; | 117 computedValues.m_position = logicalTop; |
| 118 computedValues.m_margins.m_before = marginBefore(); | 118 computedValues.m_margins.m_before = marginBefore(); |
| 119 computedValues.m_margins.m_after = marginAfter(); | 119 computedValues.m_margins.m_after = marginAfter(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void LayoutMultiColumnSpannerPlaceholder::invalidateTreeIfNeeded(PaintInvalidati
onState& paintInvalidationState) | 122 void LayoutMultiColumnSpannerPlaceholder::invalidateTreeIfNeeded(const PaintInva
lidationState& paintInvalidationState) |
| 123 { | 123 { |
| 124 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is, paintInvalidationState.paintInvalidationContainer()); | 124 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); |
| 125 newPaintInvalidationState.updatePaintOffsetAndClipForChildren(); |
| 125 m_layoutObjectInFlowThread->invalidateTreeIfNeeded(newPaintInvalidationState
); | 126 m_layoutObjectInFlowThread->invalidateTreeIfNeeded(newPaintInvalidationState
); |
| 126 LayoutBox::invalidateTreeIfNeeded(paintInvalidationState); | 127 LayoutBox::invalidateTreeIfNeeded(paintInvalidationState); |
| 127 } | 128 } |
| 128 | 129 |
| 129 void LayoutMultiColumnSpannerPlaceholder::paint(const PaintInfo& paintInfo, cons
t LayoutPoint& paintOffset) const | 130 void LayoutMultiColumnSpannerPlaceholder::paint(const PaintInfo& paintInfo, cons
t LayoutPoint& paintOffset) const |
| 130 { | 131 { |
| 131 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) | 132 if (!m_layoutObjectInFlowThread->hasSelfPaintingLayer()) |
| 132 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); | 133 m_layoutObjectInFlowThread->paint(paintInfo, paintOffset); |
| 133 } | 134 } |
| 134 | 135 |
| 135 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) |
| 136 { | 137 { |
| 137 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
); |
| 138 } | 139 } |
| 139 | 140 |
| 140 } // namespace blink | 141 } // namespace blink |
| OLD | NEW |