WebKit Bugzilla
Attachment 348633 Details for
Bug 189169
: Replace OptionSet |= and -= operators with add() and remove() functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
optionset-add-remove-9.patch (text/plain), 123.86 KB, created by
Antti Koivisto
on 2018-08-31 04:47:29 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2018-08-31 04:47:29 PDT
Size:
123.86 KB
patch
obsolete
>Index: Source/WTF/ChangeLog >=================================================================== >--- Source/WTF/ChangeLog (revision 235539) >+++ Source/WTF/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2018-08-31 Antti Koivisto <antti@apple.com> >+ >+ Replace OptionSet |= and -= operators with add() and remove() functions >+ https://bugs.webkit.org/show_bug.cgi?id=189169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Improve code readability. >+ >+ * wtf/OptionSet.h: >+ (WTF::OptionSet::add): >+ (WTF::OptionSet::remove): >+ (WTF::OptionSet::operator==): >+ (WTF::OptionSet::operator!=): >+ (WTF::OptionSet::operator|=): Deleted. >+ (WTF::OptionSet::operator-=): Deleted. >+ * wtf/ProcessPrivilege.cpp: >+ (WTF::addProcessPrivilege): >+ (WTF::removeProcessPrivilege): >+ > 2018-08-30 Don Olmstead <don.olmstead@sony.com> > > [CMake] Replace AVFoundationSupport.py using CMake >Index: Source/WTF/wtf/OptionSet.h >=================================================================== >--- Source/WTF/wtf/OptionSet.h (revision 235539) >+++ Source/WTF/wtf/OptionSet.h (working copy) >@@ -111,26 +111,24 @@ public: > return (*this & optionSet) == optionSet; > } > >- constexpr friend bool operator==(OptionSet lhs, OptionSet rhs) >+ constexpr void add(OptionSet optionSet) > { >- return lhs.m_storage == rhs.m_storage; >+ m_storage |= optionSet.m_storage; > } > >- constexpr friend bool operator!=(OptionSet lhs, OptionSet rhs) >+ constexpr void remove(OptionSet optionSet) > { >- return lhs.m_storage != rhs.m_storage; >+ m_storage &= ~optionSet.m_storage; > } > >- friend OptionSet& operator|=(OptionSet& lhs, OptionSet rhs) >+ constexpr friend bool operator==(OptionSet lhs, OptionSet rhs) > { >- lhs.m_storage |= rhs.m_storage; >- return lhs; >+ return lhs.m_storage == rhs.m_storage; > } > >- friend OptionSet& operator-=(OptionSet& lhs, OptionSet rhs) >+ constexpr friend bool operator!=(OptionSet lhs, OptionSet rhs) > { >- lhs.m_storage &= ~rhs.m_storage; >- return lhs; >+ return lhs.m_storage != rhs.m_storage; > } > > constexpr friend OptionSet operator|(OptionSet lhs, OptionSet rhs) >Index: Source/WTF/wtf/ProcessPrivilege.cpp >=================================================================== >--- Source/WTF/wtf/ProcessPrivilege.cpp (revision 235539) >+++ Source/WTF/wtf/ProcessPrivilege.cpp (working copy) >@@ -57,12 +57,12 @@ bool hasProcessPrivilege(ProcessPrivileg > > void addProcessPrivilege(ProcessPrivilege privilege) > { >- processPrivileges() |= privilege; >+ processPrivileges().add(privilege); > } > > void removeProcessPrivilege(ProcessPrivilege privilege) > { >- processPrivileges() = processPrivileges() - privilege; >+ processPrivileges().remove(privilege); > } > > } // namespace WTF >Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 235539) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,119 @@ >+2018-08-31 Antti Koivisto <antti@apple.com> >+ >+ Replace OptionSet |= and -= operators with add() and remove() functions >+ https://bugs.webkit.org/show_bug.cgi?id=189169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection const): >+ * css/StyleBuilderConverter.h: >+ (WebCore::StyleBuilderConverter::convertTextDecoration): >+ (WebCore::StyleBuilderConverter::convertTextEmphasisPosition): >+ (WebCore::StyleBuilderConverter::convertTextUnderlinePosition): >+ (WebCore::StyleBuilderConverter::convertTextDecorationSkip): >+ (WebCore::StyleBuilderConverter::convertSpeakAs): >+ (WebCore::StyleBuilderConverter::convertHangingPunctuation): >+ * css/parser/CSSParser.cpp: >+ (WebCore::CSSParser::parseSystemColor): >+ * dom/Document.cpp: >+ (WebCore::Document::styleColorOptions const): >+ * dom/DocumentMarkerController.cpp: >+ (WebCore::DocumentMarkerController::addMarker): >+ (WebCore::DocumentMarkerController::removeMarkers): >+ * dom/ScriptedAnimationController.cpp: >+ (WebCore::ScriptedAnimationController::addThrottlingReason): >+ (WebCore::ScriptedAnimationController::removeThrottlingReason): >+ * dom/SecurityContext.h: >+ (WebCore::SecurityContext::setFoundMixedContent): >+ * dom/UIEventWithKeyState.cpp: >+ (WebCore::UIEventWithKeyState::modifiersFromInitializer): >+ (WebCore::UIEventWithKeyState::setModifierKeys): >+ * dom/UserActionElementSet.cpp: >+ (WebCore::UserActionElementSet::setFlags): >+ * editing/CompositeEditCommand.cpp: >+ (WebCore::CompositeEditCommand::moveParagraphs): >+ * editing/Editor.cpp: >+ (WebCore::Editor::replaceSelectionWithFragment): >+ (WebCore::Editor::appliedEditing): >+ (WebCore::Editor::markMisspellingsAfterTypingToWord): >+ (WebCore::Editor::markMisspellingsAndBadGrammar): >+ (WebCore::Editor::resolveTextCheckingTypeMask): >+ * editing/FrameSelection.cpp: >+ (WebCore::FrameSelection::moveWithoutValidationTo): >+ (WebCore::FrameSelection::setSelectedRange): >+ * editing/FrameSelection.h: >+ (WebCore::FrameSelection::defaultSetSelectionOptions): >+ * editing/MoveSelectionCommand.cpp: >+ (WebCore::MoveSelectionCommand::doApply): >+ * editing/SpellChecker.cpp: >+ (WebCore::SpellChecker::didCheckSucceed): >+ * editing/TextCheckingHelper.cpp: >+ (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): >+ (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange const): >+ * editing/TextIterator.cpp: >+ (WebCore::SearchBuffer::SearchBuffer): >+ * html/HTMLAnchorElement.cpp: >+ (WebCore::HTMLAnchorElement::parseAttribute): >+ * inspector/agents/InspectorPageAgent.cpp: >+ (WebCore::InspectorPageAgent::reload): >+ * page/ContextMenuController.cpp: >+ (WebCore::ContextMenuController::contextMenuItemSelected): >+ * page/DOMWindow.cpp: >+ (WebCore::DOMWindow::find const): >+ * page/DragController.cpp: >+ (WebCore::DragController::concludeEditDrag): >+ * page/FrameSnapshotting.cpp: >+ (WebCore::snapshotFrameRectWithClip): >+ * page/FrameView.cpp: >+ (WebCore::updateLayerPositionFlags): >+ (WebCore::FrameView::willPaintContents): >+ * page/Page.cpp: >+ (WebCore::Page::setIsVisible): >+ * page/PerformanceObserver.cpp: >+ (WebCore::PerformanceObserver::observe): >+ * page/TextIndicator.cpp: >+ (WebCore::TextIndicator::createWithRange): >+ * page/WindowFeatures.cpp: >+ (WebCore::parseDisabledAdaptations): >+ * page/csp/ContentSecurityPolicy.h: >+ (WebCore::ContentSecurityPolicy::addHashAlgorithmsForInlineScripts): >+ (WebCore::ContentSecurityPolicy::addHashAlgorithmsForInlineStylesheets): >+ * page/csp/ContentSecurityPolicySourceList.cpp: >+ (WebCore::ContentSecurityPolicySourceList::parseHashSource): >+ * platform/PlatformEvent.h: >+ (WebCore::PlatformEvent::PlatformEvent): >+ * platform/ios/PlatformEventFactoryIOS.mm: >+ (WebCore::modifiersForEvent): >+ * platform/mac/PlatformEventFactoryMac.mm: >+ (WebCore::modifiersForEvent): >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::updateLayerPositions): >+ (WebCore::RenderLayer::updateLayerPositionsAfterScroll): >+ (WebCore::RenderLayer::paintLayer): >+ (WebCore::RenderLayer::paintLayerContentsAndReflection): >+ (WebCore::RenderLayer::paintLayerContents): >+ (WebCore::RenderLayer::paintForegroundForFragments): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::paintIntoLayer): >+ (WebCore::RenderLayerBacking::paintContents): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::reasonsForCompositing const): >+ (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus): >+ * rendering/TextDecorationPainter.cpp: >+ (WebCore::collectStylesForRenderer): >+ * rendering/TextPaintStyle.cpp: >+ (WebCore::computeTextPaintStyle): >+ * rendering/style/RenderStyle.cpp: >+ (WebCore::RenderStyle::changeRequiresLayout const): >+ (WebCore::RenderStyle::changeRequiresLayerRepaint const): >+ (WebCore::RenderStyle::changeRequiresRepaint const): >+ * testing/Internals.cpp: >+ (WebCore::parseFindOptions): >+ (WebCore::Internals::forceReload): >+ (WebCore::Internals::setPageVisibility): >+ (WebCore::Internals::setPageIsFocusedAndActive): >+ > 2018-08-31 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >Index: Source/WebCore/accessibility/AccessibilityObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityObject.cpp (revision 235539) >+++ Source/WebCore/accessibility/AccessibilityObject.cpp (working copy) >@@ -751,9 +751,9 @@ RefPtr<Range> AccessibilityObject::range > return nullptr; > > bool isBackwardSearch = searchDirection == AccessibilitySearchDirection::Previous; >- FindOptions findOptions { { AtWordStarts, AtWordEnds, CaseInsensitive, StartInSelection } }; >+ FindOptions findOptions { AtWordStarts, AtWordEnds, CaseInsensitive, StartInSelection }; > if (isBackwardSearch) >- findOptions |= Backwards; >+ findOptions.add(Backwards); > > RefPtr<Range> closestStringRange = nullptr; > for (const auto& searchString : searchStrings) { >Index: Source/WebCore/css/StyleBuilderConverter.h >=================================================================== >--- Source/WebCore/css/StyleBuilderConverter.h (revision 235539) >+++ Source/WebCore/css/StyleBuilderConverter.h (working copy) >@@ -394,7 +394,7 @@ inline OptionSet<TextDecoration> StyleBu > auto result = RenderStyle::initialTextDecoration(); > if (is<CSSValueList>(value)) { > for (auto& currentValue : downcast<CSSValueList>(value)) >- result |= downcast<CSSPrimitiveValue>(currentValue.get()); >+ result.add(downcast<CSSPrimitiveValue>(currentValue.get())); > } > return result; > } >@@ -498,7 +498,7 @@ inline OptionSet<TextEmphasisPosition> S > > OptionSet<TextEmphasisPosition> position; > for (auto& currentValue : downcast<CSSValueList>(value)) >- position |= valueToEmphasisPosition(downcast<CSSPrimitiveValue>(currentValue.get())); >+ position.add(valueToEmphasisPosition(downcast<CSSPrimitiveValue>(currentValue.get()))); > return position; > } > >@@ -645,7 +645,7 @@ inline OptionSet<TextUnderlinePosition> > > OptionSet<TextUnderlinePosition> combinedPosition; > for (auto& currentValue : downcast<CSSValueList>(value)) >- combinedPosition |= downcast<CSSPrimitiveValue>(currentValue.get()); >+ combinedPosition.add(downcast<CSSPrimitiveValue>(currentValue.get())); > return combinedPosition; > } > >@@ -753,7 +753,7 @@ inline OptionSet<TextDecorationSkip> Sty > > OptionSet<TextDecorationSkip> skip; > for (auto& currentValue : downcast<CSSValueList>(value)) >- skip |= valueToDecorationSkip(downcast<CSSPrimitiveValue>(currentValue.get())); >+ skip.add(valueToDecorationSkip(downcast<CSSPrimitiveValue>(currentValue.get()))); > return skip; > } > >@@ -1504,7 +1504,7 @@ inline OptionSet<SpeakAs> StyleBuilderCo > auto result = RenderStyle::initialSpeakAs(); > if (is<CSSValueList>(value)) { > for (auto& currentValue : downcast<CSSValueList>(value)) >- result |= downcast<CSSPrimitiveValue>(currentValue.get()); >+ result.add(downcast<CSSPrimitiveValue>(currentValue.get())); > } > return result; > } >@@ -1514,7 +1514,7 @@ inline OptionSet<HangingPunctuation> Sty > auto result = RenderStyle::initialHangingPunctuation(); > if (is<CSSValueList>(value)) { > for (auto& currentValue : downcast<CSSValueList>(value)) >- result |= downcast<CSSPrimitiveValue>(currentValue.get()); >+ result.add(downcast<CSSPrimitiveValue>(currentValue.get())); > } > return result; > } >Index: Source/WebCore/css/parser/CSSParser.cpp >=================================================================== >--- Source/WebCore/css/parser/CSSParser.cpp (revision 235539) >+++ Source/WebCore/css/parser/CSSParser.cpp (working copy) >@@ -119,7 +119,7 @@ Color CSSParser::parseSystemColor(const > > OptionSet<StyleColor::Options> options; > if (context && context->useSystemAppearance) >- options |= StyleColor::Options::UseSystemAppearance; >+ options.add(StyleColor::Options::UseSystemAppearance); > return RenderTheme::singleton().systemColor(id, options); > } > >Index: Source/WebCore/dom/Document.cpp >=================================================================== >--- Source/WebCore/dom/Document.cpp (revision 235539) >+++ Source/WebCore/dom/Document.cpp (working copy) >@@ -7178,9 +7178,9 @@ OptionSet<StyleColor::Options> Document: > { > OptionSet<StyleColor::Options> options; > if (useSystemAppearance()) >- options |= StyleColor::Options::UseSystemAppearance; >+ options.add(StyleColor::Options::UseSystemAppearance); > if (useDarkAppearance()) >- options |= StyleColor::Options::UseDarkAppearance; >+ options.add(StyleColor::Options::UseDarkAppearance); > return options; > } > >Index: Source/WebCore/dom/DocumentMarkerController.cpp >=================================================================== >--- Source/WebCore/dom/DocumentMarkerController.cpp (revision 235539) >+++ Source/WebCore/dom/DocumentMarkerController.cpp (working copy) >@@ -331,7 +331,7 @@ void DocumentMarkerController::addMarker > downcast<RenderBlockFlow>(*renderer).ensureLineBoxes(); > } > >- m_possiblyExistingMarkerTypes |= newMarker.type(); >+ m_possiblyExistingMarkerTypes.add(newMarker.type()); > > std::unique_ptr<MarkerList>& list = m_markers.add(node, nullptr).iterator->value; > >@@ -587,7 +587,7 @@ void DocumentMarkerController::removeMar > removeMarkersFromList(iterator, markerTypes); > } > >- m_possiblyExistingMarkerTypes -= markerTypes; >+ m_possiblyExistingMarkerTypes.remove(markerTypes); > } > > void DocumentMarkerController::removeMarkersFromList(MarkerMap::iterator iterator, OptionSet<DocumentMarker::MarkerType> markerTypes) >Index: Source/WebCore/dom/ScriptedAnimationController.cpp >=================================================================== >--- Source/WebCore/dom/ScriptedAnimationController.cpp (revision 235539) >+++ Source/WebCore/dom/ScriptedAnimationController.cpp (working copy) >@@ -121,7 +121,7 @@ void ScriptedAnimationController::addThr > if (m_throttlingReasons.contains(reason)) > return; > >- m_throttlingReasons |= reason; >+ m_throttlingReasons.add(reason); > > RELEASE_LOG_IF_ALLOWED("addThrottlingReason(%s) -> %s", throttlingReasonToString(reason), throttlingReasonsToString(m_throttlingReasons).utf8().data()); > >@@ -140,7 +140,7 @@ void ScriptedAnimationController::remove > if (!m_throttlingReasons.contains(reason)) > return; > >- m_throttlingReasons -= reason; >+ m_throttlingReasons.remove(reason); > > RELEASE_LOG_IF_ALLOWED("removeThrottlingReason(%s) -> %s", throttlingReasonToString(reason), throttlingReasonsToString(m_throttlingReasons).utf8().data()); > >Index: Source/WebCore/dom/SecurityContext.h >=================================================================== >--- Source/WebCore/dom/SecurityContext.h (revision 235539) >+++ Source/WebCore/dom/SecurityContext.h (working copy) >@@ -89,7 +89,7 @@ public: > }; > > const OptionSet<MixedContentType>& foundMixedContent() const { return m_mixedContentTypes; } >- void setFoundMixedContent(MixedContentType type) { m_mixedContentTypes |= type; } >+ void setFoundMixedContent(MixedContentType type) { m_mixedContentTypes.add(type); } > bool geolocationAccessed() const { return m_geolocationAccessed; } > void setGeolocationAccessed() { m_geolocationAccessed = true; } > bool secureCookiesAccessed() const { return m_secureCookiesAccessed; } >Index: Source/WebCore/dom/UIEventWithKeyState.cpp >=================================================================== >--- Source/WebCore/dom/UIEventWithKeyState.cpp (revision 235539) >+++ Source/WebCore/dom/UIEventWithKeyState.cpp (working copy) >@@ -27,17 +27,17 @@ auto UIEventWithKeyState::modifiersFromI > { > OptionSet<Modifier> result; > if (initializer.ctrlKey) >- result |= Modifier::CtrlKey; >+ result.add(Modifier::CtrlKey); > if (initializer.altKey) >- result |= Modifier::AltKey; >+ result.add(Modifier::AltKey); > if (initializer.shiftKey) >- result |= Modifier::ShiftKey; >+ result.add(Modifier::ShiftKey); > if (initializer.metaKey) >- result |= Modifier::MetaKey; >+ result.add(Modifier::MetaKey); > if (initializer.modifierAltGraph) >- result |= Modifier::AltGraphKey; >+ result.add(Modifier::AltGraphKey); > if (initializer.modifierCapsLock) >- result |= Modifier::CapsLockKey; >+ result.add(Modifier::CapsLockKey); > return result; > } > >@@ -63,15 +63,15 @@ void UIEventWithKeyState::setModifierKey > { > OptionSet<Modifier> result; > if (ctrlKey) >- result |= Modifier::CtrlKey; >+ result.add(Modifier::CtrlKey); > if (altKey) >- result |= Modifier::AltKey; >+ result.add(Modifier::AltKey); > if (shiftKey) >- result |= Modifier::ShiftKey; >+ result.add(Modifier::ShiftKey); > if (metaKey) >- result |= Modifier::MetaKey; >+ result.add(Modifier::MetaKey); > if (altGraphKey) >- result |= Modifier::AltGraphKey; >+ result.add(Modifier::AltGraphKey); > m_modifiers = result; > } > >Index: Source/WebCore/dom/UserActionElementSet.cpp >=================================================================== >--- Source/WebCore/dom/UserActionElementSet.cpp (revision 235539) >+++ Source/WebCore/dom/UserActionElementSet.cpp (working copy) >@@ -66,7 +66,10 @@ void UserActionElementSet::setFlags(Elem > { > ASSERT(!flags.isEmpty()); > >- m_elements.add(&element, OptionSet<Flag> { }).iterator->value |= flags; >+ m_elements.ensure(&element, [] { >+ return OptionSet<Flag>(); >+ }).iterator->value.add(flags); >+ > element.setUserActionElement(true); > } > >Index: Source/WebCore/editing/CompositeEditCommand.cpp >=================================================================== >--- Source/WebCore/editing/CompositeEditCommand.cpp (revision 235539) >+++ Source/WebCore/editing/CompositeEditCommand.cpp (working copy) >@@ -1494,7 +1494,7 @@ void CompositeEditCommand::moveParagraph > ASSERT(endingSelection().isCaretOrRange()); > OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::MovingParagraph }; > if (!preserveStyle) >- options |= ReplaceSelectionCommand::MatchStyle; >+ options.add(ReplaceSelectionCommand::MatchStyle); > applyCommandToComposite(ReplaceSelectionCommand::create(document(), WTFMove(fragment), options)); > > frame().editor().markMisspellingsAndBadGrammar(endingSelection()); >Index: Source/WebCore/editing/Editor.cpp >=================================================================== >--- Source/WebCore/editing/Editor.cpp (revision 235539) >+++ Source/WebCore/editing/Editor.cpp (working copy) >@@ -634,13 +634,13 @@ void Editor::replaceSelectionWithFragmen > > OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::PreventNesting, ReplaceSelectionCommand::SanitizeFragment }; > if (selectReplacement) >- options |= ReplaceSelectionCommand::SelectReplacement; >+ options.add(ReplaceSelectionCommand::SelectReplacement); > if (smartReplace) >- options |= ReplaceSelectionCommand::SmartReplace; >+ options.add(ReplaceSelectionCommand::SmartReplace); > if (matchStyle) >- options |= ReplaceSelectionCommand::MatchStyle; >+ options.add(ReplaceSelectionCommand::MatchStyle); > if (mailBlockquoteHandling == MailBlockquoteHandling::IgnoreBlockquote) >- options |= ReplaceSelectionCommand::IgnoreMailBlockquote; >+ options.add(ReplaceSelectionCommand::IgnoreMailBlockquote); > > auto command = ReplaceSelectionCommand::create(document(), &fragment, options, editingAction); > command->apply(); >@@ -1073,7 +1073,7 @@ void Editor::appliedEditing(CompositeEdi > // Don't clear the typing style with this selection change. We do those things elsewhere if necessary. > OptionSet<FrameSelection::SetSelectionOption> options; > if (command.isDictationCommand()) >- options |= FrameSelection::DictationTriggered; >+ options.add(FrameSelection::DictationTriggered); > > changeSelectionAfterCommand(newSelection, options); > } >@@ -2339,7 +2339,7 @@ void Editor::markMisspellingsAfterTyping > UNUSED_PARAM(doReplacement); > OptionSet<TextCheckingType> textCheckingOptions; > if (isContinuousSpellCheckingEnabled()) >- textCheckingOptions |= TextCheckingType::Spelling; >+ textCheckingOptions.add(TextCheckingType::Spelling); > if (!textCheckingOptions.contains(TextCheckingType::Spelling)) > return; > >@@ -2357,7 +2357,7 @@ void Editor::markMisspellingsAfterTyping > OptionSet<TextCheckingType> textCheckingOptions; > > if (isContinuousSpellCheckingEnabled()) >- textCheckingOptions |= TextCheckingType::Spelling; >+ textCheckingOptions.add(TextCheckingType::Spelling); > > #if USE(AUTOMATIC_TEXT_REPLACEMENT) > if (doReplacement >@@ -2366,13 +2366,13 @@ void Editor::markMisspellingsAfterTyping > || isAutomaticDashSubstitutionEnabled() > || isAutomaticTextReplacementEnabled() > || (textCheckingOptions.contains(TextCheckingType::Spelling) && isAutomaticSpellingCorrectionEnabled()))) >- textCheckingOptions |= TextCheckingType::Replacement; >+ textCheckingOptions.add(TextCheckingType::Replacement); > #endif > if (!textCheckingOptions.contains(TextCheckingType::Spelling) && !textCheckingOptions.contains(TextCheckingType::Replacement)) > return; > > if (isGrammarCheckingEnabled()) >- textCheckingOptions |= TextCheckingType::Grammar; >+ textCheckingOptions.add(TextCheckingType::Grammar); > > auto sentenceStart = startOfSentence(wordStart); > auto sentenceEnd = endOfSentence(wordStart); >@@ -2838,7 +2838,7 @@ void Editor::markMisspellingsAndBadGramm > // markMisspellingsAndBadGrammar() is triggered by selection change, in which case we check spelling and grammar, but don't autocorrect misspellings. > OptionSet<TextCheckingType> textCheckingOptions { TextCheckingType::Spelling }; > if (markGrammar && isGrammarCheckingEnabled()) >- textCheckingOptions |= TextCheckingType::Grammar; >+ textCheckingOptions.add(TextCheckingType::Grammar); > auto spellCheckingRange = spellingSelection.toNormalizedRange(); > markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, spellCheckingRange.copyRef(), spellCheckingRange.copyRef(), grammarSelection.toNormalizedRange()); > return; >@@ -3733,30 +3733,30 @@ OptionSet<TextCheckingType> Editor::reso > > OptionSet<TextCheckingType> checkingTypes; > if (shouldMarkSpelling) >- checkingTypes |= TextCheckingType::Spelling; >+ checkingTypes.add(TextCheckingType::Spelling); > if (shouldMarkGrammar) >- checkingTypes |= TextCheckingType::Grammar; >+ checkingTypes.add(TextCheckingType::Grammar); > #if !PLATFORM(IOS) > if (shouldCheckForCorrection) >- checkingTypes |= TextCheckingType::Correction; >+ checkingTypes.add(TextCheckingType::Correction); > if (shouldShowCorrectionPanel) >- checkingTypes |= TextCheckingType::ShowCorrectionPanel; >+ checkingTypes.add(TextCheckingType::ShowCorrectionPanel); > > #if USE(AUTOMATIC_TEXT_REPLACEMENT) > bool shouldPerformReplacement = textCheckingOptions.contains(TextCheckingType::Replacement); > if (shouldPerformReplacement) { > if (!onlyAllowsTextReplacement) { > if (isAutomaticLinkDetectionEnabled()) >- checkingTypes |= TextCheckingType::Link; >+ checkingTypes.add(TextCheckingType::Link); > if (isAutomaticQuoteSubstitutionEnabled()) >- checkingTypes |= TextCheckingType::Quote; >+ checkingTypes.add(TextCheckingType::Quote); > if (isAutomaticDashSubstitutionEnabled()) >- checkingTypes |= TextCheckingType::Dash; >+ checkingTypes.add(TextCheckingType::Dash); > if (shouldMarkSpelling && isAutomaticSpellingCorrectionEnabled()) >- checkingTypes |= TextCheckingType::Correction; >+ checkingTypes.add(TextCheckingType::Correction); > } > if (isAutomaticTextReplacementEnabled()) >- checkingTypes |= TextCheckingType::Replacement; >+ checkingTypes.add(TextCheckingType::Replacement); > } > #endif > #endif // !PLATFORM(IOS) >Index: Source/WebCore/editing/FrameSelection.cpp >=================================================================== >--- Source/WebCore/editing/FrameSelection.cpp (revision 235539) >+++ Source/WebCore/editing/FrameSelection.cpp (working copy) >@@ -187,15 +187,15 @@ void FrameSelection::moveWithoutValidati > AXTextStateChangeIntent newIntent = intent.type == AXTextStateChangeTypeUnknown ? AXTextStateChangeIntent(AXTextStateChangeTypeSelectionMove, AXTextSelection { AXTextSelectionDirectionDiscontiguous, AXTextSelectionGranularityUnknown, false }) : intent; > auto options = defaultSetSelectionOptions(); > if (!shouldSetFocus) >- options |= DoNotSetFocus; >+ options.add(DoNotSetFocus); > switch (revealMode) { > case SelectionRevealMode::DoNotReveal: > break; > case SelectionRevealMode::Reveal: >- options |= RevealSelection; >+ options.add(RevealSelection); > break; > case SelectionRevealMode::RevealUpToMainFrame: >- options |= RevealSelectionUpToMainFrame; >+ options.add(RevealSelectionUpToMainFrame); > break; > } > setSelection(newSelection, options, newIntent); >@@ -1995,7 +1995,7 @@ bool FrameSelection::setSelectedRange(Ra > > OptionSet<SetSelectionOption> selectionOptions { ClearTypingStyle }; > if (closeTyping) >- selectionOptions |= CloseTyping; >+ selectionOptions.add(CloseTyping); > > if (userTriggered == UserTriggered) { > FrameSelection trialFrameSelection; >@@ -2005,7 +2005,7 @@ bool FrameSelection::setSelectedRange(Ra > if (!shouldChangeSelection(trialFrameSelection.selection())) > return false; > >- selectionOptions |= IsUserTriggered; >+ selectionOptions.add(IsUserTriggered); > } > > setSelection(newSelection, selectionOptions); >Index: Source/WebCore/editing/FrameSelection.h >=================================================================== >--- Source/WebCore/editing/FrameSelection.h (revision 235539) >+++ Source/WebCore/editing/FrameSelection.h (working copy) >@@ -133,7 +133,7 @@ public: > { > OptionSet<SetSelectionOption> options { CloseTyping, ClearTypingStyle }; > if (userTriggered == UserTriggered) >- options |= { RevealSelection, FireSelectEvent, IsUserTriggered }; >+ options.add({ RevealSelection, FireSelectEvent, IsUserTriggered }); > return options; > } > >Index: Source/WebCore/editing/MoveSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/MoveSelectionCommand.cpp (revision 235539) >+++ Source/WebCore/editing/MoveSelectionCommand.cpp (working copy) >@@ -84,7 +84,7 @@ void MoveSelectionCommand::doApply() > } > OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::PreventNesting }; > if (m_smartInsert) >- options |= ReplaceSelectionCommand::SmartReplace; >+ options.add(ReplaceSelectionCommand::SmartReplace); > > { > auto replaceSelection = ReplaceSelectionCommand::create(document(), WTFMove(m_fragment), options, EditActionInsertFromDrop); >Index: Source/WebCore/editing/SpellChecker.cpp >=================================================================== >--- Source/WebCore/editing/SpellChecker.cpp (revision 235539) >+++ Source/WebCore/editing/SpellChecker.cpp (working copy) >@@ -218,9 +218,9 @@ void SpellChecker::didCheckSucceed(int s > if (requestData.sequence() == sequence) { > OptionSet<DocumentMarker::MarkerType> markerTypes; > if (requestData.checkingTypes().contains(TextCheckingType::Spelling)) >- markerTypes |= DocumentMarker::Spelling; >+ markerTypes.add(DocumentMarker::Spelling); > if (requestData.checkingTypes().contains(TextCheckingType::Grammar)) >- markerTypes |= DocumentMarker::Grammar; >+ markerTypes.add(DocumentMarker::Grammar); > if (!markerTypes.isEmpty()) > m_frame.document()->markers().removeMarkers(&m_processingRequest->checkingRange(), markerTypes); > } >Index: Source/WebCore/editing/TextCheckingHelper.cpp >=================================================================== >--- Source/WebCore/editing/TextCheckingHelper.cpp (revision 235539) >+++ Source/WebCore/editing/TextCheckingHelper.cpp (working copy) >@@ -353,7 +353,7 @@ String TextCheckingHelper::findFirstMiss > Vector<TextCheckingResult> results; > OptionSet<TextCheckingType> checkingTypes { TextCheckingType::Spelling }; > if (checkGrammar) >- checkingTypes |= TextCheckingType::Grammar; >+ checkingTypes.add(TextCheckingType::Grammar); > VisibleSelection currentSelection; > if (Frame* frame = paragraphRange->ownerDocument().frame()) > currentSelection = frame->selection().selection(); >@@ -587,7 +587,7 @@ Vector<String> TextCheckingHelper::guess > Vector<TextCheckingResult> results; > OptionSet<TextCheckingType> checkingTypes { TextCheckingType::Spelling }; > if (checkGrammar) >- checkingTypes |= TextCheckingType::Grammar; >+ checkingTypes.add(TextCheckingType::Grammar); > VisibleSelection currentSelection; > if (Frame* frame = m_range->ownerDocument().frame()) > currentSelection = frame->selection().selection(); >Index: Source/WebCore/editing/TextIterator.cpp >=================================================================== >--- Source/WebCore/editing/TextIterator.cpp (revision 235539) >+++ Source/WebCore/editing/TextIterator.cpp (working copy) >@@ -2097,7 +2097,7 @@ inline SearchBuffer::SearchBuffer(const > // Characters in the separator category never really occur at the beginning of a word, > // so if the target begins with such a character, we just ignore the AtWordStart option. > if (isSeparator(targetFirstCharacter)) { >- m_options -= AtWordStarts; >+ m_options.remove(AtWordStarts); > m_needsMoreContext = false; > } > } >Index: Source/WebCore/html/HTMLAnchorElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLAnchorElement.cpp (revision 235539) >+++ Source/WebCore/html/HTMLAnchorElement.cpp (working copy) >@@ -257,9 +257,9 @@ void HTMLAnchorElement::parseAttribute(c > const bool shouldFoldCase = true; > SpaceSplitString relValue(value, shouldFoldCase); > if (relValue.contains(noReferrer)) >- m_linkRelations |= Relation::NoReferrer; >+ m_linkRelations.add(Relation::NoReferrer); > if (relValue.contains(noOpener)) >- m_linkRelations |= Relation::NoOpener; >+ m_linkRelations.add(Relation::NoOpener); > if (m_relList) > m_relList->associatedAttributeValueChanged(value); > } >Index: Source/WebCore/inspector/agents/InspectorPageAgent.cpp >=================================================================== >--- Source/WebCore/inspector/agents/InspectorPageAgent.cpp (revision 235539) >+++ Source/WebCore/inspector/agents/InspectorPageAgent.cpp (working copy) >@@ -319,9 +319,9 @@ void InspectorPageAgent::reload(ErrorStr > > OptionSet<ReloadOption> reloadOptions; > if (reloadFromOrigin) >- reloadOptions |= ReloadOption::FromOrigin; >+ reloadOptions.add(ReloadOption::FromOrigin); > if (!revalidateAllResources) >- reloadOptions |= ReloadOption::ExpiredOnly; >+ reloadOptions.add(ReloadOption::ExpiredOnly); > > m_page.mainFrame().loader().reload(reloadOptions); > } >Index: Source/WebCore/page/ContextMenuController.cpp >=================================================================== >--- Source/WebCore/page/ContextMenuController.cpp (revision 235539) >+++ Source/WebCore/page/ContextMenuController.cpp (working copy) >@@ -369,7 +369,7 @@ void ContextMenuController::contextMenuI > frame->selection().setSelection(wordSelection); > } else { > ASSERT(frame->editor().selectedText().length()); >- replaceOptions |= ReplaceSelectionCommand::SelectReplacement; >+ replaceOptions.add(ReplaceSelectionCommand::SelectReplacement); > } > > Document* document = frame->document(); >Index: Source/WebCore/page/DOMWindow.cpp >=================================================================== >--- Source/WebCore/page/DOMWindow.cpp (revision 235539) >+++ Source/WebCore/page/DOMWindow.cpp (working copy) >@@ -1221,14 +1221,14 @@ bool DOMWindow::find(const String& strin > return false; > > // FIXME (13016): Support wholeWord, searchInFrames and showDialog. >- FindOptions options; >+ FindOptions options { DoNotTraverseFlatTree }; > if (backwards) >- options |= Backwards; >+ options.add(Backwards); > if (!caseSensitive) >- options |= CaseInsensitive; >+ options.add(CaseInsensitive); > if (wrap) >- options |= WrapAround; >- return m_frame->editor().findString(string, options | DoNotTraverseFlatTree); >+ options.add(WrapAround); >+ return m_frame->editor().findString(string, options); > } > > bool DOMWindow::offscreenBuffering() const >Index: Source/WebCore/page/DragController.cpp >=================================================================== >--- Source/WebCore/page/DragController.cpp (revision 235539) >+++ Source/WebCore/page/DragController.cpp (working copy) >@@ -619,9 +619,9 @@ bool DragController::concludeEditDrag(co > if (setSelectionToDragCaret(innerFrame.get(), dragCaret, range, point)) { > OptionSet<ReplaceSelectionCommand::CommandOption> options { ReplaceSelectionCommand::SelectReplacement, ReplaceSelectionCommand::PreventNesting }; > if (dragData.canSmartReplace()) >- options |= ReplaceSelectionCommand::SmartReplace; >+ options.add(ReplaceSelectionCommand::SmartReplace); > if (chosePlainText) >- options |= ReplaceSelectionCommand::MatchStyle; >+ options.add(ReplaceSelectionCommand::MatchStyle); > ReplaceSelectionCommand::create(*m_documentUnderMouse, fragment.releaseNonNull(), options, EditActionInsertFromDrop)->apply(); > } > } >Index: Source/WebCore/page/FrameSnapshotting.cpp >=================================================================== >--- Source/WebCore/page/FrameSnapshotting.cpp (revision 235539) >+++ Source/WebCore/page/FrameSnapshotting.cpp (working copy) >@@ -92,13 +92,13 @@ std::unique_ptr<ImageBuffer> snapshotFra > > auto paintBehavior = state.paintBehavior; > if (options & SnapshotOptionsForceBlackText) >- paintBehavior |= PaintBehavior::ForceBlackText; >+ paintBehavior.add(PaintBehavior::ForceBlackText); > if (options & SnapshotOptionsPaintSelectionOnly) >- paintBehavior |= PaintBehavior::SelectionOnly; >+ paintBehavior.add(PaintBehavior::SelectionOnly); > if (options & SnapshotOptionsPaintSelectionAndBackgroundsOnly) >- paintBehavior |= PaintBehavior::SelectionAndBackgroundsOnly; >+ paintBehavior.add(PaintBehavior::SelectionAndBackgroundsOnly); > if (options & SnapshotOptionsPaintEverythingExcludingSelection) >- paintBehavior |= PaintBehavior::ExcludeSelection; >+ paintBehavior.add(PaintBehavior::ExcludeSelection); > > // Other paint behaviors are set by paintContentsForSnapshot. > frame.view()->setPaintBehavior(paintBehavior); >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 235539) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -140,11 +140,11 @@ static OptionSet<RenderLayer::UpdateLaye > { > auto flags = RenderLayer::updateLayerPositionsDefaultFlags(); > if (didFullRepaint) { >- flags -= RenderLayer::CheckForRepaint; >- flags |= RenderLayer::NeedsFullRepaintInBacking; >+ flags.remove(RenderLayer::CheckForRepaint); >+ flags.add(RenderLayer::NeedsFullRepaintInBacking); > } > if (isRelayoutingSubtree && layer->enclosingPaginationLayer(RenderLayer::IncludeCompositedPaginatedLayers)) >- flags |= RenderLayer::UpdatePagination; >+ flags.add(RenderLayer::UpdatePagination); > return flags; > } > >@@ -4068,18 +4068,18 @@ void FrameView::willPaintContents(Graphi > > if (FrameView* parentView = parentFrameView()) { > if (parentView->paintBehavior() & PaintBehavior::FlattenCompositingLayers) >- m_paintBehavior |= PaintBehavior::FlattenCompositingLayers; >+ m_paintBehavior.add(PaintBehavior::FlattenCompositingLayers); > > if (parentView->paintBehavior() & PaintBehavior::Snapshotting) >- m_paintBehavior |= PaintBehavior::Snapshotting; >+ m_paintBehavior.add(PaintBehavior::Snapshotting); > > if (parentView->paintBehavior() & PaintBehavior::TileFirstPaint) >- m_paintBehavior |= PaintBehavior::TileFirstPaint; >+ m_paintBehavior.add(PaintBehavior::TileFirstPaint); > } > > if (document->printing()) { >- m_paintBehavior |= PaintBehavior::FlattenCompositingLayers; >- m_paintBehavior |= PaintBehavior::Snapshotting; >+ m_paintBehavior.add(PaintBehavior::FlattenCompositingLayers); >+ m_paintBehavior.add(PaintBehavior::Snapshotting); > } > > paintingState.isFlatteningPaintOfRootFrame = (m_paintBehavior & PaintBehavior::FlattenCompositingLayers) && !frame().ownerElement(); >Index: Source/WebCore/page/Page.cpp >=================================================================== >--- Source/WebCore/page/Page.cpp (revision 235539) >+++ Source/WebCore/page/Page.cpp (working copy) >@@ -1643,11 +1643,11 @@ void Page::setIsVisible(bool isVisible) > auto state = m_activityState; > > if (isVisible) { >- state -= ActivityState::IsVisuallyIdle; >- state |= { ActivityState::IsVisible, ActivityState::IsVisibleOrOccluded }; >+ state.remove(ActivityState::IsVisuallyIdle); >+ state.add({ ActivityState::IsVisible, ActivityState::IsVisibleOrOccluded }); > } else { >- state |= ActivityState::IsVisuallyIdle; >- state -= { ActivityState::IsVisible, ActivityState::IsVisibleOrOccluded }; >+ state.add(ActivityState::IsVisuallyIdle); >+ state.remove({ ActivityState::IsVisible, ActivityState::IsVisibleOrOccluded }); > } > setActivityState(state); > } >Index: Source/WebCore/page/PerformanceObserver.cpp >=================================================================== >--- Source/WebCore/page/PerformanceObserver.cpp (revision 235539) >+++ Source/WebCore/page/PerformanceObserver.cpp (working copy) >@@ -65,7 +65,7 @@ ExceptionOr<void> PerformanceObserver::o > OptionSet<PerformanceEntry::Type> filter; > for (const String& entryType : init.entryTypes) { > if (auto type = PerformanceEntry::parseEntryTypeString(entryType)) >- filter |= *type; >+ filter.add(*type); > } > > if (filter.isEmpty()) >Index: Source/WebCore/page/TextIndicator.cpp >=================================================================== >--- Source/WebCore/page/TextIndicator.cpp (revision 235539) >+++ Source/WebCore/page/TextIndicator.cpp (working copy) >@@ -78,8 +78,8 @@ RefPtr<TextIndicator> TextIndicator::cre > VisibleSelection oldSelection = frame->selection().selection(); > OptionSet<TemporarySelectionOption> temporarySelectionOptions; > #if PLATFORM(IOS) >- temporarySelectionOptions |= TemporarySelectionOptionIgnoreSelectionChanges; >- temporarySelectionOptions |= TemporarySelectionOptionEnableAppearanceUpdates; >+ temporarySelectionOptions.add(TemporarySelectionOptionIgnoreSelectionChanges); >+ temporarySelectionOptions.add(TemporarySelectionOptionEnableAppearanceUpdates); > #endif > TemporarySelectionChange selectionChange(*frame, { range }, temporarySelectionOptions); > >Index: Source/WebCore/page/WindowFeatures.cpp >=================================================================== >--- Source/WebCore/page/WindowFeatures.cpp (revision 235539) >+++ Source/WebCore/page/WindowFeatures.cpp (working copy) >@@ -120,7 +120,7 @@ OptionSet<DisabledAdaptations> parseDisa > for (auto& name : disabledAdaptationsString.split(',')) { > auto normalizedName = name.stripWhiteSpace().convertToASCIILowercase(); > if (normalizedName == watchAdaptationName()) >- disabledAdaptations |= DisabledAdaptations::Watch; >+ disabledAdaptations.add(DisabledAdaptations::Watch); > } > return disabledAdaptations; > } >Index: Source/WebCore/page/csp/ContentSecurityPolicy.h >=================================================================== >--- Source/WebCore/page/csp/ContentSecurityPolicy.h (revision 235539) >+++ Source/WebCore/page/csp/ContentSecurityPolicy.h (working copy) >@@ -151,11 +151,11 @@ public: > void enforceSandboxFlags(SandboxFlags sandboxFlags) { m_sandboxFlags |= sandboxFlags; } > void addHashAlgorithmsForInlineScripts(OptionSet<ContentSecurityPolicyHashAlgorithm> hashAlgorithmsForInlineScripts) > { >- m_hashAlgorithmsForInlineScripts |= hashAlgorithmsForInlineScripts; >+ m_hashAlgorithmsForInlineScripts.add(hashAlgorithmsForInlineScripts); > } > void addHashAlgorithmsForInlineStylesheets(OptionSet<ContentSecurityPolicyHashAlgorithm> hashAlgorithmsForInlineStylesheets) > { >- m_hashAlgorithmsForInlineStylesheets |= hashAlgorithmsForInlineStylesheets; >+ m_hashAlgorithmsForInlineStylesheets.add(hashAlgorithmsForInlineStylesheets); > } > > // Used by ContentSecurityPolicySource >Index: Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp >=================================================================== >--- Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp (revision 235539) >+++ Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp (working copy) >@@ -473,7 +473,7 @@ bool ContentSecurityPolicySourceList::pa > if (digest->value.size() > ContentSecurityPolicyHash::maximumDigestLength) > return false; > >- m_hashAlgorithmsUsed |= digest->algorithm; >+ m_hashAlgorithmsUsed.add(digest->algorithm); > m_hashes.add(WTFMove(*digest)); > return true; > } >Index: Source/WebCore/platform/PlatformEvent.h >=================================================================== >--- Source/WebCore/platform/PlatformEvent.h (revision 235539) >+++ Source/WebCore/platform/PlatformEvent.h (working copy) >@@ -115,13 +115,13 @@ protected: > , m_timestamp(timestamp) > { > if (shiftKey) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (ctrlKey) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (altKey) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (metaKey) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > } > > // Explicit protected destructor so that people don't accidentally >Index: Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >=================================================================== >--- Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp (revision 235539) >+++ Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp (working copy) >@@ -1330,15 +1330,15 @@ static OptionSet<PlatformEvent::Modifier > { > OptionSet<PlatformEvent::Modifier> modifiers; > if (event->state & GDK_SHIFT_MASK || event->keyval == GDK_3270_BackTab) >- modifiers |= PlatformEvent::Modifier::ShiftKey; >+ modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (event->state & GDK_CONTROL_MASK) >- modifiers |= PlatformEvent::Modifier::CtrlKey; >+ modifiers.add(PlatformEvent::Modifier::CtrlKey); > if (event->state & GDK_MOD1_MASK) >- modifiers |= PlatformEvent::Modifier::AltKey; >+ modifiers.add(PlatformEvent::Modifier::AltKey); > if (event->state & GDK_META_MASK) >- modifiers |= PlatformEvent::Modifier::MetaKey; >+ modifiers.add(PlatformEvent::Modifier::MetaKey); > if (event->state & GDK_LOCK_MASK) >- modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ modifiers.add(PlatformEvent::Modifier::CapsLockKey); > return modifiers; > } > >Index: Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >=================================================================== >--- Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp (revision 235539) >+++ Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp (working copy) >@@ -47,15 +47,15 @@ PlatformMouseEvent::PlatformMouseEvent(G > m_modifierFlags = 0; > > if (event->state & GDK_SHIFT_MASK) >- m_modifiers |= PlatformEvent::Modifier::ShiftKey; >+ m_modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (event->state & GDK_CONTROL_MASK) >- m_modifiers |= PlatformEvent::Modifier::CtrlKey; >+ m_modifiers.add(PlatformEvent::Modifier::CtrlKey); > if (event->state & GDK_MOD1_MASK) >- m_modifiers |= PlatformEvent::Modifier::AltKey; >+ m_modifiers.add(PlatformEvent::Modifier::AltKey); > if (event->state & GDK_META_MASK) >- m_modifiers |= PlatformEvent::Modifier::MetaKey; >+ m_modifiers.add(PlatformEvent::Modifier::MetaKey); > if (PlatformKeyboardEvent::modifiersContainCapsLock(event->state)) >- m_modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ m_modifiers.add(PlatformEvent::Modifier::CapsLockKey); > > switch (event->type) { > case GDK_BUTTON_PRESS: >@@ -96,15 +96,15 @@ PlatformMouseEvent::PlatformMouseEvent(G > m_modifierFlags = 0; > > if (motion->state & GDK_SHIFT_MASK) >- m_modifiers |= PlatformEvent::Modifier::ShiftKey; >+ m_modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (motion->state & GDK_CONTROL_MASK) >- m_modifiers |= PlatformEvent::Modifier::CtrlKey; >+ m_modifiers.add(PlatformEvent::Modifier::CtrlKey); > if (motion->state & GDK_MOD1_MASK) >- m_modifiers |= PlatformEvent::Modifier::AltKey; >+ m_modifiers.add(PlatformEvent::Modifier::AltKey); > if (motion->state & GDK_META_MASK) >- m_modifiers |= PlatformEvent::Modifier::MetaKey; >+ m_modifiers.add(PlatformEvent::Modifier::MetaKey); > if (PlatformKeyboardEvent::modifiersContainCapsLock(motion->state)) >- m_modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ m_modifiers.add(PlatformEvent::Modifier::CapsLockKey); > > switch (motion->type) { > case GDK_MOTION_NOTIFY: >Index: Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >=================================================================== >--- Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp (revision 235539) >+++ Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp (working copy) >@@ -47,15 +47,15 @@ PlatformWheelEvent::PlatformWheelEvent(G > m_timestamp = wallTimeForEvent(event); > > if (event->state & GDK_SHIFT_MASK) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (event->state & GDK_CONTROL_MASK) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (event->state & GDK_MOD1_MASK) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (event->state & GDK_META_MASK) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (PlatformKeyboardEvent::modifiersContainCapsLock(event->state)) >- m_modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ m_modifiers.add(PlatformEvent::Modifier::CapsLockKey); > > m_deltaX = 0; > m_deltaY = 0; >Index: Source/WebCore/platform/gtk/RenderThemeGadget.cpp >=================================================================== >--- Source/WebCore/platform/gtk/RenderThemeGadget.cpp (revision 235539) >+++ Source/WebCore/platform/gtk/RenderThemeGadget.cpp (working copy) >@@ -358,13 +358,13 @@ RenderThemeScrollbarGadget::RenderThemeS > gtk_style_context_get_style(m_context.get(), "has-backward-stepper", &hasBackward, "has-forward-stepper", &hasForward, > "has-secondary-backward-stepper", &hasSecondaryBackward, "has-secondary-forward-stepper", &hasSecondaryForward, nullptr); > if (hasBackward) >- m_steppers |= Steppers::Backward; >+ m_steppers.add(Steppers::Backward); > if (hasForward) >- m_steppers |= Steppers::Forward; >+ m_steppers.add(Steppers::Forward); > if (hasSecondaryBackward) >- m_steppers |= Steppers::SecondaryBackward; >+ m_steppers.add(Steppers::SecondaryBackward); > if (hasSecondaryForward) >- m_steppers |= Steppers::SecondaryForward; >+ m_steppers.add(Steppers::SecondaryForward); > } > > void RenderThemeScrollbarGadget::renderStepper(cairo_t* cr, const FloatRect& paintRect, RenderThemeGadget* stepperGadget, GtkOrientation orientation, Steppers stepper) >Index: Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm >=================================================================== >--- Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm (revision 235539) >+++ Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm (working copy) >@@ -43,15 +43,15 @@ static OptionSet<PlatformEvent::Modifier > OptionSet<PlatformEvent::Modifier> modifiers; > > if (event.modifierFlags & WebEventFlagMaskShift) >- modifiers |= PlatformEvent::Modifier::ShiftKey; >+ modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (event.modifierFlags & WebEventFlagMaskControl) >- modifiers |= PlatformEvent::Modifier::CtrlKey; >+ modifiers.add(PlatformEvent::Modifier::CtrlKey); > if (event.modifierFlags & WebEventFlagMaskAlternate) >- modifiers |= PlatformEvent::Modifier::AltKey; >+ modifiers.add(PlatformEvent::Modifier::AltKey); > if (event.modifierFlags & WebEventFlagMaskCommand) >- modifiers |= PlatformEvent::Modifier::MetaKey; >+ modifiers.add(PlatformEvent::Modifier::MetaKey); > if (event.modifierFlags & WebEventFlagMaskAlphaShift) >- modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ modifiers.add(PlatformEvent::Modifier::CapsLockKey); > > return modifiers; > } >Index: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >=================================================================== >--- Source/WebCore/platform/mac/PlatformEventFactoryMac.mm (revision 235539) >+++ Source/WebCore/platform/mac/PlatformEventFactoryMac.mm (working copy) >@@ -666,15 +666,15 @@ OptionSet<PlatformEvent::Modifier> modif > OptionSet<PlatformEvent::Modifier> modifiers; > > if (event.modifierFlags & NSEventModifierFlagShift) >- modifiers |= PlatformEvent::Modifier::ShiftKey; >+ modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (event.modifierFlags & NSEventModifierFlagControl) >- modifiers |= PlatformEvent::Modifier::CtrlKey; >+ modifiers.add(PlatformEvent::Modifier::CtrlKey); > if (event.modifierFlags & NSEventModifierFlagOption) >- modifiers |= PlatformEvent::Modifier::AltKey; >+ modifiers.add(PlatformEvent::Modifier::AltKey); > if (event.modifierFlags & NSEventModifierFlagCommand) >- modifiers |= PlatformEvent::Modifier::MetaKey; >+ modifiers.add(PlatformEvent::Modifier::MetaKey); > if (event.modifierFlags & NSEventModifierFlagCapsLock) >- modifiers |= PlatformEvent::Modifier::CapsLockKey; >+ modifiers.add(PlatformEvent::Modifier::CapsLockKey); > > return modifiers; > } >Index: Source/WebCore/rendering/RenderLayer.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayer.cpp (revision 235539) >+++ Source/WebCore/rendering/RenderLayer.cpp (working copy) >@@ -557,17 +557,17 @@ void RenderLayer::updateLayerPositions(R > // Clear the IsCompositingUpdateRoot flag once we've found the first compositing layer in this update. > bool isUpdateRoot = flags.contains(IsCompositingUpdateRoot); > if (isComposited()) >- flags -= IsCompositingUpdateRoot; >+ flags.remove(IsCompositingUpdateRoot); > > if (renderer().isInFlowRenderFragmentedFlow()) { > updatePagination(); >- flags |= UpdatePagination; >+ flags.add(UpdatePagination); > } > > if (transform()) { >- flags |= SeenTransformedLayer; >+ flags.add(SeenTransformedLayer); > if (!transform()->isAffine()) >- flags |= Seen3DTransformedLayer; >+ flags.add(Seen3DTransformedLayer); > } > > for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) >@@ -576,9 +576,9 @@ void RenderLayer::updateLayerPositions(R > if ((flags & UpdateCompositingLayers) && isComposited()) { > OptionSet<RenderLayerBacking::UpdateAfterLayoutFlags> updateFlags; > if (flags & NeedsFullRepaintInBacking) >- updateFlags |= RenderLayerBacking::UpdateAfterLayoutFlags::NeedsFullRepaint; >+ updateFlags.add(RenderLayerBacking::UpdateAfterLayoutFlags::NeedsFullRepaint); > if (isUpdateRoot) >- updateFlags |= RenderLayerBacking::UpdateAfterLayoutFlags::IsUpdateRoot; >+ updateFlags.add(RenderLayerBacking::UpdateAfterLayoutFlags::IsUpdateRoot); > backing()->updateAfterLayout(updateFlags); > } > >@@ -851,16 +851,16 @@ void RenderLayer::updateLayerPositionsAf > > bool positionChanged = updateLayerPosition(); > if (positionChanged) >- flags |= HasChangedAncestor; >+ flags.add(HasChangedAncestor); > > if (flags.containsAny({ HasChangedAncestor, HasSeenViewportConstrainedAncestor, IsOverflowScroll })) > clearClipRects(); > > if (renderer().style().hasViewportConstrainedPosition()) >- flags |= HasSeenViewportConstrainedAncestor; >+ flags.add(HasSeenViewportConstrainedAncestor); > > if (renderer().hasOverflowClip()) >- flags |= HasSeenAncestorWithOverflowClip; >+ flags.add(HasSeenAncestorWithOverflowClip); > > bool shouldComputeRepaintRects = (flags.contains(HasSeenViewportConstrainedAncestor) || flags.containsAll({ IsOverflowScroll, HasSeenAncestorWithOverflowClip })) && isSelfPaintingLayer(); > bool isVisuallyEmpty = !isVisuallyNonEmpty(); >@@ -3973,7 +3973,7 @@ void RenderLayer::paintLayer(GraphicsCon > // The performingPaintInvalidation() painting pass goes through compositing layers, > // but we need to ensure that we don't cache clip rects computed with the wrong root in this case. > if (context.performingPaintInvalidation() || (paintingInfo.paintBehavior & PaintBehavior::FlattenCompositingLayers)) >- paintFlags |= PaintLayerTemporaryClipRects; >+ paintFlags.add(PaintLayerTemporaryClipRects); > else if (!backing()->paintsIntoWindow() > && !backing()->paintsIntoCompositedAncestor() > && !shouldDoSoftwarePaint(this, paintFlags.contains(PaintLayerPaintingReflection)) >@@ -4000,7 +4000,7 @@ void RenderLayer::paintLayer(GraphicsCon > return; > > if (paintsWithTransparency(paintingInfo.paintBehavior)) >- paintFlags |= PaintLayerHaveTransparency; >+ paintFlags.add(PaintLayerHaveTransparency); > > // PaintLayerAppliedTransform is used in RenderReplica, to avoid applying the transform twice. > if (paintsWithTransform(paintingInfo.paintBehavior) && !(paintFlags & PaintLayerAppliedTransform)) { >@@ -4061,7 +4061,7 @@ void RenderLayer::paintLayerContentsAndR > m_paintingInsideReflection = false; > } > >- localPaintFlags |= paintLayerPaintingCompositingAllPhasesFlags(); >+ localPaintFlags.add(paintLayerPaintingCompositingAllPhasesFlags()); > paintLayerContents(context, paintingInfo, localPaintFlags); > } > >@@ -4355,21 +4355,21 @@ void RenderLayer::paintLayerContents(Gra > > OptionSet<PaintBehavior> paintBehavior = PaintBehavior::Normal; > if (localPaintFlags & PaintLayerPaintingSkipRootBackground) >- paintBehavior |= PaintBehavior::SkipRootBackground; >+ paintBehavior.add(PaintBehavior::SkipRootBackground); > else if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly) >- paintBehavior |= PaintBehavior::RootBackgroundOnly; >+ paintBehavior.add(PaintBehavior::RootBackgroundOnly); > > if (paintingInfo.paintBehavior & PaintBehavior::FlattenCompositingLayers) >- paintBehavior |= PaintBehavior::FlattenCompositingLayers; >+ paintBehavior.add(PaintBehavior::FlattenCompositingLayers); > > if (paintingInfo.paintBehavior & PaintBehavior::Snapshotting) >- paintBehavior |= PaintBehavior::Snapshotting; >+ paintBehavior.add(PaintBehavior::Snapshotting); > > if ((paintingInfo.paintBehavior & PaintBehavior::TileFirstPaint) && isRenderViewLayer()) >- paintBehavior |= PaintBehavior::TileFirstPaint; >+ paintBehavior.add(PaintBehavior::TileFirstPaint); > > if (paintingInfo.paintBehavior & PaintBehavior::ExcludeSelection) >- paintBehavior |= PaintBehavior::ExcludeSelection; >+ paintBehavior.add(PaintBehavior::ExcludeSelection); > > LayoutRect paintDirtyRect = localPaintingInfo.paintDirtyRect; > if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) { >@@ -4438,13 +4438,13 @@ void RenderLayer::paintLayerContents(Gra > if (shouldPaintContent && !(selectionOnly || selectionAndBackgroundsOnly)) { > OptionSet<PaintBehavior> paintBehavior = PaintBehavior::Normal; > if (paintingInfo.paintBehavior & PaintBehavior::FlattenCompositingLayers) >- paintBehavior |= PaintBehavior::FlattenCompositingLayers; >+ paintBehavior.add(PaintBehavior::FlattenCompositingLayers); > > if (paintingInfo.paintBehavior & PaintBehavior::Snapshotting) >- paintBehavior |= PaintBehavior::Snapshotting; >+ paintBehavior.add(PaintBehavior::Snapshotting); > > if (paintingInfo.paintBehavior & PaintBehavior::TileFirstPaint) >- paintBehavior |= PaintBehavior::TileFirstPaint; >+ paintBehavior.add(PaintBehavior::TileFirstPaint); > > if (shouldPaintMask(paintingInfo.paintBehavior, localPaintFlags)) { > // Paint the mask for the fragments. >@@ -4770,13 +4770,13 @@ void RenderLayer::paintForegroundForFrag > localPaintBehavior = paintBehavior; > > if (localPaintingInfo.paintBehavior & PaintBehavior::ExcludeSelection) >- localPaintBehavior |= PaintBehavior::ExcludeSelection; >+ localPaintBehavior.add(PaintBehavior::ExcludeSelection); > > if (localPaintingInfo.paintBehavior & PaintBehavior::Snapshotting) >- localPaintBehavior |= PaintBehavior::Snapshotting; >+ localPaintBehavior.add(PaintBehavior::Snapshotting); > > if (localPaintingInfo.paintBehavior & PaintBehavior::TileFirstPaint) >- localPaintBehavior |= PaintBehavior::TileFirstPaint; >+ localPaintBehavior.add(PaintBehavior::TileFirstPaint); > > // Optimize clipping for the single fragment case. > bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && layerFragments[0].shouldPaintContent && !layerFragments[0].foregroundRect.isEmpty(); >Index: Source/WebCore/rendering/RenderLayerBacking.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 235539) >+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy) >@@ -2534,24 +2534,24 @@ void RenderLayerBacking::paintIntoLayer( > > OptionSet<RenderLayer::PaintLayerFlag> paintFlags; > if (paintingPhase & GraphicsLayerPaintBackground) >- paintFlags |= RenderLayer::PaintLayerPaintingCompositingBackgroundPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingCompositingBackgroundPhase); > if (paintingPhase & GraphicsLayerPaintForeground) >- paintFlags |= RenderLayer::PaintLayerPaintingCompositingForegroundPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingCompositingForegroundPhase); > if (paintingPhase & GraphicsLayerPaintMask) >- paintFlags |= RenderLayer::PaintLayerPaintingCompositingMaskPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingCompositingMaskPhase); > if (paintingPhase & GraphicsLayerPaintClipPath) >- paintFlags |= RenderLayer::PaintLayerPaintingCompositingClipPathPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingCompositingClipPathPhase); > if (paintingPhase & GraphicsLayerPaintChildClippingMask) >- paintFlags |= RenderLayer::PaintLayerPaintingChildClippingMaskPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingChildClippingMaskPhase); > if (paintingPhase & GraphicsLayerPaintOverflowContents) >- paintFlags |= RenderLayer::PaintLayerPaintingOverflowContents; >+ paintFlags.add(RenderLayer::PaintLayerPaintingOverflowContents); > if (paintingPhase & GraphicsLayerPaintCompositedScroll) >- paintFlags |= RenderLayer::PaintLayerPaintingCompositingScrollingPhase; >+ paintFlags.add(RenderLayer::PaintLayerPaintingCompositingScrollingPhase); > > if (graphicsLayer == m_backgroundLayer.get() && m_backgroundLayerPaintsFixedRootBackground) >- paintFlags |= { RenderLayer::PaintLayerPaintingRootBackgroundOnly, RenderLayer::PaintLayerPaintingCompositingForegroundPhase }; // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers. >+ paintFlags.add({ RenderLayer::PaintLayerPaintingRootBackgroundOnly, RenderLayer::PaintLayerPaintingCompositingForegroundPhase }); // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers. > else if (compositor().fixedRootBackgroundLayer()) >- paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground; >+ paintFlags.add(RenderLayer::PaintLayerPaintingSkipRootBackground); > > #ifndef NDEBUG > RenderElement::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(&renderer()); >@@ -2609,10 +2609,10 @@ void RenderLayerBacking::paintContents(c > // We have to use the same root as for hit testing, because both methods can compute and cache clipRects. > OptionSet<PaintBehavior> behavior = PaintBehavior::Normal; > if (layerPaintBehavior == GraphicsLayerPaintSnapshotting) >- behavior |= PaintBehavior::Snapshotting; >+ behavior.add(PaintBehavior::Snapshotting); > > if (layerPaintBehavior == GraphicsLayerPaintFirstTilePaint) >- behavior |= PaintBehavior::TileFirstPaint; >+ behavior.add(PaintBehavior::TileFirstPaint); > > paintIntoLayer(graphicsLayer, context, dirtyRect, behavior, paintingPhase); > >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 235539) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -2164,89 +2164,89 @@ OptionSet<CompositingReason> RenderLayer > auto& renderer = rendererForCompositingTests(layer); > > if (requiresCompositingForTransform(renderer)) >- reasons |= CompositingReason::Transform3D; >+ reasons.add(CompositingReason::Transform3D); > > if (requiresCompositingForVideo(renderer)) >- reasons |= CompositingReason::Video; >+ reasons.add(CompositingReason::Video); > else if (requiresCompositingForCanvas(renderer)) >- reasons |= CompositingReason::Canvas; >+ reasons.add(CompositingReason::Canvas); > else if (requiresCompositingForPlugin(renderer)) >- reasons |= CompositingReason::Plugin; >+ reasons.add(CompositingReason::Plugin); > else if (requiresCompositingForFrame(renderer)) >- reasons |= CompositingReason::IFrame; >+ reasons.add(CompositingReason::IFrame); > > if ((canRender3DTransforms() && renderer.style().backfaceVisibility() == BackfaceVisibility::Hidden)) >- reasons |= CompositingReason::BackfaceVisibilityHidden; >+ reasons.add(CompositingReason::BackfaceVisibilityHidden); > > if (clipsCompositingDescendants(*renderer.layer())) >- reasons |= CompositingReason::ClipsCompositingDescendants; >+ reasons.add(CompositingReason::ClipsCompositingDescendants); > > if (requiresCompositingForAnimation(renderer)) >- reasons |= CompositingReason::Animation; >+ reasons.add(CompositingReason::Animation); > > if (requiresCompositingForFilters(renderer)) >- reasons |= CompositingReason::Filters; >+ reasons.add(CompositingReason::Filters); > > if (requiresCompositingForWillChange(renderer)) >- reasons |= CompositingReason::WillChange; >+ reasons.add(CompositingReason::WillChange); > > if (requiresCompositingForPosition(renderer, *renderer.layer())) >- reasons |= renderer.isFixedPositioned() ? CompositingReason::PositionFixed : CompositingReason::PositionSticky; >+ reasons.add(renderer.isFixedPositioned() ? CompositingReason::PositionFixed : CompositingReason::PositionSticky); > > #if PLATFORM(IOS) > if (requiresCompositingForScrolling(*renderer.layer())) >- reasons |= CompositingReason::OverflowScrollingTouch; >+ reasons.add(CompositingReason::OverflowScrollingTouch); > #endif > > if (requiresCompositingForOverflowScrolling(*renderer.layer())) >- reasons |= CompositingReason::OverflowScrollingTouch; >+ reasons.add(CompositingReason::OverflowScrollingTouch); > > switch (renderer.layer()->indirectCompositingReason()) { > case RenderLayer::IndirectCompositingReason::None: > break; > case RenderLayer::IndirectCompositingReason::Stacking: >- reasons |= CompositingReason::Stacking; >+ reasons.add(CompositingReason::Stacking); > break; > case RenderLayer::IndirectCompositingReason::Overlap: >- reasons |= CompositingReason::Overlap; >+ reasons.add(CompositingReason::Overlap); > break; > case RenderLayer::IndirectCompositingReason::BackgroundLayer: >- reasons |= CompositingReason::NegativeZIndexChildren; >+ reasons.add(CompositingReason::NegativeZIndexChildren); > break; > case RenderLayer::IndirectCompositingReason::GraphicalEffect: > if (renderer.hasTransform()) >- reasons |= CompositingReason::TransformWithCompositedDescendants; >+ reasons.add(CompositingReason::TransformWithCompositedDescendants); > > if (renderer.isTransparent()) >- reasons |= CompositingReason::OpacityWithCompositedDescendants; >+ reasons.add(CompositingReason::OpacityWithCompositedDescendants); > > if (renderer.hasMask()) >- reasons |= CompositingReason::MaskWithCompositedDescendants; >+ reasons.add(CompositingReason::MaskWithCompositedDescendants); > > if (renderer.hasReflection()) >- reasons |= CompositingReason::ReflectionWithCompositedDescendants; >+ reasons.add(CompositingReason::ReflectionWithCompositedDescendants); > > if (renderer.hasFilter() || renderer.hasBackdropFilter()) >- reasons |= CompositingReason::FilterWithCompositedDescendants; >+ reasons.add(CompositingReason::FilterWithCompositedDescendants); > > #if ENABLE(CSS_COMPOSITING) > if (layer.isolatesCompositedBlending()) >- reasons |= CompositingReason::IsolatesCompositedBlendingDescendants; >+ reasons.add(CompositingReason::IsolatesCompositedBlendingDescendants); > > if (layer.hasBlendMode()) >- reasons |= CompositingReason::BlendingWithCompositedDescendants; >+ reasons.add(CompositingReason::BlendingWithCompositedDescendants); > #endif > break; > case RenderLayer::IndirectCompositingReason::Perspective: >- reasons |= CompositingReason::Perspective; >+ reasons.add(CompositingReason::Perspective); > break; > case RenderLayer::IndirectCompositingReason::Preserve3D: >- reasons |= CompositingReason::Preserve3D; >+ reasons.add(CompositingReason::Preserve3D); > break; > } > > if (inCompositingMode() && renderer.layer()->isRenderViewLayer()) >- reasons |= CompositingReason::Root; >+ reasons.add(CompositingReason::Root); > > return reasons; > } >@@ -3625,10 +3625,10 @@ void RenderLayerCompositor::updateScroll > { > OptionSet<LayerScrollCoordinationRole> coordinationRoles; > if (isViewportConstrainedFixedOrStickyLayer(layer)) >- coordinationRoles |= ViewportConstrained; >+ coordinationRoles.add(ViewportConstrained); > > if (useCoordinatedScrollingForLayer(layer)) >- coordinationRoles |= Scrolling; >+ coordinationRoles.add(Scrolling); > > if (layer.isComposited()) > layer.backing()->setIsScrollCoordinatedWithViewportConstrainedRole(coordinationRoles.contains(ViewportConstrained)); >Index: Source/WebCore/rendering/TextDecorationPainter.cpp >=================================================================== >--- Source/WebCore/rendering/TextDecorationPainter.cpp (revision 235539) >+++ Source/WebCore/rendering/TextDecorationPainter.cpp (working copy) >@@ -383,17 +383,17 @@ static void collectStylesForRenderer(Tex > auto decorationStyle = style.textDecorationStyle(); > > if (decorations.contains(TextDecoration::Underline)) { >- remainingDecorations -= TextDecoration::Underline; >+ remainingDecorations.remove(TextDecoration::Underline); > result.underlineColor = color; > result.underlineStyle = decorationStyle; > } > if (decorations.contains(TextDecoration::Overline)) { >- remainingDecorations -= TextDecoration::Overline; >+ remainingDecorations.remove(TextDecoration::Overline); > result.overlineColor = color; > result.overlineStyle = decorationStyle; > } > if (decorations.contains(TextDecoration::LineThrough)) { >- remainingDecorations -= TextDecoration::LineThrough; >+ remainingDecorations.remove(TextDecoration::LineThrough); > result.linethroughColor = color; > result.linethroughStyle = decorationStyle; > } >Index: Source/WebCore/rendering/TextPaintStyle.cpp >=================================================================== >--- Source/WebCore/rendering/TextPaintStyle.cpp (revision 235539) >+++ Source/WebCore/rendering/TextPaintStyle.cpp (working copy) >@@ -100,7 +100,7 @@ TextPaintStyle computeTextPaintStyle(con > if (page && page->focusController().isActive()) { > OptionSet<StyleColor::Options> options; > if (page->useSystemAppearance()) >- options |= StyleColor::Options::UseSystemAppearance; >+ options.add(StyleColor::Options::UseSystemAppearance); > paintStyle.fillColor = RenderTheme::singleton().systemColor(CSSValueActivebuttontext, options); > return paintStyle; > } >Index: Source/WebCore/rendering/style/RenderStyle.cpp >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.cpp (revision 235539) >+++ Source/WebCore/rendering/style/RenderStyle.cpp (working copy) >@@ -613,7 +613,7 @@ bool RenderStyle::changeRequiresLayout(c > if (m_rareNonInheritedData->transform->hasTransform() != other.m_rareNonInheritedData->transform->hasTransform()) > return true; > if (*m_rareNonInheritedData->transform != *other.m_rareNonInheritedData->transform) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Transform; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::Transform); > // Don't return; keep looking for another change > } > } >@@ -629,7 +629,7 @@ bool RenderStyle::changeRequiresLayout(c > #endif > > if (!arePointingToEqualData(m_rareNonInheritedData->willChange, other.m_rareNonInheritedData->willChange)) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::WillChange; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::WillChange); > // Don't return; keep looking for another change > } > } >@@ -849,7 +849,7 @@ bool RenderStyle::changeRequiresLayerRep > > if (position() != PositionType::Static) { > if (m_visualData->clip != other.m_visualData->clip || m_visualData->hasClip != other.m_visualData->hasClip) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::ClipRect; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::ClipRect); > return true; > } > } >@@ -860,18 +860,18 @@ bool RenderStyle::changeRequiresLayerRep > #endif > > if (m_rareNonInheritedData->opacity != other.m_rareNonInheritedData->opacity) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Opacity; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::Opacity); > // Don't return; keep looking for another change. > } > > if (m_rareNonInheritedData->filter != other.m_rareNonInheritedData->filter) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Filter; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::Filter); > // Don't return; keep looking for another change. > } > > #if ENABLE(FILTERS_LEVEL_2) > if (m_rareNonInheritedData->backdropFilter != other.m_rareNonInheritedData->backdropFilter) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Filter; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::Filter); > // Don't return; keep looking for another change. > } > #endif >@@ -921,7 +921,7 @@ bool RenderStyle::changeRequiresRepaint( > > // FIXME: this should probably be moved to changeRequiresLayerRepaint(). > if (m_rareNonInheritedData->clipPath != other.m_rareNonInheritedData->clipPath) { >- changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::ClipPath; >+ changedContextSensitiveProperties.add(StyleDifferenceContextSensitiveProperty::ClipPath); > // Don't return; keep looking for another change. > } > >Index: Source/WebCore/testing/Internals.cpp >=================================================================== >--- Source/WebCore/testing/Internals.cpp (revision 235539) >+++ Source/WebCore/testing/Internals.cpp (working copy) >@@ -2242,7 +2242,7 @@ static ExceptionOr<FindOptions> parseFin > bool found = false; > for (auto& flag : flagList) { > if (flag.name == option) { >- result |= flag.value; >+ result.add(flag.value); > found = true; > break; > } >@@ -3189,7 +3189,7 @@ void Internals::forceReload(bool endToEn > { > OptionSet<ReloadOption> reloadOptions; > if (endToEnd) >- reloadOptions |= ReloadOption::FromOrigin; >+ reloadOptions.add(ReloadOption::FromOrigin); > > frame()->loader().reload(reloadOptions); > } >@@ -4342,9 +4342,9 @@ void Internals::setPageVisibility(bool i > auto state = page.activityState(); > > if (!isVisible) >- state -= ActivityState::IsVisible; >+ state.remove(ActivityState::IsVisible); > else >- state |= ActivityState::IsVisible; >+ state.add(ActivityState::IsVisible); > > page.setActivityState(state); > } >@@ -4358,9 +4358,9 @@ void Internals::setPageIsFocusedAndActiv > auto state = page.activityState(); > > if (!isFocusedAndActive) >- state -= { ActivityState::IsFocused, ActivityState::WindowIsActive }; >+ state.remove({ ActivityState::IsFocused, ActivityState::WindowIsActive }); > else >- state |= { ActivityState::IsFocused, ActivityState::WindowIsActive }; >+ state.add({ ActivityState::IsFocused, ActivityState::WindowIsActive }); > > page.setActivityState(state); > } >Index: Source/WebDriver/Session.cpp >=================================================================== >--- Source/WebDriver/Session.cpp (revision 235539) >+++ Source/WebDriver/Session.cpp (working copy) >@@ -1514,8 +1514,7 @@ void Session::elementClick(const String& > return; > } > >- OptionSet<ElementLayoutOption> options = ElementLayoutOption::ScrollIntoViewIfNeeded; >- options |= ElementLayoutOption::UseViewportCoordinates; >+ OptionSet<ElementLayoutOption> options = { ElementLayoutOption::ScrollIntoViewIfNeeded, ElementLayoutOption::UseViewportCoordinates }; > computeElementLayout(elementID, options, [this, protectedThis = makeRef(*this), elementID, completionHandler = WTFMove(completionHandler)](std::optional<Rect>&& rect, std::optional<Point>&& inViewCenter, bool isObscured, RefPtr<JSON::Object>&& error) mutable { > if (!rect || error) { > completionHandler(CommandResult::fail(WTFMove(error))); >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 235539) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,58 @@ >+2018-08-31 Antti Koivisto <antti@apple.com> >+ >+ Replace OptionSet |= and -= operators with add() and remove() functions >+ https://bugs.webkit.org/show_bug.cgi?id=189169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm: >+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): >+ * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: >+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged): >+ * Shared/WebEventConversion.cpp: >+ (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): >+ (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): >+ (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): >+ (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): >+ (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): >+ * Shared/WebsitePoliciesData.cpp: >+ (WebKit::WebsitePoliciesData::applyToDocumentLoader): >+ * UIProcess/API/C/WKPage.cpp: >+ (WKPageReload): >+ * UIProcess/API/C/WKResourceCacheManager.cpp: >+ (toWebsiteDataTypes): >+ * UIProcess/API/C/WKWebsitePolicies.cpp: >+ (WKWebsitePoliciesSetAllowedAutoplayQuirks): >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView reload]): >+ * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: >+ (WebKit::toWebsiteDataTypes): >+ * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: >+ (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]): >+ * UIProcess/API/Cocoa/_WKWebsitePolicies.mm: >+ (-[_WKWebsitePolicies setAllowedAutoplayQuirks:]): >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::viewDidMoveToWindow): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::updateActivityState): >+ (WebKit::WebPageProxy::activityStateDidChange): >+ (WebKit::WebPageProxy::dispatchActivityStateChange): >+ * UIProcess/WebsiteData/WebsiteDataRecord.cpp: >+ (WebKit::WebsiteDataRecord::add): >+ (WebKit::WebsiteDataRecord::addCookieHostName): >+ (WebKit::WebsiteDataRecord::addPluginDataHostName): >+ (WebKit::WebsiteDataRecord::addHSTSCacheHostname): >+ (WebKit::WebsiteDataRecord::addOriginWithCredential): >+ * UIProcess/mac/WKInspectorViewController.mm: >+ (-[WKInspectorViewController inspectorWKWebViewReload:]): >+ * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: >+ (WebKit::imageForRect): >+ * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: >+ (WebKit::InjectedBundleRangeHandle::renderedImage): >+ * WebProcess/WebPage/FindController.cpp: >+ (WebKit::core): >+ (WebKit::FindController::findString): >+ > 2018-08-31 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >Index: Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (revision 235539) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (working copy) >@@ -114,12 +114,12 @@ void NetworkProcess::platformInitializeN > SandboxExtension::consumePermanently(parameters.diskCacheDirectoryExtensionHandle); > OptionSet<NetworkCache::Cache::Option> cacheOptions { NetworkCache::Cache::Option::RegisterNotify }; > if (parameters.shouldEnableNetworkCacheEfficacyLogging) >- cacheOptions |= NetworkCache::Cache::Option::EfficacyLogging; >+ cacheOptions.add(NetworkCache::Cache::Option::EfficacyLogging); > if (parameters.shouldUseTestingNetworkSession) >- cacheOptions |= NetworkCache::Cache::Option::TestingMode; >+ cacheOptions.add(NetworkCache::Cache::Option::TestingMode); > #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) > if (parameters.shouldEnableNetworkCacheSpeculativeRevalidation) >- cacheOptions |= NetworkCache::Cache::Option::SpeculativeRevalidation; >+ cacheOptions.add(NetworkCache::Cache::Option::SpeculativeRevalidation); > #endif > > m_cache = NetworkCache::Cache::open(m_diskCacheDirectory, cacheOptions); >Index: Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp (revision 235539) >+++ Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp (working copy) >@@ -113,10 +113,10 @@ void NetworkProcess::platformInitializeN > > OptionSet<NetworkCache::Cache::Option> cacheOptions { NetworkCache::Cache::Option::RegisterNotify }; > if (parameters.shouldEnableNetworkCacheEfficacyLogging) >- cacheOptions |= NetworkCache::Cache::Option::EfficacyLogging; >+ cacheOptions.add(NetworkCache::Cache::Option::EfficacyLogging); > #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION) > if (parameters.shouldEnableNetworkCacheSpeculativeRevalidation) >- cacheOptions |= NetworkCache::Cache::Option::SpeculativeRevalidation; >+ cacheOptions.add(NetworkCache::Cache::Option::SpeculativeRevalidation); > #endif > > m_cache = NetworkCache::Cache::open(m_diskCacheDirectory, cacheOptions); >Index: Source/WebKit/Shared/WebEventConversion.cpp >=================================================================== >--- Source/WebKit/Shared/WebEventConversion.cpp (revision 235539) >+++ Source/WebKit/Shared/WebEventConversion.cpp (working copy) >@@ -69,15 +69,15 @@ public: > } > > if (webEvent.shiftKey()) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (webEvent.controlKey()) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (webEvent.altKey()) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (webEvent.metaKey()) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (webEvent.capsLockKey()) >- m_modifiers |= Modifier::CapsLockKey; >+ m_modifiers.add(Modifier::CapsLockKey); > > m_timestamp = webEvent.timestamp(); > >@@ -136,15 +136,15 @@ public: > m_type = PlatformEvent::Wheel; > > if (webEvent.shiftKey()) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (webEvent.controlKey()) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (webEvent.altKey()) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (webEvent.metaKey()) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (webEvent.capsLockKey()) >- m_modifiers |= Modifier::CapsLockKey; >+ m_modifiers.add(Modifier::CapsLockKey); > > m_timestamp = webEvent.timestamp(); > >@@ -198,15 +198,15 @@ public: > } > > if (webEvent.shiftKey()) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (webEvent.controlKey()) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (webEvent.altKey()) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (webEvent.metaKey()) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (webEvent.capsLockKey()) >- m_modifiers |= Modifier::CapsLockKey; >+ m_modifiers.add(Modifier::CapsLockKey); > > m_timestamp = webEvent.timestamp(); > >@@ -339,15 +339,15 @@ public: > } > > if (webEvent.shiftKey()) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (webEvent.controlKey()) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (webEvent.altKey()) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (webEvent.metaKey()) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (webEvent.capsLockKey()) >- m_modifiers |= Modifier::CapsLockKey; >+ m_modifiers.add(Modifier::CapsLockKey); > > m_timestamp = webEvent.timestamp(); > >@@ -398,15 +398,15 @@ public: > } > > if (webEvent.shiftKey()) >- m_modifiers |= Modifier::ShiftKey; >+ m_modifiers.add(Modifier::ShiftKey); > if (webEvent.controlKey()) >- m_modifiers |= Modifier::CtrlKey; >+ m_modifiers.add(Modifier::CtrlKey); > if (webEvent.altKey()) >- m_modifiers |= Modifier::AltKey; >+ m_modifiers.add(Modifier::AltKey); > if (webEvent.metaKey()) >- m_modifiers |= Modifier::MetaKey; >+ m_modifiers.add(Modifier::MetaKey); > if (webEvent.capsLockKey()) >- m_modifiers |= Modifier::CapsLockKey; >+ m_modifiers.add(Modifier::CapsLockKey); > > m_timestamp = webEvent.timestamp(); > >Index: Source/WebKit/Shared/WebsitePoliciesData.cpp >=================================================================== >--- Source/WebKit/Shared/WebsitePoliciesData.cpp (revision 235539) >+++ Source/WebKit/Shared/WebsitePoliciesData.cpp (working copy) >@@ -98,13 +98,13 @@ void WebsitePoliciesData::applyToDocumen > const auto& allowedQuirks = websitePolicies.allowedAutoplayQuirks; > > if (allowedQuirks.contains(WebsiteAutoplayQuirk::InheritedUserGestures)) >- quirks |= WebCore::AutoplayQuirk::InheritedUserGestures; >+ quirks.add(WebCore::AutoplayQuirk::InheritedUserGestures); > > if (allowedQuirks.contains(WebsiteAutoplayQuirk::SynthesizedPauseEvents)) >- quirks |= WebCore::AutoplayQuirk::SynthesizedPauseEvents; >+ quirks.add(WebCore::AutoplayQuirk::SynthesizedPauseEvents); > > if (allowedQuirks.contains(WebsiteAutoplayQuirk::ArbitraryUserGestures)) >- quirks |= WebCore::AutoplayQuirk::ArbitraryUserGestures; >+ quirks.add(WebCore::AutoplayQuirk::ArbitraryUserGestures); > > documentLoader.setAllowedAutoplayQuirks(quirks); > >Index: Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h >=================================================================== >--- Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h (revision 235539) >+++ Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h (working copy) >@@ -116,7 +116,7 @@ public: > > void notePropertiesChanged(OptionSet<LayerChange> changeFlags) > { >- changedProperties |= changeFlags; >+ changedProperties.add(changeFlags); > } > > void resetChangedProperties() >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 235539) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -1446,32 +1446,32 @@ void WebPageProxy::setSuppressVisibility > > void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpdate) > { >- m_activityState = m_activityState - flagsToUpdate; >+ m_activityState.remove(flagsToUpdate); > if (flagsToUpdate & ActivityState::IsFocused && m_pageClient.isViewFocused()) >- m_activityState |= ActivityState::IsFocused; >+ m_activityState.add(ActivityState::IsFocused); > if (flagsToUpdate & ActivityState::WindowIsActive && m_pageClient.isViewWindowActive()) >- m_activityState |= ActivityState::WindowIsActive; >+ m_activityState.add(ActivityState::WindowIsActive); > if (flagsToUpdate & ActivityState::IsVisible && m_pageClient.isViewVisible()) >- m_activityState |= ActivityState::IsVisible; >+ m_activityState.add(ActivityState::IsVisible); > if (flagsToUpdate & ActivityState::IsVisibleOrOccluded && m_pageClient.isViewVisibleOrOccluded()) >- m_activityState |= ActivityState::IsVisibleOrOccluded; >+ m_activityState.add(ActivityState::IsVisibleOrOccluded); > if (flagsToUpdate & ActivityState::IsInWindow && m_pageClient.isViewInWindow()) >- m_activityState |= ActivityState::IsInWindow; >+ m_activityState.add(ActivityState::IsInWindow); > if (flagsToUpdate & ActivityState::IsVisuallyIdle && m_pageClient.isVisuallyIdle()) >- m_activityState |= ActivityState::IsVisuallyIdle; >+ m_activityState.add(ActivityState::IsVisuallyIdle); > if (flagsToUpdate & ActivityState::IsAudible && m_mediaState & MediaProducer::IsPlayingAudio && !(m_mutedState & MediaProducer::AudioIsMuted)) >- m_activityState |= ActivityState::IsAudible; >+ m_activityState.add(ActivityState::IsAudible); > if (flagsToUpdate & ActivityState::IsLoading && m_pageLoadState.isLoading()) >- m_activityState |= ActivityState::IsLoading; >+ m_activityState.add(ActivityState::IsLoading); > if (flagsToUpdate & ActivityState::IsCapturingMedia && m_mediaState & (MediaProducer::HasActiveAudioCaptureDevice | MediaProducer::HasActiveVideoCaptureDevice)) >- m_activityState |= ActivityState::IsCapturingMedia; >+ m_activityState.add(ActivityState::IsCapturingMedia); > } > > void WebPageProxy::activityStateDidChange(OptionSet<ActivityState::Flag> mayHaveChanged, bool wantsSynchronousReply, ActivityStateChangeDispatchMode dispatchMode) > { > LOG_WITH_STREAM(ActivityState, stream << "WebPageProxy " << pageID() << " activityStateDidChange - mayHaveChanged " << mayHaveChanged); > >- m_potentiallyChangedActivityStateFlags |= mayHaveChanged; >+ m_potentiallyChangedActivityStateFlags.add(mayHaveChanged); > m_activityStateChangeWantsSynchronousReply = m_activityStateChangeWantsSynchronousReply || wantsSynchronousReply; > > if (m_suppressVisibilityUpdates && dispatchMode != ActivityStateChangeDispatchMode::Immediate) >@@ -1522,7 +1522,7 @@ void WebPageProxy::dispatchActivityState > > // If the visibility state may have changed, then so may the visually idle & occluded agnostic state. > if (m_potentiallyChangedActivityStateFlags & ActivityState::IsVisible) >- m_potentiallyChangedActivityStateFlags |= { ActivityState::IsVisibleOrOccluded, ActivityState::IsVisuallyIdle }; >+ m_potentiallyChangedActivityStateFlags.add({ ActivityState::IsVisibleOrOccluded, ActivityState::IsVisuallyIdle }); > > // Record the prior view state, update the flags that may have changed, > // and check which flags have actually changed. >Index: Source/WebKit/UIProcess/API/C/WKPage.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/C/WKPage.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/C/WKPage.cpp (working copy) >@@ -270,7 +270,7 @@ void WKPageReload(WKPageRef pageRef) > OptionSet<WebCore::ReloadOption> reloadOptions; > #if PLATFORM(COCOA) > if (linkedOnOrAfter(WebKit::SDKVersion::FirstWithExpiredOnlyReloadBehavior)) >- reloadOptions |= WebCore::ReloadOption::ExpiredOnly; >+ reloadOptions.add(WebCore::ReloadOption::ExpiredOnly); > #endif > > toImpl(pageRef)->reload(reloadOptions); >Index: Source/WebKit/UIProcess/API/C/WKResourceCacheManager.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/C/WKResourceCacheManager.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/C/WKResourceCacheManager.cpp (working copy) >@@ -40,12 +40,10 @@ WKTypeID WKResourceCacheManagerGetTypeID > > static OptionSet<WebsiteDataType> toWebsiteDataTypes(WKResourceCachesToClear cachesToClear) > { >- OptionSet<WebsiteDataType> websiteDataTypes; >- >- websiteDataTypes |= WebsiteDataType::MemoryCache; >+ OptionSet<WebsiteDataType> websiteDataTypes { WebsiteDataType::MemoryCache }; > > if (cachesToClear == WKResourceCachesToClearAll) >- websiteDataTypes |= WebsiteDataType::DiskCache; >+ websiteDataTypes.add(WebsiteDataType::DiskCache); > > return websiteDataTypes; > } >Index: Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp (working copy) >@@ -83,13 +83,13 @@ void WKWebsitePoliciesSetAllowedAutoplay > { > OptionSet<WebsiteAutoplayQuirk> quirks; > if (allowedQuirks & kWKWebsiteAutoplayQuirkInheritedUserGestures) >- quirks |= WebsiteAutoplayQuirk::InheritedUserGestures; >+ quirks.add(WebsiteAutoplayQuirk::InheritedUserGestures); > > if (allowedQuirks & kWKWebsiteAutoplayQuirkSynthesizedPauseEvents) >- quirks |= WebsiteAutoplayQuirk::SynthesizedPauseEvents; >+ quirks.add(WebsiteAutoplayQuirk::SynthesizedPauseEvents); > > if (allowedQuirks & kWKWebsiteAutoplayQuirkArbitraryUserGestures) >- quirks |= WebsiteAutoplayQuirk::ArbitraryUserGestures; >+ quirks.add(WebsiteAutoplayQuirk::ArbitraryUserGestures); > > toImpl(websitePolicies)->setAllowedAutoplayQuirks(quirks); > } >Index: Source/WebKit/UIProcess/API/C/wpe/WKAPICastWPE.h >=================================================================== >--- Source/WebKit/UIProcess/API/C/wpe/WKAPICastWPE.h (revision 235539) >+++ Source/WebKit/UIProcess/API/C/wpe/WKAPICastWPE.h (working copy) >@@ -53,9 +53,9 @@ inline OptionSet<WebCore::ActivityState: > OptionSet<WebCore::ActivityState::Flag> viewStateFlags; > > if (wkViewState & kWKViewStateIsInWindow) >- viewStateFlags |= WebCore::ActivityState::IsInWindow; >+ viewStateFlags.add(WebCore::ActivityState::IsInWindow); > if (wkViewState & kWKViewStateIsVisible) >- viewStateFlags |= WebCore::ActivityState::IsVisible; >+ viewStateFlags.add(WebCore::ActivityState::IsVisible); > > return viewStateFlags; > } >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 235539) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -961,7 +961,7 @@ - (WKNavigation *)reload > { > OptionSet<WebCore::ReloadOption> reloadOptions; > if (linkedOnOrAfter(WebKit::SDKVersion::FirstWithExpiredOnlyReloadBehavior)) >- reloadOptions |= WebCore::ReloadOption::ExpiredOnly; >+ reloadOptions.add(WebCore::ReloadOption::ExpiredOnly); > > return wrapper(_page->reload(reloadOptions)); > } >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h (revision 235539) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h (working copy) >@@ -85,7 +85,7 @@ static inline OptionSet<WebKit::WebsiteD > > for (NSString *websiteDataType in websiteDataTypes) { > if (auto dataType = toWebsiteDataType(websiteDataType)) >- result |= *dataType; >+ result.add(*dataType); > } > > return result; >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (revision 235539) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (working copy) >@@ -223,7 +223,7 @@ - (void)_fetchDataRecordsOfTypes:(NSSet< > > OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions; > if (options & _WKWebsiteDataStoreFetchOptionComputeSizes) >- fetchOptions |= WebKit::WebsiteDataFetchOption::ComputeSizes; >+ fetchOptions.add(WebKit::WebsiteDataFetchOption::ComputeSizes); > > _websiteDataStore->websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(dataTypes), fetchOptions, [completionHandlerCopy = WTFMove(completionHandlerCopy)](auto websiteDataRecords) { > Vector<RefPtr<API::Object>> elements; >Index: Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm (revision 235539) >+++ Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm (working copy) >@@ -64,13 +64,13 @@ - (void)setAllowedAutoplayQuirks:(_WKWeb > OptionSet<WebKit::WebsiteAutoplayQuirk> quirks; > > if (allowedQuirks & _WKWebsiteAutoplayQuirkInheritedUserGestures) >- quirks |= WebKit::WebsiteAutoplayQuirk::InheritedUserGestures; >+ quirks.add(WebKit::WebsiteAutoplayQuirk::InheritedUserGestures); > > if (allowedQuirks & _WKWebsiteAutoplayQuirkSynthesizedPauseEvents) >- quirks |= WebKit::WebsiteAutoplayQuirk::SynthesizedPauseEvents; >+ quirks.add(WebKit::WebsiteAutoplayQuirk::SynthesizedPauseEvents); > > if (allowedQuirks & _WKWebsiteAutoplayQuirkArbitraryUserGestures) >- quirks |= WebKit::WebsiteAutoplayQuirk::ArbitraryUserGestures; >+ quirks.add(WebKit::WebsiteAutoplayQuirk::ArbitraryUserGestures); > > _websitePolicies->setAllowedAutoplayQuirks(quirks); > } >Index: Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp (working copy) >@@ -775,8 +775,8 @@ void webkit_web_context_clear_cache(WebK > g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context)); > > OptionSet<WebsiteDataType> websiteDataTypes; >- websiteDataTypes |= WebsiteDataType::MemoryCache; >- websiteDataTypes |= WebsiteDataType::DiskCache; >+ websiteDataTypes.add(WebsiteDataType::MemoryCache); >+ websiteDataTypes.add(WebsiteDataType::DiskCache); > auto& websiteDataStore = webkitWebsiteDataManagerGetDataStore(context->priv->websiteDataManager.get()).websiteDataStore(); > websiteDataStore.removeData(websiteDataTypes, -WallTime::infinity(), [] { }); > } >Index: Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp (working copy) >@@ -630,25 +630,25 @@ static OptionSet<WebsiteDataType> toWebs > { > OptionSet<WebsiteDataType> returnValue; > if (types & WEBKIT_WEBSITE_DATA_MEMORY_CACHE) >- returnValue |= WebsiteDataType::MemoryCache; >+ returnValue.add(WebsiteDataType::MemoryCache); > if (types & WEBKIT_WEBSITE_DATA_DISK_CACHE) >- returnValue |= WebsiteDataType::DiskCache; >+ returnValue.add(WebsiteDataType::DiskCache); > if (types & WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE) >- returnValue |= WebsiteDataType::OfflineWebApplicationCache; >+ returnValue.add(WebsiteDataType::OfflineWebApplicationCache); > if (types & WEBKIT_WEBSITE_DATA_SESSION_STORAGE) >- returnValue |= WebsiteDataType::SessionStorage; >+ returnValue.add(WebsiteDataType::SessionStorage); > if (types & WEBKIT_WEBSITE_DATA_LOCAL_STORAGE) >- returnValue |= WebsiteDataType::LocalStorage; >+ returnValue.add(WebsiteDataType::LocalStorage); > if (types & WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES) >- returnValue |= WebsiteDataType::WebSQLDatabases; >+ returnValue.add(WebsiteDataType::WebSQLDatabases); > if (types & WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES) >- returnValue |= WebsiteDataType::IndexedDBDatabases; >+ returnValue.add(WebsiteDataType::IndexedDBDatabases); > #if ENABLE(NETSCAPE_PLUGIN_API) > if (types & WEBKIT_WEBSITE_DATA_PLUGIN_DATA) >- returnValue |= WebsiteDataType::PlugInData; >+ returnValue.add(WebsiteDataType::PlugInData); > #endif > if (types & WEBKIT_WEBSITE_DATA_COOKIES) >- returnValue |= WebsiteDataType::Cookies; >+ returnValue.add(WebsiteDataType::Cookies); > return returnValue; > } > >Index: Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (revision 235539) >+++ Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (working copy) >@@ -210,7 +210,7 @@ WEBKIT_DEFINE_TYPE(WebKitWebViewBase, we > static void webkitWebViewBaseScheduleUpdateActivityState(WebKitWebViewBase* webViewBase, OptionSet<ActivityState::Flag> flagsToUpdate) > { > WebKitWebViewBasePrivate* priv = webViewBase->priv; >- priv->activityStateFlagsToUpdate |= flagsToUpdate; >+ priv->activityStateFlagsToUpdate.add(flagsToUpdate); > if (priv->updateActivityStateTimer.isActive()) > return; > >@@ -227,7 +227,7 @@ static gboolean toplevelWindowFocusInEve > if (priv->activityState & ActivityState::WindowIsActive) > return FALSE; > >- priv->activityState |= ActivityState::WindowIsActive; >+ priv->activityState.add(ActivityState::WindowIsActive); > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::WindowIsActive); > > return FALSE; >@@ -239,7 +239,7 @@ static gboolean toplevelWindowFocusOutEv > if (!(priv->activityState & ActivityState::WindowIsActive)) > return FALSE; > >- priv->activityState -= ActivityState::WindowIsActive; >+ priv->activityState.remove(ActivityState::WindowIsActive); > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::WindowIsActive); > > return FALSE; >@@ -256,9 +256,9 @@ static gboolean toplevelWindowStateEvent > return FALSE; > > if (visible) >- priv->activityState |= ActivityState::IsVisible; >+ priv->activityState.add(ActivityState::IsVisible); > else >- priv->activityState -= ActivityState::IsVisible; >+ priv->activityState.remove(ActivityState::IsVisible); > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::IsVisible); > > return FALSE; >@@ -303,12 +303,12 @@ static void webkitWebViewBaseSetToplevel > if (!priv->toplevelOnScreenWindow) { > OptionSet<ActivityState::Flag> flagsToUpdate; > if (priv->activityState & ActivityState::IsInWindow) { >- priv->activityState -= ActivityState::IsInWindow; >- flagsToUpdate |= ActivityState::IsInWindow; >+ priv->activityState.remove(ActivityState::IsInWindow); >+ flagsToUpdate.add(ActivityState::IsInWindow); > } > if (priv->activityState & ActivityState::WindowIsActive) { >- priv->activityState -= ActivityState::WindowIsActive; >- flagsToUpdate |= ActivityState::IsInWindow; >+ priv->activityState.remove(ActivityState::WindowIsActive); >+ flagsToUpdate.add(ActivityState::IsInWindow); > } > if (flagsToUpdate) > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate); >@@ -626,17 +626,17 @@ static void webkitWebViewBaseMap(GtkWidg > WebKitWebViewBasePrivate* priv = webViewBase->priv; > OptionSet<ActivityState::Flag> flagsToUpdate; > if (!(priv->activityState & ActivityState::IsVisible)) >- flagsToUpdate |= ActivityState::IsVisible; >+ flagsToUpdate.add(ActivityState::IsVisible); > if (priv->toplevelOnScreenWindow) { > if (!(priv->activityState & ActivityState::IsInWindow)) >- flagsToUpdate |= ActivityState::IsInWindow; >+ flagsToUpdate.add(ActivityState::IsInWindow); > if (gtk_window_is_active(GTK_WINDOW(priv->toplevelOnScreenWindow)) && !(priv->activityState & ActivityState::WindowIsActive)) >- flagsToUpdate |= ActivityState::WindowIsActive; >+ flagsToUpdate.add(ActivityState::WindowIsActive); > } > if (!flagsToUpdate) > return; > >- priv->activityState |= flagsToUpdate; >+ priv->activityState.add(flagsToUpdate); > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate); > } > >@@ -649,7 +649,7 @@ static void webkitWebViewBaseUnmap(GtkWi > if (!(priv->activityState & ActivityState::IsVisible)) > return; > >- priv->activityState -= ActivityState::IsVisible; >+ priv->activityState.remove(ActivityState::IsVisible); > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::IsVisible); > } > >@@ -1498,7 +1498,7 @@ void webkitWebViewBaseSetFocus(WebKitWeb > > OptionSet<ActivityState::Flag> flagsToUpdate { ActivityState::IsFocused }; > if (focused) { >- priv->activityState |= ActivityState::IsFocused; >+ priv->activityState.add(ActivityState::IsFocused); > > // If the view has received the focus and the window is not active > // mark the current window as active now. This can happen if the >@@ -1506,11 +1506,11 @@ void webkitWebViewBaseSetFocus(WebKitWeb > // set programatically like WebKitTestRunner does, because POPUP > // can't be focused. > if (!(priv->activityState & ActivityState::WindowIsActive)) { >- priv->activityState |= ActivityState::WindowIsActive; >- flagsToUpdate |= ActivityState::WindowIsActive; >+ priv->activityState.add(ActivityState::WindowIsActive); >+ flagsToUpdate.add(ActivityState::WindowIsActive); > } > } else >- priv->activityState -= ActivityState::IsFocused; >+ priv->activityState.remove(ActivityState::IsFocused); > > webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate); > } >Index: Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (revision 235539) >+++ Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (working copy) >@@ -2118,7 +2118,7 @@ void WebViewImpl::viewDidMoveToWindow() > if (m_shouldDeferViewInWindowChanges) > m_viewInWindowChangeWasDeferred = true; > else >- activityStateChanges |= WebCore::ActivityState::IsInWindow; >+ activityStateChanges.add(WebCore::ActivityState::IsInWindow); > m_page->activityStateDidChange(activityStateChanges); > > updateWindowAndViewFrames(); >@@ -2144,7 +2144,7 @@ void WebViewImpl::viewDidMoveToWindow() > if (m_shouldDeferViewInWindowChanges) > m_viewInWindowChangeWasDeferred = true; > else >- activityStateChanges |= WebCore::ActivityState::IsInWindow; >+ activityStateChanges.add(WebCore::ActivityState::IsInWindow); > m_page->activityStateDidChange(activityStateChanges); > > [NSEvent removeMonitor:m_flagsChangedEventMonitor]; >Index: Source/WebKit/UIProcess/WebsiteData/WebsiteDataRecord.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebsiteData/WebsiteDataRecord.cpp (revision 235539) >+++ Source/WebKit/UIProcess/WebsiteData/WebsiteDataRecord.cpp (working copy) >@@ -79,30 +79,27 @@ String WebsiteDataRecord::displayNameFor > > void WebsiteDataRecord::add(WebsiteDataType type, const WebCore::SecurityOriginData& origin) > { >- types |= type; >- >+ types.add(type); > origins.add(origin); > } > > void WebsiteDataRecord::addCookieHostName(const String& hostName) > { >- types |= WebsiteDataType::Cookies; >- >+ types.add(WebsiteDataType::Cookies); > cookieHostNames.add(hostName); > } > > #if ENABLE(NETSCAPE_PLUGIN_API) > void WebsiteDataRecord::addPluginDataHostName(const String& hostName) > { >- types |= WebsiteDataType::PlugInData; >- >+ types.add(WebsiteDataType::PlugInData); > pluginDataHostNames.add(hostName); > } > #endif > > void WebsiteDataRecord::addHSTSCacheHostname(const String& hostName) > { >- types |= WebsiteDataType::HSTSCache; >+ types.add(WebsiteDataType::HSTSCache); > HSTSCacheHostNames.add(hostName); > } > >@@ -157,8 +154,7 @@ String WebsiteDataRecord::topPrivatelyCo > > void WebsiteDataRecord::addOriginWithCredential(const String& origin) > { >- types |= WebsiteDataType::Credentials; >- >+ types.add(WebsiteDataType::Credentials); > originsWithCredentials.add(origin); > } > >Index: Source/WebKit/UIProcess/mac/WKInspectorViewController.mm >=================================================================== >--- Source/WebKit/UIProcess/mac/WKInspectorViewController.mm (revision 235539) >+++ Source/WebKit/UIProcess/mac/WKInspectorViewController.mm (working copy) >@@ -238,7 +238,7 @@ - (void)inspectorWKWebViewReload:(WKInsp > > OptionSet<WebCore::ReloadOption> reloadOptions; > if (WebKit::linkedOnOrAfter(WebKit::SDKVersion::FirstWithExpiredOnlyReloadBehavior)) >- reloadOptions |= WebCore::ReloadOption::ExpiredOnly; >+ reloadOptions.add(WebCore::ReloadOption::ExpiredOnly); > > _inspectedPage->reload(reloadOptions); > } >Index: Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (revision 235539) >+++ Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (working copy) >@@ -170,9 +170,9 @@ static RefPtr<WebImage> imageForRect(Fra > > auto paintBehavior = frameView->paintBehavior() | PaintBehavior::FlattenCompositingLayers | PaintBehavior::Snapshotting; > if (options & SnapshotOptionsForceBlackText) >- paintBehavior |= PaintBehavior::ForceBlackText; >+ paintBehavior.add(PaintBehavior::ForceBlackText); > if (options & SnapshotOptionsForceWhiteText) >- paintBehavior |= PaintBehavior::ForceWhiteText; >+ paintBehavior.add(PaintBehavior::ForceWhiteText); > > auto oldPaintBehavior = frameView->paintBehavior(); > frameView->setPaintBehavior(paintBehavior); >Index: Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp (revision 235539) >+++ Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp (working copy) >@@ -150,11 +150,12 @@ RefPtr<WebImage> InjectedBundleRangeHand > graphicsContext->translate(-paintRect.location()); > > OptionSet<PaintBehavior> oldPaintBehavior = frameView->paintBehavior(); >- OptionSet<PaintBehavior> paintBehavior = oldPaintBehavior | PaintBehavior::SelectionOnly | PaintBehavior::FlattenCompositingLayers | PaintBehavior::Snapshotting; >+ OptionSet<PaintBehavior> paintBehavior = oldPaintBehavior; >+ paintBehavior.add({ PaintBehavior::SelectionOnly, PaintBehavior::FlattenCompositingLayers, PaintBehavior::Snapshotting }); > if (options & SnapshotOptionsForceBlackText) >- paintBehavior |= PaintBehavior::ForceBlackText; >+ paintBehavior.add(PaintBehavior::ForceBlackText); > if (options & SnapshotOptionsForceWhiteText) >- paintBehavior |= PaintBehavior::ForceWhiteText; >+ paintBehavior.add(PaintBehavior::ForceWhiteText); > > frameView->setPaintBehavior(paintBehavior); > ownerDocument.updateLayout(); >Index: Source/WebKit/WebProcess/WebPage/FindController.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/FindController.cpp (revision 235539) >+++ Source/WebKit/WebProcess/WebPage/FindController.cpp (working copy) >@@ -56,15 +56,15 @@ WebCore::FindOptions core(FindOptions op > { > WebCore::FindOptions result; > if (options & FindOptionsCaseInsensitive) >- result |= WebCore::CaseInsensitive; >+ result.add(WebCore::CaseInsensitive); > if (options & FindOptionsAtWordStarts) >- result |= WebCore::AtWordStarts; >+ result.add(WebCore::AtWordStarts); > if (options & FindOptionsTreatMedialCapitalAsWordStart) >- result |= WebCore::TreatMedialCapitalAsWordStart; >+ result.add(WebCore::TreatMedialCapitalAsWordStart); > if (options & FindOptionsBackwards) >- result |= WebCore::Backwards; >+ result.add(WebCore::Backwards); > if (options & FindOptionsWrapAround) >- result |= WebCore::WrapAround; >+ result.add(WebCore::WrapAround); > return result; > } > >@@ -204,7 +204,7 @@ void FindController::findString(const St > // we need to avoid sending the non-painted selection change to the UI process > // so that it does not clear the selection out from under us. > #if PLATFORM(IOS) >- coreOptions |= DoNotRevealSelection; >+ coreOptions.add(DoNotRevealSelection); > #endif > > willFindString(); >Index: Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (revision 235539) >+++ Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (working copy) >@@ -156,7 +156,7 @@ void ThreadedCoordinatedLayerTreeHost::s > > m_viewportController.didScroll(rect.location()); > if (m_isDiscardable) >- m_discardableSyncActions |= DiscardableSyncActions::UpdateViewport; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateViewport); > else > didChangeViewport(); > } >@@ -165,7 +165,7 @@ void ThreadedCoordinatedLayerTreeHost::c > { > m_viewportController.didChangeContentsSize(newSize); > if (m_isDiscardable) >- m_discardableSyncActions |= DiscardableSyncActions::UpdateViewport; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateViewport); > else > didChangeViewport(); > } >@@ -173,7 +173,7 @@ void ThreadedCoordinatedLayerTreeHost::c > void ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged() > { > if (m_isDiscardable) { >- m_discardableSyncActions |= DiscardableSyncActions::UpdateScale; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateScale); > return; > } > >@@ -187,7 +187,7 @@ void ThreadedCoordinatedLayerTreeHost::d > void ThreadedCoordinatedLayerTreeHost::pageBackgroundTransparencyChanged() > { > if (m_isDiscardable) { >- m_discardableSyncActions |= DiscardableSyncActions::UpdateBackground; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateBackground); > return; > } > >@@ -198,7 +198,7 @@ void ThreadedCoordinatedLayerTreeHost::p > void ThreadedCoordinatedLayerTreeHost::sizeDidChange(const IntSize& size) > { > if (m_isDiscardable) { >- m_discardableSyncActions |= DiscardableSyncActions::UpdateSize; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateSize); > m_viewportController.didChangeViewportSize(size); > return; > } >@@ -218,7 +218,7 @@ void ThreadedCoordinatedLayerTreeHost::d > { > m_viewportController.didChangeViewportAttributes(WTFMove(attr)); > if (m_isDiscardable) >- m_discardableSyncActions |= DiscardableSyncActions::UpdateViewport; >+ m_discardableSyncActions.add(DiscardableSyncActions::UpdateViewport); > else > didChangeViewport(); > } >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 235539) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-31 Antti Koivisto <antti@apple.com> >+ >+ Replace OptionSet |= and -= operators with add() and remove() functions >+ https://bugs.webkit.org/show_bug.cgi?id=189169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebFrame.mm: >+ (-[WebFrame _drawRect:contentsOnly:]): >+ * WebView/WebView.mm: >+ (coreOptions): >+ > 2018-08-31 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >Index: Source/WebKitLegacy/mac/WebView/WebFrame.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebFrame.mm (revision 235539) >+++ Source/WebKitLegacy/mac/WebView/WebFrame.mm (working copy) >@@ -649,16 +649,16 @@ - (void)_drawRect:(NSRect)rect contentsO > // For subframes, we need to inherit the paint behavior from our parent > if (FrameView* parentView = parentFrame ? parentFrame->view() : nullptr) { > if (parentView->paintBehavior().contains(PaintBehavior::FlattenCompositingLayers)) >- paintBehavior |= PaintBehavior::FlattenCompositingLayers; >+ paintBehavior.add(PaintBehavior::FlattenCompositingLayers); > > if (parentView->paintBehavior().contains(PaintBehavior::Snapshotting)) >- paintBehavior |= PaintBehavior::Snapshotting; >+ paintBehavior.add(PaintBehavior::Snapshotting); > > if (parentView->paintBehavior().contains(PaintBehavior::TileFirstPaint)) >- paintBehavior |= PaintBehavior::TileFirstPaint; >+ paintBehavior.add(PaintBehavior::TileFirstPaint); > } > } else >- paintBehavior |= [self _paintBehaviorForDestinationContext:ctx]; >+ paintBehavior.add([self _paintBehaviorForDestinationContext:ctx]); > > view->setPaintBehavior(paintBehavior); > >Index: Source/WebKitLegacy/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebView.mm (revision 235539) >+++ Source/WebKitLegacy/mac/WebView/WebView.mm (working copy) >@@ -571,17 +571,17 @@ FindOptions coreOptions(WebFindOptions o > { > FindOptions findOptions; > if (options & WebFindOptionsCaseInsensitive) >- findOptions |= CaseInsensitive; >+ findOptions.add(CaseInsensitive); > if (options & WebFindOptionsAtWordStarts) >- findOptions |= AtWordStarts; >+ findOptions.add(AtWordStarts); > if (options & WebFindOptionsTreatMedialCapitalAsWordStart) >- findOptions |= TreatMedialCapitalAsWordStart; >+ findOptions.add(TreatMedialCapitalAsWordStart); > if (options & WebFindOptionsBackwards) >- findOptions |= Backwards; >+ findOptions.add(Backwards); > if (options & WebFindOptionsWrapAround) >- findOptions |= WrapAround; >+ findOptions.add(WrapAround); > if (options & WebFindOptionsStartInSelection) >- findOptions |= StartInSelection; >+ findOptions.add(StartInSelection); > return findOptions; > } > >Index: Source/WebKitLegacy/win/WebView.cpp >=================================================================== >--- Source/WebKitLegacy/win/WebView.cpp (revision 235539) >+++ Source/WebKitLegacy/win/WebView.cpp (working copy) >@@ -3832,11 +3832,11 @@ HRESULT WebView::searchFor(_In_ BSTR str > > FindOptions options; > if (!caseFlag) >- options |= CaseInsensitive; >+ options.add(CaseInsensitive); > if (!forward) >- options |= Backwards; >+ options.add(Backwards); > if (wrapFlag) >- options |= WrapAround; >+ options.add(WrapAround); > *found = m_page->findString(toString(str), options); > return S_OK; > } >@@ -3901,7 +3901,7 @@ HRESULT WebView::markAllMatchesForText(_ > > WebCore::FindOptions options; > if (!caseSensitive) >- options |= WebCore::CaseInsensitive; >+ options.add(WebCore::CaseInsensitive); > > *matches = m_page->markAllMatchesForText(toString(str), options, highlight, limit); > return S_OK; >@@ -7840,17 +7840,17 @@ HRESULT WebView::findString(_In_ BSTR st > WebCore::FindOptions coreOptions; > > if (options & WebFindOptionsCaseInsensitive) >- coreOptions |= WebCore::CaseInsensitive; >+ coreOptions.add(WebCore::CaseInsensitive); > if (options & WebFindOptionsAtWordStarts) >- coreOptions |= WebCore::AtWordStarts; >+ coreOptions.add(WebCore::AtWordStarts); > if (options & WebFindOptionsTreatMedialCapitalAsWordStart) >- coreOptions |= WebCore::TreatMedialCapitalAsWordStart; >+ coreOptions.add(WebCore::TreatMedialCapitalAsWordStart); > if (options & WebFindOptionsBackwards) >- coreOptions |= WebCore::Backwards; >+ coreOptions.add(WebCore::Backwards); > if (options & WebFindOptionsWrapAround) >- coreOptions |= WebCore::WrapAround; >+ coreOptions.add(WebCore::WrapAround); > if (options & WebFindOptionsStartInSelection) >- coreOptions |= WebCore::StartInSelection; >+ coreOptions.add(WebCore::StartInSelection); > > *found = m_page->findString(toString(string), coreOptions); > return S_OK; >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 235539) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2018-08-31 Antti Koivisto <antti@apple.com> >+ >+ Replace OptionSet |= and -= operators with add() and remove() functions >+ https://bugs.webkit.org/show_bug.cgi?id=189169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/OptionSet.cpp: >+ (TestWebKitAPI::TEST): >+ > 2018-08-31 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >Index: Tools/TestWebKitAPI/Tests/WTF/OptionSet.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WTF/OptionSet.cpp (revision 235539) >+++ Tools/TestWebKitAPI/Tests/WTF/OptionSet.cpp (working copy) >@@ -96,16 +96,29 @@ TEST(WTF_OptionSet, Minus) > EXPECT_TRUE((set - set).isEmpty()); > } > >-TEST(WTF_OptionSet, MinusEqual) >+TEST(WTF_OptionSet, AddAndRemove) > { >- OptionSet<ExampleFlags> set { ExampleFlags::A, ExampleFlags::B, ExampleFlags::C }; >+ OptionSet<ExampleFlags> set; > >- EXPECT_TRUE(((set -= ExampleFlags::A) == OptionSet<ExampleFlags> { ExampleFlags::B, ExampleFlags::C })); >- EXPECT_TRUE((set == OptionSet<ExampleFlags> { ExampleFlags::B, ExampleFlags::C })); >- EXPECT_TRUE(((set -= ExampleFlags::D) == OptionSet<ExampleFlags> { ExampleFlags::B, ExampleFlags::C })); >- EXPECT_TRUE((set == OptionSet<ExampleFlags> { ExampleFlags::B, ExampleFlags::C })); >- EXPECT_TRUE((set -= set).isEmpty()); >- EXPECT_TRUE(set.isEmpty()); >+ set.add(ExampleFlags::A); >+ EXPECT_TRUE(set.contains(ExampleFlags::A)); >+ EXPECT_FALSE(set.contains(ExampleFlags::B)); >+ EXPECT_FALSE(set.contains(ExampleFlags::C)); >+ >+ set.add({ ExampleFlags::B, ExampleFlags::C }); >+ EXPECT_TRUE(set.contains(ExampleFlags::A)); >+ EXPECT_TRUE(set.contains(ExampleFlags::B)); >+ EXPECT_TRUE(set.contains(ExampleFlags::C)); >+ >+ set.remove(ExampleFlags::B); >+ EXPECT_TRUE(set.contains(ExampleFlags::A)); >+ EXPECT_FALSE(set.contains(ExampleFlags::B)); >+ EXPECT_TRUE(set.contains(ExampleFlags::C)); >+ >+ set.remove({ ExampleFlags::A, ExampleFlags::C }); >+ EXPECT_FALSE(set.contains(ExampleFlags::A)); >+ EXPECT_FALSE(set.contains(ExampleFlags::B)); >+ EXPECT_FALSE(set.contains(ExampleFlags::C)); > } > > TEST(WTF_OptionSet, ContainsTwoFlags) >@@ -141,15 +154,6 @@ TEST(WTF_OptionSet, ContainsTwoFlags3) > EXPECT_FALSE(set.contains(ExampleFlags::C)); > } > >-TEST(WTF_OptionSet, OperatorBitwiseOr) >-{ >- OptionSet<ExampleFlags> set = ExampleFlags::A; >- set |= ExampleFlags::C; >- EXPECT_TRUE(set.contains(ExampleFlags::A)); >- EXPECT_FALSE(set.contains(ExampleFlags::B)); >- EXPECT_TRUE(set.contains(ExampleFlags::C)); >-} >- > TEST(WTF_OptionSet, EmptyOptionSetToRawValueToOptionSet) > { > OptionSet<ExampleFlags> set; >@@ -302,10 +306,10 @@ TEST(WTF_OptionSet, NextItemAfterLargest > TEST(WTF_OptionSet, IterationOrderTheSameRegardlessOfInsertionOrder) > { > OptionSet<ExampleFlags> set1 = ExampleFlags::C; >- set1 |= ExampleFlags::A; >+ set1.add(ExampleFlags::A); > > OptionSet<ExampleFlags> set2 = ExampleFlags::A; >- set2 |= ExampleFlags::C; >+ set2.add(ExampleFlags::C); > > OptionSet<ExampleFlags>::iterator it1 = set1.begin(); > OptionSet<ExampleFlags>::iterator it2 = set2.begin();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189169
:
348548
|
348618
|
348620
|
348622
|
348626
|
348628
|
348630
| 348633