Title: [176287] trunk
- Revision
- 176287
- Author
- [email protected]
- Date
- 2014-11-18 14:51:42 -0800 (Tue, 18 Nov 2014)
Log Message
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: trunk/LayoutTests/ChangeLog (176286 => 176287)
--- trunk/LayoutTests/ChangeLog 2014-11-18 22:45:01 UTC (rev 176286)
+++ trunk/LayoutTests/ChangeLog 2014-11-18 22:51:42 UTC (rev 176287)
@@ -1,3 +1,13 @@
+2014-11-18 David Hyatt <[email protected]>
+
+ 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 <[email protected]>
Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
Added: trunk/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html (0 => 176287)
--- trunk/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html (rev 0)
+++ trunk/LayoutTests/fast/inline-block/inline-block-empty-spans-expected.html 2014-11-18 22:51:42 UTC (rev 176287)
@@ -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: trunk/LayoutTests/fast/inline-block/inline-block-empty-spans.html (0 => 176287)
--- trunk/LayoutTests/fast/inline-block/inline-block-empty-spans.html (rev 0)
+++ trunk/LayoutTests/fast/inline-block/inline-block-empty-spans.html 2014-11-18 22:51:42 UTC (rev 176287)
@@ -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: trunk/Source/WebCore/ChangeLog (176286 => 176287)
--- trunk/Source/WebCore/ChangeLog 2014-11-18 22:45:01 UTC (rev 176286)
+++ trunk/Source/WebCore/ChangeLog 2014-11-18 22:51:42 UTC (rev 176287)
@@ -1,3 +1,15 @@
+2014-11-18 David Hyatt <[email protected]>
+
+ 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 <[email protected]>
Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
Modified: trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h (176286 => 176287)
--- trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h 2014-11-18 22:45:01 UTC (rev 176286)
+++ trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h 2014-11-18 22:51:42 UTC (rev 176287)
@@ -931,8 +931,8 @@
if (is<RenderInline>(*m_current.renderer()) && isEmptyInline(downcast<RenderInline>(*m_current.renderer())))
return false;
- // Avoid breaking before empty inlines.
- if (is<RenderInline>(m_nextObject) && isEmptyInline(downcast<RenderInline>(*m_nextObject)))
+ // Avoid breaking before empty inlines (as long as the current object isn't replaced).
+ if (!m_current.renderer()->isReplaced() && is<RenderInline>(m_nextObject) && isEmptyInline(downcast<RenderInline>(*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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes