Title: [138630] trunk
- Revision
- 138630
- Author
- [email protected]
- Date
- 2013-01-02 12:18:15 -0800 (Wed, 02 Jan 2013)
Log Message
Regression (r132935): WebKit breaks between <nobr> tags
https://bugs.webkit.org/show_bug.cgi?id=11857
Reviewed by David Hyatt.
Source/WebCore:
The fix for bug 29648 in http://trac.webkit.org/changeset/132935 was too broad - it caused us
to find linebreaks in autowrap containers between non-wrapping elements where there was no
whitespace to allow the break. This reverts the code change in r132935 and ensures we attempt
to move below floats when inside an autowrap container but leaves the treatment of non-wrapping
elements in an autowrap container unaffected.
Test: fast/inline/break-between-nobr.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
LayoutTests:
* fast/inline/break-between-nobr-expected.html: Added.
* fast/inline/break-between-nobr.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (138629 => 138630)
--- trunk/LayoutTests/ChangeLog 2013-01-02 20:16:57 UTC (rev 138629)
+++ trunk/LayoutTests/ChangeLog 2013-01-02 20:18:15 UTC (rev 138630)
@@ -1,3 +1,13 @@
+2013-01-02 Robert Hogan <[email protected]>
+
+ Regression (r132935): WebKit breaks between <nobr> tags
+ https://bugs.webkit.org/show_bug.cgi?id=11857
+
+ Reviewed by David Hyatt.
+
+ * fast/inline/break-between-nobr-expected.html: Added.
+ * fast/inline/break-between-nobr.html: Added.
+
2013-01-02 Mike West <[email protected]>
sandboxed iframe attribute parsing layout tests are flaky
Added: trunk/LayoutTests/fast/inline/break-between-nobr-expected.html (0 => 138630)
--- trunk/LayoutTests/fast/inline/break-between-nobr-expected.html (rev 0)
+++ trunk/LayoutTests/fast/inline/break-between-nobr-expected.html 2013-01-02 20:18:15 UTC (rev 138630)
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<body>
+<p> There should be a single non-wrapping line below. https://bugs.webkit.org/show_bug.cgi?id=11857 </p>
+<div style="height: 100px; width: 200px; font: 20px/1 Arial;">
+<nobr>Text Text Text Text Text Text Text Text Text Text Text Text Text Text</nobr>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/inline/break-between-nobr.html (0 => 138630)
--- trunk/LayoutTests/fast/inline/break-between-nobr.html (rev 0)
+++ trunk/LayoutTests/fast/inline/break-between-nobr.html 2013-01-02 20:18:15 UTC (rev 138630)
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<body>
+<p> There should be a single non-wrapping line below. https://bugs.webkit.org/show_bug.cgi?id=11857 </p>
+<div style="height: 100px; width: 200px; font: 20px/1 Arial;">
+<nobr>Text Text Text Text Text Text Text </nobr><nobr>Text Text Text Text Text Text Text</nobr>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (138629 => 138630)
--- trunk/Source/WebCore/ChangeLog 2013-01-02 20:16:57 UTC (rev 138629)
+++ trunk/Source/WebCore/ChangeLog 2013-01-02 20:18:15 UTC (rev 138630)
@@ -1,3 +1,21 @@
+2013-01-02 Robert Hogan <[email protected]>
+
+ Regression (r132935): WebKit breaks between <nobr> tags
+ https://bugs.webkit.org/show_bug.cgi?id=11857
+
+ Reviewed by David Hyatt.
+
+ The fix for bug 29648 in http://trac.webkit.org/changeset/132935 was too broad - it caused us
+ to find linebreaks in autowrap containers between non-wrapping elements where there was no
+ whitespace to allow the break. This reverts the code change in r132935 and ensures we attempt
+ to move below floats when inside an autowrap container but leaves the treatment of non-wrapping
+ elements in an autowrap container unaffected.
+
+ Test: fast/inline/break-between-nobr.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
+
2013-01-02 Ryosuke Niwa <[email protected]>
Another Windows port build fix attempt. Don't try to build WTF files in WebCore.
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (138629 => 138630)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-01-02 20:16:57 UTC (rev 138629)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-01-02 20:18:15 UTC (rev 138630)
@@ -3036,7 +3036,7 @@
} else
ASSERT_NOT_REACHED();
- bool checkForBreak = autoWrap || blockStyle->autoWrap();
+ bool checkForBreak = autoWrap;
if (width.committedWidth() && !width.fitsOnLine() && lBreak.m_obj && currWS == NOWRAP)
checkForBreak = true;
else if (next && current.m_obj->isText() && next->isText() && !next->isBR() && (autoWrap || (next->style()->autoWrap()))) {
@@ -3079,6 +3079,10 @@
// the end label if we still don't fit on the line. -dwh
if (!width.fitsOnLine())
goto end;
+ } else if (blockStyle->autoWrap() && !width.fitsOnLine() && !width.committedWidth()) {
+ // If the container autowraps but the current child does not then we still need to ensure that it
+ // wraps and moves below any floats.
+ width.fitBelowFloats();
}
if (!current.m_obj->isFloatingOrOutOfFlowPositioned()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes