Title: [149897] trunk
Revision
149897
Author
[email protected]
Date
2013-05-10 12:02:56 -0700 (Fri, 10 May 2013)

Log Message

REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818

Reviewed by David Hyatt.

Source/WebCore:

r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.

Test: fast/inline/anonymous-block-with-empty-inline.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):

LayoutTests:

* fast/inline/anonymous-block-with-empty-inline-expected.txt: Added.
* fast/inline/anonymous-block-with-empty-inline.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (149896 => 149897)


--- trunk/LayoutTests/ChangeLog	2013-05-10 18:47:32 UTC (rev 149896)
+++ trunk/LayoutTests/ChangeLog	2013-05-10 19:02:56 UTC (rev 149897)
@@ -1,3 +1,13 @@
+2013-05-10  Robert Hogan  <[email protected]>
+
+        REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
+        https://bugs.webkit.org/show_bug.cgi?id=115818
+
+        Reviewed by David Hyatt.
+
+        * fast/inline/anonymous-block-with-empty-inline-expected.txt: Added.
+        * fast/inline/anonymous-block-with-empty-inline.html: Added.
+
 2013-05-10  Dean Jackson  <[email protected]>
 
         Include tab character as a word end for kerning

Added: trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline-expected.txt (0 => 149897)


--- trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline-expected.txt	2013-05-10 19:02:56 UTC (rev 149897)
@@ -0,0 +1,3 @@
+webkit.org/b/115818: The empty inline should get a linebox
+PASS
+ 

Added: trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline.html (0 => 149897)


--- trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/anonymous-block-with-empty-inline.html	2013-05-10 19:02:56 UTC (rev 149897)
@@ -0,0 +1,24 @@
+<style>
+body {
+	margin: 0;
+}
+span {
+	background: red;
+	padding-left: 40px;
+}
+div {
+	background: green;
+	line-height: 40px;
+	width: 60px;
+}
+p {
+	line-height: 40px;
+	margin: 0;
+}
+</style>
+<script src=""
+<p> webkit.org/b/115818: The empty inline should get a linebox</p>
+<span id="inline" data-total-y=40></span><div id="first">&nbsp;</div>
+<script>
+    checkLayout('#inline');
+</script>

Modified: trunk/Source/WebCore/ChangeLog (149896 => 149897)


--- trunk/Source/WebCore/ChangeLog	2013-05-10 18:47:32 UTC (rev 149896)
+++ trunk/Source/WebCore/ChangeLog	2013-05-10 19:02:56 UTC (rev 149897)
@@ -1,3 +1,18 @@
+2013-05-10  Robert Hogan  <[email protected]>
+
+        REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
+        https://bugs.webkit.org/show_bug.cgi?id=115818
+
+        Reviewed by David Hyatt.
+
+        r148121 only worried about split inlines inside anonymous blocks - it ought to have 
+        catered for empty inlines, with no continuations, inside a single solitary anonymous block too.
+
+        Test: fast/inline/anonymous-block-with-empty-inline.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::hasInlineDirectionBordersPaddingOrMargin):
+
 2013-05-10  Zan Dobersek  <[email protected]>
 
         [GTK] Remove unnecessary includes in WidgetGtk.cpp

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (149896 => 149897)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-05-10 18:47:32 UTC (rev 149896)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-05-10 19:02:56 UTC (rev 149897)
@@ -2397,11 +2397,11 @@
 {
     // Where an empty inline is split across anonymous blocks we should only give lineboxes to the 'sides' of the
     // inline that have borders, padding or margin.
-    bool shouldApplyStartBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || flow->inlineElementContinuation();
+    bool shouldApplyStartBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || !flow->isInlineElementContinuation();
     if (shouldApplyStartBorderPaddingOrMargin && (flow->borderStart() || flow->marginStart() || flow->paddingStart()))
         return true;
 
-    bool shouldApplyEndBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || !flow->inlineElementContinuation();
+    bool shouldApplyEndBorderPaddingOrMargin = !flow->parent()->isAnonymousBlock() || flow->isInlineElementContinuation() || !flow->inlineElementContinuation();
     return shouldApplyEndBorderPaddingOrMargin && (flow->borderEnd() || flow->marginEnd() || flow->paddingEnd());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to