Changeset 13685 in webkit


Ignore:
Timestamp:
Apr 4, 2006, 1:52:10 PM (19 years ago)
Author:
justing
Message:

LayoutTests:

Reviewed by darin

<http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
REGRESSION: Line disappears when deleting

Added:

  • editing/deleting/merge-different-styles-expected.checksum: Added.
  • editing/deleting/merge-different-styles-expected.png: Added.
  • editing/deleting/merge-different-styles-expected.txt: Added.
  • editing/deleting/merge-different-styles.html: Added.
  • editing/deleting/merge-no-br-expected.checksum: Added.
  • editing/deleting/merge-no-br-expected.png: Added.
  • editing/deleting/merge-no-br-expected.txt: Added.
  • editing/deleting/merge-no-br.html: Added.
  • editing/deleting/merge-whitespace-pre-expected.checksum: Added.
  • editing/deleting/merge-whitespace-pre-expected.png: Added.
  • editing/deleting/merge-whitespace-pre-expected.txt: Added.
  • editing/deleting/merge-whitespace-pre.html: Added.

Fixes (not enough style on nodes for the fixes to be reflected in pixel results):

  • editing/deleting/delete-block-merge-contents-005-expected.txt:
  • editing/deleting/delete-block-merge-contents-006-expected.txt:
  • editing/deleting/delete-block-merge-contents-008-expected.txt:

Equivalent render trees:

  • editing/deleting/delete-3857753-fix-expected.txt:
  • editing/inserting/insert-div-026-expected.txt:


Forgot to checkin these new expected results after fixing the DRT bug:

  • fast/lists/drag-into-marker-expected.checksum:
  • fast/lists/drag-into-marker-expected.png:
  • fast/lists/drag-into-marker-expected.txt:

WebCore:

Reviewed by darin


<http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
REGRESSION: Line disappears when deleting


Rewrote moveNodesAfterNode to address these problems:
It moved nodes without preserving their style.
It traversed over siblings looking for a br to know when
to stop merging. If the br was burried inside a span, it
wouldn't find it. If the text is whitespace:pre, it wouldn't
stop.
In theory it would crash if the "enclosingInlineElements" of the start of the
selection to delete and the end of the selection to delete were the
same. We think that this will fix these:
<rdar://problems/3950559&4498113>
CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
But we haven't been able to construct a reproducible case.


  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand. (WebCore::CompositeEditCommand::prune): Ditto.
  • editing/CompositeEditCommand.h:
  • editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): (WebCore::DeleteSelectionCommand::doApply):
  • editing/DeleteSelectionCommand.h:
  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
  • editing/ReplaceSelectionCommand.h: (WebCore::):
  • editing/markup.cpp: (WebCore::createMarkup): Was crashing when passed a collapsed range. I early return an empty string instead.
