Title: [174370] trunk
Revision
174370
Author
[email protected]
Date
2014-10-06 15:07:33 -0700 (Mon, 06 Oct 2014)

Log Message

REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=137461

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/inline-block/simple-line-layout.html

* rendering/SimpleLineLayoutFunctions.h:
(WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
(WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
Fix the baseline computation functions in simple line layout to
use lineCount rather than runCount.

LayoutTests:

* fast/inline-block/simple-line-layout-expected.html: Added.
* fast/inline-block/simple-line-layout.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (174369 => 174370)


--- trunk/LayoutTests/ChangeLog	2014-10-06 22:07:24 UTC (rev 174369)
+++ trunk/LayoutTests/ChangeLog	2014-10-06 22:07:33 UTC (rev 174370)
@@ -1,3 +1,13 @@
+2014-10-06  David Hyatt  <[email protected]>
+
+        REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=137461
+
+        Reviewed by Simon Fraser.
+
+        * fast/inline-block/simple-line-layout-expected.html: Added.
+        * fast/inline-block/simple-line-layout.html: Added.
+
 2014-10-06  Benjamin Poulain  <[email protected]>
 
         Unreviewed, rolling out r174336.

Added: trunk/LayoutTests/fast/inline-block/simple-line-layout-expected.html (0 => 174370)


--- trunk/LayoutTests/fast/inline-block/simple-line-layout-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline-block/simple-line-layout-expected.html	2014-10-06 22:07:33 UTC (rev 174370)
@@ -0,0 +1 @@
+One <div style="display:inline-block">This line has multiple runs.</div> Two

Added: trunk/LayoutTests/fast/inline-block/simple-line-layout.html (0 => 174370)


--- trunk/LayoutTests/fast/inline-block/simple-line-layout.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline-block/simple-line-layout.html	2014-10-06 22:07:33 UTC (rev 174370)
@@ -0,0 +1 @@
+One <div style="display:inline-block">This  line  has  multiple  runs.</div> Two

Modified: trunk/Source/WebCore/ChangeLog (174369 => 174370)


--- trunk/Source/WebCore/ChangeLog	2014-10-06 22:07:24 UTC (rev 174369)
+++ trunk/Source/WebCore/ChangeLog	2014-10-06 22:07:33 UTC (rev 174370)
@@ -1,3 +1,18 @@
+2014-10-06  David Hyatt  <[email protected]>
+
+        REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=137461
+
+        Reviewed by Simon Fraser.
+
+        Added fast/inline-block/simple-line-layout.html
+
+        * rendering/SimpleLineLayoutFunctions.h:
+        (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
+        (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
+        Fix the baseline computation functions in simple line layout to
+        use lineCount rather than runCount.
+
 2014-10-06  Ada Chan  <[email protected]>
 
         Add ChromeClient::isPlayingAudioDidChange().

Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h (174369 => 174370)


--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h	2014-10-06 22:07:24 UTC (rev 174369)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h	2014-10-06 22:07:33 UTC (rev 174370)
@@ -78,14 +78,14 @@
 
 inline LayoutUnit computeFlowFirstLineBaseline(const RenderBlockFlow& flow, const Layout& layout)
 {
-    ASSERT_UNUSED(layout, layout.runCount());
+    ASSERT_UNUSED(layout, layout.lineCount());
     return flow.borderAndPaddingBefore() + baselineFromFlow(flow);
 }
 
 inline LayoutUnit computeFlowLastLineBaseline(const RenderBlockFlow& flow, const Layout& layout)
 {
-    ASSERT(layout.runCount());
-    return flow.borderAndPaddingBefore() + lineHeightFromFlow(flow) * (layout.runCount() - 1) + baselineFromFlow(flow);
+    ASSERT(layout.lineCount());
+    return flow.borderAndPaddingBefore() + lineHeightFromFlow(flow) * (layout.lineCount() - 1) + baselineFromFlow(flow);
 }
 
 inline unsigned findTextCaretMinimumOffset(const RenderText&, const Layout& layout)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to