2011-03-30 Abhishek Arya <inferno@chromium.org>
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 22:00:06 +0000 (22:00 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Mar 2011 22:00:06 +0000 (22:00 +0000)
commit89240183d95f2e1105ed5aea21f0f766761d168c
treef2ea6e5cb33e0384ec16c84d94737e9f6b74eed3
parent170d50542648b52ab7121962b960cc232912ed74
2011-03-30  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Tests that we do not crash when removing inline style
        from a node that is not a html element.
        https://bugs.webkit.org/show_bug.cgi?id=57348

        * editing/execCommand/remove-format-non-html-element-crash-expected.txt: Added.
        * editing/execCommand/remove-format-non-html-element-crash.html: Added.
2011-03-30  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Fix wrong type assumptions in editing code. Move code
        from ASSERTs to hard checks.
        https://bugs.webkit.org/show_bug.cgi?id=57348

        Test: editing/execCommand/remove-format-non-html-element-crash.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::getRGBAFontColor):
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
        * editing/DeleteButtonController.cpp:
        (WebCore::enclosingDeletableElement):
        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::textDirection):
        (WebCore::EditingStyle::prepareToApplyAt):
        * editing/Editor.cpp:
        (WebCore::Editor::textDirectionForSelection):
        * editing/FormatBlockCommand.cpp:
        (WebCore::FormatBlockCommand::elementForFormatBlockCommand):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/DeleteButtonController.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FormatBlockCommand.cpp