[webkit-changes] cvs commit: WebCore/khtml/xml dom_position.cpp
David
harrison at opensource.apple.com
Tue Aug 16 14:53:53 PDT 2005
harrison 05/08/16 14:53:53
Modified: . ChangeLog
khtml/xml dom_position.cpp
Log:
<rdar://problem/4119646> assertion failure in DOM::Position::upstream at babelfish.com
<rdar://problem/4125949> Assertion failure clicking outside of textarea in page containing only textarea
Removed asserts that did not account for iterating from a nested node to its parent.
Test cases added: n/a for assert removal
* khtml/xml/dom_position.cpp:
(DOM::Position::upstream):
(DOM::Position::downstream):
Revision Changes Path
1.4588 +13 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4587
retrieving revision 1.4588
diff -u -r1.4587 -r1.4588
--- ChangeLog 16 Aug 2005 19:03:06 -0000 1.4587
+++ ChangeLog 16 Aug 2005 21:53:48 -0000 1.4588
@@ -1,3 +1,16 @@
+2005-08-16 David Harrison <harrison at apple.com>
+
+ <rdar://problem/4119646> assertion failure in DOM::Position::upstream at babelfish.com
+ <rdar://problem/4125949> Assertion failure clicking outside of textarea in page containing only textarea
+
+ Removed asserts that did not account for iterating from a nested node to its parent.
+
+ Test cases added: n/a for assert removal
+
+ * khtml/xml/dom_position.cpp:
+ (DOM::Position::upstream):
+ (DOM::Position::downstream):
+
2005-08-16 Darin Adler <darin at apple.com>
Reviewed by Beth Dakin.
1.75 +2 -8 WebCore/khtml/xml/dom_position.cpp
Index: dom_position.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_position.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- dom_position.cpp 30 Jul 2005 02:33:26 -0000 1.74
+++ dom_position.cpp 16 Aug 2005 21:53:53 -0000 1.75
@@ -376,13 +376,11 @@
lastVisible = currentPos;
// return position after replaced or BR elements
+ // NOTE: caretMaxOffset() can be less than childNodeCount()!!
+ // e.g. SELECT and APPLET nodes
if (renderer->isReplaced() || renderer->isBR()) {
if (currentOffset >= renderer->caretMaxOffset())
return Position(currentNode, renderer->caretMaxOffset());
-
- // we could not have iterated here because we would have returned
- // this node, caretMaxOffset, so we must have started here
- assert(currentPos == start);
continue;
}
@@ -489,10 +487,6 @@
if (renderer->isReplaced() || renderer->isBR()) {
if (currentOffset <= renderer->caretMinOffset())
return Position(currentNode, renderer->caretMinOffset());
-
- // we could not have iterated here because we would have returned
- // this node, offset 0, so we must have started here
- assert(currentPos == start);
continue;
}
More information about the webkit-changes
mailing list