Title: [151992] trunk/Source/WebCore
- Revision
- 151992
- Author
- abu...@adobe.com
- Date
- 2013-06-26 09:05:23 -0700 (Wed, 26 Jun 2013)
Log Message
[CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
https://bugs.webkit.org/show_bug.cgi?id=117797
Reviewed by Antti Koivisto.
The seamless iframes inherit the current RenderFlowThread during layout. This means getting
the LayoutState object from the flow thread RenderView object is not always correct.
For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
layout when pushing a new state.
Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::currentActiveRenderBox):
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (151991 => 151992)
--- trunk/Source/WebCore/ChangeLog 2013-06-26 16:00:18 UTC (rev 151991)
+++ trunk/Source/WebCore/ChangeLog 2013-06-26 16:05:23 UTC (rev 151992)
@@ -1,3 +1,23 @@
+2013-06-26 Andrei Bucur <abu...@adobe.com>
+
+ [CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
+ https://bugs.webkit.org/show_bug.cgi?id=117797
+
+ Reviewed by Antti Koivisto.
+
+ The seamless iframes inherit the current RenderFlowThread during layout. This means getting
+ the LayoutState object from the flow thread RenderView object is not always correct.
+ For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
+ of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
+ layout when pushing a new state.
+
+ Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
+
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::currentActiveRenderBox):
+ (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
+ (WebCore::RenderFlowThread::popFlowThreadLayoutState):
+
2013-06-26 Ryosuke Niwa <rn...@webkit.org>
Remove many static_casts to Element types from AccessibilityNodeObject
Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (151991 => 151992)
--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp 2013-06-26 16:00:18 UTC (rev 151991)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp 2013-06-26 16:05:23 UTC (rev 151992)
@@ -1037,21 +1037,22 @@
const RenderBox* RenderFlowThread::currentActiveRenderBox() const
{
- const RenderObject* currentObject = m_activeObjectsStack.isEmpty() ? 0 : m_activeObjectsStack.last();
- if (currentObject && currentObject->isBox())
- return toRenderBox(currentObject);
+ if (m_activeObjectsStack.isEmpty())
+ return 0;
- return 0;
+ const RenderObject* currentObject = m_activeObjectsStack.last();
+ return currentObject->isBox() ? toRenderBox(currentObject) : 0;
}
void RenderFlowThread::pushFlowThreadLayoutState(const RenderObject* object)
{
- const RenderBox* currentBoxDescendant = currentActiveRenderBox();
- LayoutState* layoutState = view()->layoutState();
- if (currentBoxDescendant && layoutState && layoutState->isPaginated()) {
- ASSERT(layoutState->m_renderer == currentBoxDescendant);
- LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset;
- setOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant, currentBoxDescendant->isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width());
+ if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) {
+ LayoutState* layoutState = currentBoxDescendant->view()->layoutState();
+ if (layoutState && layoutState->isPaginated()) {
+ ASSERT(layoutState->m_renderer == currentBoxDescendant);
+ LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset;
+ setOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant, currentBoxDescendant->isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width());
+ }
}
m_activeObjectsStack.add(object);
@@ -1061,10 +1062,11 @@
{
m_activeObjectsStack.removeLast();
- const RenderBox* currentBoxDescendant = currentActiveRenderBox();
- LayoutState* layoutState = view()->layoutState();
- if (currentBoxDescendant && layoutState && layoutState->isPaginated())
- clearOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant);
+ if (const RenderBox* currentBoxDescendant = currentActiveRenderBox()) {
+ LayoutState* layoutState = currentBoxDescendant->view()->layoutState();
+ if (layoutState && layoutState->isPaginated())
+ clearOffsetFromLogicalTopOfFirstRegion(currentBoxDescendant);
+ }
}
LayoutUnit RenderFlowThread::offsetFromLogicalTopOfFirstRegion(const RenderBlock* currentBlock) const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes