[Webkit-unassigned] [Bug 57088] Refactoring: Editor::TextCheckingOptions should be replaced with TextCheckingType

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 19 17:50:52 PDT 2011


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





--- Comment #17 from MORITA Hajime <morrita at google.com>  2011-04-19 17:50:52 PST ---
Hi Jia, thank you for your feedback! 
I updated to patch to address your point.
I confused the relationship between checking and showing the correction.


(In reply to comment #15)
> (From update of attachment 90210 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=90210&action=review
> 
> > Source/WebCore/editing/Editor.cpp:3249
> > -    bool shouldMarkSpelling = textCheckingOptions & MarkSpelling;
> > -    bool shouldMarkGrammar = textCheckingOptions & MarkGrammar;
> > -    bool shouldShowCorrectionPanel = textCheckingOptions & ShowCorrectionPanel;
> > -    bool shouldCheckForCorrection = shouldShowCorrectionPanel || (textCheckingOptions & CheckForCorrection);
> > -
> > -    TextCheckingTypeMask checkingTypes = 0;
> > -    if (shouldMarkSpelling)
> > -        checkingTypes |= TextCheckingTypeSpelling;
> > -    if (shouldMarkGrammar)
> > -        checkingTypes |= TextCheckingTypeGrammar;
> > -    if (shouldCheckForCorrection)
> > -        checkingTypes |= TextCheckingTypeCorrection;
> > -
> > +    TextCheckingTypes result = types;
> 
> This change is problematic at least on Mac. In original code, TextCheckingTypeCorrection will be set if ShowCorrectionPanel is set in textCheckingOptions. This is not the case in new code. The end result is that, if types.isCorrectionPanel() is true, but types.isCorrection() is false, the spell checker will not check for correction. I suggest to add code here to call setCorrection() if types.isCorrectionPanel() is true.

-- 
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