[Webkit-unassigned] [Bug 55571] [Refactoring] Auto correction panel should be handled by its own class.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 8 10:40:10 PDT 2011


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
  Attachment #88745|review?                     |review+
               Flag|                            |

--- Comment #62 from Darin Adler <darin at apple.com>  2011-04-08 10:40:10 PST ---
(From update of attachment 88745)
View in context: https://bugs.webkit.org/attachment.cgi?id=88745&action=review

> Source/WebCore/editing/Editor.cpp:-3546
>          bool shouldCheckSpellingAndGrammar = true;
>          // Don't check spelling and grammar if the change of selection is triggered by spelling correction itself.
>          shouldCheckSpellingAndGrammar = !(options & SelectionController::SpellCorrectionTriggered);
> -#endif

Since we are removing this #if, we should combine the definition and initialization into a single line.

> Source/WebCore/editing/SpellingCorrectionController.h:77
> +#define UNLESS_ENABLED(functionBody) functionBody

I think you should just put the braces here in the macro so we can use ( ) instead of ({ }) around all those function bodies.

> Source/WebCore/editing/SpellingCorrectionController.h:80
> +class SpellingCorrectionController {

This class should be marked noncopyable.

> Source/WebCore/editing/SpellingCorrectionController.h:83
> +    SpellingCorrectionController(Frame*) UNLESS_ENABLED({})
> +    ~SpellingCorrectionController() UNLESS_ENABLED({})

This technique with all the macros on each function seems a little ugly to me, but I have no better suggestion.

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