Title: [179748] branches/safari-600.5-branch

Diff

Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (179747 => 179748)


--- 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)
@@ -1,19 +1,3 @@
-2015-01-26  David Kilzer  <[email protected]>
-
-        Merge r177377.
-
-    2014-12-16  Myles C. Maxfield  <[email protected]>
-
-        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:
-
 2015-01-24  David Kilzer  <[email protected]>
 
         Merge r176262.

Modified: branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification-expected.html (179747 => 179748)


--- 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)
@@ -9,13 +9,7 @@
 <div>
 abcdefg <ruby>abcdefg<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 </div>
-<div>
-abcdefg <ruby>a<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 </div>
-<div>
-a<span style="background: green;">&#x685c;</span>b mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
-</div>
-</div>
 <div style="font-family: Ahem; font-size: 16px;">
 <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
 </div>

Modified: branches/safari-600.5-branch/LayoutTests/fast/ruby/ruby-justification.html (179747 => 179748)


--- 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)
@@ -9,12 +9,6 @@
 <div>
 <ruby>abcdefg abcdefg<rt><span style="color: transparent;">a</span></ruby> abcdefg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 </div>
-<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>
 <div style="font-family: Ahem;">
 <ruby>abcdefg abcdefg<rt>a</ruby> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 </div>

Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (179747 => 179748)


--- 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)
@@ -1,64 +1,3 @@
-2015-01-26  David Kilzer  <[email protected]>
-
-        Merge r177377.
-
-    2014-12-16  Myles C. Maxfield  <[email protected]>
-
-        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):
-
 2015-01-24  David Kilzer  <[email protected]>
 
         Merge r176262.

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineBox.h (179747 => 179748)


--- 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)
@@ -277,12 +277,6 @@
         m_bitfields.setExpansion(newExpansion);
         m_logicalWidth += m_bitfields.expansion();
     }
-    void setExpansionWithoutGrowing(float newExpansion)
-    {
-        ASSERT(!m_expansion);
-        m_expansion = newExpansion;
-    }
-    float expansion() const { return m_expansion; }
 
 private:
     InlineBox* m_next; // The next element on the same line as us.
@@ -420,6 +414,7 @@
     void setHasHyphen(bool hasHyphen) { m_bitfields.setHasEllipsisBoxOrHyphen(hasHyphen); }    
     bool canHaveLeadingExpansion() const { return m_bitfields.hasSelectedChildrenOrCanHaveLeadingExpansion(); }
     void setCanHaveLeadingExpansion(bool canHaveLeadingExpansion) { m_bitfields.setHasSelectedChildrenOrCanHaveLeadingExpansion(canHaveLeadingExpansion); }
+    int expansion() { return m_bitfields.expansion(); }
     
     // For InlineFlowBox and InlineTextBox
     bool extracted() const { return m_bitfields.extracted(); }

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineFlowBox.cpp (179747 => 179748)


--- 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)
@@ -179,14 +179,6 @@
     if (!isDirty())
         dirtyLineBoxes();
 
-    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.
-    }
-
     root().childRemoved(child);
 
     if (child == m_firstChild)
@@ -383,7 +375,6 @@
 
 float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, InlineBox* lastChild, float& logicalLeft, float& minLogicalLeft, float& maxLogicalRight, bool& needsWordSpacing)
 {
-    float totalExpansion = 0;
     for (InlineBox* curr = firstChild; curr && curr != lastChild; curr = curr->nextOnLine()) {
         if (curr->renderer().isText()) {
             InlineTextBox* text = toInlineTextBox(curr);
@@ -397,7 +388,6 @@
             if (knownToHaveNoOverflow())
                 minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
             logicalLeft += text->logicalWidth();
-            totalExpansion += text->expansion();
             if (knownToHaveNoOverflow())
                 maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
         } else {
@@ -417,7 +407,6 @@
                 if (knownToHaveNoOverflow())
                     minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
                 logicalLeft = flow->placeBoxesInInlineDirection(logicalLeft, needsWordSpacing);
-                totalExpansion += flow->expansion();
                 if (knownToHaveNoOverflow())
                     maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
                 logicalLeft += flow->marginLogicalRight();
@@ -440,7 +429,6 @@
             }
         }
     }
-    setExpansionWithoutGrowing(totalExpansion);
     return logicalLeft;
 }
 

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/InlineTextBox.h (179747 => 179748)


