Title: [151613] trunk
Revision
151613
Author
[email protected]
Date
2013-06-14 23:59:28 -0700 (Fri, 14 Jun 2013)

Log Message

REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
https://bugs.webkit.org/show_bug.cgi?id=117284

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/text/whitespace/inline-whitespace-wrapping-7.html

We were looking for line breaks in trailing collapsed whitespace even when inside a nowrap inline.
It's wrong to do this as we don't know yet if we will want or need to break - that decision has to
be deferred until we enter a part of the line that is autowrap.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/text/whitespace/inline-whitespace-wrapping-7-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-7.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (151612 => 151613)


--- trunk/LayoutTests/ChangeLog	2013-06-15 04:42:23 UTC (rev 151612)
+++ trunk/LayoutTests/ChangeLog	2013-06-15 06:59:28 UTC (rev 151613)
@@ -1,3 +1,13 @@
+2013-06-14  Robert Hogan  <[email protected]>
+
+        REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
+        https://bugs.webkit.org/show_bug.cgi?id=117284
+
+        Reviewed by David Hyatt.
+
+        * fast/text/whitespace/inline-whitespace-wrapping-7-expected.html: Added.
+        * fast/text/whitespace/inline-whitespace-wrapping-7.html: Added.
+
 2013-06-14  Lukasz Gajowy  <[email protected]>
 
         background-color is not preserved when inserting a new paragraph

Added: trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7-expected.html (0 => 151613)


--- trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7-expected.html	2013-06-15 06:59:28 UTC (rev 151613)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<style>
+    #container {
+        float: right;
+    }
+</style>
+</head>
+<body>
+<p> webkit.org/b/117284: Don't detect line breaks in trailing collapsing space inside nowrap inlines.</p> 
+<div id="container">
+        <a href="" </a>
+        <a href=""
+</div>
+<br>
+<div id="container">
+        <a href="" </a>
+        <a href=""
+</div>
+</body>

Added: trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7.html (0 => 151613)


--- trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/whitespace/inline-whitespace-wrapping-7.html	2013-06-15 06:59:28 UTC (rev 151613)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<style>
+    #container {
+        float: right;
+    }
+    .link
+    {
+        white-space: nowrap;
+    }
+</style>
+</head>
+<body>
+<p> webkit.org/b/117284: Don't detect line breaks in trailing collapsing space inside nowrap inlines.</p> 
+<div id="container">
+         <a href="" class="link">
+						A
+					</a>
+         <a href="" class="link">
+						B
+					</a>
+</div>
+<br>
+<div id="container">
+        <a href="" class="link">A </a>
+        <a href="" class="link">B</a>
+</div>
+</body>

Modified: trunk/Source/WebCore/ChangeLog (151612 => 151613)


--- trunk/Source/WebCore/ChangeLog	2013-06-15 04:42:23 UTC (rev 151612)
+++ trunk/Source/WebCore/ChangeLog	2013-06-15 06:59:28 UTC (rev 151613)
@@ -1,3 +1,19 @@
+2013-06-14  Robert Hogan  <[email protected]>
+
+        REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
+        https://bugs.webkit.org/show_bug.cgi?id=117284
+
+        Reviewed by David Hyatt.
+
+        Test: fast/text/whitespace/inline-whitespace-wrapping-7.html
+
+        We were looking for line breaks in trailing collapsed whitespace even when inside a nowrap inline.
+        It's wrong to do this as we don't know yet if we will want or need to break - that decision has to
+        be deferred until we enter a part of the line that is autowrap.
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
+
 2013-06-14  Lukasz Gajowy  <[email protected]>
 
         background-color is not preserved when inserting a new paragraph

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (151612 => 151613)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-06-15 04:42:23 UTC (rev 151612)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-06-15 06:59:28 UTC (rev 151613)
@@ -3409,7 +3409,7 @@
                     UChar c = nextText->characterAt(0);
                     // If we allow whitespace collapsing, 'word  ' and 'word' are equivalent before a whitespace
                     // character, so treat both as a potential linebreak.
-                    checkForBreak = (ignoringSpaces || !currentCharacterIsSpace) && (c == ' ' || c == '\t' || (c == '\n' && !next->preservesNewline()));
+                    checkForBreak = autoWrap && (ignoringSpaces || !currentCharacterIsSpace) && (c == ' ' || c == '\t' || (c == '\n' && !next->preservesNewline()));
                 } else if (nextText->isWordBreak())
                     checkForBreak = true;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to