[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 17:18:58 PDT 2011


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





--- Comment #68 from MORITA Hajime <morrita at google.com>  2011-04-08 17:18:58 PST ---
> Why is the UNLESS_ENABLED macro ok? Why should we be compiling this code with empty stubs for features that are not enabled? Why not compile it out instead of potentially adding runtime overhead and introducing subtle bugs because someone calls something that is not enabled and it doesn't fail at compile-time?
So how about to use caller side macro like RUN_IF_AUTOCORRECTION_ENABLED() ?
That would be:
IF_AUTOCORRECTION_ENABLED(m_spellingCorrector->someMethod());

The point is to minimize the number of ifdefs. 
#if/#endif pairs occupy two additional lines, it's makes reading/changing code really hard.
In editor, there is so meny ifdefs. I don't want any more.

This is important especially for Editor because editor-related ifdefs are large number of small chunks,
that is different from typical flags like SVG, which has large, smal number of blocks.

For more long term goal, I'd like to factor the Editor class into more meaningful group of classes
like spell checking, command execution, text composition, etc.
This is a part of such refactoring.

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