- fixed <rdar://problem/
4045924> improve compareBoundaryPoints to make style changes faster
* khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
Do early outs in a couple of the loops to make things faster.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8846
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-10 Darin Adler <darin@apple.com>
+
+ Change written by Steve Peters, reviewed by me.
+
+ - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster
+
+ * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
+ Do early outs in a couple of the loops to make things faster.
+
2005-03-10 Jens Alfke <jens@apple.com>
Reviewed by rjw.
2005-03-10 Jens Alfke <jens@apple.com>
Reviewed by rjw.
if (c) {
int offsetC = 0;
NodeImpl *n = containerA->firstChild();
if (c) {
int offsetC = 0;
NodeImpl *n = containerA->firstChild();
+ while (n != c && offsetC < offsetA) {
offsetC++;
n = n->nextSibling();
}
offsetC++;
n = n->nextSibling();
}
if (c) {
int offsetC = 0;
NodeImpl *n = containerB->firstChild();
if (c) {
int offsetC = 0;
NodeImpl *n = containerB->firstChild();
+ while (n != c && offsetC < offsetB) {
offsetC++;
n = n->nextSibling();
}
offsetC++;
n = n->nextSibling();
}