[Webkit-unassigned] [Bug 113332] Have TextCheckerMac use WebKit2 preference keys for TextChecker state

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 27 15:25:14 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=113332





--- Comment #4 from Tim Horton <timothy_horton at apple.com>  2013-03-27 15:23:24 PST ---
(From update of attachment 195410)
View in context: https://bugs.webkit.org/attachment.cgi?id=195410&action=review

> Source/WebKit2/ChangeLog:10
> +		WebKit2 TextChecker was not using WebKit2 preference keys when determining TextChecker states.
> +		This patch adds new web preferences and has TextChecker use those in initializing and setting state.
> +		The old keys were also being queried directly from NSUserDefaults instead of going through WebPreferences.

Why is this indented.

> Source/WebKit2/ChangeLog:45
> +        (WebKit):
> +        * UIProcess/API/mac/WKView.mm:
> +        (-[WKView toggleContinuousSpellChecking:]):
> +        (-[WKView setGrammarCheckingEnabled:]):
> +        (-[WKView toggleGrammarChecking:]):
> +        (-[WKView toggleAutomaticSpellingCorrection:]):
> +        (-[WKView toggleSmartInsertDelete:]):
> +        (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
> +        (-[WKView toggleAutomaticQuoteSubstitution:]):
> +        (-[WKView setAutomaticDashSubstitutionEnabled:]):
> +        (-[WKView toggleAutomaticDashSubstitution:]):
> +        (-[WKView setAutomaticLinkDetectionEnabled:]):
> +        (-[WKView toggleAutomaticLinkDetection:]):
> +        (-[WKView setAutomaticTextReplacementEnabled:]):
> +        (-[WKView toggleAutomaticTextReplacement:]):
> +        * UIProcess/WebPageProxy.cpp:
> +        (WebKit::WebPageProxy::initializeWebPage):
> +        (WebKit::WebPageProxy::initializeTextCheckerState):
> +        (WebKit):
> +        * UIProcess/WebPageProxy.h:
> +        (WebPageProxy):
> +        * UIProcess/mac/TextCheckerMac.mm:
> +        (WebKit):
> +        (WebKit::TextChecker::state):
> +        (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
> +        (WebKit::TextChecker::setGrammarCheckingEnabled):
> +        (WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
> +        (WebKit::TextChecker::setAutomaticQuoteSubstitutionEnabled):
> +        (WebKit::TextChecker::setAutomaticDashSubstitutionEnabled):
> +        (WebKit::TextChecker::setAutomaticLinkDetectionEnabled):
> +        (WebKit::TextChecker::setAutomaticTextReplacementEnabled):
> +        (WebKit::TextChecker::isSmartInsertDeleteEnabled):
> +        (WebKit::TextChecker::setSmartInsertDeleteEnabled):

You should make sue of this area!

> Source/WebKit2/UIProcess/API/mac/WKView.mm:66
> +#import "WebPageGroup.h"

Please reorder these.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:886
> +    bool automaticSpellingCorrection = !TextChecker::state().isAutomaticSpellingCorrectionEnabled;

Please add an Enabled suffix to all of these (smartInsertDelete etc also)

> Source/WebKit2/UIProcess/WebPageProxy.cpp:3427
> +void WebPageProxy::initializeTextCheckerState()

Maybe update instead of initialize? It gets called more than once (if preferences change).

Or at least it's supposed to... where did that code go?!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list