summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/DOM
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebKit/mac/DOM
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebKit/mac/DOM')
-rw-r--r--WebKit/mac/DOM/WebDOMOperations.mm39
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsInternal.h33
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsPrivate.h11
3 files changed, 64 insertions, 19 deletions
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 8f5fc03..2bda67a 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -28,6 +28,7 @@
#import "WebDOMOperationsPrivate.h"
+#import "DOMDocumentInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchiveInternal.h"
@@ -43,32 +44,29 @@
#import <WebKit/DOMHTML.h>
#import <wtf/Assertions.h>
-#if ENABLE(SVG)
-#import <WebKit/DOMSVG.h>
-#endif
-
using namespace WebCore;
@implementation DOMNode (WebDOMNodeOperations)
- (WebArchive *)webArchive
{
- return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create([self _node])] autorelease];
+ return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(core(self))] autorelease];
}
- (NSString *)markupString
{
- return createFullMarkup([self _node]);
+ return createFullMarkup(core(self));
}
@end
-@implementation DOMNode (WebDOMNodeOperationsPrivate)
+/* This doesn't appear to be used by anyone. We should consider removing this. */
+@implementation DOMNode (WebDOMNodeOperationsInternal)
- (NSArray *)_subresourceURLs
{
ListHashSet<KURL> urls;
- [self _node]->getSubresourceURLs(urls);
+ core(self)->getSubresourceURLs(urls);
if (!urls.size())
return nil;
@@ -95,14 +93,15 @@ using namespace WebCore;
- (NSURL *)URLWithAttributeString:(NSString *)string
{
- // FIXME: Is parseURL appropriate here?
- return core(self)->completeURL(parseURL(string));
+ // FIXME: Is deprecatedParseURL appropriate here?
+ return core(self)->completeURL(deprecatedParseURL(string));
}
@end
-@implementation DOMDocument (WebDOMDocumentOperationsPrivate)
+@implementation DOMDocument (WebDOMDocumentOperationsInternal)
+/* This doesn't appear to be used by anyone. We should consider removing this. */
- (DOMRange *)_createRangeWithNode:(DOMNode *)node
{
DOMRange *range = [self createRange];
@@ -117,16 +116,30 @@ using namespace WebCore;
@end
+@implementation DOMDocument (WebDOMDocumentOperationsPrivate)
+
+- (NSArray *)_focusableNodes
+{
+ Vector<RefPtr<Node> > nodes;
+ core(self)->getFocusableNodes(nodes);
+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:nodes.size()];
+ for (unsigned i = 0; i < nodes.size(); ++i)
+ [array addObject:kit(nodes[i].get())];
+ return array;
+}
+
+@end
+
@implementation DOMRange (WebDOMRangeOperations)
- (WebArchive *)webArchive
{
- return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create([self _range])] autorelease];
+ return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(core(self))] autorelease];
}
- (NSString *)markupString
{
- return createFullMarkup([self _range]);
+ return createFullMarkup(core(self));
}
@end
diff --git a/WebKit/mac/DOM/WebDOMOperationsInternal.h b/WebKit/mac/DOM/WebDOMOperationsInternal.h
new file mode 100644
index 0000000..c86817d
--- /dev/null
+++ b/WebKit/mac/DOM/WebDOMOperationsInternal.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit/WebDOMOperations.h>
+
+@interface DOMDocument (WebDOMDocumentOperationsInternal)
+- (DOMRange *)_documentRange;
+@end
diff --git a/WebKit/mac/DOM/WebDOMOperationsPrivate.h b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
index 19b8a7d..013a687 100644
--- a/WebKit/mac/DOM/WebDOMOperationsPrivate.h
+++ b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,11 +28,10 @@
#import <WebKit/WebDOMOperations.h>
-@interface DOMNode (WebDOMNodeOperationsPrivate)
-- (NSArray *)_subresourceURLs;
+@interface DOMDocument (WebDOMDocumentOperationsPrivate)
+- (NSArray *)_focusableNodes;
@end
-@interface DOMDocument (WebDOMDocumentOperationsPrivate)
-- (DOMRange *)_createRangeWithNode:(DOMNode *)node;
-- (DOMRange *)_documentRange;
+@interface DOMNode (WebDOMNodeOperationsPendingPublic)
+- (NSString *)markupString;
@end