<!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>[182241] 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/182241">182241</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2015-04-01 11:10:32 -0700 (Wed, 01 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
https://bugs.webkit.org/show_bug.cgi?id=143307
Reviewed by Dean Jackson.
Source/WebCore:
Added fast/block/inside-inlines/basic-float-intrusion.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
Make sure to exclude the margins of an anonymous inline-block when considering the height of the line.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::baselinePosition):
Anonymous inline-block lines ignore line-height and just return the height of the block. For baseline position, the baseline
is considered to be at the bottom border edge of the anonymous inline-block.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::addIntrudingFloats):
* rendering/RenderBlockFlow.h:
Patch float intrusion to handle the case of anonymous inline-blocks. Instead of collecting the floats from our parent(), we
collect them from the containingBlock() in the anonymous inline-block case. Patch addIntrudingFloats to pass in the container
that acts as the "parent", since it is not the parent() in the anonymous inline-block case.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalInlinePositions):
Make sure to use the full available width for content always in the anonymous inline-block case, since we don't avoid the
floats, but instead let them intrude into the inline-block.
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
Patch callers of updateLogicalInlinePositions to pass in the root line box that we're checking for.
(WebCore::RenderBlockFlow::layoutLineBoxes):
Defer the layout of anonymous inline-blocks, since they need to only lay out once the vertical position to lay them out
at is known.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext):
(WebCore::RenderBox::avoidsFloats):
Anonymous inline-blocks do not establish a new block formatting context, nor do they avoid floats.
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleReplaced):
Add code to do a just-in-time layout of the anonymous inline-block at the time it is being examined (after the break before
it was handled).
LayoutTests:
* fast/block/inside-inlines/basic-float-intrusion-expected.html: Added.
* fast/block/inside-inlines/basic-float-intrusion.html: Added.
* fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html: Added.
* fast/block/inside-inlines/new-model/basic-float-intrusion.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowh">trunk/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderinglineBreakingContexth">trunk/Source/WebCore/rendering/line/BreakingContext.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastblockinsideinlinesbasicfloatintrusionexpectedhtml">trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastblockinsideinlinesbasicfloatintrusionhtml">trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion.html</a></li>
<li><a href="#trunkLayoutTestsfastblockinsideinlinesnewmodelbasicfloatintrusionexpectedhtml">trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastblockinsideinlinesnewmodelbasicfloatintrusionhtml">trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/LayoutTests/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-04-01 David Hyatt <hyatt@apple.com>
+
+ [New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
+ https://bugs.webkit.org/show_bug.cgi?id=143307
+
+ Reviewed by Dean Jackson.
+
+ * fast/block/inside-inlines/basic-float-intrusion-expected.html: Added.
+ * fast/block/inside-inlines/basic-float-intrusion.html: Added.
+ * fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html: Added.
+ * fast/block/inside-inlines/new-model/basic-float-intrusion.html: Added.
+
</ins><span class="cx"> 2015-04-01 Hunseop Jeong <hs85.jeong@samsung.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed EFL gardening. Remove warning message in layoutTest.
</span></span></pre></div>
<a id="trunkLayoutTestsfastblockinsideinlinesbasicfloatintrusionexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion-expected.html (0 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion-expected.html        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!doctype html>
+<head>
+<style>
+.box { border:1px solid black; padding:3px; margin:3px }
+.nowrap { white-space: nowrap; }
+.float { float: left; }
+.box div { height:40px; }
+.float { width:100px; height:100px; background-color:cyan }
+</style>
+<body>
+
+<div class="float"></div>
+
+<div class="box"><div>Avoid the float!</div></div>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastblockinsideinlinesbasicfloatintrusionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion.html (0 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion.html         (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/basic-float-intrusion.html        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!doctype html>
+<head>
+<style>
+.box { border:1px solid black; padding:3px; margin:3px }
+.nowrap { white-space: nowrap; }
+.float { float: left; }
+.box div { height:40px; }
+.float { width:100px; height:100px; background-color:cyan }
+</style>
+<body>
+
+<div class="float"></div>
+
+<div class="box"><a><div>Avoid the float!</div></a></div>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastblockinsideinlinesnewmodelbasicfloatintrusionexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html (0 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion-expected.html        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!doctype html>
+<head>
+<style>
+.box { border:1px solid black; padding:3px; margin:3px }
+.nowrap { white-space: nowrap; }
+.float { float: left; }
+.box div { height:40px; }
+.float { width:100px; height:100px; background-color:cyan }
+</style>
+<body>
+
+<div class="float"></div>
+
+<div class="box"><div>Avoid the float!</div></div>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastblockinsideinlinesnewmodelbasicfloatintrusionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html (0 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html         (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/new-model/basic-float-intrusion.html        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<!doctype html>
+<head>
+<style>
+.box { border:1px solid black; padding:3px; margin:3px }
+.nowrap { white-space: nowrap; }
+.float { float: left; }
+.box div { height:40px; }
+.float { width:100px; height:100px; background-color:cyan }
+</style>
+<script>
+if (window.internals)
+ window.internals.settings.setNewBlockInsideInlineModelEnabled(true)
+</script>
+<body>
+
+<div class="float"></div>
+
+<div class="box"><a><div>Avoid the float!</div></a></div>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/ChangeLog        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2015-04-01 David Hyatt <hyatt@apple.com>
+
+ [New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
+ https://bugs.webkit.org/show_bug.cgi?id=143307
+
+ Reviewed by Dean Jackson.
+
+ Added fast/block/inside-inlines/basic-float-intrusion.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
+ Make sure to exclude the margins of an anonymous inline-block when considering the height of the line.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::lineHeight):
+ (WebCore::RenderBlock::baselinePosition):
+ Anonymous inline-block lines ignore line-height and just return the height of the block. For baseline position, the baseline
+ is considered to be at the bottom border edge of the anonymous inline-block.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
+ (WebCore::RenderBlockFlow::addIntrudingFloats):
+ * rendering/RenderBlockFlow.h:
+ Patch float intrusion to handle the case of anonymous inline-blocks. Instead of collecting the floats from our parent(), we
+ collect them from the containingBlock() in the anonymous inline-block case. Patch addIntrudingFloats to pass in the container
+ that acts as the "parent", since it is not the parent() in the anonymous inline-block case.
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::updateLogicalInlinePositions):
+ Make sure to use the full available width for content always in the anonymous inline-block case, since we don't avoid the
+ floats, but instead let them intrude into the inline-block.
+
+ (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
+ Patch callers of updateLogicalInlinePositions to pass in the root line box that we're checking for.
+
+ (WebCore::RenderBlockFlow::layoutLineBoxes):
+ Defer the layout of anonymous inline-blocks, since they need to only lay out once the vertical position to lay them out
+ at is known.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::createsNewFormattingContext):
+ (WebCore::RenderBox::avoidsFloats):
+ Anonymous inline-blocks do not establish a new block formatting context, nor do they avoid floats.
+
+ * rendering/line/BreakingContext.h:
+ (WebCore::BreakingContext::handleReplaced):
+ Add code to do a just-in-time layout of the anonymous inline-block at the time it is being examined (after the break before
+ it was handled).
+
</ins><span class="cx"> 2015-04-01 Eric Carlson <eric.carlson@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] Do not include route button if element does not support target playback
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -671,7 +671,7 @@
</span><span class="cx"> : boxObject.borderRight() + boxObject.paddingRight();
</span><span class="cx"> }
</span><span class="cx"> newLogicalTopIncludingMargins = newLogicalTop;
</span><del>- } else if (!child->renderer().isBR()) {
</del><ins>+ } else if (!child->renderer().isBR() && !child->renderer().isAnonymousInlineBlock()) {
</ins><span class="cx"> const auto& box = downcast<RenderBox>(child->renderer());
</span><span class="cx"> newLogicalTopIncludingMargins = newLogicalTop;
</span><span class="cx"> LayoutUnit overSideMargin = child->isHorizontal() ? box.marginTop() : box.marginRight();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -2802,6 +2802,10 @@
</span><span class="cx">
</span><span class="cx"> LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
</span><span class="cx"> {
</span><ins>+ // Anonymous inline blocks don't include margins or any real line height.
+ if (isAnonymousInlineBlock() && linePositionMode == PositionOnContainingLine)
+ return direction == HorizontalLine ? height() : width();
+
</ins><span class="cx"> // Inline blocks are replaced elements. Otherwise, just pass off to
</span><span class="cx"> // the base class. If we're being queried as though we're the root line
</span><span class="cx"> // box, then the fact that we're an inline-block is irrelevant, and we behave
</span><span class="lines">@@ -2825,6 +2829,9 @@
</span><span class="cx"> // box, then the fact that we're an inline-block is irrelevant, and we behave
</span><span class="cx"> // just like a block.
</span><span class="cx"> if (isReplaced() && linePositionMode == PositionOnContainingLine) {
</span><ins>+ if (isAnonymousInlineBlock())
+ return direction == HorizontalLine ? height() : width();
+
</ins><span class="cx"> // For "leaf" theme objects, let the theme decide what the baseline position is.
</span><span class="cx"> // FIXME: Might be better to have a custom CSS property instead, so that if the theme
</span><span class="cx"> // is turned off, checkboxes/radios will still have decent baselines.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -232,17 +232,20 @@
</span><span class="cx"> // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add
</span><span class="cx"> // floats in an invalid context. This will cause a crash arising from a bad cast on the parent.
</span><span class="cx"> // See <rdar://problem/8049753>, where float property is applied on a text node in a SVG.
</span><del>- if (!is<RenderBlockFlow>(parent()))
</del><ins>+ bool isBlockInsideInline = isAnonymousInlineBlock();
+ if (!is<RenderBlockFlow>(parent()) && !isBlockInsideInline)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // First add in floats from the parent. Self-collapsing blocks let their parent track any floats that intrude into
</span><span class="cx"> // them (as opposed to floats they contain themselves) so check for those here too.
</span><del>- RenderBlockFlow& parentBlock = downcast<RenderBlockFlow>(*parent());
- bool parentHasFloats = false;
- RenderBlockFlow* previousBlock = previousSiblingWithOverhangingFloats(parentHasFloats);
</del><ins>+ RenderBlockFlow& parentBlock = downcast<RenderBlockFlow>(isBlockInsideInline ? *containingBlock() : *parent());
+ bool parentHasFloats = isBlockInsideInline ? parentBlock.containsFloats() : false;
+ RenderBlockFlow* previousBlock = nullptr;
+ if (!isBlockInsideInline)
+ previousBlock = previousSiblingWithOverhangingFloats(parentHasFloats);
</ins><span class="cx"> LayoutUnit logicalTopOffset = logicalTop();
</span><span class="cx"> if (parentHasFloats || (parentBlock.lowestFloatLogicalBottom() > logicalTopOffset && previousBlock && previousBlock->isSelfCollapsingBlock()))
</span><del>- addIntrudingFloats(&parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset);
</del><ins>+ addIntrudingFloats(&parentBlock, &parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset);
</ins><span class="cx">
</span><span class="cx"> LayoutUnit logicalLeftOffset = 0;
</span><span class="cx"> if (previousBlock)
</span><span class="lines">@@ -254,7 +257,7 @@
</span><span class="cx">
</span><span class="cx"> // Add overhanging floats from the previous RenderBlock, but only if it has a float that intrudes into our space.
</span><span class="cx"> if (previousBlock->m_floatingObjects && previousBlock->lowestFloatLogicalBottom() > logicalTopOffset)
</span><del>- addIntrudingFloats(previousBlock, logicalLeftOffset, logicalTopOffset);
</del><ins>+ addIntrudingFloats(previousBlock, &parentBlock, logicalLeftOffset, logicalTopOffset);
</ins><span class="cx">
</span><span class="cx"> if (childrenInline()) {
</span><span class="cx"> LayoutUnit changeLogicalTop = LayoutUnit::max();
</span><span class="lines">@@ -2681,7 +2684,7 @@
</span><span class="cx"> return logicalBottomForFloat(it->get()) > logicalHeight();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderBlockFlow::addIntrudingFloats(RenderBlockFlow* prev, LayoutUnit logicalLeftOffset, LayoutUnit logicalTopOffset)
</del><ins>+void RenderBlockFlow::addIntrudingFloats(RenderBlockFlow* prev, RenderBlockFlow* container, LayoutUnit logicalLeftOffset, LayoutUnit logicalTopOffset)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!avoidsFloats());
</span><span class="cx">
</span><span class="lines">@@ -2711,8 +2714,8 @@
</span><span class="cx"> // into account. Only apply this code if prev is the parent, since otherwise the left margin
</span><span class="cx"> // will get applied twice.
</span><span class="cx"> LayoutSize offset = isHorizontalWritingMode()
</span><del>- ? LayoutSize(logicalLeftOffset - (prev != parent() ? prev->marginLeft() : LayoutUnit()), logicalTopOffset)
- : LayoutSize(logicalTopOffset, logicalLeftOffset - (prev != parent() ? prev->marginTop() : LayoutUnit()));
</del><ins>+ ? LayoutSize(logicalLeftOffset - (prev != container ? prev->marginLeft() : LayoutUnit()), logicalTopOffset)
+ : LayoutSize(logicalTopOffset, logicalLeftOffset - (prev != container ? prev->marginTop() : LayoutUnit()));
</ins><span class="cx">
</span><span class="cx"> m_floatingObjects->add(floatingObject->copyToNewContainer(offset));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.h        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx">
</span><span class="cx"> LayoutUnit addOverhangingFloats(RenderBlockFlow& child, bool makeChildPaintOtherFloats);
</span><span class="cx"> bool hasOverhangingFloat(RenderBox&);
</span><del>- void addIntrudingFloats(RenderBlockFlow* prev, LayoutUnit xoffset, LayoutUnit yoffset);
</del><ins>+ void addIntrudingFloats(RenderBlockFlow* prev, RenderBlockFlow* container, LayoutUnit xoffset, LayoutUnit yoffset);
</ins><span class="cx"> bool hasOverhangingFloats() { return parent() && containsFloats() && lowestFloatLogicalBottom() > logicalHeight(); }
</span><span class="cx"> LayoutUnit getClearDelta(RenderBox& child, LayoutUnit yPos);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -685,11 +685,17 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void updateLogicalInlinePositions(RenderBlockFlow& block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight)
</del><ins>+static void updateLogicalInlinePositions(RenderBlockFlow& block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight,
+ RootInlineBox* rootBox)
</ins><span class="cx"> {
</span><span class="cx"> LayoutUnit lineLogicalHeight = block.minLineHeightForReplacedRenderer(firstLine, boxLogicalHeight);
</span><del>- lineLogicalLeft = block.logicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight);
- lineLogicalRight = block.logicalRightOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight);
</del><ins>+ if (rootBox->hasAnonymousInlineBlock()) {
+ lineLogicalLeft = block.logicalLeftOffsetForContent(block.logicalHeight());
+ lineLogicalRight = block.logicalRightOffsetForContent(block.logicalHeight());
+ } else {
+ lineLogicalLeft = block.logicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight);
+ lineLogicalRight = block.logicalRightOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight);
+ }
</ins><span class="cx"> availableLogicalWidth = lineLogicalRight - lineLogicalLeft;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -707,12 +713,12 @@
</span><span class="cx"> float lineLogicalLeft;
</span><span class="cx"> float lineLogicalRight;
</span><span class="cx"> float availableLogicalWidth;
</span><del>- updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, 0);
</del><ins>+ updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, 0, lineBox);
</ins><span class="cx"> bool needsWordSpacing;
</span><span class="cx">
</span><span class="cx"> if (firstRun && firstRun->renderer().isReplaced()) {
</span><span class="cx"> RenderBox& renderBox = downcast<RenderBox>(firstRun->renderer());
</span><del>- updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, renderBox.logicalHeight());
</del><ins>+ updateLogicalInlinePositions(*this, lineLogicalLeft, lineLogicalRight, availableLogicalWidth, isFirstLine, shouldIndentText, renderBox.logicalHeight(), lineBox);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, lineLogicalLeft, availableLogicalWidth, firstRun, trailingSpaceRun, textBoxDataMap, verticalPositionCache, wordMeasurements);
</span><span class="lines">@@ -1567,10 +1573,12 @@
</span><span class="cx"> else if (isFullLayout || box.needsLayout()) {
</span><span class="cx"> // Replaced element.
</span><span class="cx"> box.dirtyLineBoxes(isFullLayout);
</span><del>- if (isFullLayout)
- replacedChildren.append(&box);
- else
- box.layoutIfNeeded();
</del><ins>+ if (!o.isAnonymousInlineBlock()) {
+ if (isFullLayout)
+ replacedChildren.append(&box);
+ else
+ box.layoutIfNeeded();
+ }
</ins><span class="cx"> }
</span><span class="cx"> } else if (o.isTextOrLineBreak() || (is<RenderInline>(o) && !walker.atEndOfInline())) {
</span><span class="cx"> if (is<RenderInline>(o))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -4302,7 +4302,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderBox::createsNewFormattingContext() const
</span><span class="cx"> {
</span><del>- return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
</del><ins>+ return (isInlineBlockOrInlineTable() && !isAnonymousInlineBlock()) || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
</ins><span class="cx"> || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isRoot() || isRenderFlowThread() || isRenderRegion()
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> || isGridItem()
</span><span class="lines">@@ -4312,7 +4312,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderBox::avoidsFloats() const
</span><span class="cx"> {
</span><del>- return isReplaced() || isHR() || isLegend() || createsNewFormattingContext();
</del><ins>+ return (isReplaced() && !isAnonymousInlineBlock()) || isHR() || isLegend() || createsNewFormattingContext();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderBox::addVisualEffectOverflow()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (182240 => 182241)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-04-01 18:07:16 UTC (rev 182240)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-04-01 18:10:32 UTC (rev 182241)
</span><span class="lines">@@ -500,6 +500,9 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ if (replacedBox.isAnonymousInlineBlock())
+ replacedBox.layoutIfNeeded();
</ins><span class="cx">
</span><span class="cx"> if (m_ignoringSpaces)
</span><span class="cx"> m_lineMidpointState.stopIgnoringSpaces(InlineIterator(0, m_current.renderer(), 0));
</span></span></pre>
</div>
</div>
</body>
</html>