--- 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)
@@ -166,7 +166,7 @@
     TextRun::ExpansionBehavior expansionBehavior() const
     {
         return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : TextRun::ForbidLeadingExpansion)
-            | (renderer().contentIsKnownToFollow() || (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak()) ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
+            | (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
     }
 
     void behavesLikeText() const = delete;

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockFlow.h (179747 => 179748)


--- 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)
@@ -550,8 +550,6 @@
     RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&);
     void setMarginsForRubyRun(BidiRun*, RenderRubyRun&, RenderObject*, const LineInfo&);
     void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&, WordMeasurements&);
-    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&);
     BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const LineInfo&, ETextAlign, float& logicalLeft,
         float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, WordMeasurements&);
     void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (179747 => 179748)


--- 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)
@@ -540,7 +540,7 @@
     }
 }
 
-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)
+static inline void updateRubyForJustifiedText(RenderRubyRun& rubyRun, BidiRun& r, const Vector<unsigned, 16>& expansionOpportunities, unsigned& expansionOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth, size_t& i)
 {
     if (!rubyRun.rubyBase() || !rubyRun.rubyBase()->firstRootBox() || rubyRun.rubyBase()->firstRootBox()->nextRootBox() || !r.renderer().style().collapseWhiteSpace())
         return;
@@ -563,47 +563,26 @@
 
     if (totalOpportunitiesInRun) {
         ASSERT(!rubyRun.hasOverrideWidth());
-        float newBaseWidth = rubyRun.logicalWidth() + totalExpansion + marginStartForChild(rubyRun) + marginEndForChild(rubyRun);
-        float newRubyRunWidth = rubyRun.logicalWidth() + totalExpansion;
-        rubyBase.setInitialOffset((newRubyRunWidth - newBaseWidth) / 2);
-        rubyRun.setOverrideLogicalContentWidth(newRubyRunWidth);
+        rubyRun.setOverrideLogicalContentWidth(rubyRun.logicalWidth() + totalExpansion);
         rubyRun.setNeedsLayout(MarkOnlyThis);
-        rootBox.markDirty();
-        if (RenderRubyText* rubyText = rubyRun.rubyText()) {
-            if (RootInlineBox* textRootBox = rubyText->firstRootBox())
-                textRootBox->markDirty();
-        }
         rubyRun.layoutBlock(true);
         rubyRun.clearOverrideLogicalContentWidth();
-        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());
+        r.box()->setExpansion(totalExpansion);
 
-        // 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);
-
         totalLogicalWidth += totalExpansion;
         expansionOpportunityCount -= totalOpportunitiesInRun;
     }
 }
 
-void RenderBlockFlow::computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth, const LineInfo& lineInfo)
+static inline void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth)
 {
     if (!expansionOpportunityCount || availableLogicalWidth <= totalLogicalWidth)
         return;
 
-    RenderObject* previousObject = nullptr;
-
     size_t i = 0;
     for (BidiRun* r = firstRun; r; r = r->next()) {
-        if (!r->box() || r == trailingSpaceRun) {
-            previousObject = &r->renderer();
+        if (!r->box() || r == trailingSpaceRun)
             continue;
-        }
         
         if (r->renderer().isText()) {
             unsigned opportunitiesInRun = expansionOpportunities[i++];
@@ -619,10 +598,8 @@
             }
             expansionOpportunityCount -= opportunitiesInRun;
         } else if (r->renderer().isRubyRun())
-            updateRubyForJustifiedText(toRenderRubyRun(r->renderer()), *r, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, previousObject, lineInfo, i);
+            updateRubyForJustifiedText(toRenderRubyRun(r->renderer()), *r, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, i);
 
-        previousObject = &r->renderer();
-
         if (!expansionOpportunityCount)
             break;
     }
@@ -722,7 +699,7 @@
     bool needsWordSpacing = false;
     float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth();
     unsigned expansionOpportunityCount = 0;
-    bool isAfterExpansion = this->isRubyBase() ? toRenderRubyBase(*this).isAfterExpansion() : true;
+    bool isAfterExpansion = true;
     Vector<unsigned, 16> expansionOpportunities;
     RenderObject* previousObject = 0;
 
