Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: Source/WebCore/rendering/RenderBlockLineLayout.cpp

Issue 9253026: Merge 103206 - Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/block/positioning/resources/positioned-float-layout-after-image-load-2.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 105350)
+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy)
@@ -1842,10 +1842,10 @@
{
while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo, TrailingWhitespace)) {
RenderObject* object = iterator.m_obj;
- if (object->isFloating()) {
+ if (object->isPositioned())
+ setStaticPositions(m_block, toRenderBox(object));
+ else if (object->isFloating())
m_block->insertFloatingObject(toRenderBox(object));
- } else if (object->isPositioned())
- setStaticPositions(m_block, toRenderBox(object));
iterator.increment();
}
}
@@ -1855,10 +1855,10 @@
{
while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
RenderObject* object = resolver.position().m_obj;
- if (object->isFloating())
+ if (object->isPositioned())
+ setStaticPositions(m_block, toRenderBox(object));
+ else if (object->isFloating())
m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width);
- else if (object->isPositioned())
- setStaticPositions(m_block, toRenderBox(object));
resolver.increment();
}
resolver.commitExplicitEmbedding();
@@ -2132,21 +2132,7 @@
goto end;
}
- if (current.m_obj->isFloating()) {
- RenderBox* floatBox = toRenderBox(current.m_obj);
- FloatingObject* f = m_block->insertFloatingObject(floatBox);
- // check if it fits in the current line.
- // If it does, position it now, otherwise, position
- // it after moving to next line (in newLine() func)
- if (floatsFitOnLine && width.fitsOnLine(m_block->logicalWidthForFloat(f))) {
- m_block->positionNewFloatOnLine(f, lastFloatFromPreviousLine, lineInfo, width);
- if (lBreak.m_obj == current.m_obj) {
- ASSERT(!lBreak.m_pos);
- lBreak.increment();
- }
- } else
- floatsFitOnLine = false;
- } else if (current.m_obj->isPositioned()) {
+ if (current.m_obj->isPositioned()) {
// If our original display wasn't an inline type, then we can
// go ahead and determine our static inline position now.
RenderBox* box = toRenderBox(current.m_obj);
@@ -2171,6 +2157,20 @@
trailingObjects.appendBoxIfNeeded(box);
} else
m_positionedObjects.append(box);
+ } else if (current.m_obj->isFloating()) {
+ RenderBox* floatBox = toRenderBox(current.m_obj);
+ FloatingObject* f = m_block->insertFloatingObject(floatBox);
+ // check if it fits in the current line.
+ // If it does, position it now, otherwise, position
+ // it after moving to next line (in newLine() func)
+ if (floatsFitOnLine && width.fitsOnLine(m_block->logicalWidthForFloat(f))) {
+ m_block->positionNewFloatOnLine(f, lastFloatFromPreviousLine, lineInfo, width);
+ if (lBreak.m_obj == current.m_obj) {
+ ASSERT(!lBreak.m_pos);
+ lBreak.increment();
+ }
+ } else
+ floatsFitOnLine = false;
} else if (current.m_obj->isRenderInline()) {
// Right now, we should only encounter empty inlines here.
ASSERT(!current.m_obj->firstChild());
« no previous file with comments | « LayoutTests/fast/block/positioning/resources/positioned-float-layout-after-image-load-2.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698