Title: [178260] releases/WebKitGTK/webkit-2.6
Revision
178260
Author
carlo...@webkit.org
Date
2015-01-12 06:20:01 -0800 (Mon, 12 Jan 2015)

Log Message

Merge r176287 - REGRESSION(r152313): Inline-block element doesn't wrap properly
https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/inline-block/inline-block-empty-spans.html

* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::canBreakAtThisPosition):

LayoutTests:

* fast/inline-block/inline-block-empty-spans-expected.html: Added.
* fast/inline-block/inline-block-empty-spans.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog (178259 => 178260)


--- releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog	2015-01-12 14:16:29 UTC (rev 178259)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog	2015-01-12 14:20:01 UTC (rev 178260)
@@ -1,3 +1,13 @@
+2014-11-18  David Hyatt  <hy...@apple.com>
+
+        REGRESSION(r152313): Inline-block element doesn't wrap properly
+        https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>
+
+        Reviewed by Simon Fraser.
+
+        * fast/inline-block/inline-block-empty-spans-expected.html: Added.
+        * fast/inline-block/inline-block-empty-spans.html: Added.
+
 2014-11-18  Myles C. Maxfield  <lithe...@gmail.com>
 
         Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns

Added: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html (0 => 178260)


--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html	2015-01-12 14:20:01 UTC (rev 178260)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+    table {
+    	width: 130px;
+    	border-collapse:collapse;
+    }
+    .button {
+      display: inline-block;
+      padding: 5px;
+      margin: 3px;
+      background: green;
+      min-width: 100px;
+    }
+</style>
+</head>
+<body>
+<table>
+	<tbody>
+		<tr>
+			<td>
+			  <div>
+			    <span class="button">One</span>
+                <span class="button">Two</span>
+                <span class="button">Three</span>
+			  </div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+</body>
+</html>

Added: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans.html (0 => 178260)


--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/inline-block/inline-block-empty-spans.html	2015-01-12 14:20:01 UTC (rev 178260)
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style type="text/css">
+    table {
+    	width: 130px;
+    	border-collapse:collapse;
+    }
+    .button {
+      display: inline-block;
+      padding: 5px;
+      margin: 3px;
+      background: green;
+      min-width: 100px;
+    }
+</style>
+</head>
+<body>
+<table>
+	<tbody>
+		<tr>
+			<td>
+			  <div>
+			    <span class="button">One</span><span class="button">Two</span><span class="button">Three</span><span> </span>
+			  </div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (178259 => 178260)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2015-01-12 14:16:29 UTC (rev 178259)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2015-01-12 14:20:01 UTC (rev 178260)
@@ -1,3 +1,15 @@
+2014-11-18  David Hyatt  <hy...@apple.com>
+
+        REGRESSION(r152313): Inline-block element doesn't wrap properly
+        https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>
+
+        Reviewed by Simon Fraser.
+
+        Added fast/inline-block/inline-block-empty-spans.html
+
+        * rendering/line/BreakingContextInlineHeaders.h:
+        (WebCore::BreakingContext::canBreakAtThisPosition):
+
 2014-11-18  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h (178259 => 178260)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h	2015-01-12 14:16:29 UTC (rev 178259)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h	2015-01-12 14:20:01 UTC (rev 178260)
@@ -935,8 +935,8 @@
     if (m_current.renderer()->isRenderInline() && isEmptyInline(toRenderInline(*m_current.renderer())))
         return false;
 
-    // Avoid breaking before empty inlines.
-    if (m_nextObject && m_nextObject->isRenderInline() && isEmptyInline(toRenderInline(*m_nextObject)))
+    // Avoid breaking before empty inlines (as long as the current object isn't replaced).
+    if (!m_current.renderer()->isReplaced() && m_nextObject && m_nextObject->isRenderInline() && isEmptyInline(toRenderInline(*m_nextObject)))
         return false;
 
     // Return early if we autowrap and the current character is a space as we will always want to break at such a position.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to