@@ -758,7 +735,6 @@
             if (r->renderer().isRubyRun() && textAlign == JUSTIFY && r != trailingSpaceRun && toRenderRubyRun(r->renderer()).rubyBase()) {
                 auto* rubyBase = toRenderRubyRun(r->renderer()).rubyBase();
                 if (rubyBase->firstRootBox() && !rubyBase->firstRootBox()->nextRootBox() && r->renderer().style().collapseWhiteSpace()) {
-                    rubyBase->setIsAfterExpansion(isAfterExpansion);
                     for (auto* leafChild = rubyBase->firstRootBox()->firstLeafChild(); leafChild; leafChild = leafChild->nextLeafChild()) {
                         if (!leafChild->isInlineTextBox())
                             continue;
@@ -796,28 +772,13 @@
     }
 
     if (isAfterExpansion && !expansionOpportunities.isEmpty()) {
-        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--;
-        }
+        expansionOpportunities.last()--;
+        expansionOpportunityCount--;
     }
 
     updateLogicalWidthForAlignment(textAlign, lineBox, trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth, expansionOpportunityCount);
 
-    computeExpansionForJustifiedText(firstRun, trailingSpaceRun, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth, lineInfo);
+    computeExpansionForJustifiedText(firstRun, trailingSpaceRun, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth);
 
     return r;
 }

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.cpp (179747 => 179748)


--- 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)
@@ -38,8 +38,6 @@
 
 RenderRubyBase::RenderRubyBase(Document& document, PassRef<RenderStyle> style)
     : RenderBlockFlow(document, WTF::move(style))
-    , m_initialOffset(0)
-    , m_isAfterExpansion(true)
 {
     setInline(false);
 }
@@ -145,12 +143,6 @@
 
 void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const
 {
-    if (rubyRun()->hasOverrideWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) {
-        logicalLeft += m_initialOffset;
-        logicalWidth -= 2 * m_initialOffset;
-        return;
-    }
-
     LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideWidth() ? rubyRun()->overrideLogicalContentWidth() : this->maxPreferredLogicalWidth();
     if (maxPreferredLogicalWidth >= logicalWidth)
         return;

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyBase.h (179747 => 179748)


--- 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)
@@ -48,17 +48,6 @@
 
     RenderRubyRun* rubyRun() const;
 
-    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;
-    }
-
 private:
     virtual bool isChildAllowed(const RenderObject&, const RenderStyle&) const;
     virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
@@ -71,9 +60,6 @@
 
     // Allow RenderRubyRun to manipulate the children within ruby bases.
     friend class RenderRubyRun;
-
-    float m_initialOffset;
-    unsigned m_isAfterExpansion : 1;
 };
 
 RENDER_OBJECT_TYPE_CASTS(RenderRubyBase, isRubyBase())

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderRubyRun.cpp (179747 => 179748)


--- 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)
@@ -231,9 +231,6 @@
 
 void RenderRubyRun::layout()
 {
-    if (RenderRubyBase* base = rubyBase())
-        base->reset();
-
     RenderBlockFlow::layout();
     
     RenderRubyText* rt = rubyText();

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.cpp (179747 => 179748)


--- 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)
@@ -163,7 +163,6 @@
     , m_knownToHaveNoOverflowAndNoFallbackFonts(false)
     , m_useBackslashAsYenSymbol(false)
     , m_originalTextDiffersFromRendered(false)
-    , m_contentIsKnownToFollow(false)
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     , m_candidateComputedTextSize(0)
 #endif

Modified: branches/safari-600.5-branch/Source/WebCore/rendering/RenderText.h (179747 => 179748)


--- 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)
@@ -156,9 +156,6 @@
     void deleteLineBoxesBeforeSimpleLineLayout();
     const SimpleLineLayout::Layout* simpleLineLayout() const;
 
-    bool contentIsKnownToFollow() { return m_contentIsKnownToFollow; }
-    void setContentIsKnownToFollow(bool contentIsKnownToFollow) { m_contentIsKnownToFollow = contentIsKnownToFollow; }
-
 protected:
     virtual void computePreferredLogicalWidths(float leadWidth);
     virtual void willBeDestroyed() override;
@@ -194,22 +191,21 @@
     void node() const = delete;
 
     // We put the bitfield first to minimize padding on 64-bit.
-    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
+    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
                            // line boxes, and this hint will enable layoutInlineChildren to avoid
                            // just dirtying everything when character data is modified (e.g., appended/inserted
                            // or removed).
-    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;
+    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;
 
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     // FIXME: This should probably be part of the text sizing structures in Document instead. That would save some memory.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to