Changeset 166631 in webkit
- Timestamp:
- Apr 1, 2014 10:36:54 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166630 r166631 1 2014-04-01 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Simplify the RenderFlowThread state pusher 4 https://bugs.webkit.org/show_bug.cgi?id=131035 5 6 Reviewed by David Hyatt. 7 8 The RenderFlowThread state pusher is desynchronized from the RenderView layout state pusher 9 by one renderer. This patch fixes the anomaly by correctly ordering the push and pop operations 10 between the two systems. 11 12 Tests: no functional change, no new tests. 13 14 * rendering/RenderFlowThread.cpp: 15 (WebCore::RenderFlowThread::pushFlowThreadLayoutState): 16 (WebCore::RenderFlowThread::popFlowThreadLayoutState): 17 (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion): 18 * rendering/RenderView.cpp: 19 (WebCore::RenderView::pushLayoutState): 20 * rendering/RenderView.h: 21 1 22 2014-04-01 Beth Dakin <bdakin@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r166495 r166631 1145 1145 void RenderFlowThread::pushFlowThreadLayoutState(const RenderObject& object) 1146 1146 { 1147 m_activeObjectsStack.add(&object); 1148 1147 1149 if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) { 1148 1150 LayoutState* layoutState = currentBoxDescendant->view().layoutState(); … … 1153 1155 } 1154 1156 } 1155 1156 m_activeObjectsStack.add(&object);1157 1157 } 1158 1158 1159 1159 void RenderFlowThread::popFlowThreadLayoutState() 1160 1160 { 1161 m_activeObjectsStack.removeLast();1162 1163 1161 if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) { 1164 1162 LayoutState* layoutState = currentBoxDescendant->view().layoutState(); … … 1166 1164 clearOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant); 1167 1165 } 1166 1167 m_activeObjectsStack.removeLast(); 1168 1168 } 1169 1169 … … 1174 1174 if (hasCachedOffsetFromLogicalTopOfFirstRegion(currentBlock)) 1175 1175 return cachedOffsetFromLogicalTopOfFirstRegion(currentBlock); 1176 1177 // If it's the current box being laid out, use the layout state.1178 const RenderBox* currentBoxDescendant = currentActiveRenderBox();1179 if (currentBlock == currentBoxDescendant) {1180 LayoutState* layoutState = view().layoutState();1181 ASSERT(layoutState->m_renderer == currentBlock);1182 ASSERT(layoutState && layoutState->isPaginated());1183 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset;1184 return currentBoxDescendant->isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width();1185 }1186 1176 1187 1177 // As a last resort, take the slow path. -
trunk/Source/WebCore/rendering/RenderView.cpp
r166489 r166631 1020 1020 ASSERT(m_layoutState == 0); 1021 1021 1022 m_layoutState = std::make_unique<LayoutState>(root); 1022 1023 pushLayoutStateForCurrentFlowThread(root); 1023 m_layoutState = std::make_unique<LayoutState>(root);1024 1024 } 1025 1025 -
trunk/Source/WebCore/rendering/RenderView.h
r166489 r166631 254 254 if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer.hasColumns() || renderer.flowThreadContainingBlock() 255 255 || m_layoutState->lineGrid() || (renderer.style().lineGrid() != RenderStyle::initialLineGrid() && renderer.isRenderBlockFlow())) { 256 m_layoutState = std::make_unique<LayoutState>(std::move(m_layoutState), &renderer, offset, pageHeight, pageHeightChanged, colInfo); 256 257 pushLayoutStateForCurrentFlowThread(renderer); 257 m_layoutState = std::make_unique<LayoutState>(std::move(m_layoutState), &renderer, offset, pageHeight, pageHeightChanged, colInfo);258 258 return true; 259 259 } … … 263 263 void popLayoutState() 264 264 { 265 popLayoutStateForCurrentFlowThread(); 265 266 m_layoutState = std::move(m_layoutState->m_next); 266 popLayoutStateForCurrentFlowThread();267 267 } 268 268
Note: See TracChangeset
for help on using the changeset viewer.