Changeset 25311 in webkit


Ignore:
Timestamp:
Aug 29, 2007 5:32:10 PM (17 years ago)
Author:
darin
Message:

Reviewed by Adele.

  • editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode): Fix an assert that was firing for me all the time when doing editing operations.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r25310 r25311  
     12007-08-29  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Adele.
     4
     5        * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
     6        Fix an assert that was firing for me all the time when doing editing operations.
     7
    182007-08-29  Anders Carlsson <andersca@apple.com>
    29
  • trunk/WebCore/editing/htmlediting.cpp

    r25305 r25311  
    11/*
    2  * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
     2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    889889    ASSERT(startContainer);
    890890    ASSERT(endContainer);
    891     ASSERT(node->parent());
     891    ASSERT(!node || node->parentNode());
    892892
    893893    if (startContainer == node || startContainer->isDescendantOf(node)) {
    894         startContainer = node->parent();
     894        startContainer = node->parentNode();
    895895        startOffset = node->nodeIndex();
    896896    }
    897897    if (endContainer == node || endContainer->isDescendantOf(node)) {
    898         endContainer = node->parent();
     898        endContainer = node->parentNode();
    899899        endOffset = node->nodeIndex();
    900900    }
     
    913913    ASSERT(base);
    914914    ASSERT(extent);
    915     ASSERT(node->parent());
     915    ASSERT(!node || node->parentNode());
    916916   
    917917    if (base == node || base->isDescendantOf(node))
    918         updatedSelection.setBase(Position(node->parent(), node->nodeIndex()));
     918        updatedSelection.setBase(Position(node->parentNode(), node->nodeIndex()));
    919919   
    920920    if (extent == node || extent->isDescendantOf(node))
    921         updatedSelection.setExtent(Position(node->parent(), node->nodeIndex()));
     921        updatedSelection.setExtent(Position(node->parentNode(), node->nodeIndex()));
    922922       
    923923    return updatedSelection;
Note: See TracChangeset for help on using the changeset viewer.