Changeset 151992 in webkit
- Timestamp:
- Jun 26, 2013 9:05:23 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151990 r151992 1 2013-06-26 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts 4 https://bugs.webkit.org/show_bug.cgi?id=117797 5 6 Reviewed by Antti Koivisto. 7 8 The seamless iframes inherit the current RenderFlowThread during layout. This means getting 9 the LayoutState object from the flow thread RenderView object is not always correct. 10 For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one 11 of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during 12 layout when pushing a new state. 13 14 Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html 15 16 * rendering/RenderFlowThread.cpp: 17 (WebCore::RenderFlowThread::currentActiveRenderBox): 18 (WebCore::RenderFlowThread::pushFlowThreadLayoutState): 19 (WebCore::RenderFlowThread::popFlowThreadLayoutState): 20 1 21 2013-06-26 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r151843 r151992 1038 1038 const RenderBox* RenderFlowThread::currentActiveRenderBox() const 1039 1039 { 1040 const RenderObject* currentObject = m_activeObjectsStack.isEmpty() ? 0 : m_activeObjectsStack.last();1041 if (currentObject && currentObject->isBox())1042 return toRenderBox(currentObject); 1043 1044 return 0;1040 if (m_activeObjectsStack.isEmpty()) 1041 return 0; 1042 1043 const RenderObject* currentObject = m_activeObjectsStack.last(); 1044 return currentObject->isBox() ? toRenderBox(currentObject) : 0; 1045 1045 } 1046 1046 1047 1047 void RenderFlowThread::pushFlowThreadLayoutState(const RenderObject* object) 1048 1048 { 1049 const RenderBox* currentBoxDescendant = currentActiveRenderBox(); 1050 LayoutState* layoutState = view()->layoutState(); 1051 if (currentBoxDescendant && layoutState && layoutState->isPaginated()) { 1052 ASSERT(layoutState->m_renderer == currentBoxDescendant); 1053 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset; 1054 setOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant, currentBoxDescendant->isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width()); 1049 if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) { 1050 LayoutState* layoutState = currentBoxDescendant->view()->layoutState(); 1051 if (layoutState && layoutState->isPaginated()) { 1052 ASSERT(layoutState->m_renderer == currentBoxDescendant); 1053 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset; 1054 setOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant, currentBoxDescendant->isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width()); 1055 } 1055 1056 } 1056 1057 … … 1062 1063 m_activeObjectsStack.removeLast(); 1063 1064 1064 const RenderBox* currentBoxDescendant = currentActiveRenderBox(); 1065 LayoutState* layoutState = view()->layoutState(); 1066 if (currentBoxDescendant && layoutState && layoutState->isPaginated()) 1067 clearOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant); 1065 if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) { 1066 LayoutState* layoutState = currentBoxDescendant->view()->layoutState(); 1067 if (layoutState && layoutState->isPaginated()) 1068 clearOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant); 1069 } 1068 1070 } 1069 1071
Note: See TracChangeset
for help on using the changeset viewer.