Location:
trunk
Files:
12 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r13673 r13685  
     12006-04-04  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by darin
     4
     5        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
     6        REGRESSION: Line disappears when deleting
     7
     8        Added:
     9        * editing/deleting/merge-different-styles-expected.checksum: Added.
     10        * editing/deleting/merge-different-styles-expected.png: Added.
     11        * editing/deleting/merge-different-styles-expected.txt: Added.
     12        * editing/deleting/merge-different-styles.html: Added.
     13        * editing/deleting/merge-no-br-expected.checksum: Added.
     14        * editing/deleting/merge-no-br-expected.png: Added.
     15        * editing/deleting/merge-no-br-expected.txt: Added.
     16        * editing/deleting/merge-no-br.html: Added.
     17        * editing/deleting/merge-whitespace-pre-expected.checksum: Added.
     18        * editing/deleting/merge-whitespace-pre-expected.png: Added.
     19        * editing/deleting/merge-whitespace-pre-expected.txt: Added.
     20        * editing/deleting/merge-whitespace-pre.html: Added.
     21
     22        Fixes (not enough style on nodes for the fixes to be reflected in pixel results):
     23        * editing/deleting/delete-block-merge-contents-005-expected.txt:
     24        * editing/deleting/delete-block-merge-contents-006-expected.txt:
     25        * editing/deleting/delete-block-merge-contents-008-expected.txt:
     26
     27        Equivalent render trees:
     28        * editing/deleting/delete-3857753-fix-expected.txt:
     29        * editing/inserting/insert-div-026-expected.txt:
     30       
     31        Forgot to checkin these new expected results after fixing the DRT bug:
     32        * fast/lists/drag-into-marker-expected.checksum:
     33        * fast/lists/drag-into-marker-expected.png:
     34        * fast/lists/drag-into-marker-expected.txt:
     35
    1362006-04-03  Alexey Proskuryakov  <ap@nypop.com>
    237
  • trunk/LayoutTests/editing/deleting/delete-3857753-fix-expected.txt

    r12708 r13685  
    1717    RenderBody {BODY} at (8,8) size 784x584 [border: (2px solid #FF0000)]
    1818      RenderBlock {DIV} at (14,14) size 756x28
    19         RenderInline {B} at (0,0) size 25x28
     19        RenderInline {B} at (0,0) size 37x28
    2020          RenderText {TEXT} at (0,0) size 25x28
    2121            text run at (0,0) width 25: "on"
    22         RenderInline {I} at (0,0) size 12x28
    23           RenderText {TEXT} at (25,0) size 12x28
    24             text run at (25,0) width 12: "o"
     22          RenderInline {SPAN} at (0,0) size 12x28
     23            RenderInline {I} at (0,0) size 12x28
     24              RenderText {TEXT} at (25,0) size 12x28
     25                text run at (25,0) width 12: "o"
    2526      RenderBlock {DIV} at (14,42) size 756x28
    2627        RenderInline {B} at (0,0) size 54x28
  • trunk/LayoutTests/editing/deleting/delete-block-merge-contents-005-expected.txt

    r12708 r13685  
    2222              text run at (40,0) width 44: "Two"
    2323          RenderBlock {DIV} at (0,28) size 756x28
    24             RenderText {TEXT} at (0,0) size 57x28
    25               text run at (0,0) width 57: "Three"
     24            RenderBlock (anonymous) at (0,0) size 756x0
     25            RenderBlock {DIV} at (0,0) size 756x28
     26              RenderText {TEXT} at (0,0) size 57x28
     27                text run at (0,0) width 57: "Three"
    2628          RenderBlock (anonymous) at (0,56) size 756x28
    2729            RenderText {TEXT} at (0,0) size 45x28
  • trunk/LayoutTests/editing/deleting/delete-block-merge-contents-006-expected.txt

    r12708 r13685  
    2222              text run at (40,0) width 44: "Two"
    2323          RenderBlock {DIV} at (0,28) size 756x28
    24             RenderText {TEXT} at (0,0) size 57x28
    25               text run at (0,0) width 57: "Three"
    26             RenderBR {BR} at (0,0) size 0x0
     24            RenderBlock (anonymous) at (0,0) size 756x0
     25            RenderBlock {DIV} at (0,0) size 756x28
     26              RenderText {TEXT} at (0,0) size 57x28
     27                text run at (0,0) width 57: "Three"
     28              RenderBR {BR} at (0,0) size 0x0
    2729          RenderBlock (anonymous) at (0,56) size 756x28
    2830            RenderText {TEXT} at (0,0) size 45x28
  • trunk/LayoutTests/editing/deleting/delete-block-merge-contents-008-expected.txt

    r12708 r13685  
    2121            RenderText {TEXT} at (40,0) size 44x28
    2222              text run at (40,0) width 44: "Two"
    23           RenderBlock {DIV} at (0,28) size 756x28
    24             RenderText {TEXT} at (0,0) size 57x28
    25               text run at (0,0) width 57: "Three"
    26           RenderBlock {DIV} at (0,56) size 756x28
    27             RenderText {TEXT} at (0,0) size 45x28
    28               text run at (0,0) width 45: "Four"
     23          RenderBlock {DIV} at (0,28) size 756x56
     24            RenderBlock {DIV} at (0,0) size 756x28
     25              RenderBlock (anonymous) at (0,0) size 756x0
     26              RenderBlock {DIV} at (0,0) size 756x28
     27                RenderText {TEXT} at (0,0) size 57x28
     28                  text run at (0,0) width 57: "Three"
     29            RenderBlock (anonymous) at (0,28) size 756x28
     30              RenderText {TEXT} at (0,0) size 45x28
     31                text run at (0,0) width 45: "Four"
    2932caret: position 3 of child 0 {TEXT} of child 1 {DIV} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
  • trunk/LayoutTests/editing/inserting/insert-div-026-expected.txt

    r12709 r13685  
    4949      RenderBlock {DIV} at (0,236) size 784x32
    5050        RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
    51           RenderInline {B} at (0,0) size 20x28
     51          RenderInline {B} at (0,0) size 32x28
    5252            RenderText {TEXT} at (2,2) size 20x28
    5353              text run at (2,2) width 20: "fo"
    54           RenderText {TEXT} at (22,2) size 12x28
    55             text run at (22,2) width 12: "x"
     54            RenderInline {SPAN} at (0,0) size 12x28
     55              RenderText {TEXT} at (22,2) size 12x28
     56                text run at (22,2) width 12: "x"
    5657caret: position 3 of child 0 {TEXT} of child 0 {B} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
  • trunk/LayoutTests/fast/lists/drag-into-marker-expected.checksum

    r13664 r13685  
    1 df27ed25b1f079512d5aad0ce5771c69
     1720296de5356ea7c8b963a39d88d5ff2
  • trunk/LayoutTests/fast/lists/drag-into-marker-expected.txt

    r13664 r13685  
    3131          text run at (0,54) width 371: "this test drags a bit of text over the list marker and drops it. "
    3232          text run at (371,54) width 386: "It should be pasted into the list item, which is contenteditable."
    33       RenderBlock {P} at (0,161) size 784x36
    34         RenderInline {B} at (0,0) size 771x36
    35           RenderText {TEXT} at (0,0) size 771x36
    36             text run at (0,0) width 713: "This test case demonstrates a bug in DumpRenderTree's drag and drop support, which is that the source "
    37             text run at (713,0) width 58: "is copied"
    38             text run at (0,18) width 113: "on drop, not cut."
    39         RenderText {TEXT} at (113,18) size 173x18
    40           text run at (113,18) width 4: " "
    41           text run at (117,18) width 169: "So you'll see 'world' twice."
    4233selection start: position 0 of child 0 {TEXT} of child 0 {SPAN} of child 0 {LI} of child 1 {UL} of child 0 {BODY} of child 0 {HTML} of document
    4334selection end:   position 6 of child 0 {TEXT} of child 0 {SPAN} of child 0 {LI} of child 1 {UL} of child 0 {BODY} of child 0 {HTML} of document
  • trunk/WebCore/ChangeLog

    r13682 r13685  
     12006-04-04  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by darin
     4       
     5        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
     6        REGRESSION: Line disappears when deleting
     7       
     8        Rewrote moveNodesAfterNode to address these problems:
     9        It moved nodes without preserving their style.
     10        It traversed over siblings looking for a br to know when
     11        to stop merging.  If the br was burried inside a span, it
     12        wouldn't find it.  If the text is whitespace:pre, it wouldn't
     13        stop.
     14        In theory it would crash if the "enclosingInlineElements" of the start of the
     15        selection to delete and the end of the selection to delete were the
     16        same.  We think that this will fix these:
     17        <rdar://problems/3950559&4498113>
     18        CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
     19        CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
     20        But we haven't been able to construct a reproducible case.
     21       
     22        * editing/CompositeEditCommand.cpp:
     23        (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand.
     24        (WebCore::CompositeEditCommand::prune): Ditto.
     25        * editing/CompositeEditCommand.h:
     26        * editing/DeleteSelectionCommand.cpp:
     27        (WebCore::DeleteSelectionCommand::mergeParagraphs):
     28        (WebCore::DeleteSelectionCommand::doApply):
     29        * editing/DeleteSelectionCommand.h:
     30        * editing/ReplaceSelectionCommand.cpp:
     31        (WebCore::ReplaceSelectionCommand::doApply):
     32        * editing/ReplaceSelectionCommand.h:
     33        (WebCore::):
     34        * editing/markup.cpp:
     35        (WebCore::createMarkup):
     36        Was crashing when passed a collapsed range.  I early return an empty string instead.
     37
    1382006-04-04  John Sullivan  <sullivan@apple.com>
    239
  • trunk/WebCore/editing/CompositeEditCommand.cpp

    r13485 r13685  
    228228}
    229229
     230void CompositeEditCommand::removeNodeAndPruneAncestors(Node* node)
     231{
     232    RefPtr<Node> parent = node->parentNode();
     233    removeNode(node);
     234    prune(parent);
     235}
     236
     237void CompositeEditCommand::prune(PassRefPtr<Node> node)
     238{
     239    while (node) {
     240        RefPtr<Node> parent = node->parentNode();
     241        // If you change this rule you may have to add an updateLayout() here.
     242        if (node->renderer() && node->renderer()->firstChild())
     243            return;
     244        removeNode(node.get());
     245        node = parent;
     246    }
     247}
     248
    230249void CompositeEditCommand::splitTextNode(Text *text, int offset)
    231250{
  • trunk/WebCore/editing/CompositeEditCommand.h

    r13477 r13685  
    7676    void removeNode(WebCore::Node *removeChild);
    7777    void removeNodePreservingChildren(WebCore::Node *node);
     78    void removeNodeAndPruneAncestors(Node* node);
     79    void prune(PassRefPtr<Node> node);
    7880    void replaceTextInNode(WebCore::Text *node, int offset, int count, const WebCore::String &replacementText);
    7981    WebCore::Position positionOutsideTabSpan(const WebCore::Position& pos);
  • trunk/WebCore/editing/DeleteSelectionCommand.cpp

    r13579 r13685  
    3636#include "htmlediting.h"
    3737#include "HTMLNames.h"
     38#include "markup.h"
    3839#include "render_line.h"
    3940#include "RenderObject.h"
     41#include "ReplaceSelectionCommand.h"
    4042#include "VisiblePosition.h"
    4143#include "TextIterator.h"
     
    491493}
    492494
    493 // This function moves nodes in the block containing startNode to dstBlock, starting
    494 // from startNode and proceeding to the end of the paragraph. Nodes in the block containing
    495 // startNode that appear in document order before startNode are not moved.
    496 // This function is an important helper for deleting selections that cross paragraph
    497 // boundaries.
    498 void DeleteSelectionCommand::moveNodesAfterNode()
     495// If a selection ended in a different paragraph than it started in, we must merge
     496// the two paragraphs after deleting the selection.
     497void DeleteSelectionCommand::mergeParagraphs()
    499498{
    500499    if (!m_mergeBlocksAfterDelete)
    501500        return;
    502501
     502    // FIXME: Deletion should adjust selection endpoints as it removes nodes so that we never get into this state (4099839).
     503    if (!m_downstreamEnd.node()->inDocument() || !m_upstreamStart.node()->inDocument())
     504         return;
     505         
     506    // Do not move content between parts of a table.
     507    if (isTableStructureNode(m_downstreamEnd.node()->enclosingBlockFlowElement()) || isTableStructureNode(m_upstreamStart.node()->enclosingBlockFlowElement()))
     508        return;
     509       
     510    VisiblePosition startOfParagraphToMove(m_downstreamEnd);
     511    VisiblePosition mergeDestination(m_upstreamStart);
     512   
     513    if (mergeDestination == startOfParagraphToMove)
     514        return;
     515   
     516    // FIXME: The above early return should be all we need.
    503517    if (m_endBlock == m_startBlock)
    504518        return;
    505 
    506     Node *startNode = m_downstreamEnd.node();
    507     Node *dstNode = m_upstreamStart.node();
    508 
    509     if (!startNode->inDocument() || !dstNode->inDocument())
    510         return;
    511 
    512     Node *startBlock = startNode->enclosingBlockFlowElement();
    513 
    514     // Do not move content between parts of a table.
    515     if (isTableStructureNode(startBlock))
    516         return;
    517    
    518     // Now that we are about to add content, check to see if a placeholder element
    519     // can be removed.
    520     removeBlockPlaceholder(startBlock);
    521 
    522     // Move the subtree containing node
    523     Node *node = startNode->enclosingInlineElement();
    524 
    525     // Insert after the subtree containing dstNode
    526     Node *refNode = dstNode->enclosingInlineElement();
    527 
    528     // Preserve nesting when deleting to the beginning of an ancestor block
    529     Node *dstBlock = refNode->enclosingBlockFlowElement();
    530     if (startBlock->isAncestor(dstBlock) && isStartOfBlock(VisiblePosition(m_upstreamStart)))
    531         return;
    532 
    533     // Do the move.
    534     Node *rootNode = refNode->rootEditableElement();
    535     while (node && node->isAncestor(startBlock)) {
    536         Node *moveNode = node;
    537         node = node->nextSibling();
    538         removeNode(moveNode);
    539         if (moveNode->hasTagName(brTag) && !moveNode->renderer()) {
    540             // Just remove this node, and don't put it back.
    541             // If the BR was not rendered (since it was at the end of a block, for instance),
    542             // putting it back in the document might make it appear, and that is not desirable.
    543             break;
    544         }
    545         if (refNode == rootNode)
    546             insertNodeAt(moveNode, refNode, 0);
    547         else
    548             insertNodeAfter(moveNode, refNode);
    549         refNode = moveNode;
    550         if (moveNode->hasTagName(brTag))
    551             break;
    552     }
    553 
    554     // If the startBlock no longer has any kids, we may need to deal with adding a BR
    555     // to make the layout come out right. Consider this document:
    556     //
    557     // One
    558     // <div>Two</div>
    559     // Three
    560     //
    561     // Placing the insertion before before the 'T' of 'Two' and hitting delete will
    562     // move the contents of the div to the block containing 'One' and delete the div.
    563     // This will have the side effect of moving 'Three' on to the same line as 'One'
    564     // and 'Two'. This is undesirable. We fix this up by adding a BR before the 'Three'.
    565     // This may not be ideal, but it is better than nothing.
    566     updateLayout();
    567     if (!startBlock->renderer() || startBlock->renderer()->isEmpty()) {
    568         removeNode(startBlock);
    569         updateLayout();
    570         if (refNode->renderer() && refNode->renderer()->inlineBox() && refNode->renderer()->inlineBox()->nextOnLineExists()) {
    571             insertNodeAfter(createBreakElement(document()).get(), refNode);
    572         }
    573     }
     519       
     520    VisiblePosition endOfParagraphToMove = endOfParagraph(startOfParagraphToMove);
     521   
     522    Position start = startOfParagraphToMove.deepEquivalent().upstream();
     523    // We upstream() the end so that we don't include collapsed whitespace in the move.
     524    // If we must later add a br after the merged paragraph, doing so would cause the moved unrendered space to become rendered.
     525    Position end = endOfParagraphToMove.deepEquivalent().upstream();
     526    RefPtr<Range> range = new Range(document(), start.node(), start.offset(), end.node(), end.offset());
     527
     528    // FIXME: This is an inefficient way to preserve style on nodes in the paragraph to move.  It
     529    // shouldn't matter though, since moved paragraphs will usually be quite small.
     530    RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(document(), range->toHTML(), "");
     531   
     532    setEndingSelection(Selection(startOfParagraphToMove.deepEquivalent(), endOfParagraphToMove.deepEquivalent(), DOWNSTREAM));
     533    deleteSelection(false, false);
     534   
     535    // The above deletion leaves a placeholder (it always does when a whole paragraph is deleted).
     536    // We remove it and prune it's parents since we want to remove all traces of the paragraph to move.
     537    Node* placeholder = endingSelection().end().node();
     538    // FIXME: Deletion has bugs and it doesn't always add a placeholder.  If it fails, still do pruning.
     539    if (placeholder->hasTagName(brTag))
     540        removeNodeAndPruneAncestors(placeholder);
     541    else
     542        prune(placeholder);
     543
     544    // Add a br if pruning an empty block level element caused a collapse.  For example:
     545    // foo
     546    // <div>bar</div>
     547    // baz
     548    // Placing the cursor before 'bar' and hitting delete will merge 'foo' and 'bar' and prune the empty div.   
     549    if (!isEndOfParagraph(mergeDestination))
     550        insertNodeAt(createBreakElement(document()).get(), m_upstreamStart.node(), m_upstreamStart.offset());
     551   
     552    setEndingSelection(mergeDestination);
     553    EditCommandPtr cmd(new ReplaceSelectionCommand(document(), fragment.get(), false));
     554    applyCommandToComposite(cmd);
    574555}
    575556
     
    695676    handleGeneralDelete();
    696677   
    697     // Do block merge if start and end of selection are in different blocks.
    698     moveNodesAfterNode();
     678    mergeParagraphs();
    699679   
    700680    calculateEndingPosition();
  • trunk/WebCore/editing/DeleteSelectionCommand.h

    r13393 r13685  
    5050    void handleGeneralDelete();
    5151    void fixupWhitespace();
    52     void moveNodesAfterNode();
     52    void mergeParagraphs();
    5353    void calculateEndingPosition();
    5454    void calculateTypingStyleAfterDelete(WebCore::Node *insertedPlaceholder);
  • trunk/WebCore/editing/ReplaceSelectionCommand.cpp

    r13664 r13685  
    286286}
    287287
    288 // FIXME: Move this somewhere so that the other editing operations can use it to clean up after themselves.
    289 void ReplaceSelectionCommand::removeNodeAndPruneAncestors(Node* node)
    290 {
    291     Node* parent = node->parentNode();
    292     removeNode(node);
    293     while (parent) {
    294         Node* nextParent = parent->parentNode();
    295         // If you change this rule you may have to add an updateLayout() here.
    296         if (parent->renderer() && parent->renderer()->firstChild())
    297             return;
    298         removeNode(parent);
    299         parent = nextParent;
    300     }
    301 }
    302 
    303288void ReplaceSelectionCommand::fixupNodeStyles(const NodeVector& nodes, const RenderingInfoMap& renderingInfo)
    304289{
     
    502487    ReplacementFragment fragment(document(), m_documentFragment.get(), m_matchStyle, selection.rootEditableElement());
    503488   
     489    if (fragment.type() == EmptyFragment)
     490        return;
     491   
    504492    if (m_matchStyle)
    505493        m_insertionStyle = styleAtPosition(selection.start());
  • trunk/WebCore/editing/ReplaceSelectionCommand.h

    r13664 r13685  
    3636class DocumentFragment;
    3737
     38enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment };
     39
    3840class RenderingInfo : public Shared<RenderingInfo> {
    3941public:
     
    5759    ReplacementFragment(Document*, DocumentFragment*, bool, Element*);
    5860    ~ReplacementFragment();
    59 
    60     enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment };
    6161
    6262    Node *firstChild() const;
     
    131131    void fixupNodeStyles(const NodeVector&, const RenderingInfoMap&);
    132132    void removeLinePlaceholderIfNeeded(Node *);
    133     void removeNodeAndPruneAncestors(Node*);
    134133
    135134    RefPtr<Node> m_firstNodeInserted;
  • trunk/WebCore/editing/markup.cpp

    r13543 r13685  
    327327
    328328    ExceptionCode ec = 0;
     329    if (range->collapsed(ec))
     330        return "";
     331    ASSERT(ec == 0);
    329332    Node *commonAncestor = range->commonAncestorContainer(ec);
    330333    ASSERT(ec == 0);
Note: See TracChangeset for help on using the changeset viewer.