2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Antonio Gomes.

        REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
        https://bugs.webkit.org/show_bug.cgi?id=45525

        The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
        the case where there is no common block ancestor. Fixed this by adding a null check.

        Test: editing/pasteboard/copy-without-common-block-crash.html

        * editing/markup.cpp:
        (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Antonio Gomes.

        REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
        https://bugs.webkit.org/show_bug.cgi?id=45525

        Added a test to ensure WebKit does not crash when copying a region that doesn't have any common block ancestor.
        Also removed doubleclick-inline-first-last-contenteditable.html from the qt's skipped list since
        this test should not crash anymore.

        * editing/pasteboard/copy-without-common-block-crash-expected.txt: Added.
        * editing/pasteboard/copy-without-common-block-crash.html: Added.
        * platform/qt/Skipped: Removed doubleclick-inline-first-last-contenteditable.html from the list.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed