2011-04-13 Roland Steiner <rolandsteiner@chromium.org>
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Apr 2011 23:52:15 +0000 (23:52 +0000)
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Apr 2011 23:52:15 +0000 (23:52 +0000)
commitd771c2ca4b28d68a4ae89fad918729c199fa69b2
tree860eab3ba81499c611a91616b5ccc77bc2c20275
parent37a73bae09e70c3474a5d56755858c28a0261f28
2011-04-13  Roland Steiner  <rolandsteiner@chromium.org>

        Reviewed by David Hyatt.

        Bug 55930 - Incorrect handling of 'display:' property within nested <ruby> tags
        https://bugs.webkit.org/show_bug.cgi?id=55930

        Test that 'display: block' and 'display: table' on generated :before/:after content
        within <ruby> doesn't crash.

        * fast/ruby/after-block-doesnt-crash-expected.txt: Added.
        * fast/ruby/after-block-doesnt-crash.html: Added.
        * fast/ruby/after-table-doesnt-crash-expected.txt: Added.
        * fast/ruby/after-table-doesnt-crash.html: Added.
        * fast/ruby/before-block-doesnt-crash-expected.txt: Added.
        * fast/ruby/before-block-doesnt-crash.html: Added.
        * fast/ruby/before-table-doesnt-crash-expected.txt: Added.
        * fast/ruby/before-table-doesnt-crash.html: Added.
2011-04-13  Roland Steiner  <rolandsteiner@chromium.org>

        Reviewed by David Hyatt.

        Bug 55930 - Incorrect handling of 'display:' property within nested <ruby> tags
        https://bugs.webkit.org/show_bug.cgi?id=55930

        Non-inline :before/:after generated content is now wrapped with an anonymous inline block.

        Also, added an additional check in RenderObjectChildList::updateBeforeAfterContent()
        to verify that the created render object is legal under the parent.

        Tests: fast/ruby/after-block-doesnt-crash.html
               fast/ruby/after-table-doesnt-crash.html
               fast/ruby/before-block-doesnt-crash.html
               fast/ruby/before-table-doesnt-crash.html

        * rendering/RenderObjectChildList.cpp:
        (WebCore::RenderObjectChildList::updateBeforeAfterContent):
        * rendering/RenderRuby.cpp:
        (WebCore::isAnonymousRubyInlineBlock):
        (WebCore::rubyBeforeBlock):
        (WebCore::rubyAfterBlock):
        (WebCore::createAnonymousRubyInlineBlock):
        (WebCore::lastRubyRun):
        (WebCore::RenderRubyAsInline::addChild):
        (WebCore::RenderRubyAsInline::removeChild):
        (WebCore::RenderRubyAsBlock::addChild):
        (WebCore::RenderRubyAsBlock::removeChild):
        * rendering/RenderRuby.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/ruby/after-block-doesnt-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/ruby/after-block-doesnt-crash.html [new file with mode: 0644]
LayoutTests/fast/ruby/after-table-doesnt-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/ruby/after-table-doesnt-crash.html [new file with mode: 0644]
LayoutTests/fast/ruby/before-block-doesnt-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/ruby/before-block-doesnt-crash.html [new file with mode: 0644]
LayoutTests/fast/ruby/before-table-doesnt-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/ruby/before-table-doesnt-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderRuby.cpp
Source/WebCore/rendering/RenderRuby.h