+2006-10-05 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Timothy.
+
+ Bug: http://bugs.webkit.org/show_bug.cgi?id=9887
+ Continuous spell checking now remembers user's setting. The change is applied globally,
+ meaning, both TextArea and TextField are affected when either of them enables/disables
+ spell checking.
+
+ * WebView/WebPreferenceKeysPrivate.h: added a define for WebContinuousSpellCheckingEnabled
+ * WebView/WebView.m:
+ (-[WebViewPrivate init]): reads WebContinuousSpellCheckingEnabled from NSUserDefaults
+ (-[WebView setContinuousSpellCheckingEnabled:]):
+ (-[WebView isContinuousSpellCheckingEnabled]):
+
2006-10-05 MorganL <morganl.webkit@yahoo.com>
Reviewed by Darin.
#define WebKitBackForwardCacheExpirationIntervalKey @"WebKitBackForwardCacheExpirationIntervalKey"
#define WebKitTabToLinksPreferenceKey @"WebKitTabToLinksPreferenceKey"
#define WebKitPrivateBrowsingEnabledPreferenceKey @"WebKitPrivateBrowsingEnabled"
+#define WebContinuousSpellCheckingEnabled @"WebContinuousSpellCheckingEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
#import "WebPluginDatabase.h"
#import "WebPolicyDelegate.h"
#import "WebPreferencesPrivate.h"
+#import "WebPreferenceKeysPrivate.h"
#import "WebResourceLoadDelegate.h"
#import "WebScriptDebugDelegatePrivate.h"
#import "WebScriptDebugServerPrivate.h"
BOOL hasSpellCheckerDocumentTag;
WebNSInteger spellCheckerDocumentTag;
- BOOL continuousSpellCheckingEnabled;
BOOL smartInsertDeleteEnabled;
-
+
BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
@implementation WebProgressItem
@end
+
+static BOOL continuousSpellCheckingEnabled;
+
@implementation WebViewPrivate
- init
dashboardBehaviorAllowWheelScrolling = YES;
tabKeyCyclesThroughElements = YES;
shouldCloseWithWindow = objc_collecting_enabled();
+ continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
return self;
}
- (void)setContinuousSpellCheckingEnabled:(BOOL)flag
{
- _private->continuousSpellCheckingEnabled = flag;
+ if (continuousSpellCheckingEnabled != flag) {
+ continuousSpellCheckingEnabled = flag;
+ [[NSUserDefaults standardUserDefaults] setBool:continuousSpellCheckingEnabled forKey:WebContinuousSpellCheckingEnabled];
+ }
+
if ([self isContinuousSpellCheckingEnabled]) {
[[self class] _preflightSpellChecker];
} else {
- (BOOL)isContinuousSpellCheckingEnabled
{
- return _private->continuousSpellCheckingEnabled && [self _continuousCheckingAllowed];
+ return (continuousSpellCheckingEnabled && [self _continuousCheckingAllowed]);
}
- (WebNSInteger)spellCheckerDocumentTag