Changeset 140613 in webkit
- Timestamp:
- Jan 23, 2013 4:33:06 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140610 r140613 1 2012-12-12 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION: WebKit does not render selection in non-first ruby text nodes. 4 https://bugs.webkit.org/show_bug.cgi?id=92818 5 6 Reviewed by Levi Weintraub. 7 8 Add a test, authored by Sukolsak Sakshuwong. 9 10 * fast/ruby/select-ruby.html: Added. 11 * platform/mac/fast/ruby/ruby-base-merge-block-children-crash-expected.png: Added. 12 * platform/mac/fast/ruby/select-ruby-expected.png: Added. 13 * platform/mac/fast/ruby/select-ruby-expected.txt: Added. 14 1 15 2013-01-23 Martin Robinson <mrobinson@igalia.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r140611 r140613 1 2012-12-12 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION: WebKit does not render selection in non-first ruby text nodes. 4 https://bugs.webkit.org/show_bug.cgi?id=92818 5 6 Reviewed by Levi Weintraub. 7 8 The patch is based on the one submitted by Sukolsak Sakshuwong. 9 10 The bug was caused by the fact isSelectionRoot was returning false on RenderRubyRun even though 11 it doesn't lay down its children in block direction. 12 13 The selection painting code assumes that all blocks in each selection root are laid down in 14 the containing block direction. In particular, InlineTextBox::paintSelection calls 15 RootInlineBox::selectionTopAdjustedForPrecedingBlock in order to determine the end of the previous 16 line, which in turn calls blockBeforeWithinSelectionRoot. blockBeforeWithinSelectionRoot goes 17 through block nodes that appears before "this" block, and selectionTopAdjustedForPrecedingBlock 18 assumes that to compute the end of the previous line. 19 20 Now suppose we have markup such as <ruby>Ichi<rt>One</rt></ruby><ruby>Ni<rt>Two</rt></ruby>. When 21 selectionTopAdjustedForPrecedingBlock is called on the line box generated for "Two", it tries to 22 determine the bottom of the inline box above that of "Two", which blockBeforeWithinSelectionRoot 23 determines to be that of "One". At this point, everything goes wrong and the selection height is 24 computed to be 0. 25 26 The fix to this problem is to allow RenderRubyRun to be a selection root. Since RenderRubyRun is 27 already an inline-block, it suffices to bypass the !nonPseudoNode() check. In fact, there is no 28 need to check this condition anymore as far as I can tell. The check was added in 29 http://trac.webkit.org/changeset/12986 but all tests added by this change set as well as the rest 30 of layout tests pass without this condition. 31 32 Test: fast/ruby/select-ruby.html 33 34 * rendering/RenderBlock.cpp: 35 (WebCore::RenderBlock::isSelectionRoot): 36 1 37 2013-01-23 Kentaro Hara <haraken@chromium.org> 2 38 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r140576 r140613 3253 3253 bool RenderBlock::isSelectionRoot() const 3254 3254 { 3255 if ( !nonPseudoNode())3255 if (isPseudoElement()) 3256 3256 return false; 3257 ASSERT(node() || isAnonymous()); 3257 3258 3258 3259 // FIXME: Eventually tables should have to learn how to fill gaps between cells, at least in simple non-spanning cases.
Note: See TracChangeset
for help on using the changeset viewer.