OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 previousRegionLogicalHeight = regionLogicalHeight; | 116 previousRegionLogicalHeight = regionLogicalHeight; |
117 } | 117 } |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 updateLogicalWidth(); // Called to get the maximum logical width for the col
umnSet. | 121 updateLogicalWidth(); // Called to get the maximum logical width for the col
umnSet. |
122 updateRegionsFlowThreadPortionRect(); | 122 updateRegionsFlowThreadPortionRect(); |
123 } | 123 } |
124 | 124 |
| 125 void RenderFlowThread::mapRectToPaintInvalidationBacking(const RenderLayerModelO
bject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationStat
e* paintInvalidationState) const |
| 126 { |
| 127 ASSERT(paintInvalidationContainer != this); // A flow thread should never be
an invalidation container. |
| 128 rect = fragmentsBoundingBox(rect); |
| 129 RenderBlockFlow::mapRectToPaintInvalidationBacking(paintInvalidationContaine
r, rect, paintInvalidationState); |
| 130 } |
| 131 |
125 void RenderFlowThread::layout() | 132 void RenderFlowThread::layout() |
126 { | 133 { |
127 m_pageLogicalSizeChanged = m_regionsInvalidated && everHadLayout(); | 134 m_pageLogicalSizeChanged = m_regionsInvalidated && everHadLayout(); |
128 | 135 |
129 CurrentRenderFlowThreadMaintainer currentFlowThreadSetter(this); | 136 CurrentRenderFlowThreadMaintainer currentFlowThreadSetter(this); |
130 RenderBlockFlow::layout(); | 137 RenderBlockFlow::layout(); |
131 | 138 |
132 m_pageLogicalSizeChanged = false; | 139 m_pageLogicalSizeChanged = false; |
133 } | 140 } |
134 | 141 |
135 void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L
ogicalExtentComputedValues& computedValues) const | 142 void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L
ogicalExtentComputedValues& computedValues) const |
136 { | 143 { |
137 computedValues.m_position = logicalTop; | 144 computedValues.m_position = logicalTop; |
138 computedValues.m_extent = 0; | 145 computedValues.m_extent = 0; |
139 | 146 |
140 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { | 147 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { |
141 RenderMultiColumnSet* columnSet = *iter; | 148 RenderMultiColumnSet* columnSet = *iter; |
142 computedValues.m_extent += columnSet->logicalHeightInFlowThread(); | 149 computedValues.m_extent += columnSet->logicalHeightInFlowThread(); |
143 } | 150 } |
144 } | 151 } |
145 | 152 |
146 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula
tedOffset, HitTestAction hitTestAction) | 153 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula
tedOffset, HitTestAction hitTestAction) |
147 { | 154 { |
148 if (hitTestAction == HitTestBlockBackground) | 155 if (hitTestAction == HitTestBlockBackground) |
149 return false; | 156 return false; |
150 return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, ac
cumulatedOffset, hitTestAction); | 157 return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, ac
cumulatedOffset, hitTestAction); |
151 } | 158 } |
152 | 159 |
153 bool RenderFlowThread::shouldIssuePaintInvalidations(const LayoutRect& r) const | |
154 { | |
155 if (view()->document().printing() || r.isEmpty()) | |
156 return false; | |
157 | |
158 return true; | |
159 } | |
160 | |
161 void RenderFlowThread::paintInvalidationRectangleInRegions(const LayoutRect& pai
ntInvalidationRect) const | |
162 { | |
163 if (!shouldIssuePaintInvalidations(paintInvalidationRect) || !hasValidRegion
Info()) | |
164 return; | |
165 | |
166 // We can't use currentFlowThread as it is possible to have interleaved flow
threads and the wrong one could be used. | |
167 // Let each columnSet figure out the proper enclosing flow thread. | |
168 CurrentRenderFlowThreadDisabler disabler(view()); | |
169 | |
170 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { | |
171 RenderMultiColumnSet* columnSet = *iter; | |
172 | |
173 columnSet->paintInvalidationForFlowThreadContent(paintInvalidationRect); | |
174 } | |
175 } | |
176 | |
177 LayoutUnit RenderFlowThread::pageLogicalHeightForOffset(LayoutUnit offset) | 160 LayoutUnit RenderFlowThread::pageLogicalHeightForOffset(LayoutUnit offset) |
178 { | 161 { |
179 RenderMultiColumnSet* columnSet = columnSetAtBlockOffset(offset); | 162 RenderMultiColumnSet* columnSet = columnSetAtBlockOffset(offset); |
180 if (!columnSet) | 163 if (!columnSet) |
181 return 0; | 164 return 0; |
182 | 165 |
183 return columnSet->pageLogicalHeight(); | 166 return columnSet->pageLogicalHeight(); |
184 } | 167 } |
185 | 168 |
186 LayoutUnit RenderFlowThread::pageRemainingLogicalHeightForOffset(LayoutUnit offs
et, PageBoundaryRule pageBoundaryRule) | 169 LayoutUnit RenderFlowThread::pageRemainingLogicalHeightForOffset(LayoutUnit offs
et, PageBoundaryRule pageBoundaryRule) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, con
st LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) | 223 void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, con
st LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) |
241 { | 224 { |
242 ASSERT(!m_regionsInvalidated); | 225 ASSERT(!m_regionsInvalidated); |
243 | 226 |
244 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { | 227 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { |
245 RenderMultiColumnSet* columnSet = *iter; | 228 RenderMultiColumnSet* columnSet = *iter; |
246 columnSet->collectLayerFragments(layerFragments, layerBoundingBox, dirty
Rect); | 229 columnSet->collectLayerFragments(layerFragments, layerBoundingBox, dirty
Rect); |
247 } | 230 } |
248 } | 231 } |
249 | 232 |
250 LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundin
gBox) | 233 LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundin
gBox) const |
251 { | 234 { |
252 ASSERT(!m_regionsInvalidated); | 235 ASSERT(!m_regionsInvalidated); |
253 | 236 |
254 LayoutRect result; | 237 LayoutRect result; |
255 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { | 238 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be
gin(); iter != m_multiColumnSetList.end(); ++iter) { |
256 RenderMultiColumnSet* columnSet = *iter; | 239 RenderMultiColumnSet* columnSet = *iter; |
257 LayerFragments fragments; | 240 LayerFragments fragments; |
258 columnSet->collectLayerFragments(fragments, layerBoundingBox, PaintInfo:
:infiniteRect()); | 241 columnSet->collectLayerFragments(fragments, layerBoundingBox, PaintInfo:
:infiniteRect()); |
259 for (size_t i = 0; i < fragments.size(); ++i) { | 242 for (size_t i = 0; i < fragments.size(); ++i) { |
260 const LayerFragment& fragment = fragments.at(i); | 243 const LayerFragment& fragment = fragments.at(i); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 { | 375 { |
393 if (!m_renderFlowThread) | 376 if (!m_renderFlowThread) |
394 return; | 377 return; |
395 RenderView* view = m_renderFlowThread->view(); | 378 RenderView* view = m_renderFlowThread->view(); |
396 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); | 379 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); |
397 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); | 380 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); |
398 } | 381 } |
399 | 382 |
400 | 383 |
401 } // namespace blink | 384 } // namespace blink |
OLD | NEW |