From 967717af5423377c967781471ee106e2bb4e11c8 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 22 Jul 2010 15:37:06 +0100 Subject: Merge WebKit at r63859 : Initial merge by git. Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62 --- WebKit/mac/DOM/WebDOMOperations.mm | 28 ++++++++++++++++++++++++++++ WebKit/mac/DOM/WebDOMOperationsPrivate.h | 6 ++++++ 2 files changed, 34 insertions(+) (limited to 'WebKit/mac/DOM') 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 #import #import +#import #import #import +#import #import #import +#import +#import #import 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 +#import + +@interface DOMElement (WebDOMElementOperationsPrivate) ++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value; +- (NSString *)_markerTextForListItem; +@end @interface DOMDocument (WebDOMDocumentOperationsPrivate) - (NSArray *)_focusableNodes; -- cgit v1.1