[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 13:58:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c8254807b7c068679b86e242aa3474eef3feee79
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 30 21:43:22 2010 +0000

    -[DOMDocument _documentRange] throws an exception if there is no document element
    https://bugs.webkit.org/show_bug.cgi?id=46934
    <rdar://problem/8169260>
    
    Reviewed by Darin Adler.
    
    If there is no document element, just return an empty range. Otherwise we'll try to call
    Range::selectNode with a null Node which will throw a NOT_FOUND exception.
    
    * DOM/WebDOMOperations.mm:
    (-[DOMDocument _documentRange]):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68831 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 724273a..e710716 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-30  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Darin Adler.
+
+        -[DOMDocument _documentRange] throws an exception if there is no document element
+        https://bugs.webkit.org/show_bug.cgi?id=46934
+        <rdar://problem/8169260>
+
+        If there is no document element, just return an empty range. Otherwise we'll try to call
+        Range::selectNode with a null Node which will throw a NOT_FOUND exception.
+
+        * DOM/WebDOMOperations.mm:
+        (-[DOMDocument _documentRange]):
+
 2010-09-30  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 3d69836..8166811 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -136,17 +136,14 @@ using namespace JSC;
 
 @implementation DOMDocument (WebDOMDocumentOperationsInternal)
 
-/* This doesn't appear to be used by anyone.  We should consider removing this. */
-- (DOMRange *)_createRangeWithNode:(DOMNode *)node
+- (DOMRange *)_documentRange
 {
     DOMRange *range = [self createRange];
-    [range selectNode:node];
-    return range;
-}
 
-- (DOMRange *)_documentRange
-{
-    return [self _createRangeWithNode:[self documentElement]];
+    if (DOMNode* documentElement = [self documentElement])
+        [range selectNode:documentElement];
+
+    return range;
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list