diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKit/mac/DOM | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKit/mac/DOM')
-rw-r--r-- | WebKit/mac/DOM/WebDOMOperations.mm | 28 | ||||
-rw-r--r-- | WebKit/mac/DOM/WebDOMOperationsPrivate.h | 6 |
2 files changed, 34 insertions, 0 deletions
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm index 194a000..d21f2b0 100644 --- a/WebKit/mac/DOM/WebDOMOperations.mm +++ b/WebKit/mac/DOM/WebDOMOperations.mm @@ -29,6 +29,7 @@ #import "WebDOMOperationsPrivate.h" #import "DOMDocumentInternal.h" +#import "DOMElementInternal.h" #import "DOMNodeInternal.h" #import "DOMRangeInternal.h" #import "WebArchiveInternal.h" @@ -36,15 +37,42 @@ #import "WebFrameInternal.h" #import "WebFramePrivate.h" #import "WebKitNSStringExtras.h" +#import <JavaScriptCore/APICast.h> #import <WebCore/CSSHelper.h> #import <WebCore/Document.h> +#import <WebCore/JSElement.h> #import <WebCore/LegacyWebArchive.h> #import <WebCore/markup.h> +#import <WebCore/RenderTreeAsText.h> #import <WebKit/DOMExtensions.h> #import <WebKit/DOMHTML.h> +#import <runtime/JSLock.h> +#import <runtime/JSValue.h> #import <wtf/Assertions.h> using namespace WebCore; +using namespace JSC; + +@implementation DOMElement (WebDOMElementOperationsPrivate) + ++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value +{ + if (!context) + return 0; + + if (!value) + return 0; + + JSLock lock(SilenceAssertionsOnly); + return kit(toElement(toJS(toJS(context), value))); +} + +- (NSString *)_markerTextForListItem +{ + return WebCore::markerTextForListItem(core(self)); +} + +@end @implementation DOMNode (WebDOMNodeOperations) diff --git a/WebKit/mac/DOM/WebDOMOperationsPrivate.h b/WebKit/mac/DOM/WebDOMOperationsPrivate.h index 826aa7d..1c22e82 100644 --- a/WebKit/mac/DOM/WebDOMOperationsPrivate.h +++ b/WebKit/mac/DOM/WebDOMOperationsPrivate.h @@ -27,6 +27,12 @@ */ #import <WebKit/WebDOMOperations.h> +#import <JavaScriptCore/JSBase.h> + +@interface DOMElement (WebDOMElementOperationsPrivate) ++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value; +- (NSString *)_markerTextForListItem; +@end @interface DOMDocument (WebDOMDocumentOperationsPrivate) - (NSArray *)_focusableNodes; |