+2011-12-18 Dan Bernstein <mitz@apple.com>
+
+ Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
+ https://bugs.webkit.org/show_bug.cgi?id=67759
+
+ Reviewed by Darin Adler.
+
+ Re-added this test from r94695.
+
+ * fast/block/positioning/positioned-float-layout-after-image-load-expected.txt: Copied from LayoutTests/fast/block/positioning/positioned-float-layout-after-image-load-expected.txt.
+ * fast/block/positioning/positioned-float-layout-after-image-load.html: Copied from LayoutTests/fast/block/positioning/positioned-float-layout-after-image-load.html.
+ * fast/block/positioning/resources/positioned-float-layout-after-image-load-2.html: Copied from LayoutTests/fast/block/positioning/resources/positioned-float-layout-after-image-load-2.html.
+
2011-12-18 Hajime Morrita <morrita@chromium.org>
Unreviewed expectations update.
--- /dev/null
+<html>
+<head>
+<style type="text/css">
+ body { margin-left: 10%; margin-right: 10%;}
+ h1,h2,h3,h4,h5,h6 { text-align: center; clear: both;}
+ h1 span { display: block; padding-bottom: 0.5em; }
+ .figcenter { margin: auto; text-align: center;}
+ .footnote {margin-left: 10%; margin-right: 10%; font-size: 0.9em;}
+ .footnote .label {position: absolute; float: -webkit-positioned; right: 84%; text-align: right; width: 200px}
+</style>
+
+<script>
+ // https://bugs.webkit.org/show_bug.cgi?id=54611
+ // When navigating to the anchor directly, the anchor should be positioned below
+ // the image on first load.
+
+ function test(){
+ var bottomOfImage = document.getElementById("image").offsetTop + document.getElementById("image").offsetHeight;
+ var footnotePosition = document.getElementById("spantext").offsetTop;
+ if (footnotePosition >= bottomOfImage)
+ document.getElementById("console").innerHTML = "SUCCESS";
+ layoutTestController.notifyDone();
+ }
+</script>
+
+</head>
+<body onload="test();">
+<div class="figcenter">
+ <img id="image" src="icon-gold.png" alt="Book cover." title="">
+</div>
+
+<div class="footnote"><a id="anchor1"></a><a href="http://www.gutenberg.org/files/33439/33439-h/33439-h.htm#FNanchor_1"><span id="spantext" class="label">[1]</span></a></div>
+
+<div id="console">FAILURE</div>
+</body></html>
+
+2011-12-18 Dan Bernstein <mitz@apple.com>
+
+ Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
+ https://bugs.webkit.org/show_bug.cgi?id=67759
+
+ Reviewed by Darin Adler.
+
+ Test: fast/block/positioning/positioned-float-layout-after-image-load.html
+
+ Positioned floats are both floating and positioned. Made the following functions treat them as
+ positioned rather than as floats by reordering code.
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
+ (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
+ (WebCore::RenderBlock::LineBreaker::nextLineBreak):
+
2011-12-18 Benjamin Poulain <bpoulain@apple.com>
Add support for 8 bits strings to Document::isValidName()
{
while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo, TrailingWhitespace)) {
RenderObject* object = iterator.m_obj;
- if (object->isFloating()) {
- m_block->insertFloatingObject(toRenderBox(object));
- } else if (object->isPositioned())
+ if (object->isPositioned())
setStaticPositions(m_block, toRenderBox(object));
+ else if (object->isFloating())
+ m_block->insertFloatingObject(toRenderBox(object));
iterator.increment();
}
}
{
while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
RenderObject* object = resolver.position().m_obj;
- if (object->isFloating())
- m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width);
- else if (object->isPositioned())
+ if (object->isPositioned())
setStaticPositions(m_block, toRenderBox(object));
+ else if (object->isFloating())
+ m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width);
resolver.increment();
}
resolver.commitExplicitEmbedding();
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);
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());