Replace TextIndicatorOptions with OptionSet<TextIndicatorOption>. Also change enum TextIndicatorOption to an enum class while we're here.
<rdar://problem/63368556>
Created attachment 399686 [details] Patch v1
Style bot complains about using "{ ... }" in an Objectve-C argument list: ERROR: Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm:565: Missing space before { [whitespace/braces] [5] ERROR: Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:5908: Missing space before { [whitespace/braces] [5]
Comment on attachment 399686 [details] Patch v1 Oops! Need to compile for iOS, too.
Created attachment 399694 [details] Patch v2
Comment on attachment 399694 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=399694&action=review > Source/WebCore/platform/ios/DragImageIOS.mm:148 > + constexpr OptionSet<TextIndicatorOption> defaultLinkIndicatorOptions { TextIndicatorOption::TightlyFitContent, TextIndicatorOption::RespectTextColor, TextIndicatorOption::UseBoundingRectAndPaintAllContentForComplexRanges, TextIndicatorOption::ExpandClipBeyondVisibleRect, TextIndicatorOption::ComputeEstimatedBackgroundColor }; Maybe put these one per line. > Source/WebCore/platform/ios/DragImageIOS.mm:168 > +constexpr OptionSet<TextIndicatorOption> defaultSelectionDragImageTextIndicatorOptions { TextIndicatorOption::ExpandClipBeyondVisibleRect, TextIndicatorOption::PaintAllContent, TextIndicatorOption::UseSelectionRectForSizing, TextIndicatorOption::ComputeEstimatedBackgroundColor }; Ditto > Source/WebCore/testing/Internals.h:966 > + OptionSet<WebCore::TextIndicatorOption> core() core() is a really weird name. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1010 > + constexpr OptionSet<TextIndicatorOption> defaultTextIndicatorOptionsForEditDrag { TextIndicatorOption::IncludeSnapshotOfAllVisibleContentWithoutSelection, TextIndicatorOption::ExpandClipBeyondVisibleRect, TextIndicatorOption::PaintAllContent, TextIndicatorOption::IncludeMarginIfRangeMatchesSelection, TextIndicatorOption::PaintBackgrounds, TextIndicatorOption::ComputeEstimatedBackgroundColor, TextIndicatorOption::UseSelectionRectForSizing, TextIndicatorOption::IncludeSnapshotWithSelectionHighlight }; One per line > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2607 > + { TextIndicatorOption::TightlyFitContent, TextIndicatorOption::RespectTextColor, TextIndicatorOption::PaintBackgrounds, TextIndicatorOption::UseBoundingRectAndPaintAllContentForComplexRanges, TextIndicatorOption::IncludeMarginIfRangeMatchesSelection, TextIndicatorOption::ComputeEstimatedBackgroundColor }, One per line > Source/WebKitLegacy/mac/DOM/DOM.mm:526 > + constexpr OptionSet<TextIndicatorOption> options { TextIndicatorOption::TightlyFitContent, TextIndicatorOption::RespectTextColor, TextIndicatorOption::PaintBackgrounds, TextIndicatorOption::UseBoundingRectAndPaintAllContentForComplexRanges, TextIndicatorOption::IncludeMarginIfRangeMatchesSelection }; One per line > Source/WebKitLegacy/mac/WebView/WebView.mm:1964 > + constexpr OptionSet<WebCore::TextIndicatorOption> defaultEditDragTextIndicatorOptions { WebCore::TextIndicatorOption::IncludeSnapshotOfAllVisibleContentWithoutSelection, WebCore::TextIndicatorOption::ExpandClipBeyondVisibleRect, WebCore::TextIndicatorOption::PaintAllContent, WebCore::TextIndicatorOption::IncludeMarginIfRangeMatchesSelection, WebCore::TextIndicatorOption::PaintBackgrounds, WebCore::TextIndicatorOption::UseSelectionRectForSizing, WebCore::TextIndicatorOption::IncludeSnapshotWithSelectionHighlight, WebCore::TextIndicatorOption::RespectTextColor }; One per line
Comment on attachment 399694 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=399694&action=review Will make the other multi-line changes as well before landing. >> Source/WebCore/testing/Internals.h:966 >> + OptionSet<WebCore::TextIndicatorOption> core() > > core() is a really weird name. Changed to coreOptions().
Created attachment 399703 [details] Patch for landing
Committed r261848: <https://trac.webkit.org/changeset/261848> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399703 [details].