Changeset 29207 in webkit


Ignore:
Timestamp:
Jan 6, 2008 3:27:45 AM (16 years ago)
Author:
andrew@webkit.org
Message:

WebCore:

Reviewed by Darin.


DOMRange.cloneContents does not work (Acid3 bug)
http://bugs.webkit.org/show_bug.cgi?id=16748


When cloning an empty range, return an empty DocmentFragment instead of
null or undefined.

Test: fast/dom/Range/range-clone-empty.html

  • dom/Range.cpp: (WebCore::Range::processContents):

LayoutTests:

Reviewed by Darin.


DOMRange.cloneContents does not work (Acid3 bug)
http://bugs.webkit.org/show_bug.cgi?id=16748


When cloning an empty range, return an empty DocmentFragment instead of
null or undefined.

  • fast/dom/Range/range-clone-empty-expected.txt: Added.
  • fast/dom/Range/range-clone-empty.html: Added.
  • fast/dom/Range/resources/range-clone-empty.js: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r29204 r29207  
     12008-01-06  Andrew Wellington  <proton@wiretapped.net>
     2
     3        Reviewed by Darin.
     4       
     5        DOMRange.cloneContents does not work (Acid3 bug)
     6        http://bugs.webkit.org/show_bug.cgi?id=16748
     7       
     8        When cloning an empty range, return an empty DocmentFragment instead of
     9        null or undefined.
     10
     11        * fast/dom/Range/range-clone-empty-expected.txt: Added.
     12        * fast/dom/Range/range-clone-empty.html: Added.
     13        * fast/dom/Range/resources/range-clone-empty.js: Added.
     14
    1152008-01-06  Eric Seidel  <eric@webkit.org>
    216
  • trunk/WebCore/ChangeLog

    r29206 r29207  
     12008-01-06  Andrew Wellington  <proton@wiretapped.net>
     2
     3        Reviewed by Darin.
     4       
     5        DOMRange.cloneContents does not work (Acid3 bug)
     6        http://bugs.webkit.org/show_bug.cgi?id=16748
     7       
     8        When cloning an empty range, return an empty DocmentFragment instead of
     9        null or undefined.
     10
     11        Test: fast/dom/Range/range-clone-empty.html
     12
     13        * dom/Range.cpp:
     14        (WebCore::Range::processContents):
     15
    1162008-01-06  Luca Bruno  <lethalman88@gmail.com>
    217
  • trunk/WebCore/dom/Range.cpp

    r29098 r29207  
    634634    // ### perhaps disable node deletion notification for this range while we do this?
    635635
     636    RefPtr<DocumentFragment> fragment;
     637    if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS)
     638        fragment = new DocumentFragment(m_ownerDocument.get());
     639   
    636640    ec = 0;
    637641    if (collapsed(ec))
    638         return 0;
     642        return fragment.release();
    639643    if (ec)
    640644        return 0;
     
    659663            partialEnd = partialEnd->parentNode();
    660664    }
    661 
    662     RefPtr<DocumentFragment> fragment;
    663     if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS)
    664         fragment = new DocumentFragment(m_ownerDocument.get());
    665665
    666666    // Simple case: the start and end containers are the same. We just grab
Note: See TracChangeset for help on using the changeset viewer.