[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:50:14 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 694dbf416d824ed37ac4c088d939b05d009daffa
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 14 19:48:59 2004 +0000

            Reviewed by John
    
            * khtml/xml/dom_position.cpp:
            (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
            Soon, I plan to land some changes that use this new function.
            * khtml/xml/dom_position.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1542517..a5ce0f4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,14 @@
 2004-07-14  Ken Kocienda  <kocienda at apple.com>
 
+        Reviewed by John
+
+        * khtml/xml/dom_position.cpp:
+        (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
+        Soon, I plan to land some changes that use this new function.
+        * khtml/xml/dom_position.h:
+
+2004-07-14  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by Vicki
 
         * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
diff --git a/WebCore/khtml/xml/dom_position.cpp b/WebCore/khtml/xml/dom_position.cpp
index 0a6a66d..dd688c5 100644
--- a/WebCore/khtml/xml/dom_position.cpp
+++ b/WebCore/khtml/xml/dom_position.cpp
@@ -568,6 +568,26 @@ Position Position::equivalentShallowPosition() const
     return pos;
 }
 
+Position Position::equivalentDeepPosition() const
+{
+    if (isEmpty() || !node()->hasChildNodes())
+        return *this;
+
+    NodeImpl *child = 0;
+    if (offset() >= (int)node()->childNodeCount())
+        child = node()->lastChild();
+    else
+        child = node()->childNode(offset());
+    ASSERT(child);
+    Position pos(child, 0);
+    while (pos.node()->hasChildNodes()) {
+        child = pos.node()->firstChild();
+        ASSERT(child);
+        pos = Position(child, 0);
+    }
+    return pos;
+}
+
 Position Position::closestRenderedPosition(EAffinity affinity) const
 {
     if (isEmpty() || inRenderedContent())
diff --git a/WebCore/khtml/xml/dom_position.h b/WebCore/khtml/xml/dom_position.h
index 8809134..bfde9c4 100644
--- a/WebCore/khtml/xml/dom_position.h
+++ b/WebCore/khtml/xml/dom_position.h
@@ -68,6 +68,7 @@ public:
     Position equivalentDownstreamPosition() const;
     Position equivalentRangeCompliantPosition() const;
     Position equivalentShallowPosition() const;
+    Position equivalentDeepPosition() const;
     Position closestRenderedPosition(EAffinity) const;
     bool atStartOfContainingEditableBlock() const;
     bool atStartOfRootEditableElement() const;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list