<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181292] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181292">181292</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-03-09 16:43:34 -0700 (Mon, 09 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION(<a href="http://trac.webkit.org/projects/webkit/changeset/176978">r176978</a>): Inline-blocks with overflowing contents have ascents that are too large
https://bugs.webkit.org/show_bug.cgi?id=141783

Reviewed by David Hyatt.

Source/WebCore:

When we have an inline-block element, and we want to find its baseline (to lay out other
elements on the same line) we loop through the element's children and ask them what their
baselines are. The children use the location of the top of their last line to compute this
value. However, if the child has overflow-y, this might not be the correct calculation.

This behavior is in the spec: &quot;The baseline of an 'inline-block' is the baseline of its last
line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow'
property has a computed value other than 'visible', in which case the baseline is the bottom
margin edge.&quot;
    -- http://www.w3.org/TR/CSS21/visudet.html#leading

However, we believe that a better policy is, when overflow is not &quot;visible,&quot; to place the
baseline at the bottom of the block if the contents overflowed in the Y direction, and to place
it at the bottom of the last line if the contents did not overflow in the Y direction. This is
partially consistent with previous behavior, and isn't too far from the spec to cause too many
breakages.

Test: fast/css/inline-block-tricky-baselines.html
      fast/text/baseline-inline-block.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineBlockBaseline):

LayoutTests:

Update expected results.

