Changeset 207747 in webkit


Ignore:
Timestamp:
Oct 24, 2016, 12:18:47 AM (9 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r207275. rdar://problem/28810752

Location:
branches/safari-602-branch
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602-branch/LayoutTests/ChangeLog

    r207746 r207747  
     12016-10-20  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r207275. rdar://problem/28810752
     4
     5    2016-10-12  Zalan Bujtas  <zalan@apple.com>
     6
     7            RenderRubyRun should not mark child renderers dirty at the end of layout.
     8            https://bugs.webkit.org/show_bug.cgi?id=163359
     9            <rdar://problem/28711840>
     10
     11            Reviewed by David Hyatt.
     12
     13            * fast/ruby/rubyrun-has-bad-child-expected.txt: Added.
     14            * fast/ruby/rubyrun-has-bad-child.html: Added.
     15
    1162016-10-20  Matthew Hanson  <matthew_hanson@apple.com>
    217
  • branches/safari-602-branch/Source/WebCore/ChangeLog

    r207746 r207747  
     12016-10-20  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r207275. rdar://problem/28810752
     4
     5    2016-10-12  Zalan Bujtas  <zalan@apple.com>
     6
     7            RenderRubyRun should not mark child renderers dirty at the end of layout.
     8            https://bugs.webkit.org/show_bug.cgi?id=163359
     9            <rdar://problem/28711840>
     10
     11            Reviewed by David Hyatt.
     12
     13            The current layout logic does not support marking renderers dirty for subsequent layouts.
     14            Layout needs to exit with a clean tree.
     15            Should relayoutChild be insufficient, we could also mark the base/text dirty for the justified content.
     16
     17            Test: fast/ruby/rubyrun-has-bad-child.html
     18
     19            * rendering/RenderBlockLineLayout.cpp:
     20            (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
     21            * rendering/RenderRubyRun.cpp:
     22            (WebCore::RenderRubyRun::layout):
     23            (WebCore::RenderRubyRun::layoutBlock):
     24            * rendering/RenderRubyRun.h:
     25
    1262016-10-20  Matthew Hanson  <matthew_hanson@apple.com>
    227
  • branches/safari-602-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r202931 r207747  
    582582    r.box()->setExpansion(newRubyRunWidth - r.box()->logicalWidth());
    583583
    584     // 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
    585     // RenderRubyRun, make sure that we relayout the RenderRubyBase and RenderRubyText as well.
    586     rubyBase.setNeedsLayout(MarkOnlyThis);
    587     if (RenderRubyText* rubyText = rubyRun.rubyText())
    588         rubyText->setNeedsLayout(MarkOnlyThis);
    589 
    590584    totalLogicalWidth += totalExpansion;
    591585    expansionOpportunityCount -= totalOpportunitiesInRun;
  • branches/safari-602-branch/Source/WebCore/rendering/RenderRubyRun.cpp

    r200041 r207747  
    236236    if (RenderRubyBase* base = rubyBase())
    237237        base->reset();
    238 
    239238    RenderBlockFlow::layout();
    240    
     239}
     240
     241void RenderRubyRun::layoutBlock(bool relayoutChildren, LayoutUnit pageHeight)
     242{
     243    if (!relayoutChildren) {
     244        // Since the extra relayout in RenderBlockFlow::updateRubyForJustifiedText() causes the size of the RenderRubyText/RenderRubyBase
     245        // dependent on the line's current expansion, whenever we relayout the RenderRubyRun, we need to relayout the RenderRubyBase/RenderRubyText as well.
     246        // FIXME: We should take the expansion opportunities into account if possible.
     247        relayoutChildren = style().textAlign() == JUSTIFY;
     248    }
     249
     250    RenderBlockFlow::layoutBlock(relayoutChildren, pageHeight);
     251
    241252    RenderRubyText* rt = rubyText();
    242253    if (!rt)
     
    244255
    245256    rt->setLogicalLeft(0);
    246    
     257
    247258    // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase.
    248259    LayoutUnit lastLineRubyTextBottom = rt->logicalHeight();
  • branches/safari-602-branch/Source/WebCore/rendering/RenderRubyRun.h

    r200041 r207747  
    5656    RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) override;
    5757    void layout() override;
     58    void layoutBlock(bool relayoutChildren, LayoutUnit pageHeight = 0) override;
    5859
    5960    bool isChildAllowed(const RenderObject&, const RenderStyle&) const override;
Note: See TracChangeset for help on using the changeset viewer.