haikuwebkit/LayoutTests/fast/ruby/floating-ruby-text.html

5 lines
315 B
HTML
Raw Permalink Normal View History

Positioned children of ruby runs not handled correctly during layout https://bugs.webkit.org/show_bug.cgi?id=84157 Patch by Ken Buchanan <kenrb@chromium.org> on 2012-04-19 Reviewed by Julien Chaffraix. Source/WebCore: A positioned ruby text causes a problem because it is excluded from normal layout by its parent and instead gets layout from RenderRubyRun::layoutSpecialExcludedChild; however this means it gets skipped over during the loop in RenderBlock::layoutBlockChildren, which is where positioned RenderBlocks get added to the appropriate positioned object lists. As a result, a dirty positioned ruby text will not get layout again unless the RenderRubyRun also needs layout which is not guaranteed. This patch disqualifies ruby text elements from being positioned. If it is necessary to support this in future, ruby text layout will have to be modified to ensure the renderers are added to the appropriate block lists. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::rubyText): LayoutTests: * fast/ruby/modify-positioned-ruby-text-crash-expected.txt: Added * fast/ruby/modify-positioned-ruby-text-crash.html: Exercises the crash condition in but 84157 relating to positioned ruby text. This is being added in case support for positioned ruby text is added in future, so that we can guard against regression. * fast/ruby/floating-ruby-text-expected.png: Added * fast/ruby/floating-ruby-text-expected.txt: Added * fast/ruby/floating-ruby-text.html: Creates a positioned ruby text. The position should be ignored. * fast/ruby/positioned-ruby-text-expected.png: Added * fast/ruby/positioned-ruby-text-expected.txt: Added * fast/ruby/positioned-ruby-text.html: Creates a floating ruby text. The float should be ignored. Canonical link: https://commits.webkit.org/101865@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-19 20:15:18 +00:00
<!DOCTYPE html>
<html style="font-family: ahem; font-size: 10px; -webkit-font-smoothing: none; color: white;">
<ruby>Attempt to create a floating ruby text element. Float is not supported for ruby text, which should be apparent from the resulting render tree.<rt style="float:left">rubytext</rt></ruby>
Positioned children of ruby runs not handled correctly during layout https://bugs.webkit.org/show_bug.cgi?id=84157 Patch by Ken Buchanan <kenrb@chromium.org> on 2012-04-19 Reviewed by Julien Chaffraix. Source/WebCore: A positioned ruby text causes a problem because it is excluded from normal layout by its parent and instead gets layout from RenderRubyRun::layoutSpecialExcludedChild; however this means it gets skipped over during the loop in RenderBlock::layoutBlockChildren, which is where positioned RenderBlocks get added to the appropriate positioned object lists. As a result, a dirty positioned ruby text will not get layout again unless the RenderRubyRun also needs layout which is not guaranteed. This patch disqualifies ruby text elements from being positioned. If it is necessary to support this in future, ruby text layout will have to be modified to ensure the renderers are added to the appropriate block lists. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::rubyText): LayoutTests: * fast/ruby/modify-positioned-ruby-text-crash-expected.txt: Added * fast/ruby/modify-positioned-ruby-text-crash.html: Exercises the crash condition in but 84157 relating to positioned ruby text. This is being added in case support for positioned ruby text is added in future, so that we can guard against regression. * fast/ruby/floating-ruby-text-expected.png: Added * fast/ruby/floating-ruby-text-expected.txt: Added * fast/ruby/floating-ruby-text.html: Creates a positioned ruby text. The position should be ignored. * fast/ruby/positioned-ruby-text-expected.png: Added * fast/ruby/positioned-ruby-text-expected.txt: Added * fast/ruby/positioned-ruby-text.html: Creates a floating ruby text. The float should be ignored. Canonical link: https://commits.webkit.org/101865@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-19 20:15:18 +00:00
</html>