* css3/flexbox/child-overflow-expected.html:
* css3/flexbox/child-overflow.html:
* fast/css/inline-block-tricky-baselines-expected.html: Added.
* fast/css/inline-block-tricky-baselines.html: Added.
* fast/forms/textfield-overflow-by-value-update-expected.txt:
* fast/text/baseline-inline-block-expected.html: Added.
* fast/text/baseline-inline-block.html: Added.
* platform/mac/fast/forms/search-vertical-alignment-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3flexboxchildoverflowexpectedhtml">trunk/LayoutTests/css3/flexbox/child-overflow-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3flexboxchildoverflowhtml">trunk/LayoutTests/css3/flexbox/child-overflow.html</a></li>
<li><a href="#trunkLayoutTestsfastformstextfieldoverflowbyvalueupdateexpectedtxt">trunk/LayoutTests/fast/forms/textfield-overflow-by-value-update-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastformssearchverticalalignmentexpectedtxt">trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmavericksfastformssearchverticalalignmentexpectedtxt">trunk/LayoutTests/platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssinlineblocktrickybaselinesexpectedhtml">trunk/LayoutTests/fast/css/inline-block-tricky-baselines-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssinlineblocktrickybaselineshtml">trunk/LayoutTests/fast/css/inline-block-tricky-baselines.html</a></li>
<li><a href="#trunkLayoutTestsfasttextbaselineinlineblockexpectedhtml">trunk/LayoutTests/fast/text/baseline-inline-block-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextbaselineinlineblockhtml">trunk/LayoutTests/fast/text/baseline-inline-block.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/ChangeLog        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-03-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        REGRESSION(r176978): Inline-blocks with overflowing contents have ascents that are too large
+        https://bugs.webkit.org/show_bug.cgi?id=141783
+
+        Reviewed by David Hyatt.
+
+        Update expected results.
+
+        * css3/flexbox/child-overflow-expected.html:
+        * css3/flexbox/child-overflow.html:
+        * fast/css/inline-block-tricky-baselines-expected.html: Added.
+        * fast/css/inline-block-tricky-baselines.html: Added.
+        * fast/forms/textfield-overflow-by-value-update-expected.txt:
+        * fast/text/baseline-inline-block-expected.html: Added.
+        * fast/text/baseline-inline-block.html: Added.
+        * platform/mac/fast/forms/search-vertical-alignment-expected.txt:
+
</ins><span class="cx"> 2015-03-09  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Content Filtering] Add tests
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxchildoverflowexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/child-overflow-expected.html (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/child-overflow-expected.html        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/css3/flexbox/child-overflow-expected.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> &lt;style&gt;
</span><span class="cx"> .container {
</span><span class="cx">     display: inline-block;
</span><ins>+    vertical-align: top;
</ins><span class="cx">     margin-right: 30px;
</span><span class="cx">     width: 100px;
</span><span class="cx">     height: 100px;
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxchildoverflowhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/child-overflow.html (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/child-overflow.html        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/css3/flexbox/child-overflow.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx"> &lt;style&gt;
</span><span class="cx"> .container {
</span><span class="cx">     display: inline-block;
</span><ins>+    vertical-align: top;
</ins><span class="cx">     margin-right: 30px;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssinlineblocktrickybaselinesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/inline-block-tricky-baselines-expected.html (0 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/inline-block-tricky-baselines-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css/inline-block-tricky-baselines-expected.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+
+  .inline-block {
+    display: inline-block;
+  }
+
+  .inner {
+    display: block;
+    width: 22px;
+    height: 13px;
+    overflow: hidden;
+  }
+&lt;/style&gt;
+&lt;div class=&quot;pause inline-block&quot;&gt;
+  &lt;div class=&quot;inner&quot;&gt;
+    Single
+  &lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&quot;next inline-block&quot;&gt;
+  &lt;div class=&quot;inner&quot;&gt;
+    Multiple
+  &lt;/div&gt;
+&lt;/div&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssinlineblocktrickybaselineshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/inline-block-tricky-baselines.html (0 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/inline-block-tricky-baselines.html                                (rev 0)
+++ trunk/LayoutTests/fast/css/inline-block-tricky-baselines.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+
+  .inline-block {
+    display: inline-block;
+  }
+
+  .inner {
+    display: block;
+    width: 22px;
+    height: 13px;
+    overflow: hidden;
+  }
+&lt;/style&gt;
+&lt;div class=&quot;pause inline-block&quot;&gt;
+  &lt;div class=&quot;inner&quot;&gt;
+    Single-line
+  &lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&quot;next inline-block&quot;&gt;
+  &lt;div class=&quot;inner&quot;&gt;
+    Multiple words that get wrapped
+  &lt;/div&gt;
+&lt;/div&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformstextfieldoverflowbyvalueupdateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/textfield-overflow-by-value-update-expected.txt (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/textfield-overflow-by-value-update-expected.txt        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/fast/forms/textfield-overflow-by-value-update-expected.txt        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx">   RenderView at (0,0) size 800x600
</span><del>-layer at (0,0) size 800x52
-  RenderBlock {HTML} at (0,0) size 800x52
-    RenderBody {BODY} at (8,8) size 784x36
-      RenderTextControl {INPUT} at (0,0) size 102x2 [bgcolor=#FFFFFF]
</del><ins>+layer at (0,0) size 800x34
+  RenderBlock {HTML} at (0,0) size 800x34
+    RenderBody {BODY} at (8,8) size 784x18
+      RenderTextControl {INPUT} at (0,13) size 102x2 [bgcolor=#FFFFFF]
</ins><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextbaselineinlineblockexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/baseline-inline-block-expected.html (0 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/baseline-inline-block-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/baseline-inline-block-expected.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;div style=&quot;background: cyan; width: 100%; height: 352px;&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 13px; top: 95px; width: 50px; height: 150px; overflow: scroll;&quot;&gt;&lt;div style=&quot;width: 16px; height: 240px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 84px; top: 90px; width: 60px; height: 160px;&quot;&gt;&lt;div style=&quot;background: green; position: absolute; left: 5px; top: 5px; width: 50px; height: 150px; overflow: scroll;&quot;&gt;&lt;div style=&quot;width: 16px; height: 240px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 165px; top: 13px; width: 50px; height: 150px;&quot;&gt;&lt;div style=&quot;width: 16px; height: 240px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 236px; top: 8px; width: 60px; height: 160px;&quot;&gt;&lt;div style=&quot;background: green; position: absolute; left: 5px; top: 5px; width: 50px; height: 150px;&quot;&gt;&lt;div style=&quot;width: 16px; height: 240px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 312px; top: 184px; width: 60px; height: 160px;&quot;&gt;&lt;div style=&quot;background: green; position: absolute; left: 5px; top: 5px; width: 50px; height: 150px; overflow: scroll;&quot;&gt;&lt;div style=&quot;width: 16px; height: 64px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 388px; top: 184px; width: 60px; height: 160px;&quot;&gt;&lt;div style=&quot;background: green; position: absolute; left: 5px; top: 5px; width: 50px; height: 150px;&quot;&gt;&lt;div style=&quot;width: 16px; height: 64px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: green; position: absolute; left: 469px; top: 189px; width: 50px; height: 150px;&quot;&gt;&lt;div style=&quot;width: 16px; height: 64px; background: black;&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div style=&quot;background: black; position: absolute; left: 540px; top: 237px; width: 16px; height: 16px;&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;background: black; position: absolute; left: 8px; top: 344px; width: 16px; height: 16px;&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextbaselineinlineblockhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/baseline-inline-block.html (0 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/baseline-inline-block.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/baseline-inline-block.html        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;div style=&quot;background: cyan; font-family: Ahem; -webkit-font-smoothing: none;&quot;&gt;
+&lt;div style=&quot;display: inline-block; background: green; height: 150px; width: 50px; overflow: scroll; margin: 5px;&quot;&gt;
+    L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green;&quot;&gt;
+    &lt;div style=&quot;height: 150px; width: 50px; overflow: scroll; margin: 5px;&quot;&gt;
+        L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green; height: 150px; width: 50px; margin: 5px;&quot;&gt;
+    L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green;&quot;&gt;
+    &lt;div style=&quot;height: 150px; width: 50px; margin: 5px;&quot;&gt;
+        L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green;&quot;&gt;
+    &lt;div style=&quot;height: 150px; width: 50px; overflow: scroll; margin: 5px;&quot;&gt;
+        L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green;&quot;&gt;
+    &lt;div style=&quot;height: 150px; width: 50px; margin: 5px;&quot;&gt;
+        L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div style=&quot;display: inline-block; background: green; height: 150px; width: 50px; margin: 5px;&quot;&gt;
+    L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;L&lt;br&gt;
+&lt;/div&gt;
+L&lt;br&gt;L
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastformssearchverticalalignmentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -31,14 +31,14 @@
</span><span class="cx">         RenderTextControl {INPUT} at (176,2) size 137x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</span><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {P} at (0,147) size 784x18
</span><del>-        RenderTextControl {INPUT} at (2,0) size 167x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</del><ins>+        RenderTextControl {INPUT} at (2,5) size 167x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</ins><span class="cx">           RenderFlexibleBox {DIV} at (3,0) size 161x12
</span><span class="cx">             RenderBlock {DIV} at (0,0) size 17x12
</span><span class="cx">             RenderBlock {DIV} at (17,3) size 131x6
</span><span class="cx">             RenderBlock {DIV} at (147,0) size 14x12
</span><span class="cx">         RenderText {#text} at (170,0) size 5x18
</span><span class="cx">           text run at (170,0) width 5: &quot; &quot;
</span><del>-        RenderTextControl {INPUT} at (176,0) size 137x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</del><ins>+        RenderTextControl {INPUT} at (176,5) size 137x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx"> layer at (30,76) size 130x13
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 131x13
</span><span class="lines">@@ -56,11 +56,11 @@
</span><span class="cx">   RenderBlock {DIV} at (3,1) size 131x13
</span><span class="cx">     RenderText {#text} at (0,0) size 22x13
</span><span class="cx">       text run at (0,0) width 22: &quot;Text&quot;
</span><del>-layer at (30,158) size 130x6 scrollHeight 13
</del><ins>+layer at (30,163) size 130x6 scrollHeight 13
</ins><span class="cx">   RenderBlock {DIV} at (0,0) size 131x6
</span><span class="cx">     RenderText {#text} at (0,0) size 22x13
</span><span class="cx">       text run at (0,0) width 22: &quot;Text&quot;
</span><del>-layer at (187,158) size 130x6 scrollHeight 13
</del><ins>+layer at (187,163) size 130x6 scrollHeight 13
</ins><span class="cx">   RenderBlock {DIV} at (3,3) size 131x6
</span><span class="cx">     RenderText {#text} at (0,0) size 22x13
</span><span class="cx">       text run at (0,0) width 22: &quot;Text&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmavericksfastformssearchverticalalignmentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.txt (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.txt        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.txt        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -31,14 +31,14 @@
</span><span class="cx">         RenderTextControl {INPUT} at (185,2) size 146x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</span><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {P} at (0,147) size 784x18
</span><del>-        RenderTextControl {INPUT} at (2,0) size 176x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</del><ins>+        RenderTextControl {INPUT} at (2,5) size 176x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</ins><span class="cx">           RenderFlexibleBox {DIV} at (3,0) size 170x12
</span><span class="cx">             RenderBlock {DIV} at (0,0) size 17x12
</span><span class="cx">             RenderBlock {DIV} at (17,3) size 140x6
</span><span class="cx">             RenderBlock {DIV} at (156,0) size 14x12
</span><span class="cx">         RenderText {#text} at (179,0) size 5x18
</span><span class="cx">           text run at (179,0) width 5: &quot; &quot;
</span><del>-        RenderTextControl {INPUT} at (185,0) size 146x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</del><ins>+        RenderTextControl {INPUT} at (185,5) size 146x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx"> layer at (30,76) size 139x13
</span><span class="cx">   RenderBlock {DIV} at (0,0) size 140x13
</span><span class="lines">@@ -56,11 +56,11 @@
</span><span class="cx">   RenderBlock {DIV} at (3,1) size 140x13
</span><span class="cx">     RenderText {#text} at (0,0) size 23x13
</span><span class="cx">       text run at (0,0) width 23: &quot;Text&quot;
</span><del>-layer at (30,158) size 139x6 scrollHeight 13
</del><ins>+layer at (30,163) size 139x6 scrollHeight 13
</ins><span class="cx">   RenderBlock {DIV} at (0,0) size 140x6
</span><span class="cx">     RenderText {#text} at (0,0) size 23x13
</span><span class="cx">       text run at (0,0) width 23: &quot;Text&quot;
</span><del>-layer at (196,158) size 139x6 scrollHeight 13
</del><ins>+layer at (196,163) size 139x6 scrollHeight 13
</ins><span class="cx">   RenderBlock {DIV} at (3,3) size 140x6
</span><span class="cx">     RenderText {#text} at (0,0) size 23x13
</span><span class="cx">       text run at (0,0) width 23: &quot;Text&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/Source/WebCore/ChangeLog        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-03-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        REGRESSION(r176978): Inline-blocks with overflowing contents have ascents that are too large
+        https://bugs.webkit.org/show_bug.cgi?id=141783
+
+        Reviewed by David Hyatt.
+
+        When we have an inline-block element, and we want to find its baseline (to lay out other
+        elements on the same line) we loop through the element's children and ask them what their
+        baselines are. The children use the location of the top of their last line to compute this
+        value. However, if the child has overflow-y, this might not be the correct calculation.
+
+        This behavior is in the spec: &quot;The baseline of an 'inline-block' is the baseline of its last
+        line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow'
+        property has a computed value other than 'visible', in which case the baseline is the bottom
+        margin edge.&quot;
+            -- http://www.w3.org/TR/CSS21/visudet.html#leading
+
+        However, we believe that a better policy is, when overflow is not &quot;visible,&quot; to place the
+        baseline at the bottom of the block if the contents overflowed in the Y direction, and to place
+        it at the bottom of the last line if the contents did not overflow in the Y direction. This is
+        partially consistent with previous behavior, and isn't too far from the spec to cause too many
+        breakages.
+
+        Test: fast/css/inline-block-tricky-baselines.html
+              fast/text/baseline-inline-block.html
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::inlineBlockBaseline):
+
</ins><span class="cx"> 2015-03-09  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Content Filtering] Add tests
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (181291 => 181292)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-03-09 23:39:05 UTC (rev 181291)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-03-09 23:43:34 UTC (rev 181292)
</span><span class="lines">@@ -3023,12 +3023,20 @@
</span><span class="cx">              + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // Note that here we only take the left and bottom into consideration. Our caller takes the right and top into consideration.
+    float boxHeight = lineDirection == HorizontalLine ? height() + m_marginBox.bottom() : width() + m_marginBox.left();
+    float lastBaseline;
</ins><span class="cx">     if (auto simpleLineLayout = this-&gt;simpleLineLayout())
</span><del>-        return SimpleLineLayout::computeFlowLastLineBaseline(*this, *simpleLineLayout);
-
-    bool isFirstLine = lastRootBox() == firstRootBox();
-    const RenderStyle&amp; style = isFirstLine ? firstLineStyle() : this-&gt;style();
-    return lastRootBox()-&gt;logicalTop() + style.fontMetrics().ascent(lastRootBox()-&gt;baselineType());
</del><ins>+        lastBaseline = SimpleLineLayout::computeFlowLastLineBaseline(*this, *simpleLineLayout);
+    else {
+        bool isFirstLine = lastRootBox() == firstRootBox();
+        const RenderStyle&amp; style = isFirstLine ? firstLineStyle() : this-&gt;style();
+        lastBaseline = lastRootBox()-&gt;logicalTop() + style.fontMetrics().ascent(lastRootBox()-&gt;baselineType());
+    }
+    // According to the CSS spec http://www.w3.org/TR/CSS21/visudet.html, we shouldn't be performing this min, but should
+    // instead be returning boxHeight directly. However, we feel that a min here is better behavior (and is consistent
+    // enough with the spec to not cause tons of breakages).
+    return style().overflowY() == OVISIBLE ? lastBaseline : std::min(boxHeight, lastBaseline);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GapRects RenderBlockFlow::inlineSelectionGaps(RenderBlock&amp; rootBlock, const LayoutPoint&amp; rootBlockPhysicalPosition, const LayoutSize&amp; offsetFromRootBlock,
</span></span></pre>
</div>
</div>

</body>
</html>