[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 154d720b7dfaede9297ed340363a5fc72cda00ef
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Apr 24 16:17:19 2003 +0000

    	- fixed 3151501 -- Toggling "Check Spelling As You Type" in a
    	textarea should affect future textareas
    
            Reviewed by Darin
    
            * kwq/KWQTextArea.mm:
            (+[KWQTextAreaTextView _setContinuousSpellCheckingEnabledForNewTextAreas:]):
    	new method, sets a static variable and an NSUserDefault
            (+[KWQTextAreaTextView _isContinuousSpellCheckingEnabledForNewTextAreas]):
    	new method, checks a static variable, reading it from an NSUserDefault the
    	first time
            (-[KWQTextAreaTextView initWithFrame:textContainer:]):
    	override designated initializer to set continuous spell checking if appropriate
            (-[KWQTextAreaTextView setContinuousSpellCheckingEnabled:]):
    	call _setContinuousSpellCheckingEnabledForNewTextAreas in addition to
    	setting the value for this object
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4166 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 097f128..766da83 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2003-04-24  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3151501 -- Toggling "Check Spelling As You Type" in a
+	textarea should affect future textareas
+
+        Reviewed by Darin
+
+        * kwq/KWQTextArea.mm:
+        (+[KWQTextAreaTextView _setContinuousSpellCheckingEnabledForNewTextAreas:]):
+	new method, sets a static variable and an NSUserDefault
+        (+[KWQTextAreaTextView _isContinuousSpellCheckingEnabledForNewTextAreas]):
+	new method, checks a static variable, reading it from an NSUserDefault the
+	first time
+        (-[KWQTextAreaTextView initWithFrame:textContainer:]):
+	override designated initializer to set continuous spell checking if appropriate
+        (-[KWQTextAreaTextView setContinuousSpellCheckingEnabled:]):
+	call _setContinuousSpellCheckingEnabledForNewTextAreas in addition to
+	setting the value for this object
+
 2003-04-23  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 097f128..766da83 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2003-04-24  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3151501 -- Toggling "Check Spelling As You Type" in a
+	textarea should affect future textareas
+
+        Reviewed by Darin
+
+        * kwq/KWQTextArea.mm:
+        (+[KWQTextAreaTextView _setContinuousSpellCheckingEnabledForNewTextAreas:]):
+	new method, sets a static variable and an NSUserDefault
+        (+[KWQTextAreaTextView _isContinuousSpellCheckingEnabledForNewTextAreas]):
+	new method, checks a static variable, reading it from an NSUserDefault the
+	first time
+        (-[KWQTextAreaTextView initWithFrame:textContainer:]):
+	override designated initializer to set continuous spell checking if appropriate
+        (-[KWQTextAreaTextView setContinuousSpellCheckingEnabled:]):
+	call _setContinuousSpellCheckingEnabledForNewTextAreas in addition to
+	setting the value for this object
+
 2003-04-23  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index 4e1870c..c2a4af5 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -421,6 +421,42 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
 
 @implementation KWQTextAreaTextView
 
+static BOOL _spellCheckingInitiallyEnabled = NO;
+static NSString *WebContinuousSpellCheckingEnabled = @"WebContinuousSpellCheckingEnabled";
+
++ (void)_setContinuousSpellCheckingEnabledForNewTextAreas:(BOOL)flag
+{
+    _spellCheckingInitiallyEnabled = flag;
+    [[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebContinuousSpellCheckingEnabled];
+}
+
++ (BOOL)_isContinuousSpellCheckingEnabledForNewTextAreas
+{
+    static BOOL _checkedUserDefault = NO;
+    if (!_checkedUserDefault) {
+        _spellCheckingInitiallyEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
+        _checkedUserDefault = YES;
+    }
+
+    return _spellCheckingInitiallyEnabled;
+}
+
+- (id)initWithFrame:(NSRect)frame textContainer:(NSTextContainer *)aTextContainer
+{
+    self = [super initWithFrame:frame textContainer:aTextContainer];
+    [super setContinuousSpellCheckingEnabled:
+        [[self class] _isContinuousSpellCheckingEnabledForNewTextAreas]];
+
+    return self;
+}
+
+- (void)setContinuousSpellCheckingEnabled:(BOOL)flag
+{
+    [[self class] _setContinuousSpellCheckingEnabledForNewTextAreas:flag];
+    [super setContinuousSpellCheckingEnabled:flag];
+}
+
+
 - (void)setWidget:(QTextEdit *)w
 {
     widget = w;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list