2010-08-16 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Aug 2010 23:23:10 +0000 (23:23 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Aug 2010 23:23:10 +0000 (23:23 +0000)
commitf1cf9f3eca2507e9299c7260962cd7af9537547e
treeca99d9922d4b6dcd2c3824a8d74181b173cf0d55
parente069227d38d0b9ba997922a1c02641f512a5c86d
2010-08-16  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Tony Chang.

        REGRESSION(r65208): editing/pasteboard/smart-paste-003.html and smart-paste-004.html crash on Windows Chromium
        https://bugs.webkit.org/show_bug.cgi?id=44070

        The crash was caused by start or end node being removed in pushDownInlineStyleAroundNode.
        It made start and end orphaned, and caused s.node() to be detached from the document.
        Fixed the crash by using nodes passed to pushDownInlineStyleAroundNode for start and end if the original
        start and end are orphaned because pushDownInlineStyleAroundNode won't prune targetNode.

        Test: editing/pasteboard/smart-paste-003-trailing-whitespace.html

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::removeInlineStyle):
2010-08-16  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Tony Chang.

        REGRESSION(r65208): editing/pasteboard/smart-paste-003.html and smart-paste-004.html crash on Windows Chromium
        https://bugs.webkit.org/show_bug.cgi?id=44070

        The bug only reproduced on Windows when trailing space is selected only on Windows.
        Added a crash test to copy & paste a word with trailing space.

        * editing/pasteboard/smart-paste-003-trailing-whitespace-expected.txt: Added.
        * editing/pasteboard/smart-paste-003-trailing-whitespace.html: Added.
        * platform/chromium/test_expectations.txt: editing/pasteboard/smart-paste-003.html and smart-paste-004.html should not crash.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/smart-paste-003-trailing-whitespace-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/smart-paste-003-trailing-whitespace.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
WebCore/ChangeLog
WebCore/editing/ApplyStyleCommand.cpp