Changeset 207747 in webkit
- Timestamp:
- Oct 24, 2016, 12:18:47 AM (9 years ago)
- Location:
- branches/safari-602-branch
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-602-branch/LayoutTests/ChangeLog
r207746 r207747 1 2016-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 1 16 2016-10-20 Matthew Hanson <matthew_hanson@apple.com> 2 17 -
branches/safari-602-branch/Source/WebCore/ChangeLog
r207746 r207747 1 2016-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 1 26 2016-10-20 Matthew Hanson <matthew_hanson@apple.com> 2 27 -
branches/safari-602-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r202931 r207747 582 582 r.box()->setExpansion(newRubyRunWidth - r.box()->logicalWidth()); 583 583 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 the585 // 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 590 584 totalLogicalWidth += totalExpansion; 591 585 expansionOpportunityCount -= totalOpportunitiesInRun; -
branches/safari-602-branch/Source/WebCore/rendering/RenderRubyRun.cpp
r200041 r207747 236 236 if (RenderRubyBase* base = rubyBase()) 237 237 base->reset(); 238 239 238 RenderBlockFlow::layout(); 240 239 } 240 241 void 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 241 252 RenderRubyText* rt = rubyText(); 242 253 if (!rt) … … 244 255 245 256 rt->setLogicalLeft(0); 246 257 247 258 // Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase. 248 259 LayoutUnit lastLineRubyTextBottom = rt->logicalHeight(); -
branches/safari-602-branch/Source/WebCore/rendering/RenderRubyRun.h
r200041 r207747 56 56 RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) override; 57 57 void layout() override; 58 void layoutBlock(bool relayoutChildren, LayoutUnit pageHeight = 0) override; 58 59 59 60 bool isChildAllowed(const RenderObject&, const RenderStyle&) const override;
Note:
See TracChangeset
for help on using the changeset viewer.