Title: [131359] trunk
- Revision
- 131359
- Author
- le...@chromium.org
- Date
- 2012-10-15 14:29:31 -0700 (Mon, 15 Oct 2012)
Log Message
Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced
https://bugs.webkit.org/show_bug.cgi?id=99194
Reviewed by Eric Seidel.
Source/WebCore:
Correctly breaking lines after inline replaced elements that follow inline flows. Previously, alternating
these two types of elements would cause us to increase our preferred width forever.
Test: fast/block/block-with-inline-replaced-children-in-inline-flows.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
LayoutTests:
* fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html: Added.
* fast/block/block-with-inline-replaced-children-in-inline-flows.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (131358 => 131359)
--- trunk/LayoutTests/ChangeLog 2012-10-15 21:27:41 UTC (rev 131358)
+++ trunk/LayoutTests/ChangeLog 2012-10-15 21:29:31 UTC (rev 131359)
@@ -1,3 +1,13 @@
+2012-10-15 Levi Weintraub <le...@chromium.org>
+
+ Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced
+ https://bugs.webkit.org/show_bug.cgi?id=99194
+
+ Reviewed by Eric Seidel.
+
+ * fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html: Added.
+ * fast/block/block-with-inline-replaced-children-in-inline-flows.html: Added.
+
2012-10-15 Emil A Eklund <e...@chromium.org>
Revert rounding change in RenderTable::paintObject
Added: trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html (0 => 131359)
--- trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html (rev 0)
+++ trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows-expected.html 2012-10-15 21:29:31 UTC (rev 131359)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<style>
+span {
+ padding-left: 30px;
+}
+img {
+ width: 50px;
+ height: 50px;
+}
+</style>
+<body>
+<div>Test for Bugzilla bug:<a href="" 99194</a> Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced.</div>
+<div>This test verifies that we properly calculate block preferred widths when we have repeated inline replaced elements wrapped in InlineFlows.</div>
+<div style="width: 80px; border: 1px solid black;">
+ <span style=""><img src="" src=""
+</div>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows.html (0 => 131359)
--- trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows.html (rev 0)
+++ trunk/LayoutTests/fast/block/block-with-inline-replaced-children-in-inline-flows.html 2012-10-15 21:29:31 UTC (rev 131359)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<style>
+span > span {
+ padding-left: 30px;
+}
+img {
+ width: 50px;
+ height: 50px;
+}
+</style>
+<body>
+<div>Test for Bugzilla bug:<a href="" 99194</a> Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced.</div>
+<div>This test verifies that we properly calculate block preferred widths when we have repeated inline replaced elements wrapped in InlineFlows.</div>
+<div style="width: 50px">
+ <span style="float: left; border: 1px solid black;">
+ <span style=""><img src="" src=""
+ </span>
+</div>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (131358 => 131359)
--- trunk/Source/WebCore/ChangeLog 2012-10-15 21:27:41 UTC (rev 131358)
+++ trunk/Source/WebCore/ChangeLog 2012-10-15 21:29:31 UTC (rev 131359)
@@ -1,3 +1,18 @@
+2012-10-15 Levi Weintraub <le...@chromium.org>
+
+ Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced
+ https://bugs.webkit.org/show_bug.cgi?id=99194
+
+ Reviewed by Eric Seidel.
+
+ Correctly breaking lines after inline replaced elements that follow inline flows. Previously, alternating
+ these two types of elements would cause us to increase our preferred width forever.
+
+ Test: fast/block/block-with-inline-replaced-children-in-inline-flows.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
+
2012-10-15 Emil A Eklund <e...@chromium.org>
Revert rounding change in RenderTable::paintObject
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (131358 => 131359)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-10-15 21:27:41 UTC (rev 131358)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-10-15 21:29:31 UTC (rev 131359)
@@ -5914,6 +5914,11 @@
inlineMin = 0;
}
+ if (autoWrap && canBreakReplacedElement && isPrevChildInlineFlow) {
+ updatePreferredWidth(m_minPreferredLogicalWidth, inlineMin);
+ inlineMin = 0;
+ }
+
// We are no longer stripping whitespace at the start of
// a line.
if (!child->isFloating()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes