<!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>[179748] branches/safari-600.5-branch</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/179748">179748</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-02-06 09:58:43 -0800 (Fri, 06 Feb 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rollout <a href="http://trac.webkit.org/projects/webkit/changeset/179133">r179133</a>. rdar://problem/19526158</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6005branchLayoutTestsChangeLog">branches/safari-600.5-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6005branchLayoutTestsfastrubyrubyjustificationexpectedhtml">branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification-expected.html</a></li>
<li><a href="#branchessafari6005branchLayoutTestsfastrubyrubyjustificationhtml">branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification.html</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreChangeLog">branches/safari-600.5-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingInlineBoxh">branches/safari-600.5-branch/Source/WebCore/rendering/InlineBox.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingInlineFlowBoxcpp">branches/safari-600.5-branch/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingInlineTextBoxh">branches/safari-600.5-branch/Source/WebCore/rendering/InlineTextBox.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderBlockFlowh">branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderBlockLineLayoutcpp">branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderRubyBasecpp">branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderRubyBaseh">branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderRubyRuncpp">branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyRun.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderTextcpp">branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingRenderTexth">branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6005branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -1,19 +1,3 @@
</span><del>-2015-01-26 David Kilzer <ddkilzer@apple.com>
-
- Merge r177377.
-
- 2014-12-16 Myles C. Maxfield <litherum@gmail.com>
-
- Ruby does not preserve expansion opportunities from enclosing context
- https://bugs.webkit.org/show_bug.cgi?id=139618
-
- Updating test for new expansion logic.
-
- Reviewed by David Hyatt.
-
- * fast/ruby/ruby-justification-expected.html:
- * fast/ruby/ruby-justification.html:
-
</del><span class="cx"> 2015-01-24 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r176262.
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestsfastrubyrubyjustificationexpectedhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification-expected.html (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification-expected.html        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification-expected.html        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -9,13 +9,7 @@
</span><span class="cx"> <div>
</span><span class="cx"> abcdefg <ruby>abcdefg<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
</span><span class="cx"> </div>
</span><del>-<div>
-abcdefg <ruby>a<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
</del><span class="cx"> </div>
</span><del>-<div>
-a<span style="background: green;">&#x685c;</span>b mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
-</div>
-</div>
</del><span class="cx"> <div style="font-family: Ahem; font-size: 16px;">
</span><span class="cx"> <ruby>abcdefg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;abcdefg<rt>a</ruby> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestsfastrubyrubyjustificationhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification.html (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification.html        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification.html        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -9,12 +9,6 @@
</span><span class="cx"> <div>
</span><span class="cx"> <ruby>abcdefg abcdefg<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
</span><span class="cx"> </div>
</span><del>-<div>
-abcdefg <ruby>a<rt><span style="color: transparent;">aaaaaaaaaaaaaaaaaaaaaaa</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
-</div>
-<div>
-a<ruby><rb style="background: green;">&#x685c;</rb><rt> </ruby>b mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
-</div>
</del><span class="cx"> <div style="font-family: Ahem;">
</span><span class="cx"> <ruby>abcdefg abcdefg<rt>a</ruby> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -1,64 +1,3 @@
</span><del>-2015-01-26 David Kilzer <ddkilzer@apple.com>
-
- Merge r177377.
-
- 2014-12-16 Myles C. Maxfield <litherum@gmail.com>
-
- Ruby does not preserve expansion opportunities from enclosing context
- https://bugs.webkit.org/show_bug.cgi?id=139618
-
- Reviewed by David Hyatt.
-
- There is currently no sharing of expansion opportunity information between
- ruby bases and the text surrounding the ruby. This patch adds a bit on
- RenderText, m_contentIsKnownToFollow, which affects how expansion
- opportunities are handled at paint-time, as well as a bit on RenderRubyBase,
- m_isAfterExpansion, which affects how expansions are calculated when laying
- out a line. This patch also adds a field to RenderRubyBase which represents
- the base's starting position within a ruby. This field is necessary because
- an expansion from a line might occur at the very beginning of a ruby base,
- so we have to remember some state from expansion time to RenderRubyBase
- layout time.
-
- Added more tests to fast/ruby/ruby-justification.html.
-
- * rendering/InlineBox.h:
- (WebCore::InlineBox::setExpansionWithoutGrowing):
- (WebCore::InlineBox::expansion):
- * rendering/InlineFlowBox.cpp:
- (WebCore::InlineFlowBox::removeChild): Keep the bit on InlineTextBox up to
- date.
- (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Set expansion
- information in InlineFlowBoxes so the total expansion for a whole line
- is held in the RootInlineBox's expansion.
- * rendering/InlineTextBox.h:
- (WebCore::InlineTextBox::expansionBehavior):
- * rendering/RenderBlockFlow.h:
- * rendering/RenderBlockLineLayout.cpp:
- (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
- updateRubyForJustifiedText() had a bunch of problems with it. First of all,
- it didn't actually set the InlineBoxes as dirty, so the second layout pass
- sometimes wouldn't perform any updates. Secondarily, it didn't take
- overhangs into account. Thirdly, it didn't mark the ruby base and text as
- needing layout so that subsequent layouts would actually traverse into them.
- (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
- (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
- This nested if triangle is super nasty, but I'm not sure of a better way to
- write it.
- (WebCore::updateRubyForJustifiedText): Deleted.
- (WebCore::computeExpansionForJustifiedText): Deleted.
- * rendering/RenderRubyBase.cpp:
- (WebCore::RenderRubyBase::RenderRubyBase):
- (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
- * rendering/RenderRubyBase.h:
- * rendering/RenderRubyRun.cpp:
- (WebCore::RenderRubyRun::layout):
- * rendering/RenderText.cpp:
- (WebCore::RenderText::RenderText):
- * rendering/RenderText.h:
- (WebCore::RenderText::contentIsKnownToFollow):
- (WebCore::RenderText::setContentIsKnownToFollow):
-
</del><span class="cx"> 2015-01-24 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r176262.
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingInlineBoxh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineBox.h (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/InlineBox.h        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/InlineBox.h        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -277,12 +277,6 @@
</span><span class="cx"> m_bitfields.setExpansion(newExpansion);
</span><span class="cx"> m_logicalWidth += m_bitfields.expansion();
</span><span class="cx"> }
</span><del>- void setExpansionWithoutGrowing(float newExpansion)
- {
- ASSERT(!m_expansion);
- m_expansion = newExpansion;
- }
- float expansion() const { return m_expansion; }
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> InlineBox* m_next; // The next element on the same line as us.
</span><span class="lines">@@ -420,6 +414,7 @@
</span><span class="cx"> void setHasHyphen(bool hasHyphen) { m_bitfields.setHasEllipsisBoxOrHyphen(hasHyphen); }
</span><span class="cx"> bool canHaveLeadingExpansion() const { return m_bitfields.hasSelectedChildrenOrCanHaveLeadingExpansion(); }
</span><span class="cx"> void setCanHaveLeadingExpansion(bool canHaveLeadingExpansion) { m_bitfields.setHasSelectedChildrenOrCanHaveLeadingExpansion(canHaveLeadingExpansion); }
</span><ins>+ int expansion() { return m_bitfields.expansion(); }
</ins><span class="cx">
</span><span class="cx"> // For InlineFlowBox and InlineTextBox
</span><span class="cx"> bool extracted() const { return m_bitfields.extracted(); }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineFlowBox.cpp (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/InlineFlowBox.cpp        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/InlineFlowBox.cpp        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -179,14 +179,6 @@
</span><span class="cx"> if (!isDirty())
</span><span class="cx"> dirtyLineBoxes();
</span><span class="cx">
</span><del>- if (child->prevLeafChild() && child->prevLeafChild()->isInlineTextBox()) {
- if (child->isInlineTextBox())
- toInlineTextBox(child->prevLeafChild())->renderer().setContentIsKnownToFollow(toInlineTextBox(child)->renderer().contentIsKnownToFollow());
- // FIXME: Handle the case where we remove the last inline box, and it's not a text box. If we're trying to share
- // expansion opportunites both inside and outside a replaced element (such as for ruby bases), we need to search
- // outside the current inline box tree to determine if there is content that follows the new last inline item.
- }
-
</del><span class="cx"> root().childRemoved(child);
</span><span class="cx">
</span><span class="cx"> if (child == m_firstChild)
</span><span class="lines">@@ -383,7 +375,6 @@
</span><span class="cx">
</span><span class="cx"> float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, InlineBox* lastChild, float& logicalLeft, float& minLogicalLeft, float& maxLogicalRight, bool& needsWordSpacing)
</span><span class="cx"> {
</span><del>- float totalExpansion = 0;
</del><span class="cx"> for (InlineBox* curr = firstChild; curr && curr != lastChild; curr = curr->nextOnLine()) {
</span><span class="cx"> if (curr->renderer().isText()) {
</span><span class="cx"> InlineTextBox* text = toInlineTextBox(curr);
</span><span class="lines">@@ -397,7 +388,6 @@
</span><span class="cx"> if (knownToHaveNoOverflow())
</span><span class="cx"> minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
</span><span class="cx"> logicalLeft += text->logicalWidth();
</span><del>- totalExpansion += text->expansion();
</del><span class="cx"> if (knownToHaveNoOverflow())
</span><span class="cx"> maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
</span><span class="cx"> } else {
</span><span class="lines">@@ -417,7 +407,6 @@
</span><span class="cx"> if (knownToHaveNoOverflow())
</span><span class="cx"> minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
</span><span class="cx"> logicalLeft = flow->placeBoxesInInlineDirection(logicalLeft, needsWordSpacing);
</span><del>- totalExpansion += flow->expansion();
</del><span class="cx"> if (knownToHaveNoOverflow())
</span><span class="cx"> maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
</span><span class="cx"> logicalLeft += flow->marginLogicalRight();
</span><span class="lines">@@ -440,7 +429,6 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- setExpansionWithoutGrowing(totalExpansion);
</del><span class="cx"> return logicalLeft;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineTextBox.h (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/InlineTextBox.h        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/InlineTextBox.h        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> TextRun::ExpansionBehavior expansionBehavior() const
</span><span class="cx"> {
</span><span class="cx"> return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : TextRun::ForbidLeadingExpansion)
</span><del>- | (renderer().contentIsKnownToFollow() || (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak()) ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
</del><ins>+ | (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void behavesLikeText() const = delete;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderBlockFlowh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.h (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.h        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.h        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -550,8 +550,6 @@
</span><span class="cx"> RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&);
</span><span class="cx"> void setMarginsForRubyRun(BidiRun*, RenderRubyRun&, RenderObject*, const LineInfo&);
</span><span class="cx"> void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&, WordMeasurements&);
</span><del>- void updateRubyForJustifiedText(RenderRubyRun&, BidiRun&, const Vector<unsigned, 16>& expansionOpportunities, unsigned& expansionOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth, RenderObject* previousObject, const LineInfo&, size_t& expansionIndex);
- void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth, const LineInfo&);
</del><span class="cx"> BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const LineInfo&, ETextAlign, float& logicalLeft,
</span><span class="cx"> float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, WordMeasurements&);
</span><span class="cx"> void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderBlockFlow::updateRubyForJustifiedText(RenderRubyRun& rubyRun, BidiRun& r, const Vector<unsigned, 16>& expansionOpportunities, unsigned& expansionOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth, RenderObject* previousObject, const LineInfo& lineInfo, size_t& i)
</del><ins>+static inline void updateRubyForJustifiedText(RenderRubyRun& rubyRun, BidiRun& r, const Vector<unsigned, 16>& expansionOpportunities, unsigned& expansionOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth, size_t& i)
</ins><span class="cx"> {
</span><span class="cx"> if (!rubyRun.rubyBase() || !rubyRun.rubyBase()->firstRootBox() || rubyRun.rubyBase()->firstRootBox()->nextRootBox() || !r.renderer().style().collapseWhiteSpace())
</span><span class="cx"> return;
</span><span class="lines">@@ -563,47 +563,26 @@
</span><span class="cx">
</span><span class="cx"> if (totalOpportunitiesInRun) {
</span><span class="cx"> ASSERT(!rubyRun.hasOverrideWidth());
</span><del>- float newBaseWidth = rubyRun.logicalWidth() + totalExpansion + marginStartForChild(rubyRun) + marginEndForChild(rubyRun);
- float newRubyRunWidth = rubyRun.logicalWidth() + totalExpansion;
- rubyBase.setInitialOffset((newRubyRunWidth - newBaseWidth) / 2);
- rubyRun.setOverrideLogicalContentWidth(newRubyRunWidth);
</del><ins>+ rubyRun.setOverrideLogicalContentWidth(rubyRun.logicalWidth() + totalExpansion);
</ins><span class="cx"> rubyRun.setNeedsLayout(MarkOnlyThis);
</span><del>- rootBox.markDirty();
- if (RenderRubyText* rubyText = rubyRun.rubyText()) {
- if (RootInlineBox* textRootBox = rubyText->firstRootBox())
- textRootBox->markDirty();
- }
</del><span class="cx"> rubyRun.layoutBlock(true);
</span><span class="cx"> rubyRun.clearOverrideLogicalContentWidth();
</span><del>- setMarginsForRubyRun(&r, rubyRun, previousObject, lineInfo); // Expanding the base might mean there's less of a need for overhang
- r.box()->setExpansion(newRubyRunWidth - r.box()->logicalWidth());
</del><ins>+ r.box()->setExpansion(totalExpansion);
</ins><span class="cx">
</span><del>- // This relayout caused the size of the RenderRubyText and the RenderRubyBase to change, dependent on the line's current expansion. Next time we relayout the
- // RenderRubyRun, make sure that we relayout the RenderRubyBase and RenderRubyText as well.
- rubyBase.setNeedsLayout(MarkOnlyThis);
- if (RenderRubyText* rubyText = rubyRun.rubyText())
- rubyText->setNeedsLayout(MarkOnlyThis);
- if (rubyBase.lastLeafChild() && rubyBase.lastLeafChild()->isText() && r.box() && r.box()->nextLeafChild() && !r.box()->nextLeafChild()->isLineBreak())
- toRenderText(rubyBase.lastLeafChild())->setContentIsKnownToFollow(true);
-
</del><span class="cx"> totalLogicalWidth += totalExpansion;
</span><span class="cx"> expansionOpportunityCount -= totalOpportunitiesInRun;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderBlockFlow::computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth, const LineInfo& lineInfo)
</del><ins>+static inline void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth)
</ins><span class="cx"> {
</span><span class="cx"> if (!expansionOpportunityCount || availableLogicalWidth <= totalLogicalWidth)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RenderObject* previousObject = nullptr;
-
</del><span class="cx"> size_t i = 0;
</span><span class="cx"> for (BidiRun* r = firstRun; r; r = r->next()) {
</span><del>- if (!r->box() || r == trailingSpaceRun) {
- previousObject = &r->renderer();
</del><ins>+ if (!r->box() || r == trailingSpaceRun)
</ins><span class="cx"> continue;
</span><del>- }
</del><span class="cx">
</span><span class="cx"> if (r->renderer().isText()) {
</span><span class="cx"> unsigned opportunitiesInRun = expansionOpportunities[i++];
</span><span class="lines">@@ -619,10 +598,8 @@
</span><span class="cx"> }
</span><span class="cx"> expansionOpportunityCount -= opportunitiesInRun;
</span><span class="cx"> } else if (r->renderer().isRubyRun())
</span><del>- updateRubyForJustifiedText(toRenderRubyRun(r->renderer()), *r, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, previousObject, lineInfo, i);
</del><ins>+ updateRubyForJustifiedText(toRenderRubyRun(r->renderer()), *r, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, i);
</ins><span class="cx">
</span><del>- previousObject = &r->renderer();
-
</del><span class="cx"> if (!expansionOpportunityCount)
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -722,7 +699,7 @@
</span><span class="cx"> bool needsWordSpacing = false;
</span><span class="cx"> float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth();
</span><span class="cx"> unsigned expansionOpportunityCount = 0;
</span><del>- bool isAfterExpansion = this->isRubyBase() ? toRenderRubyBase(*this).isAfterExpansion() : true;
</del><ins>+ bool isAfterExpansion = true;
</ins><span class="cx"> Vector<unsigned, 16> expansionOpportunities;
</span><span class="cx"> RenderObject* previousObject = 0;
</span><span class="cx">
</span><span class="lines">@@ -758,7 +735,6 @@
</span><span class="cx"> if (r->renderer().isRubyRun() && textAlign == JUSTIFY && r != trailingSpaceRun && toRenderRubyRun(r->renderer()).rubyBase()) {
</span><span class="cx"> auto* rubyBase = toRenderRubyRun(r->renderer()).rubyBase();
</span><span class="cx"> if (rubyBase->firstRootBox() && !rubyBase->firstRootBox()->nextRootBox() && r->renderer().style().collapseWhiteSpace()) {
</span><del>- rubyBase->setIsAfterExpansion(isAfterExpansion);
</del><span class="cx"> for (auto* leafChild = rubyBase->firstRootBox()->firstLeafChild(); leafChild; leafChild = leafChild->nextLeafChild()) {
</span><span class="cx"> if (!leafChild->isInlineTextBox())
</span><span class="cx"> continue;
</span><span class="lines">@@ -796,28 +772,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (isAfterExpansion && !expansionOpportunities.isEmpty()) {
</span><del>- bool shouldShareExpansionsWithContainingLine = true;
- if (this->isRubyBase()) {
- if (RenderRubyRun* rubyRun = toRenderRubyBase(*this).rubyRun()) {
- if (RenderElement* rubyElement = rubyRun->parent()) {
- if (rubyElement->style().display() == INLINE) {
- if (RenderBlock* containingBlock = rubyElement->containingBlock()) {
- if (containingBlock->style().textAlign() == JUSTIFY)
- shouldShareExpansionsWithContainingLine = false;
- }
- }
- }
- }
- }
- if (shouldShareExpansionsWithContainingLine) {
- expansionOpportunities.last()--;
- expansionOpportunityCount--;
- }
</del><ins>+ expansionOpportunities.last()--;
+ expansionOpportunityCount--;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> updateLogicalWidthForAlignment(textAlign, lineBox, trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth, expansionOpportunityCount);
</span><span class="cx">
</span><del>- computeExpansionForJustifiedText(firstRun, trailingSpaceRun, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, lineInfo);
</del><ins>+ computeExpansionForJustifiedText(firstRun, trailingSpaceRun, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth);
</ins><span class="cx">
</span><span class="cx"> return r;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderRubyBasecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.cpp (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.cpp        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.cpp        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -38,8 +38,6 @@
</span><span class="cx">
</span><span class="cx"> RenderRubyBase::RenderRubyBase(Document& document, PassRef<RenderStyle> style)
</span><span class="cx"> : RenderBlockFlow(document, WTF::move(style))
</span><del>- , m_initialOffset(0)
- , m_isAfterExpansion(true)
</del><span class="cx"> {
</span><span class="cx"> setInline(false);
</span><span class="cx"> }
</span><span class="lines">@@ -145,12 +143,6 @@
</span><span class="cx">
</span><span class="cx"> void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const
</span><span class="cx"> {
</span><del>- if (rubyRun()->hasOverrideWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) {
- logicalLeft += m_initialOffset;
- logicalWidth -= 2 * m_initialOffset;
- return;
- }
-
</del><span class="cx"> LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideWidth() ? rubyRun()->overrideLogicalContentWidth() : this->maxPreferredLogicalWidth();
</span><span class="cx"> if (maxPreferredLogicalWidth >= logicalWidth)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderRubyBaseh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.h (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.h        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.h        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -48,17 +48,6 @@
</span><span class="cx">
</span><span class="cx"> RenderRubyRun* rubyRun() const;
</span><span class="cx">
</span><del>- void setIsAfterExpansion(bool isAfterExpansion) { m_isAfterExpansion = isAfterExpansion; }
- bool isAfterExpansion() { return m_isAfterExpansion; }
-
- void setInitialOffset(float initialOffset) { m_initialOffset = initialOffset; }
-
- void reset()
- {
- m_initialOffset = 0;
- m_isAfterExpansion = true;
- }
-
</del><span class="cx"> private:
</span><span class="cx"> virtual bool isChildAllowed(const RenderObject&, const RenderStyle&) const;
</span><span class="cx"> virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
</span><span class="lines">@@ -71,9 +60,6 @@
</span><span class="cx">
</span><span class="cx"> // Allow RenderRubyRun to manipulate the children within ruby bases.
</span><span class="cx"> friend class RenderRubyRun;
</span><del>-
- float m_initialOffset;
- unsigned m_isAfterExpansion : 1;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> RENDER_OBJECT_TYPE_CASTS(RenderRubyBase, isRubyBase())
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderRubyRuncpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyRun.cpp (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyRun.cpp        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyRun.cpp        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -231,9 +231,6 @@
</span><span class="cx">
</span><span class="cx"> void RenderRubyRun::layout()
</span><span class="cx"> {
</span><del>- if (RenderRubyBase* base = rubyBase())
- base->reset();
-
</del><span class="cx"> RenderBlockFlow::layout();
</span><span class="cx">
</span><span class="cx"> RenderRubyText* rt = rubyText();
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.cpp (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.cpp        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.cpp        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -163,7 +163,6 @@
</span><span class="cx"> , m_knownToHaveNoOverflowAndNoFallbackFonts(false)
</span><span class="cx"> , m_useBackslashAsYenSymbol(false)
</span><span class="cx"> , m_originalTextDiffersFromRendered(false)
</span><del>- , m_contentIsKnownToFollow(false)
</del><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> , m_candidateComputedTextSize(0)
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.h (179747 => 179748)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.h        2015-02-06 16:27:54 UTC (rev 179747)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.h        2015-02-06 17:58:43 UTC (rev 179748)
</span><span class="lines">@@ -156,9 +156,6 @@
</span><span class="cx"> void deleteLineBoxesBeforeSimpleLineLayout();
</span><span class="cx"> const SimpleLineLayout::Layout* simpleLineLayout() const;
</span><span class="cx">
</span><del>- bool contentIsKnownToFollow() { return m_contentIsKnownToFollow; }
- void setContentIsKnownToFollow(bool contentIsKnownToFollow) { m_contentIsKnownToFollow = contentIsKnownToFollow; }
-
</del><span class="cx"> protected:
</span><span class="cx"> virtual void computePreferredLogicalWidths(float leadWidth);
</span><span class="cx"> virtual void willBeDestroyed() override;
</span><span class="lines">@@ -194,22 +191,21 @@
</span><span class="cx"> void node() const = delete;
</span><span class="cx">
</span><span class="cx"> // We put the bitfield first to minimize padding on 64-bit.
</span><del>- unsigned m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
- unsigned m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n').
- unsigned m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t').
- unsigned m_hasBeginWS : 1; // Whether or not we begin with WS (only true if we aren't pre)
- unsigned m_hasEndWS : 1; // Whether or not we end with WS (only true if we aren't pre)
- unsigned m_linesDirty : 1; // This bit indicates that the text run has already dirtied specific
</del><ins>+ bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
+ bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n').
+ bool m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t').
+ bool m_hasBeginWS : 1; // Whether or not we begin with WS (only true if we aren't pre)
+ bool m_hasEndWS : 1; // Whether or not we end with WS (only true if we aren't pre)
+ bool m_linesDirty : 1; // This bit indicates that the text run has already dirtied specific
</ins><span class="cx"> // line boxes, and this hint will enable layoutInlineChildren to avoid
</span><span class="cx"> // just dirtying everything when character data is modified (e.g., appended/inserted
</span><span class="cx"> // or removed).
</span><del>- unsigned m_containsReversedText : 1;
- unsigned m_isAllASCII : 1;
- unsigned m_canUseSimpleFontCodePath : 1;
- mutable unsigned m_knownToHaveNoOverflowAndNoFallbackFonts : 1;
- unsigned m_useBackslashAsYenSymbol : 1;
- unsigned m_originalTextDiffersFromRendered : 1;
- unsigned m_contentIsKnownToFollow : 1;
</del><ins>+ bool m_containsReversedText : 1;
+ bool m_isAllASCII : 1;
+ bool m_canUseSimpleFontCodePath : 1;
+ mutable bool m_knownToHaveNoOverflowAndNoFallbackFonts : 1;
+ bool m_useBackslashAsYenSymbol : 1;
+ bool m_originalTextDiffersFromRendered : 1;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> // FIXME: This should probably be part of the text sizing structures in Document instead. That would save some memory.
</span></span></pre>
</div>
</div>
</body>
</html>