[webkit-reviews] review granted: [Bug 174594] Cleanup: Use OptionSet to represent marker types : [Attachment 315713] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 17 18:50:50 PDT 2017


Darin Adler <darin at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 174594: Cleanup: Use OptionSet to represent marker types
https://bugs.webkit.org/show_bug.cgi?id=174594

Attachment 315713: Patch

https://bugs.webkit.org/attachment.cgi?id=315713&action=review




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 315713
  --> https://bugs.webkit.org/attachment.cgi?id=315713
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=315713&action=review

> Source/WebCore/dom/DocumentMarker.h:164
> +	   AcceptedCandidate
> +	   , Autocorrected
> +	   , CorrectionIndicator
> +	   , DeletedAutocorrection
> +	   , DictationAlternatives
> +	   , Grammar
> +	   , RejectedCorrection
> +	   , Replacement
> +	   , SpellCheckingExemption
> +	   , Spelling
> +	   , TextMatch
> +#if ENABLE(TELEPHONE_NUMBER_DETECTION)
> +	   , TelephoneNumber
> +#endif
> +#if PLATFORM(IOS)
> +	   , DictationPhraseWithAlternatives
> +	   , DictationResult
> +#endif
> +	   , DraggedContent

I would like to see this sorted alphabetically (including "DraggedContent", but
not including the conditional items. And we should use trailing commas instead
of leading commas, with the extra one at the end that C++ allows in initializer
lists. That way we don’t have to have one line different from the others.

> Source/WebCore/editing/Editor.cpp:2752
> +	   DocumentMarker::Spelling, DocumentMarker::CorrectionIndicator,
DocumentMarker::SpellCheckingExemption,
> +	   DocumentMarker::DictationAlternatives
> +#if !PLATFORM(IOS)
> +	   , DocumentMarker::Grammar
>  #endif

Trailing commas after each item is a cleaner way to do this since you can have
an extra comma.


More information about the webkit-reviews mailing list