Skip to content
  • rniwa@webkit.org's avatar
    2011-05-12 Ryosuke Niwa <rniwa@webkit.org> · 67a06f94
    rniwa@webkit.org authored
            Reviewed by Darin Adler.
    
            WebKit inserts base, link, meta, style, and title elements into an editable region
            when pasting table cells from Excel
            https://bugs.webkit.org/show_bug.cgi?id=60644
    
            Added a test to ensure WebKit strips the said elements prior to inserting HTML.
    
            * editing/pasteboard/paste-head-contents-expected.txt: Added.
            * editing/pasteboard/paste-head-contents.html: Added.
    2011-05-12  Ryosuke Niwa  <rniwa@webkit.org>
    
            Reviewed by Darin Adler.
    
            WebKit inserts base, link, meta, style, and title elements into an editable region
            when pasting table cells from Excel
            https://bugs.webkit.org/show_bug.cgi?id=60644
    
            Strip base, link, meta, style, and tile elements from the fragment to be pasted prior
            to the merge. We don't have to strip these elements in performTrivialReplace because
            the function only handles a fragment that consists of exactly one text node.
    
            Test: editing/pasteboard/paste-head-contents.html
    
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::removeHeadContents): Added.
            (WebCore::ReplaceSelectionCommand::doApply): Calls removeHeadContents before handing
            style spans.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    67a06f94