summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Misc
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-02 14:57:50 +0000
committerSteve Block <steveblock@google.com>2010-02-04 15:06:55 +0000
commitd0825bca7fe65beaee391d30da42e937db621564 (patch)
tree7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebKit/mac/Misc
parent3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff)
downloadexternal_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebKit/mac/Misc')
-rw-r--r--WebKit/mac/Misc/WebCache.mm2
-rw-r--r--WebKit/mac/Misc/WebElementDictionary.mm8
-rw-r--r--WebKit/mac/Misc/WebKitErrors.m7
-rw-r--r--WebKit/mac/Misc/WebKitErrorsPrivate.h9
4 files changed, 25 insertions, 1 deletions
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index 6013a5f..b29f720 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -115,8 +115,10 @@
[WebView _setCacheModel:WebCacheModelDocumentViewer];
[WebView _setCacheModel:cacheModel];
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
// Empty the application cache.
WebCore::cacheStorage().empty();
+#endif
// Empty the Cross-Origin Preflight cache
WebCore::CrossOriginPreflightResultCache::shared().empty();
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index aa703e0..7779392 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -91,6 +91,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
addLookupKey(WebElementLinkLabelKey, @selector(_textContent));
addLookupKey(WebElementLinkIsLiveKey, @selector(_isLiveLink));
addLookupKey(WebElementIsContentEditableKey, @selector(_isContentEditable));
+ addLookupKey(WebElementIsInScrollBarKey, @selector(_isInScrollBar));
}
- (id)initWithHitTestResult:(const HitTestResult&)result
@@ -254,4 +255,9 @@ static NSString* NSStringOrNil(String coreString)
return [NSNumber numberWithBool:_result->isContentEditable()];
}
+- (NSNumber *)_isInScrollBar
+{
+ return [NSNumber numberWithBool:_result->scrollbar() != 0];
+}
+
@end
diff --git a/WebKit/mac/Misc/WebKitErrors.m b/WebKit/mac/Misc/WebKitErrors.m
index ec42dc9..09aa907 100644
--- a/WebKit/mac/Misc/WebKitErrors.m
+++ b/WebKit/mac/Misc/WebKitErrors.m
@@ -53,6 +53,10 @@ NSString * const WebKitErrorPlugInPageURLStringKey = @"WebKitErrorPlugInPageU
#define WebKitErrorDescriptionPlugInCancelledConnection UI_STRING("Plug-in cancelled", "WebKitErrorPlugInCancelledConnection description")
#define WebKitErrorDescriptionPlugInWillHandleLoad UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description")
+// Geolocations errors
+
+#define WebKitErrorDescriptionGeolocationLocationUnknown UI_STRING("The current location cannot be found.", "WebKitErrorGeolocationLocationUnknown description")
+
static pthread_once_t registerErrorsControl = PTHREAD_ONCE_INIT;
static void registerErrors(void);
@@ -161,6 +165,9 @@ static void registerErrors()
WebKitErrorDescriptionJavaUnavailable, [NSNumber numberWithInt: WebKitErrorJavaUnavailable],
WebKitErrorDescriptionPlugInCancelledConnection, [NSNumber numberWithInt: WebKitErrorPlugInCancelledConnection],
WebKitErrorDescriptionPlugInWillHandleLoad, [NSNumber numberWithInt: WebKitErrorPlugInWillHandleLoad],
+
+ // Geolocation errors
+ WebKitErrorDescriptionGeolocationLocationUnknown, [NSNumber numberWithInt: WebKitErrorGeolocationLocationUnknown],
nil];
[NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain];
diff --git a/WebKit/mac/Misc/WebKitErrorsPrivate.h b/WebKit/mac/Misc/WebKitErrorsPrivate.h
index 6a98c4e..eee50a0 100644
--- a/WebKit/mac/Misc/WebKitErrorsPrivate.h
+++ b/WebKit/mac/Misc/WebKitErrorsPrivate.h
@@ -41,6 +41,15 @@ enum {
WebKitErrorCannotUseRestrictedPort = 103,
};
+/*!
+ @enum
+ @abstract Geolocation errors
+ @constant WebKitErrorGeolocationLocationUnknown
+*/
+enum {
+ WebKitErrorGeolocationLocationUnknown = 300,
+};
+
@interface NSError (WebKitExtras)
+ (NSError *)_webKitErrorWithCode:(int)code failingURL:(NSString *)URL;
+ (NSError *)_webKitErrorWithDomain:(NSString *)domain code:(int)code URL:(NSURL *)URL;