diff options
author | Leon Clarke <leonclarke@google.com> | 2010-07-15 12:03:35 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-07-20 16:57:23 +0100 |
commit | e458d70a0d18538346f41b503114c9ebe6b2ce12 (patch) | |
tree | 86f1637deca2c524432a822e5fcedd4bef221091 /WebKit/mac/Misc | |
parent | f43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff) | |
download | external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2 |
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebKit/mac/Misc')
-rw-r--r-- | WebKit/mac/Misc/WebCache.mm | 4 | ||||
-rw-r--r-- | WebKit/mac/Misc/WebNSObjectExtras.h | 1 | ||||
-rw-r--r-- | WebKit/mac/Misc/WebNSObjectExtras.mm | 5 | ||||
-rw-r--r-- | WebKit/mac/Misc/WebUserContentURLPattern.h | 1 | ||||
-rw-r--r-- | WebKit/mac/Misc/WebUserContentURLPattern.mm | 6 |
5 files changed, 17 insertions, 0 deletions
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm index b29f720..747d213 100644 --- a/WebKit/mac/Misc/WebCache.mm +++ b/WebKit/mac/Misc/WebCache.mm @@ -25,6 +25,7 @@ #import "WebCache.h" +#import "WebNSObjectExtras.h" #import "WebPreferences.h" #import "WebSystemInterface.h" #import "WebView.h" @@ -126,6 +127,9 @@ + (void)setDisabled:(BOOL)disabled { + if (!pthread_main_np()) + return [[self _webkit_invokeOnMainThread] setDisabled:disabled]; + WebCore::cache()->setDisabled(disabled); } diff --git a/WebKit/mac/Misc/WebNSObjectExtras.h b/WebKit/mac/Misc/WebNSObjectExtras.h index f327966..0114bcc 100644 --- a/WebKit/mac/Misc/WebNSObjectExtras.h +++ b/WebKit/mac/Misc/WebNSObjectExtras.h @@ -54,5 +54,6 @@ static inline IMP method_setImplementation(Method m, IMP i) #endif @interface NSObject (WebNSObjectExtras) ++ (id)_webkit_invokeOnMainThread; - (id)_webkit_invokeOnMainThread; @end diff --git a/WebKit/mac/Misc/WebNSObjectExtras.mm b/WebKit/mac/Misc/WebNSObjectExtras.mm index 3beb641..d00726b 100644 --- a/WebKit/mac/Misc/WebNSObjectExtras.mm +++ b/WebKit/mac/Misc/WebNSObjectExtras.mm @@ -105,6 +105,11 @@ static bool returnTypeIsObject(NSInvocation *invocation) @implementation NSObject (WebNSObjectExtras) ++ (id)_webkit_invokeOnMainThread +{ + return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease]; +} + - (id)_webkit_invokeOnMainThread { return [[[WebMainThreadInvoker alloc] initWithTarget:self] autorelease]; diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.h b/WebKit/mac/Misc/WebUserContentURLPattern.h index 6ec4bcf..e7ccac4 100644 --- a/WebKit/mac/Misc/WebUserContentURLPattern.h +++ b/WebKit/mac/Misc/WebUserContentURLPattern.h @@ -34,5 +34,6 @@ - (NSString *)scheme; - (NSString *)host; - (BOOL)matchesSubdomains; +- (BOOL)matchesURL:(NSURL *)url; @end diff --git a/WebKit/mac/Misc/WebUserContentURLPattern.mm b/WebKit/mac/Misc/WebUserContentURLPattern.mm index 5d9f49e..883f2e6 100644 --- a/WebKit/mac/Misc/WebUserContentURLPattern.mm +++ b/WebKit/mac/Misc/WebUserContentURLPattern.mm @@ -24,6 +24,7 @@ #import "WebUserContentURLPattern.h" +#import <WebCore/KURL.h> #import <WebCore/UserContentURLPattern.h> using namespace WebCore; @@ -80,4 +81,9 @@ using namespace WebCore; return _private->pattern.matchSubdomains(); } +- (BOOL)matchesURL:(NSURL *)url +{ + return _private->pattern.matches(url); +} + @end |