WebKit Bugzilla
Attachment 347352 Details for
Bug 188692
: Replace canBubble and cancelable booleans in Event by enum classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
GTK build fix attempt
bug-188692-20180816231123.patch (text/plain), 190.80 KB, created by
Ryosuke Niwa
on 2018-08-16 23:11:24 PDT
(
hide
)
Description:
GTK build fix attempt
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2018-08-16 23:11:24 PDT
Size:
190.80 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234910) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,374 @@ >+2018-08-16 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Replace canBubble and cancelable booleans in Event by enum classes >+ https://bugs.webkit.org/show_bug.cgi?id=188692 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Replaced booleans indicating whether an event can bubble and an event is cancelable >+ by two enum classes: CanBubble and IsCancelable. >+ >+ No new tests since there should be no behavioral changes. >+ >+ * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: >+ (WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent): >+ * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp: >+ (WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent): >+ * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp: >+ (WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent): >+ * Modules/applepay/ApplePaySession.cpp: >+ (WebCore::ApplePaySession::didCancelPaymentSession): >+ * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp: >+ (WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent): >+ * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp: >+ (WebCore::ApplePayShippingMethodSelectedEvent::ApplePayShippingMethodSelectedEvent): >+ * Modules/applepay/ApplePayValidateMerchantEvent.cpp: >+ (WebCore::ApplePayValidateMerchantEvent::ApplePayValidateMerchantEvent): >+ * Modules/encryptedmedia/MediaKeySession.cpp: >+ (WebCore::MediaKeySession::updateKeyStatuses): >+ * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: >+ (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent): >+ * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: >+ (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent): >+ * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: >+ (WebCore::WebKitMediaKeySession::addKeyTimerFired): >+ (WebCore::WebKitMediaKeySession::sendError): >+ * Modules/gamepad/GamepadEvent.cpp: >+ (WebCore::GamepadEvent::GamepadEvent): >+ * Modules/indexeddb/IDBDatabase.cpp: >+ (WebCore::IDBDatabase::connectionToServerLost): >+ * Modules/indexeddb/IDBOpenDBRequest.cpp: >+ (WebCore::IDBOpenDBRequest::onError): >+ (WebCore::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit): >+ (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion): >+ (WebCore::IDBOpenDBRequest::onSuccess): >+ * Modules/indexeddb/IDBRequest.cpp: >+ (WebCore::IDBRequest::onError): >+ (WebCore::IDBRequest::onSuccess): >+ * Modules/indexeddb/IDBRequestCompletionEvent.cpp: >+ (WebCore::IDBRequestCompletionEvent::IDBRequestCompletionEvent): >+ * Modules/indexeddb/IDBRequestCompletionEvent.h: >+ (WebCore::IDBRequestCompletionEvent::create): >+ * Modules/indexeddb/IDBTransaction.cpp: >+ (WebCore::IDBTransaction::fireOnComplete): >+ (WebCore::IDBTransaction::fireOnAbort): >+ * Modules/indexeddb/IDBVersionChangeEvent.cpp: >+ (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent): >+ * Modules/mediasession/MediaSession.cpp: >+ (WebCore::MediaSession::skipToNextTrack): >+ (WebCore::MediaSession::skipToPreviousTrack): >+ * Modules/mediasource/MediaSource.cpp: >+ (WebCore::MediaSource::scheduleEvent): >+ * Modules/mediasource/SourceBuffer.cpp: >+ (WebCore::SourceBuffer::scheduleEvent): >+ * Modules/mediasource/SourceBufferList.cpp: >+ (WebCore::SourceBufferList::scheduleEvent): >+ * Modules/mediastream/MediaDevices.cpp: >+ (WebCore::MediaDevices::scheduledEventTimerFired): >+ * Modules/mediastream/MediaStream.cpp: >+ (WebCore::MediaStream::internalAddTrack): >+ (WebCore::MediaStream::internalRemoveTrack): >+ * Modules/mediastream/MediaStreamEvent.cpp: >+ (WebCore::MediaStreamEvent::create): >+ (WebCore::MediaStreamEvent::MediaStreamEvent): >+ * Modules/mediastream/MediaStreamEvent.h: >+ * Modules/mediastream/MediaStreamTrack.cpp: >+ (WebCore::MediaStreamTrack::trackEnded): >+ (WebCore::MediaStreamTrack::trackMutedChanged): >+ * Modules/mediastream/MediaStreamTrackEvent.cpp: >+ (WebCore::MediaStreamTrackEvent::create): >+ (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): >+ * Modules/mediastream/MediaStreamTrackEvent.h: >+ * Modules/mediastream/OverconstrainedErrorEvent.h: >+ (WebCore::OverconstrainedErrorEvent::create): >+ (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): >+ * Modules/mediastream/PeerConnectionBackend.cpp: >+ (WebCore::PeerConnectionBackend::fireICECandidateEvent): >+ (WebCore::PeerConnectionBackend::doneGatheringCandidates): >+ (WebCore::PeerConnectionBackend::updateSignalingState): >+ * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: >+ (WebCore::RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent): >+ * Modules/mediastream/RTCDataChannel.cpp: >+ (WebCore::RTCDataChannel::didChangeReadyState): >+ (WebCore::RTCDataChannel::didDetectError): >+ (WebCore::RTCDataChannel::bufferedAmountIsDecreasing): >+ * Modules/mediastream/RTCDataChannelEvent.cpp: >+ (WebCore::RTCDataChannelEvent::create): >+ (WebCore::RTCDataChannelEvent::RTCDataChannelEvent): >+ * Modules/mediastream/RTCDataChannelEvent.h: >+ * Modules/mediastream/RTCPeerConnection.cpp: >+ (WebCore::RTCPeerConnection::updateIceGatheringState): >+ (WebCore::RTCPeerConnection::updateIceConnectionState): >+ (WebCore::RTCPeerConnection::updateConnectionState): >+ (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent): >+ * Modules/mediastream/RTCPeerConnectionIceEvent.cpp: >+ (WebCore::RTCPeerConnectionIceEvent::create): >+ (WebCore::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent): >+ * Modules/mediastream/RTCPeerConnectionIceEvent.h: >+ * Modules/mediastream/RTCTrackEvent.cpp: >+ (WebCore::RTCTrackEvent::create): >+ (WebCore::RTCTrackEvent::RTCTrackEvent): >+ * Modules/mediastream/RTCTrackEvent.h: >+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: >+ (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): >+ (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): >+ (WebCore::LibWebRTCMediaEndpoint::addDataChannel): >+ * Modules/notifications/Notification.cpp: >+ (WebCore::Notification::dispatchShowEvent): >+ (WebCore::Notification::dispatchClickEvent): >+ (WebCore::Notification::dispatchCloseEvent): >+ (WebCore::Notification::dispatchErrorEvent): >+ * Modules/paymentrequest/MerchantValidationEvent.cpp: >+ (WebCore::MerchantValidationEvent::MerchantValidationEvent): >+ * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp: >+ (WebCore::PaymentRequestUpdateEvent::PaymentRequestUpdateEvent): >+ * Modules/plugins/QuickTimePluginReplacement.mm: >+ (WebCore::QuickTimePluginReplacement::postEvent): >+ * Modules/speech/SpeechSynthesisEvent.cpp: >+ (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent): >+ * Modules/webaudio/AudioContext.cpp: >+ (WebCore::AudioContext::setState): >+ * Modules/webaudio/AudioProcessingEvent.cpp: >+ (WebCore::AudioProcessingEvent::AudioProcessingEvent): >+ * Modules/webaudio/AudioScheduledSourceNode.cpp: >+ (WebCore::AudioScheduledSourceNode::finish): >+ * Modules/webaudio/OfflineAudioCompletionEvent.cpp: >+ (WebCore::OfflineAudioCompletionEvent::OfflineAudioCompletionEvent): >+ * Modules/websockets/CloseEvent.h: >+ (WebCore::CloseEvent::CloseEvent): >+ * Modules/websockets/WebSocket.cpp: >+ (WebCore::WebSocket::didConnect): >+ (WebCore::WebSocket::dispatchOrQueueErrorEvent): >+ * Modules/webvr/VRDisplayEvent.cpp: >+ (WebCore::VRDisplayEvent::VRDisplayEvent): >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const): >+ * accessibility/AccessibleSetValueEvent.cpp: >+ (WebCore::AccessibleSetValueEvent::AccessibleSetValueEvent): >+ * animation/AnimationPlaybackEvent.cpp: >+ (WebCore::AnimationPlaybackEvent::AnimationPlaybackEvent): >+ * dom/AbortSignal.cpp: >+ (WebCore::AbortSignal::abort): >+ * dom/AnimationEvent.cpp: >+ (WebCore::AnimationEvent::AnimationEvent): >+ * dom/BeforeLoadEvent.h: >+ * dom/BeforeTextInsertedEvent.cpp: >+ (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): >+ * dom/BeforeUnloadEvent.cpp: >+ (WebCore::BeforeUnloadEvent::BeforeUnloadEvent): >+ * dom/CharacterData.cpp: >+ (WebCore::CharacterData::dispatchModifiedEvent): >+ * dom/CompositionEvent.cpp: >+ (WebCore::CompositionEvent::CompositionEvent): >+ * dom/ContainerNode.cpp: >+ (WebCore::dispatchChildInsertionEvents): >+ (WebCore::dispatchChildRemovalEvents): >+ * dom/DeviceMotionEvent.cpp: >+ (WebCore::DeviceMotionEvent::DeviceMotionEvent): >+ * dom/DeviceOrientationEvent.cpp: >+ (WebCore::DeviceOrientationEvent::DeviceOrientationEvent): >+ * dom/Document.cpp: >+ (WebCore::Document::setReadyState): >+ (WebCore::Document::visibilityStateChanged): >+ (WebCore::Document::finishedParsing): >+ (WebCore::Document::dispatchFullScreenChangeOrErrorEvent): >+ (WebCore::Document::orientationChanged): >+ * dom/DocumentEventQueue.cpp: >+ (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): >+ (WebCore::DocumentEventQueue::enqueueScrollEvent): >+ (WebCore::DocumentEventQueue::enqueueResizeEvent): >+ * dom/DocumentEventQueue.h: >+ * dom/Element.cpp: >+ (WebCore::Element::dispatchMouseEvent): >+ (WebCore::Element::dispatchFocusInEvent): >+ (WebCore::Element::dispatchFocusOutEvent): >+ (WebCore::Element::dispatchFocusEvent): >+ (WebCore::Element::dispatchBlurEvent): >+ (WebCore::Element::dispatchWebKitImageReadyEventForTesting): >+ * dom/ErrorEvent.cpp: >+ (WebCore::ErrorEvent::ErrorEvent): >+ * dom/Event.cpp: >+ (WebCore::Event::Event): >+ (WebCore::Event::create): >+ * dom/Event.h: >+ * dom/FocusEvent.cpp: >+ (WebCore::FocusEvent::FocusEvent): >+ * dom/FocusEvent.h: >+ * dom/HashChangeEvent.h: >+ * dom/InputEvent.cpp: >+ (WebCore::InputEvent::create): >+ (WebCore::InputEvent::InputEvent): >+ * dom/InputEvent.h: >+ * dom/KeyboardEvent.cpp: >+ (WebCore::KeyboardEvent::KeyboardEvent): >+ * dom/MessageEvent.cpp: >+ (WebCore::MessageEvent::MessageEvent): >+ * dom/MouseEvent.cpp: >+ (WebCore::MouseEvent::create): >+ (WebCore::MouseEvent::MouseEvent): >+ * dom/MouseEvent.h: >+ * dom/MouseRelatedEvent.cpp: >+ (WebCore::MouseRelatedEvent::MouseRelatedEvent): >+ * dom/MouseRelatedEvent.h: >+ * dom/MutationEvent.cpp: >+ (WebCore::MutationEvent::MutationEvent): >+ * dom/MutationEvent.h: >+ * dom/Node.cpp: >+ (WebCore::Node::dispatchSubtreeModifiedEvent): >+ (WebCore::Node::dispatchDOMActivateEvent): >+ (WebCore::Node::dispatchInputEvent): >+ * dom/OverflowEvent.cpp: >+ (WebCore::OverflowEvent::OverflowEvent): >+ * dom/PageTransitionEvent.cpp: >+ (WebCore::PageTransitionEvent::PageTransitionEvent): >+ * dom/PopStateEvent.cpp: >+ (WebCore::PopStateEvent::PopStateEvent): >+ * dom/ProgressEvent.cpp: >+ (WebCore::ProgressEvent::ProgressEvent): >+ * dom/ScriptElement.cpp: >+ (WebCore::ScriptElement::dispatchErrorEvent): >+ * dom/SecurityPolicyViolationEvent.h: >+ * dom/SimulatedClick.cpp: >+ * dom/TextEvent.cpp: >+ (WebCore::TextEvent::TextEvent): >+ * dom/TransitionEvent.cpp: >+ (WebCore::TransitionEvent::TransitionEvent): >+ * dom/UIEvent.cpp: >+ (WebCore::UIEvent::UIEvent): >+ * dom/UIEvent.h: >+ (WebCore::UIEvent::create): >+ * dom/UIEventWithKeyState.h: >+ (WebCore::UIEventWithKeyState::UIEventWithKeyState): >+ * dom/WebKitAnimationEvent.cpp: >+ (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): >+ * dom/WebKitTransitionEvent.cpp: >+ (WebCore::WebKitTransitionEvent::WebKitTransitionEvent): >+ * dom/WheelEvent.cpp: >+ (WebCore::WheelEvent::WheelEvent): >+ * editing/Editor.cpp: >+ (WebCore::dispatchBeforeInputEvent): >+ (WebCore::dispatchBeforeInputEvents): >+ (WebCore::Editor::willApplyEditing const): >+ * editing/FrameSelection.cpp: >+ (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): >+ (WebCore::FrameSelection::selectAll): >+ (WebCore::FrameSelection::dispatchSelectStart): >+ * html/HTMLDetailsElement.cpp: >+ (WebCore::HTMLDetailsElement::dispatchPendingEvent): >+ * html/HTMLFormControlElement.cpp: >+ (WebCore::HTMLFormControlElement::dispatchChangeEvent): >+ (WebCore::HTMLFormControlElement::checkValidity): >+ * html/HTMLFormElement.cpp: >+ (WebCore::HTMLFormElement::prepareForSubmission): >+ (WebCore::HTMLFormElement::reset): >+ * html/HTMLImageLoader.cpp: >+ (WebCore::HTMLImageLoader::dispatchLoadEvent): >+ * html/HTMLInputElement.cpp: >+ (WebCore::HTMLInputElement::onSearch): >+ * html/HTMLLinkElement.cpp: >+ (WebCore::HTMLLinkElement::dispatchPendingEvent): >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::scheduleEvent): >+ (WebCore::HTMLMediaElement::notifyAboutPlaying): >+ (WebCore::HTMLMediaElement::updateActiveTextTrackCues): >+ (WebCore::HTMLMediaElement::layoutSizeChanged): >+ * html/HTMLPlugInImageElement.cpp: >+ (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): >+ * html/HTMLScriptElement.cpp: >+ (WebCore::HTMLScriptElement::dispatchLoadEvent): >+ * html/HTMLSlotElement.cpp: >+ (WebCore::HTMLSlotElement::dispatchSlotChangeEvent): >+ * html/HTMLSourceElement.cpp: >+ (WebCore::HTMLSourceElement::errorEventTimerFired): >+ * html/HTMLStyleElement.cpp: >+ (WebCore::HTMLStyleElement::dispatchPendingEvent): >+ * html/HTMLTextFormControlElement.cpp: >+ (WebCore::HTMLTextFormControlElement::selectionChanged): >+ * html/HTMLTrackElement.cpp: >+ (WebCore::HTMLTrackElement::didCompleteLoad): >+ * html/MediaController.cpp: >+ (WebCore::MediaController::scheduleEvent): >+ * html/canvas/WebGLContextEvent.cpp: >+ (WebCore::WebGLContextEvent::WebGLContextEvent): >+ * html/canvas/WebGLContextEvent.h: >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::WebGLRenderingContextBase::create): >+ (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent): >+ (WebCore::WebGLRenderingContextBase::maybeRestoreContext): >+ (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent): >+ * html/parser/HTMLScriptRunner.cpp: >+ (WebCore::createScriptLoadEvent): >+ * html/track/TrackEvent.cpp: >+ (WebCore::TrackEvent::TrackEvent): >+ * html/track/TrackEvent.h: >+ * html/track/TrackListBase.cpp: >+ (WebCore::TrackListBase::scheduleTrackEvent): >+ (WebCore::TrackListBase::scheduleChangeEvent): >+ * loader/DocumentLoader.cpp: >+ (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied): >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::dispatchUnloadEvents): >+ * loader/ImageLoader.cpp: >+ (WebCore::ImageLoader::dispatchPendingErrorEvent): >+ * loader/PolicyChecker.cpp: >+ (WebCore::PolicyChecker::checkNavigationPolicy): >+ * loader/appcache/ApplicationCacheHost.cpp: >+ (WebCore::createApplicationCacheEvent): >+ * page/DOMWindow.cpp: >+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): >+ (WebCore::DOMWindow::languagesChanged): >+ (WebCore::DOMWindow::dispatchLoadEvent): >+ * page/EventHandler.cpp: >+ (WebCore::dispatchSelectStart): >+ (WebCore::EventHandler::dispatchDragEvent): >+ * page/EventSource.cpp: >+ (WebCore::EventSource::scheduleReconnect): >+ (WebCore::EventSource::didReceiveResponse): >+ (WebCore::EventSource::abortConnectionAttempt): >+ * page/FocusController.cpp: >+ (WebCore::dispatchEventsOnWindowAndFocusedElement): >+ (WebCore::FocusController::setFocusedFrame): >+ * page/FrameView.cpp: >+ (WebCore::FrameView::sendResizeEventIfNeeded): >+ * page/Page.cpp: >+ (WebCore::networkStateChanged): >+ * page/Performance.cpp: >+ (WebCore::Performance::resourceTimingBufferFullTimerFired): >+ * page/PointerLockController.cpp: >+ (WebCore::PointerLockController::enqueueEvent): >+ * page/VisualViewport.cpp: >+ (WebCore::VisualViewport::enqueueResizeEvent): >+ (WebCore::VisualViewport::enqueueScrollEvent): >+ * storage/StorageEvent.cpp: >+ (WebCore::StorageEvent::StorageEvent): >+ * svg/SVGElement.cpp: >+ (WebCore::SVGElement::sendSVGLoadEventIfPossible): >+ * svg/SVGImageLoader.cpp: >+ (WebCore::SVGImageLoader::dispatchLoadEvent): >+ * svg/SVGUseElement.cpp: >+ (WebCore::SVGUseElement::notifyFinished): >+ * svg/animation/SVGSMILElement.cpp: >+ (WebCore::SVGSMILElement::dispatchPendingEvent): >+ * workers/Worker.cpp: >+ (WebCore::Worker::notifyFinished): >+ * workers/WorkerMessagingProxy.cpp: >+ (WebCore::WorkerMessagingProxy::notifyNetworkStateChange): >+ * workers/service/ExtendableEvent.cpp: >+ (WebCore::ExtendableEvent::ExtendableEvent): >+ * workers/service/ExtendableEvent.h: >+ * workers/service/ExtendableMessageEvent.cpp: >+ (WebCore::ExtendableMessageEvent::ExtendableMessageEvent): >+ * workers/service/ServiceWorker.cpp: >+ (WebCore::ServiceWorker::scheduleTaskToUpdateState): >+ * workers/service/ServiceWorkerContainer.cpp: >+ (WebCore::ServiceWorkerContainer::scheduleTaskToFireControllerChangeEvent): >+ * workers/service/ServiceWorkerRegistration.cpp: >+ (WebCore::ServiceWorkerRegistration::scheduleTaskToFireUpdateFoundEvent): >+ * workers/service/context/ServiceWorkerThreadProxy.cpp: >+ (WebCore::ServiceWorkerThreadProxy::notifyNetworkStateChange): >+ * xml/XMLHttpRequest.cpp: >+ (WebCore::XMLHttpRequest::callReadyStateChangeListener): >+ > 2018-08-15 Ben Richards <benton_richards@apple.com> > > We should cache the compiled sandbox profile in a data vault >Index: Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp >=================================================================== >--- Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp (working copy) >@@ -41,7 +41,7 @@ static const AtomicString& stringForPlay > } > > WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, bool available) >- : Event(eventType, false, false) >+ : Event(eventType, CanBubble::No, IsCancelable::No) > , m_availability(stringForPlaybackTargetAvailability(available)) > { > } >Index: Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > namespace WebCore { > > ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent(const AtomicString& type, unsigned version, const Payment& payment) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_payment(payment.toApplePayPayment(version)) > { > } >Index: Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > namespace WebCore { > > ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent(const AtomicString& type, const PaymentMethod& paymentMethod) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_paymentMethod(paymentMethod.toApplePayPaymentMethod()) > { > } >Index: Source/WebCore/Modules/applepay/ApplePaySession.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePaySession.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePaySession.cpp (working copy) >@@ -840,7 +840,7 @@ void ApplePaySession::didCancelPaymentSe > > m_state = State::Canceled; > >- auto event = Event::create(eventNames().cancelEvent, false, false); >+ auto event = Event::create(eventNames().cancelEvent, Event::CanBubble::No, Event::IsCancelable::No); > dispatchEvent(event.get()); > > didReachFinalState(); >Index: Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePayShippingContactSelectedEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > namespace WebCore { > > ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent(const AtomicString& type, unsigned version, const PaymentContact& shippingContact) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_shippingContact(shippingContact.toApplePayPaymentContact(version)) > { > } >Index: Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp (working copy) >@@ -44,7 +44,7 @@ static inline ApplePayShippingMethod con > } > > ApplePayShippingMethodSelectedEvent::ApplePayShippingMethodSelectedEvent(const AtomicString& type, const ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_shippingMethod(convert(shippingMethod)) > { > } >Index: Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.cpp >=================================================================== >--- Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.cpp (working copy) >@@ -31,7 +31,7 @@ > namespace WebCore { > > ApplePayValidateMerchantEvent::ApplePayValidateMerchantEvent(const AtomicString& type, const URL& validationURL) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_validationURL(validationURL) > { > } >Index: Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >=================================================================== >--- Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (revision 234910) >+++ Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (working copy) >@@ -641,7 +641,7 @@ void MediaKeySession::updateKeyStatuses( > m_statuses.uncheckedAppend({ WTFMove(status.first), toMediaKeyStatus(status.second) }); > > // 5. Queue a task to fire a simple event named keystatuseschange at the session. >- m_eventQueue.enqueueEvent(Event::create(eventNames().keystatuseschangeEvent, false, false)); >+ m_eventQueue.enqueueEvent(Event::create(eventNames().keystatuseschangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > // 6. Queue a task to run the Attempt to Resume Playback If Necessary algorithm on each of the media element(s) whose mediaKeys attribute is the MediaKeys object that created the session. > m_taskQueue.enqueueTask( >Index: Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp >=================================================================== >--- Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > namespace WebCore { > > WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent(const AtomicString& type, Uint8Array* message, const String& destinationURL) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_message(message) > , m_destinationURL(destinationURL) > { >Index: Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp >=================================================================== >--- Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > namespace WebCore { > > WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent(const AtomicString& type, Uint8Array* initData) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_initData(initData) > { > } >Index: Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp >=================================================================== >--- Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp (revision 234910) >+++ Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp (working copy) >@@ -179,7 +179,7 @@ void WebKitMediaKeySession::addKeyTimerF > > // 2.7. If did store key is true, queue a task to fire a simple event named keyadded at the MediaKeySession object. > if (didStoreKey) { >- auto keyaddedEvent = Event::create(eventNames().webkitkeyaddedEvent, false, false); >+ auto keyaddedEvent = Event::create(eventNames().webkitkeyaddedEvent, Event::CanBubble::No, Event::IsCancelable::No); > keyaddedEvent->setTarget(this); > m_asyncEventQueue.enqueueEvent(WTFMove(keyaddedEvent)); > >@@ -212,7 +212,7 @@ void WebKitMediaKeySession::sendError(Me > { > m_error = WebKitMediaKeyError::create(errorCode, systemCode); > >- auto keyerrorEvent = Event::create(eventNames().webkitkeyerrorEvent, false, false); >+ auto keyerrorEvent = Event::create(eventNames().webkitkeyerrorEvent, Event::CanBubble::No, Event::IsCancelable::No); > keyerrorEvent->setTarget(this); > m_asyncEventQueue.enqueueEvent(WTFMove(keyerrorEvent)); > } >Index: Source/WebCore/Modules/gamepad/GamepadEvent.cpp >=================================================================== >--- Source/WebCore/Modules/gamepad/GamepadEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/gamepad/GamepadEvent.cpp (working copy) >@@ -30,7 +30,7 @@ > namespace WebCore { > > GamepadEvent::GamepadEvent(const AtomicString& eventType, Gamepad& gamepad) >- : Event(eventType, false, false) >+ : Event(eventType, CanBubble::No, IsCancelable::No) > , m_gamepad(&gamepad) > { > } >Index: Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (working copy) >@@ -267,13 +267,13 @@ void IDBDatabase::connectionToServerLost > for (auto& transaction : m_activeTransactions.values()) > transaction->connectionClosedFromServer(error); > >- auto errorEvent = Event::create(m_eventNames.errorEvent, true, false); >+ auto errorEvent = Event::create(m_eventNames.errorEvent, Event::CanBubble::Yes, Event::IsCancelable::No); > errorEvent->setTarget(this); > > if (auto* context = scriptExecutionContext()) > context->eventQueue().enqueueEvent(WTFMove(errorEvent)); > >- auto closeEvent = Event::create(m_eventNames.closeEvent, true, false); >+ auto closeEvent = Event::create(m_eventNames.closeEvent, Event::CanBubble::Yes, Event::IsCancelable::No); > closeEvent->setTarget(this); > > if (auto* context = scriptExecutionContext()) >Index: Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (working copy) >@@ -71,7 +71,7 @@ void IDBOpenDBRequest::onError(const IDB > ASSERT(&originThread() == &Thread::current()); > > m_domError = data.error().toDOMException(); >- enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this)); >+ enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, *this)); > } > > void IDBOpenDBRequest::versionChangeTransactionDidFinish() >@@ -91,7 +91,7 @@ void IDBOpenDBRequest::fireSuccessAfterV > ASSERT(hasPendingActivity()); > m_transaction->addRequest(*this); > >- auto event = IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this); >+ auto event = IDBRequestCompletionEvent::create(eventNames().successEvent, Event::CanBubble::No, Event::IsCancelable::No, *this); > m_openDatabaseSuccessEvent = &event.get(); > > enqueueEvent(WTFMove(event)); >@@ -109,7 +109,7 @@ void IDBOpenDBRequest::fireErrorAfterVer > setResultToUndefined(); > > m_transaction->addRequest(*this); >- enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, true, true, *this)); >+ enqueueEvent(IDBRequestCompletionEvent::create(eventNames().errorEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, *this)); > } > > void IDBOpenDBRequest::cancelForStop() >@@ -138,7 +138,7 @@ void IDBOpenDBRequest::onSuccess(const I > setResult(IDBDatabase::create(*scriptExecutionContext(), connectionProxy(), resultData)); > m_readyState = ReadyState::Done; > >- enqueueEvent(IDBRequestCompletionEvent::create(eventNames().successEvent, false, false, *this)); >+ enqueueEvent(IDBRequestCompletionEvent::create(eventNames().successEvent, Event::CanBubble::No, Event::IsCancelable::No, *this)); > } > > void IDBOpenDBRequest::onUpgradeNeeded(const IDBResultData& resultData) >Index: Source/WebCore/Modules/indexeddb/IDBRequest.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBRequest.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBRequest.cpp (working copy) >@@ -528,15 +528,14 @@ void IDBRequest::onError() > ASSERT(!m_idbError.isNull()); > > m_domError = m_idbError.toDOMException(); >- enqueueEvent(Event::create(eventNames().errorEvent, true, true)); >+ enqueueEvent(Event::create(eventNames().errorEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes)); > } > > void IDBRequest::onSuccess() > { > LOG(IndexedDB, "IDBRequest::onSuccess"); > ASSERT(&originThread() == &Thread::current()); >- >- enqueueEvent(Event::create(eventNames().successEvent, false, false)); >+ enqueueEvent(Event::create(eventNames().successEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void IDBRequest::setResult(Ref<IDBDatabase>&& database) >Index: Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.cpp (working copy) >@@ -30,7 +30,7 @@ > > namespace WebCore { > >-IDBRequestCompletionEvent::IDBRequestCompletionEvent(const AtomicString& type, bool canBubble, bool cancelable, IDBRequest& request) >+IDBRequestCompletionEvent::IDBRequestCompletionEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, IDBRequest& request) > : Event(type, canBubble, cancelable) > , m_request(request) > { >Index: Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBRequestCompletionEvent.h (working copy) >@@ -34,13 +34,13 @@ namespace WebCore { > > class IDBRequestCompletionEvent : public Event { > public: >- static Ref<Event> create(const AtomicString& type, bool canBubble, bool cancelable, IDBRequest& request) >+ static Ref<Event> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, IDBRequest& request) > { > return adoptRef(*new IDBRequestCompletionEvent(type, canBubble, cancelable, request)); > } > > private: >- IDBRequestCompletionEvent(const AtomicString& type, bool canBubble, bool cancelable, IDBRequest&); >+ IDBRequestCompletionEvent(const AtomicString& type, CanBubble, IsCancelable, IDBRequest&); > > Ref<IDBRequest> m_request; > }; >Index: Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (working copy) >@@ -591,14 +591,14 @@ void IDBTransaction::fireOnComplete() > { > LOG(IndexedDB, "IDBTransaction::fireOnComplete"); > ASSERT(&m_database->originThread() == &Thread::current()); >- enqueueEvent(Event::create(eventNames().completeEvent, false, false)); >+ enqueueEvent(Event::create(eventNames().completeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void IDBTransaction::fireOnAbort() > { > LOG(IndexedDB, "IDBTransaction::fireOnAbort"); > ASSERT(&m_database->originThread() == &Thread::current()); >- enqueueEvent(Event::create(eventNames().abortEvent, true, false)); >+ enqueueEvent(Event::create(eventNames().abortEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void IDBTransaction::enqueueEvent(Ref<Event>&& event) >Index: Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp >=================================================================== >--- Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp (working copy) >@@ -31,7 +31,7 @@ > namespace WebCore { > > IDBVersionChangeEvent::IDBVersionChangeEvent(const IDBResourceIdentifier& requestIdentifier, uint64_t oldVersion, uint64_t newVersion, const AtomicString& name) >- : Event(name, false /*canBubble*/, false /*cancelable*/) >+ : Event(name, CanBubble::No, IsCancelable::No) > , m_requestIdentifier(requestIdentifier) > , m_oldVersion(oldVersion) > { >Index: Source/WebCore/Modules/mediasession/MediaSession.cpp >=================================================================== >--- Source/WebCore/Modules/mediasession/MediaSession.cpp (revision 234910) >+++ Source/WebCore/Modules/mediasession/MediaSession.cpp (working copy) >@@ -253,13 +253,13 @@ void MediaSession::safelyIterateActiveMe > void MediaSession::skipToNextTrack() > { > if (m_controls && m_controls->nextTrackEnabled()) >- m_controls->dispatchEvent(Event::create(eventNames().nexttrackEvent, false, false)); >+ m_controls->dispatchEvent(Event::create(eventNames().nexttrackEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void MediaSession::skipToPreviousTrack() > { > if (m_controls && m_controls->previousTrackEnabled()) >- m_controls->dispatchEvent(Event::create(eventNames().previoustrackEvent, false, false)); >+ m_controls->dispatchEvent(Event::create(eventNames().previoustrackEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void MediaSession::controlIsEnabledDidChange() >Index: Source/WebCore/Modules/mediasource/MediaSource.cpp >=================================================================== >--- Source/WebCore/Modules/mediasource/MediaSource.cpp (revision 234910) >+++ Source/WebCore/Modules/mediasource/MediaSource.cpp (working copy) >@@ -1025,7 +1025,7 @@ ExceptionOr<Ref<SourceBufferPrivate>> Me > > void MediaSource::scheduleEvent(const AtomicString& eventName) > { >- auto event = Event::create(eventName, false, false); >+ auto event = Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::No); > event->setTarget(this); > > m_asyncEventQueue.enqueueEvent(WTFMove(event)); >Index: Source/WebCore/Modules/mediasource/SourceBuffer.cpp >=================================================================== >--- Source/WebCore/Modules/mediasource/SourceBuffer.cpp (revision 234910) >+++ Source/WebCore/Modules/mediasource/SourceBuffer.cpp (working copy) >@@ -501,7 +501,7 @@ bool SourceBuffer::isRemoved() const > > void SourceBuffer::scheduleEvent(const AtomicString& eventName) > { >- auto event = Event::create(eventName, false, false); >+ auto event = Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::No); > event->setTarget(this); > > m_asyncEventQueue.enqueueEvent(WTFMove(event)); >Index: Source/WebCore/Modules/mediasource/SourceBufferList.cpp >=================================================================== >--- Source/WebCore/Modules/mediasource/SourceBufferList.cpp (revision 234910) >+++ Source/WebCore/Modules/mediasource/SourceBufferList.cpp (working copy) >@@ -92,7 +92,7 @@ void SourceBufferList::swap(Vector<RefPt > > void SourceBufferList::scheduleEvent(const AtomicString& eventName) > { >- auto event = Event::create(eventName, false, false); >+ auto event = Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::No); > event->setTarget(this); > > m_asyncEventQueue.enqueueEvent(WTFMove(event)); >Index: Source/WebCore/Modules/mediastream/MediaDevices.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaDevices.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaDevices.cpp (working copy) >@@ -163,7 +163,7 @@ MediaTrackSupportedConstraints MediaDevi > void MediaDevices::scheduledEventTimerFired() > { > if (scriptExecutionContext()) >- dispatchEvent(Event::create(eventNames().devicechangeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().devicechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > bool MediaDevices::hasPendingActivity() const >Index: Source/WebCore/Modules/mediastream/MediaStream.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStream.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStream.cpp (working copy) >@@ -227,7 +227,7 @@ bool MediaStream::internalAddTrack(Ref<M > if (streamModifier == StreamModifier::DomAPI) > m_private->addTrack(&track.privateTrack(), MediaStreamPrivate::NotifyClientOption::DontNotify); > else >- dispatchEvent(MediaStreamTrackEvent::create(eventNames().addtrackEvent, false, false, &track)); >+ dispatchEvent(MediaStreamTrackEvent::create(eventNames().addtrackEvent, Event::CanBubble::No, Event::IsCancelable::No, &track)); > > return true; > } >@@ -245,7 +245,7 @@ bool MediaStream::internalRemoveTrack(co > if (streamModifier == StreamModifier::DomAPI) > m_private->removeTrack(track->privateTrack(), MediaStreamPrivate::NotifyClientOption::DontNotify); > else >- dispatchEvent(MediaStreamTrackEvent::create(eventNames().removetrackEvent, false, false, WTFMove(track))); >+ dispatchEvent(MediaStreamTrackEvent::create(eventNames().removetrackEvent, Event::CanBubble::No, Event::IsCancelable::No, WTFMove(track))); > > return true; > } >Index: Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp (working copy) >@@ -31,7 +31,7 @@ > > namespace WebCore { > >-Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&& stream) >+Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStream>&& stream) > { > return adoptRef(*new MediaStreamEvent(type, canBubble, cancelable, WTFMove(stream))); > } >@@ -41,7 +41,7 @@ Ref<MediaStreamEvent> MediaStreamEvent:: > return adoptRef(*new MediaStreamEvent(type, initializer, isTrusted)); > } > >-MediaStreamEvent::MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&& stream) >+MediaStreamEvent::MediaStreamEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStream>&& stream) > : Event(type, canBubble, cancelable) > , m_stream(WTFMove(stream)) > { >Index: Source/WebCore/Modules/mediastream/MediaStreamEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStreamEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStreamEvent.h (working copy) >@@ -36,7 +36,7 @@ class MediaStreamEvent : public Event { > public: > virtual ~MediaStreamEvent(); > >- static Ref<MediaStreamEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&&); >+ static Ref<MediaStreamEvent> create(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStream>&&); > > struct Init : EventInit { > RefPtr<MediaStream> stream; >@@ -48,7 +48,7 @@ public: > virtual EventInterface eventInterface() const; > > private: >- MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&&); >+ MediaStreamEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStream>&&); > MediaStreamEvent(const AtomicString& type, const Init&, IsTrusted); > > RefPtr<MediaStream> m_stream; >Index: Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (working copy) >@@ -365,7 +365,7 @@ void MediaStreamTrack::trackEnded(MediaS > > // 3. Notify track's source that track is ended so that the source may be stopped, unless other MediaStreamTrack objects depend on it. > // 4. Fire a simple event named ended at the object. >- dispatchEvent(Event::create(eventNames().endedEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().endedEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > for (auto& observer : m_observers) > observer->trackDidEnd(); >@@ -379,7 +379,7 @@ void MediaStreamTrack::trackMutedChanged > return; > > AtomicString eventType = muted() ? eventNames().muteEvent : eventNames().unmuteEvent; >- dispatchEvent(Event::create(eventType, false, false)); >+ dispatchEvent(Event::create(eventType, Event::CanBubble::No, Event::IsCancelable::No)); > > configureTrackRendering(); > } >Index: Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp (working copy) >@@ -31,7 +31,7 @@ > > namespace WebCore { > >-Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&& track) >+Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStreamTrack>&& track) > { > return adoptRef(*new MediaStreamTrackEvent(type, canBubble, cancelable, WTFMove(track))); > } >@@ -41,7 +41,7 @@ Ref<MediaStreamTrackEvent> MediaStreamTr > return adoptRef(*new MediaStreamTrackEvent(type, initializer, isTrusted)); > } > >-MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&& track) >+MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<MediaStreamTrack>&& track) > : Event(type, canBubble, cancelable) > , m_track(WTFMove(track)) > { >Index: Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h (working copy) >@@ -37,7 +37,7 @@ class MediaStreamTrackEvent : public Eve > public: > virtual ~MediaStreamTrackEvent(); > >- static Ref<MediaStreamTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&&); >+ static Ref<MediaStreamTrackEvent> create(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStreamTrack>&&); > > struct Init : EventInit { > RefPtr<MediaStreamTrack> track; >@@ -50,7 +50,7 @@ public: > EventInterface eventInterface() const override; > > private: >- MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&&); >+ MediaStreamTrackEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<MediaStreamTrack>&&); > MediaStreamTrackEvent(const AtomicString& type, const Init&, IsTrusted); > > RefPtr<MediaStreamTrack> m_track; >Index: Source/WebCore/Modules/mediastream/OverconstrainedErrorEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/OverconstrainedErrorEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/OverconstrainedErrorEvent.h (working copy) >@@ -40,7 +40,7 @@ class OverconstrainedErrorEvent : public > public: > virtual ~OverconstrainedErrorEvent() = default; > >- static Ref<OverconstrainedErrorEvent> create(const AtomicString& type, bool canBubble, bool cancelable, OverconstrainedError* error) >+ static Ref<OverconstrainedErrorEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, OverconstrainedError* error) > { > return adoptRef(*new OverconstrainedErrorEvent(type, canBubble, cancelable, error)); > } >@@ -58,7 +58,7 @@ public: > EventInterface eventInterface() const override { return OverconstrainedErrorEventInterfaceType; } > > private: >- explicit OverconstrainedErrorEvent(const AtomicString& type, bool canBubble, bool cancelable, OverconstrainedError* error) >+ explicit OverconstrainedErrorEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, OverconstrainedError* error) > : Event(type, canBubble, cancelable) > , m_error(error) > { >Index: Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (working copy) >@@ -356,7 +356,7 @@ void PeerConnectionBackend::fireICECandi > { > ASSERT(isMainThread()); > >- m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, WTFMove(candidate), WTFMove(serverURL))); >+ m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(Event::CanBubble::No, Event::IsCancelable::No, WTFMove(candidate), WTFMove(serverURL))); > } > > void PeerConnectionBackend::enableICECandidateFiltering() >@@ -456,7 +456,7 @@ void PeerConnectionBackend::doneGatherin > if (m_waitingForMDNSRegistration) > return; > >- m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, nullptr, { })); >+ m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(Event::CanBubble::No, Event::IsCancelable::No, nullptr, { })); > m_peerConnection.updateIceGatheringState(RTCIceGatheringState::Complete); > m_pendingICECandidates.clear(); > } >@@ -505,7 +505,7 @@ void PeerConnectionBackend::updateSignal > > if (newSignalingState != m_peerConnection.signalingState()) { > m_peerConnection.setSignalingState(newSignalingState); >- m_peerConnection.fireEvent(Event::create(eventNames().signalingstatechangeEvent, false, false)); >+ m_peerConnection.fireEvent(Event::create(eventNames().signalingstatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > } > >Index: Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp (working copy) >@@ -43,7 +43,7 @@ Ref<RTCDTMFToneChangeEvent> RTCDTMFToneC > } > > RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent(const String& tone) >- : Event(eventNames().tonechangeEvent, false, false) >+ : Event(eventNames().tonechangeEvent, CanBubble::No, IsCancelable::No) > , m_tone(tone) > { > } >Index: Source/WebCore/Modules/mediastream/RTCDataChannel.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCDataChannel.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCDataChannel.cpp (working copy) >@@ -171,10 +171,10 @@ void RTCDataChannel::didChangeReadyState > > switch (m_readyState) { > case RTCDataChannelState::Open: >- scheduleDispatchEvent(Event::create(eventNames().openEvent, false, false)); >+ scheduleDispatchEvent(Event::create(eventNames().openEvent, Event::CanBubble::No, Event::IsCancelable::No)); > break; > case RTCDataChannelState::Closed: >- scheduleDispatchEvent(Event::create(eventNames().closeEvent, false, false)); >+ scheduleDispatchEvent(Event::create(eventNames().closeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > break; > default: > break; >@@ -211,7 +211,7 @@ void RTCDataChannel::didDetectError() > if (m_stopped) > return; > >- scheduleDispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ scheduleDispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void RTCDataChannel::bufferedAmountIsDecreasing(size_t amount) >@@ -220,7 +220,7 @@ void RTCDataChannel::bufferedAmountIsDec > return; > > if (amount <= m_bufferedAmountLowThreshold) >- scheduleDispatchEvent(Event::create(eventNames().bufferedamountlowEvent, false, false)); >+ scheduleDispatchEvent(Event::create(eventNames().bufferedamountlowEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void RTCDataChannel::stop() >Index: Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp (working copy) >@@ -32,7 +32,7 @@ > > namespace WebCore { > >-Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&& channel) >+Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, Ref<RTCDataChannel>&& channel) > { > return adoptRef(*new RTCDataChannelEvent(type, canBubble, cancelable, WTFMove(channel))); > } >@@ -42,7 +42,7 @@ Ref<RTCDataChannelEvent> RTCDataChannelE > return adoptRef(*new RTCDataChannelEvent(type, WTFMove(initializer), isTrusted)); > } > >-RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&& channel) >+RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, Ref<RTCDataChannel>&& channel) > : Event(type, canBubble, cancelable) > , m_channel(WTFMove(channel)) > { >Index: Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h (working copy) >@@ -39,7 +39,7 @@ public: > RefPtr<RTCDataChannel> channel; > }; > >- static Ref<RTCDataChannelEvent> create(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&&); >+ static Ref<RTCDataChannelEvent> create(const AtomicString& type, CanBubble, IsCancelable, Ref<RTCDataChannel>&&); > static Ref<RTCDataChannelEvent> create(const AtomicString& type, Init&&, IsTrusted = IsTrusted::No); > > RTCDataChannel& channel(); >@@ -47,7 +47,7 @@ public: > virtual EventInterface eventInterface() const; > > private: >- RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&&); >+ RTCDataChannelEvent(const AtomicString& type, CanBubble, IsCancelable, Ref<RTCDataChannel>&&); > RTCDataChannelEvent(const AtomicString& type, Init&&, IsTrusted); > > Ref<RTCDataChannel> m_channel; >Index: Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (working copy) >@@ -503,7 +503,7 @@ void RTCPeerConnection::updateIceGatheri > return; > > protectedThis->m_iceGatheringState = newState; >- protectedThis->dispatchEvent(Event::create(eventNames().icegatheringstatechangeEvent, false, false)); >+ protectedThis->dispatchEvent(Event::create(eventNames().icegatheringstatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > protectedThis->updateConnectionState(); > }); > } >@@ -517,7 +517,7 @@ void RTCPeerConnection::updateIceConnect > return; > > protectedThis->m_iceConnectionState = newState; >- protectedThis->dispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, false, false)); >+ protectedThis->dispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > protectedThis->updateConnectionState(); > }); > } >@@ -547,7 +547,7 @@ void RTCPeerConnection::updateConnection > INFO_LOG(LOGIDENTIFIER, "state changed from: " , m_connectionState, " to ", state); > > m_connectionState = state; >- dispatchEvent(Event::create(eventNames().connectionstatechangeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().connectionstatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void RTCPeerConnection::scheduleNegotiationNeededEvent() >@@ -558,7 +558,7 @@ void RTCPeerConnection::scheduleNegotiat > if (!protectedThis->m_backend->isNegotiationNeeded()) > return; > protectedThis->m_backend->clearNegotiationNeededState(); >- protectedThis->dispatchEvent(Event::create(eventNames().negotiationneededEvent, false, false)); >+ protectedThis->dispatchEvent(Event::create(eventNames().negotiationneededEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }); > } > >Index: Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp (working copy) >@@ -32,17 +32,18 @@ > > namespace WebCore { > >-Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL) >+Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(CanBubble canBubble, IsCancelable cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL) > { > return adoptRef(*new RTCPeerConnectionIceEvent(eventNames().icecandidateEvent, canBubble, cancelable, WTFMove(candidate), WTFMove(serverURL))); > } > > Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(const AtomicString& type, Init&& init) > { >- return adoptRef(*new RTCPeerConnectionIceEvent(type, init.bubbles, init.cancelable, WTFMove(init.candidate), WTFMove(init.url))); >+ return adoptRef(*new RTCPeerConnectionIceEvent(type, init.bubbles ? CanBubble::Yes : CanBubble::No, >+ init.cancelable ? IsCancelable::Yes : IsCancelable::No, WTFMove(init.candidate), WTFMove(init.url))); > } > >-RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL) >+RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL) > : Event(type, canBubble, cancelable) > , m_candidate(WTFMove(candidate)) > , m_url(WTFMove(serverURL)) >Index: Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h (working copy) >@@ -42,7 +42,7 @@ public: > }; > > static Ref<RTCPeerConnectionIceEvent> create(const AtomicString& type, Init&&); >- static Ref<RTCPeerConnectionIceEvent> create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL); >+ static Ref<RTCPeerConnectionIceEvent> create(CanBubble, IsCancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL); > > RTCIceCandidate* candidate() const; > const String& url() const { return m_url; } >@@ -50,7 +50,7 @@ public: > virtual EventInterface eventInterface() const; > > private: >- RTCPeerConnectionIceEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL); >+ RTCPeerConnectionIceEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL); > > RefPtr<RTCIceCandidate> m_candidate; > String m_url; >Index: Source/WebCore/Modules/mediastream/RTCTrackEvent.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCTrackEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCTrackEvent.cpp (working copy) >@@ -39,7 +39,7 @@ > > namespace WebCore { > >-Ref<RTCTrackEvent> RTCTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track, Vector<RefPtr<MediaStream>>&& streams, RefPtr<RTCRtpTransceiver>&& transceiver) >+Ref<RTCTrackEvent> RTCTrackEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track, Vector<RefPtr<MediaStream>>&& streams, RefPtr<RTCRtpTransceiver>&& transceiver) > { > return adoptRef(*new RTCTrackEvent(type, canBubble, cancelable, WTFMove(receiver), WTFMove(track), WTFMove(streams), WTFMove(transceiver))); > } >@@ -49,7 +49,7 @@ Ref<RTCTrackEvent> RTCTrackEvent::create > return adoptRef(*new RTCTrackEvent(type, initializer, isTrusted)); > } > >-RTCTrackEvent::RTCTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track, Vector<RefPtr<MediaStream>>&& streams, RefPtr<RTCRtpTransceiver>&& transceiver) >+RTCTrackEvent::RTCTrackEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track, Vector<RefPtr<MediaStream>>&& streams, RefPtr<RTCRtpTransceiver>&& transceiver) > : Event(type, canBubble, cancelable) > , m_receiver(WTFMove(receiver)) > , m_track(WTFMove(track)) >Index: Source/WebCore/Modules/mediastream/RTCTrackEvent.h >=================================================================== >--- Source/WebCore/Modules/mediastream/RTCTrackEvent.h (revision 234910) >+++ Source/WebCore/Modules/mediastream/RTCTrackEvent.h (working copy) >@@ -46,7 +46,7 @@ typedef Vector<RefPtr<MediaStream>> Medi > > class RTCTrackEvent : public Event { > public: >- static Ref<RTCTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&, MediaStreamArray&&, RefPtr<RTCRtpTransceiver>&&); >+ static Ref<RTCTrackEvent> create(const AtomicString& type, CanBubble, IsCancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&, MediaStreamArray&&, RefPtr<RTCRtpTransceiver>&&); > > struct Init : EventInit { > RefPtr<RTCRtpReceiver> receiver; >@@ -64,7 +64,7 @@ public: > virtual EventInterface eventInterface() const { return RTCTrackEventInterfaceType; } > > private: >- RTCTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&, MediaStreamArray&&, RefPtr<RTCRtpTransceiver>&&); >+ RTCTrackEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&, MediaStreamArray&&, RefPtr<RTCRtpTransceiver>&&); > RTCTrackEvent(const AtomicString& type, const Init&, IsTrusted); > > RefPtr<RTCRtpReceiver> m_receiver; >Index: Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp >=================================================================== >--- Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (revision 234910) >+++ Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (working copy) >@@ -634,7 +634,8 @@ void LibWebRTCMediaEndpoint::addRemoteSt > return; > > auto& mediaStream = mediaStreamFromRTCStream(rtcStream); >- m_peerConnectionBackend.connection().fireEvent(MediaStreamEvent::create(eventNames().addstreamEvent, false, false, &mediaStream)); >+ m_peerConnectionBackend.connection().fireEvent(MediaStreamEvent::create(eventNames().addstreamEvent, >+ Event::CanBubble::No, Event::IsCancelable::No, &mediaStream)); > } > > class RTCRtpReceiverBackend final : public RTCRtpReceiver::Backend { >@@ -687,7 +688,8 @@ void LibWebRTCMediaEndpoint::addRemoteTr > streams.append(&mediaStream); > mediaStream.addTrackFromPlatform(*track); > } >- m_peerConnectionBackend.connection().fireEvent(RTCTrackEvent::create(eventNames().trackEvent, false, false, WTFMove(receiver), track, WTFMove(streams), nullptr)); >+ m_peerConnectionBackend.connection().fireEvent(RTCTrackEvent::create(eventNames().trackEvent, >+ Event::CanBubble::No, Event::IsCancelable::No, WTFMove(receiver), track, WTFMove(streams), nullptr)); > } > > void LibWebRTCMediaEndpoint::removeRemoteStream(webrtc::MediaStreamInterface& rtcStream) >@@ -777,7 +779,8 @@ void LibWebRTCMediaEndpoint::addDataChan > }); > } > >- m_peerConnectionBackend.connection().fireEvent(RTCDataChannelEvent::create(eventNames().datachannelEvent, false, false, WTFMove(channel))); >+ m_peerConnectionBackend.connection().fireEvent(RTCDataChannelEvent::create(eventNames().datachannelEvent, >+ Event::CanBubble::No, Event::IsCancelable::No, WTFMove(channel))); > } > > void LibWebRTCMediaEndpoint::OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel) >Index: Source/WebCore/Modules/notifications/Notification.cpp >=================================================================== >--- Source/WebCore/Modules/notifications/Notification.cpp (revision 234910) >+++ Source/WebCore/Modules/notifications/Notification.cpp (working copy) >@@ -141,24 +141,24 @@ void Notification::finalize() > > void Notification::dispatchShowEvent() > { >- dispatchEvent(Event::create(eventNames().showEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().showEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void Notification::dispatchClickEvent() > { > WindowFocusAllowedIndicator windowFocusAllowed; >- dispatchEvent(Event::create(eventNames().clickEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().clickEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void Notification::dispatchCloseEvent() > { >- dispatchEvent(Event::create(eventNames().closeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().closeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > finalize(); > } > > void Notification::dispatchErrorEvent() > { >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > auto Notification::permission(Document& document) -> Permission >Index: Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.cpp >=================================================================== >--- Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.cpp (working copy) >@@ -38,7 +38,7 @@ Ref<MerchantValidationEvent> MerchantVal > } > > MerchantValidationEvent::MerchantValidationEvent(const AtomicString& type, const URL& validationURL, PaymentRequest& paymentRequest) >- : Event { type, false, false } >+ : Event { type, Event::CanBubble::No, Event::IsCancelable::No } > , m_validationURL { validationURL } > , m_paymentRequest { paymentRequest } > { >Index: Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEvent.cpp >=================================================================== >--- Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/paymentrequest/PaymentRequestUpdateEvent.cpp (working copy) >@@ -38,7 +38,7 @@ PaymentRequestUpdateEvent::PaymentReques > } > > PaymentRequestUpdateEvent::PaymentRequestUpdateEvent(const AtomicString& type, PaymentRequest& paymentRequest) >- : Event { type, false, false } >+ : Event { type, CanBubble::No, IsCancelable::No } > , m_paymentRequest { &paymentRequest } > { > } >Index: Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm >=================================================================== >--- Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm (revision 234910) >+++ Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm (working copy) >@@ -250,7 +250,7 @@ unsigned long long QuickTimePluginReplac > void QuickTimePluginReplacement::postEvent(const String& eventName) > { > Ref<HTMLPlugInElement> protect(*m_parentElement); >- Ref<Event> event = Event::create(eventName, false, true); >+ Ref<Event> event = Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::Yes); > m_parentElement->dispatchEvent(event); > } > >Index: Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp >=================================================================== >--- Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp (working copy) >@@ -36,7 +36,7 @@ Ref<SpeechSynthesisEvent> SpeechSynthesi > } > > SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_charIndex(charIndex) > , m_elapsedTime(elapsedTime) > , m_name(name) >Index: Source/WebCore/Modules/webaudio/AudioContext.cpp >=================================================================== >--- Source/WebCore/Modules/webaudio/AudioContext.cpp (revision 234910) >+++ Source/WebCore/Modules/webaudio/AudioContext.cpp (working copy) >@@ -288,7 +288,7 @@ void AudioContext::setState(State state) > return; > > m_state = state; >- m_eventQueue->enqueueEvent(Event::create(eventNames().statechangeEvent, true, false)); >+ m_eventQueue->enqueueEvent(Event::create(eventNames().statechangeEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > > size_t stateIndex = static_cast<size_t>(state); > if (stateIndex >= m_stateReactions.size()) >Index: Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp >=================================================================== >--- Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp (working copy) >@@ -36,7 +36,7 @@ namespace WebCore { > AudioProcessingEvent::AudioProcessingEvent() = default; > > AudioProcessingEvent::AudioProcessingEvent(RefPtr<AudioBuffer>&& inputBuffer, RefPtr<AudioBuffer>&& outputBuffer, double playbackTime) >- : Event(eventNames().audioprocessEvent, true, false) >+ : Event(eventNames().audioprocessEvent, CanBubble::Yes, IsCancelable::No) > , m_inputBuffer(WTFMove(inputBuffer)) > , m_outputBuffer(WTFMove(outputBuffer)) > , m_playbackTime(playbackTime) >Index: Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp >=================================================================== >--- Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp (revision 234910) >+++ Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp (working copy) >@@ -179,7 +179,7 @@ void AudioScheduledSourceNode::finish() > if (!this->scriptExecutionContext()) > return; > >- this->dispatchEvent(Event::create(eventNames().endedEvent, false, false)); >+ this->dispatchEvent(Event::create(eventNames().endedEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }); > } > >Index: Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp >=================================================================== >--- Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp (working copy) >@@ -39,7 +39,7 @@ Ref<OfflineAudioCompletionEvent> Offline > } > > OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(RefPtr<AudioBuffer>&& renderedBuffer) >- : Event(eventNames().completeEvent, true, false) >+ : Event(eventNames().completeEvent, CanBubble::Yes, IsCancelable::No) > , m_renderedBuffer(WTFMove(renderedBuffer)) > { > } >Index: Source/WebCore/Modules/websockets/CloseEvent.h >=================================================================== >--- Source/WebCore/Modules/websockets/CloseEvent.h (revision 234910) >+++ Source/WebCore/Modules/websockets/CloseEvent.h (working copy) >@@ -62,7 +62,7 @@ public: > > private: > CloseEvent(bool wasClean, int code, const String& reason) >- : Event(eventNames().closeEvent, false, false) >+ : Event(eventNames().closeEvent, CanBubble::No, IsCancelable::No) > , m_wasClean(wasClean) > , m_code(code) > , m_reason(reason) >Index: Source/WebCore/Modules/websockets/WebSocket.cpp >=================================================================== >--- Source/WebCore/Modules/websockets/WebSocket.cpp (revision 234910) >+++ Source/WebCore/Modules/websockets/WebSocket.cpp (working copy) >@@ -563,7 +563,7 @@ void WebSocket::didConnect() > m_state = OPEN; > m_subprotocol = m_channel->subprotocol(); > m_extensions = m_channel->extensions(); >- dispatchEvent(Event::create(eventNames().openEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().openEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void WebSocket::didReceiveMessage(const String& msg) >@@ -657,7 +657,7 @@ void WebSocket::dispatchOrQueueErrorEven > return; > > m_dispatchedErrorEvent = true; >- dispatchOrQueueEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchOrQueueEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void WebSocket::dispatchOrQueueEvent(Ref<Event>&& event) >Index: Source/WebCore/Modules/webvr/VRDisplayEvent.cpp >=================================================================== >--- Source/WebCore/Modules/webvr/VRDisplayEvent.cpp (revision 234910) >+++ Source/WebCore/Modules/webvr/VRDisplayEvent.cpp (working copy) >@@ -37,7 +37,7 @@ VRDisplayEvent::VRDisplayEvent(const Ato > } > > VRDisplayEvent::VRDisplayEvent(const AtomicString& name, const RefPtr<VRDisplay>& display, std::optional<VRDisplayEventReason>&& reason) >- : Event(name, false /*canBubble*/, false /*cancelable*/) >+ : Event(name, CanBubble::No, IsCancelable::No) > , m_display(display) > , m_reason(WTFMove(reason)) > { >Index: Source/WebCore/accessibility/AccessibilityObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityObject.cpp (revision 234910) >+++ Source/WebCore/accessibility/AccessibilityObject.cpp (working copy) >@@ -2216,7 +2216,7 @@ bool AccessibilityObject::dispatchAccess > return false; > } > >- auto event = Event::create(eventName, true, true); >+ auto event = Event::create(eventName, Event::CanBubble::Yes, Event::IsCancelable::Yes); > return dispatchAccessibilityEvent(event); > } > >Index: Source/WebCore/accessibility/AccessibleSetValueEvent.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibleSetValueEvent.cpp (revision 234910) >+++ Source/WebCore/accessibility/AccessibleSetValueEvent.cpp (working copy) >@@ -29,7 +29,7 @@ > namespace WebCore { > > AccessibleSetValueEvent::AccessibleSetValueEvent(const AtomicString& type, const AtomicString& value) >- : Event(type, true, true) >+ : Event(type, CanBubble::Yes, IsCancelable::Yes) > , m_value(value) > { > } >Index: Source/WebCore/animation/AnimationPlaybackEvent.cpp >=================================================================== >--- Source/WebCore/animation/AnimationPlaybackEvent.cpp (revision 234910) >+++ Source/WebCore/animation/AnimationPlaybackEvent.cpp (working copy) >@@ -45,7 +45,7 @@ AnimationPlaybackEvent::AnimationPlaybac > } > > AnimationPlaybackEvent::AnimationPlaybackEvent(const AtomicString& type, std::optional<Seconds> currentTime, std::optional<Seconds> timelineTime) >- : Event(type, true, false) >+ : Event(type, CanBubble::Yes, IsCancelable::No) > , m_currentTime(currentTime) > , m_timelineTime(timelineTime) > { >Index: Source/WebCore/dom/AbortSignal.cpp >=================================================================== >--- Source/WebCore/dom/AbortSignal.cpp (revision 234910) >+++ Source/WebCore/dom/AbortSignal.cpp (working copy) >@@ -58,7 +58,7 @@ void AbortSignal::abort() > // FIXME: Add support for 'abort algorithms' - https://dom.spec.whatwg.org/#abortsignal-abort-algorithms > > // 5. Fire an event named abort at signal. >- dispatchEvent(Event::create(eventNames().abortEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().abortEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > } >Index: Source/WebCore/dom/AnimationEvent.cpp >=================================================================== >--- Source/WebCore/dom/AnimationEvent.cpp (revision 234910) >+++ Source/WebCore/dom/AnimationEvent.cpp (working copy) >@@ -36,7 +36,7 @@ AnimationEvent::AnimationEvent(const Ato > } > > AnimationEvent::AnimationEvent(const AtomicString& type, const String& animationName, double elapsedTime) >- : Event(type, true, false) >+ : Event(type, CanBubble::Yes, IsCancelable::No) > , m_animationName(animationName) > , m_elapsedTime(elapsedTime) > { >Index: Source/WebCore/dom/BeforeLoadEvent.h >=================================================================== >--- Source/WebCore/dom/BeforeLoadEvent.h (revision 234910) >+++ Source/WebCore/dom/BeforeLoadEvent.h (working copy) >@@ -53,7 +53,7 @@ public: > > private: > explicit BeforeLoadEvent(const String& url) >- : Event(eventNames().beforeloadEvent, false, true) >+ : Event(eventNames().beforeloadEvent, CanBubble::No, IsCancelable::Yes) > , m_url(url) > { > } >Index: Source/WebCore/dom/BeforeTextInsertedEvent.cpp >=================================================================== >--- Source/WebCore/dom/BeforeTextInsertedEvent.cpp (revision 234910) >+++ Source/WebCore/dom/BeforeTextInsertedEvent.cpp (working copy) >@@ -31,7 +31,7 @@ > namespace WebCore { > > BeforeTextInsertedEvent::BeforeTextInsertedEvent(const String& text) >- : Event(eventNames().webkitBeforeTextInsertedEvent, false, true), m_text(text) >+ : Event(eventNames().webkitBeforeTextInsertedEvent, CanBubble::No, IsCancelable::Yes), m_text(text) > { > } > >Index: Source/WebCore/dom/BeforeUnloadEvent.cpp >=================================================================== >--- Source/WebCore/dom/BeforeUnloadEvent.cpp (revision 234910) >+++ Source/WebCore/dom/BeforeUnloadEvent.cpp (working copy) >@@ -28,7 +28,7 @@ > namespace WebCore { > > BeforeUnloadEvent::BeforeUnloadEvent() >- : Event(eventNames().beforeunloadEvent, false, true) >+ : Event(eventNames().beforeunloadEvent, CanBubble::No, IsCancelable::Yes) > { > } > >Index: Source/WebCore/dom/CharacterData.cpp >=================================================================== >--- Source/WebCore/dom/CharacterData.cpp (revision 234910) >+++ Source/WebCore/dom/CharacterData.cpp (working copy) >@@ -227,7 +227,7 @@ void CharacterData::dispatchModifiedEven > > if (!isInShadowTree()) { > if (document().hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER)) >- dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, nullptr, oldData, m_data)); >+ dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, Event::CanBubble::Yes, nullptr, oldData, m_data)); > dispatchSubtreeModifiedEvent(); > } > >Index: Source/WebCore/dom/CompositionEvent.cpp >=================================================================== >--- Source/WebCore/dom/CompositionEvent.cpp (revision 234910) >+++ Source/WebCore/dom/CompositionEvent.cpp (working copy) >@@ -32,7 +32,7 @@ namespace WebCore { > CompositionEvent::CompositionEvent() = default; > > CompositionEvent::CompositionEvent(const AtomicString& type, RefPtr<WindowProxy>&& view, const String& data) >- : UIEvent(type, true, true, WTFMove(view), 0) >+ : UIEvent(type, CanBubble::Yes, IsCancelable::Yes, WTFMove(view), 0) > , m_data(data) > { > } >Index: Source/WebCore/dom/ContainerNode.cpp >=================================================================== >--- Source/WebCore/dom/ContainerNode.cpp (revision 234910) >+++ Source/WebCore/dom/ContainerNode.cpp (working copy) >@@ -775,12 +775,12 @@ static void dispatchChildInsertionEvents > Ref<Document> document(child.document()); > > if (c->parentNode() && document->hasListenerType(Document::DOMNODEINSERTED_LISTENER)) >- c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedEvent, true, c->parentNode())); >+ c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedEvent, Event::CanBubble::Yes, c->parentNode())); > > // dispatch the DOMNodeInsertedIntoDocument event to all descendants > if (c->isConnected() && document->hasListenerType(Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER)) { > for (; c; c = NodeTraversal::next(*c, &child)) >- c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedIntoDocumentEvent, false)); >+ c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedIntoDocumentEvent, Event::CanBubble::No)); > } > } > >@@ -800,12 +800,12 @@ static void dispatchChildRemovalEvents(R > > // dispatch pre-removal mutation events > if (child->parentNode() && document->hasListenerType(Document::DOMNODEREMOVED_LISTENER)) >- child->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedEvent, true, child->parentNode())); >+ child->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedEvent, Event::CanBubble::Yes, child->parentNode())); > > // dispatch the DOMNodeRemovedFromDocument event to all descendants > if (child->isConnected() && document->hasListenerType(Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER)) { > for (RefPtr<Node> currentNode = child.copyRef(); currentNode; currentNode = NodeTraversal::next(*currentNode, child.ptr())) >- currentNode->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedFromDocumentEvent, false)); >+ currentNode->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedFromDocumentEvent, Event::CanBubble::No)); > } > } > >Index: Source/WebCore/dom/DeviceMotionEvent.cpp >=================================================================== >--- Source/WebCore/dom/DeviceMotionEvent.cpp (revision 234910) >+++ Source/WebCore/dom/DeviceMotionEvent.cpp (working copy) >@@ -38,7 +38,7 @@ DeviceMotionEvent::DeviceMotionEvent() > } > > DeviceMotionEvent::DeviceMotionEvent(const AtomicString& eventType, DeviceMotionData* deviceMotionData) >- : Event(eventType, false, false) // Can't bubble, not cancelable >+ : Event(eventType, CanBubble::No, IsCancelable::No) > , m_deviceMotionData(deviceMotionData) > { > } >Index: Source/WebCore/dom/DeviceOrientationEvent.cpp >=================================================================== >--- Source/WebCore/dom/DeviceOrientationEvent.cpp (revision 234910) >+++ Source/WebCore/dom/DeviceOrientationEvent.cpp (working copy) >@@ -38,7 +38,7 @@ DeviceOrientationEvent::DeviceOrientatio > } > > DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData* orientation) >- : Event(eventType, false, false) // Can't bubble, not cancelable >+ : Event(eventType, CanBubble::No, IsCancelable::No) > , m_orientation(orientation) > { > } >Index: Source/WebCore/dom/Document.cpp >=================================================================== >--- Source/WebCore/dom/Document.cpp (revision 234910) >+++ Source/WebCore/dom/Document.cpp (working copy) >@@ -1216,7 +1216,7 @@ void Document::setReadyState(ReadyState > } > > m_readyState = readyState; >- dispatchEvent(Event::create(eventNames().readystatechangeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().readystatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > if (settings().suppressesIncrementalRendering()) > setVisualUpdatesAllowed(readyState); >@@ -1630,7 +1630,7 @@ void Document::unregisterForVisibilitySt > > void Document::visibilityStateChanged() > { >- enqueueDocumentEvent(Event::create(eventNames().visibilitychangeEvent, false, false)); >+ enqueueDocumentEvent(Event::create(eventNames().visibilitychangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > for (auto* client : m_visibilityStateCallbackClients) > client->visibilityStateChanged(); > >@@ -5427,7 +5427,7 @@ void Document::finishedParsing() > if (!m_documentTiming.domContentLoadedEventStart) > m_documentTiming.domContentLoadedEventStart = MonotonicTime::now(); > >- dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false)); >+ dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > > if (!m_documentTiming.domContentLoadedEventEnd) > m_documentTiming.domContentLoadedEventEnd = MonotonicTime::now(); >@@ -6401,7 +6401,7 @@ void Document::dispatchFullScreenChangeO > if (shouldNotifyMediaElement && is<HTMLMediaElement>(*node)) > downcast<HTMLMediaElement>(*node).enteredOrExitedFullscreen(); > #endif >- node->dispatchEvent(Event::create(eventName, true, false)); >+ node->dispatchEvent(Event::create(eventName, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > } > >@@ -7449,7 +7449,7 @@ void Document::didRemoveInDocumentShadow > void Document::orientationChanged(int orientation) > { > LOG(Events, "Document %p orientationChanged - orientation %d", this, orientation); >- dispatchWindowEvent(Event::create(eventNames().orientationchangeEvent, false, false)); >+ dispatchWindowEvent(Event::create(eventNames().orientationchangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > m_orientationNotifier.orientationChanged(orientation); > } > >Index: Source/WebCore/dom/DocumentEventQueue.cpp >=================================================================== >--- Source/WebCore/dom/DocumentEventQueue.cpp (revision 234910) >+++ Source/WebCore/dom/DocumentEventQueue.cpp (working copy) >@@ -86,12 +86,10 @@ void DocumentEventQueue::enqueueOrDispat > ASSERT(&target.document() == &m_document); > > // Per the W3C CSSOM View Module, scroll events fired at the document should bubble, others should not. >- bool bubbles = target.isDocumentNode(); >- bool cancelable = false; >- enqueueScrollEvent(target, bubbles, cancelable); >+ enqueueScrollEvent(target, target.isDocumentNode() ? Event::CanBubble::Yes : Event::CanBubble::No, Event::IsCancelable::No); > } > >-void DocumentEventQueue::enqueueScrollEvent(EventTarget& target, bool bubbles, bool cancelable) >+void DocumentEventQueue::enqueueScrollEvent(EventTarget& target, Event::CanBubble canBubble, Event::IsCancelable cancelable) > { > if (m_isClosed) > return; >@@ -102,12 +100,12 @@ void DocumentEventQueue::enqueueScrollEv > if (!m_targetsWithQueuedScrollEvents.add(&target).isNewEntry) > return; > >- Ref<Event> scrollEvent = Event::create(eventNames().scrollEvent, bubbles, cancelable); >+ Ref<Event> scrollEvent = Event::create(eventNames().scrollEvent, canBubble, cancelable); > scrollEvent->setTarget(&target); > enqueueEvent(WTFMove(scrollEvent)); > } > >-void DocumentEventQueue::enqueueResizeEvent(EventTarget& target, bool bubbles, bool cancelable) >+void DocumentEventQueue::enqueueResizeEvent(EventTarget& target, Event::CanBubble canBubble, Event::IsCancelable cancelable) > { > if (m_isClosed) > return; >@@ -118,7 +116,7 @@ void DocumentEventQueue::enqueueResizeEv > if (!m_targetsWithQueuedResizeEvents.add(&target).isNewEntry) > return; > >- Ref<Event> resizeEvent = Event::create(eventNames().resizeEvent, bubbles, cancelable); >+ Ref<Event> resizeEvent = Event::create(eventNames().resizeEvent, canBubble, cancelable); > resizeEvent->setTarget(&target); > enqueueEvent(WTFMove(resizeEvent)); > } >Index: Source/WebCore/dom/DocumentEventQueue.h >=================================================================== >--- Source/WebCore/dom/DocumentEventQueue.h (revision 234910) >+++ Source/WebCore/dom/DocumentEventQueue.h (working copy) >@@ -27,6 +27,7 @@ > > #pragma once > >+#include "Event.h" > #include "EventQueue.h" > #include <memory> > #include <wtf/HashSet.h> >@@ -35,7 +36,6 @@ > namespace WebCore { > > class Document; >-class Event; > class Node; > > class DocumentEventQueue final : public EventQueue { >@@ -48,8 +48,8 @@ public: > void close() override; > > void enqueueOrDispatchScrollEvent(Node&); >- void enqueueScrollEvent(EventTarget&, bool bubbles, bool cancelable); >- void enqueueResizeEvent(EventTarget&, bool bubbles, bool cancelable); >+ void enqueueScrollEvent(EventTarget&, Event::CanBubble, Event::IsCancelable); >+ void enqueueResizeEvent(EventTarget&, Event::CanBubble, Event::IsCancelable); > > private: > void pendingEventTimerFired(); >Index: Source/WebCore/dom/Element.cpp >=================================================================== >--- Source/WebCore/dom/Element.cpp (revision 234910) >+++ Source/WebCore/dom/Element.cpp (working copy) >@@ -291,7 +291,8 @@ bool Element::dispatchMouseEvent(const P > // of the DOM specs, but is used for compatibility with the ondblclick="" attribute. This is treated > // as a separate event in other DOM-compliant browsers like Firefox, and so we do the same. > Ref<MouseEvent> doubleClickEvent = MouseEvent::create(eventNames().dblclickEvent, >- mouseEvent->bubbles(), mouseEvent->cancelable(), mouseEvent->view(), mouseEvent->detail(), >+ mouseEvent->bubbles() ? Event::CanBubble::Yes : Event::CanBubble::No, mouseEvent->cancelable() ? Event::IsCancelable::Yes : Event::IsCancelable::No, >+ mouseEvent->view(), mouseEvent->detail(), > mouseEvent->screenX(), mouseEvent->screenY(), mouseEvent->clientX(), mouseEvent->clientY(), > mouseEvent->ctrlKey(), mouseEvent->altKey(), mouseEvent->shiftKey(), mouseEvent->metaKey(), > mouseEvent->button(), mouseEvent->buttons(), mouseEvent->syntheticClickType(), relatedTarget); >@@ -2579,34 +2580,34 @@ void Element::dispatchFocusInEvent(const > { > ASSERT_WITH_SECURITY_IMPLICATION(ScriptDisallowedScope::InMainThread::isScriptAllowed()); > ASSERT(eventType == eventNames().focusinEvent || eventType == eventNames().DOMFocusInEvent); >- dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().windowProxy(), 0, WTFMove(oldFocusedElement))); >+ dispatchScopedEvent(FocusEvent::create(eventType, Event::CanBubble::Yes, Event::IsCancelable::No, document().windowProxy(), 0, WTFMove(oldFocusedElement))); > } > > void Element::dispatchFocusOutEvent(const AtomicString& eventType, RefPtr<Element>&& newFocusedElement) > { > ASSERT_WITH_SECURITY_IMPLICATION(ScriptDisallowedScope::InMainThread::isScriptAllowed()); > ASSERT(eventType == eventNames().focusoutEvent || eventType == eventNames().DOMFocusOutEvent); >- dispatchScopedEvent(FocusEvent::create(eventType, true, false, document().windowProxy(), 0, WTFMove(newFocusedElement))); >+ dispatchScopedEvent(FocusEvent::create(eventType, Event::CanBubble::Yes, Event::IsCancelable::No, document().windowProxy(), 0, WTFMove(newFocusedElement))); > } > > void Element::dispatchFocusEvent(RefPtr<Element>&& oldFocusedElement, FocusDirection) > { > if (auto* page = document().page()) > page->chrome().client().elementDidFocus(*this); >- dispatchEvent(FocusEvent::create(eventNames().focusEvent, false, false, document().windowProxy(), 0, WTFMove(oldFocusedElement))); >+ dispatchEvent(FocusEvent::create(eventNames().focusEvent, Event::CanBubble::No, Event::IsCancelable::No, document().windowProxy(), 0, WTFMove(oldFocusedElement))); > } > > void Element::dispatchBlurEvent(RefPtr<Element>&& newFocusedElement) > { > if (auto* page = document().page()) > page->chrome().client().elementDidBlur(*this); >- dispatchEvent(FocusEvent::create(eventNames().blurEvent, false, false, document().windowProxy(), 0, WTFMove(newFocusedElement))); >+ dispatchEvent(FocusEvent::create(eventNames().blurEvent, Event::CanBubble::No, Event::IsCancelable::No, document().windowProxy(), 0, WTFMove(newFocusedElement))); > } > > void Element::dispatchWebKitImageReadyEventForTesting() > { > if (document().settings().webkitImageReadyEventEnabled()) >- dispatchEvent(Event::create("webkitImageFrameReady", true, true)); >+ dispatchEvent(Event::create("webkitImageFrameReady", Event::CanBubble::Yes, Event::IsCancelable::Yes)); > } > > bool Element::dispatchMouseForceWillBegin() >Index: Source/WebCore/dom/ErrorEvent.cpp >=================================================================== >--- Source/WebCore/dom/ErrorEvent.cpp (revision 234910) >+++ Source/WebCore/dom/ErrorEvent.cpp (working copy) >@@ -51,7 +51,7 @@ ErrorEvent::ErrorEvent(const AtomicStrin > } > > ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, JSC::Strong<JSC::Unknown> error) >- : Event(eventNames().errorEvent, false, true) >+ : Event(eventNames().errorEvent, CanBubble::No, IsCancelable::Yes) > , m_message(message) > , m_fileName(fileName) > , m_lineNumber(lineNumber) >Index: Source/WebCore/dom/Event.cpp >=================================================================== >--- Source/WebCore/dom/Event.cpp (revision 234910) >+++ Source/WebCore/dom/Event.cpp (working copy) >@@ -40,21 +40,21 @@ Event::Event(IsTrusted isTrusted) > { > } > >-Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg) >+Event::Event(const AtomicString& eventType, CanBubble canBubble, IsCancelable isCancelable) > : m_type(eventType) > , m_isInitialized(true) >- , m_canBubble(canBubbleArg) >- , m_cancelable(cancelableArg) >+ , m_canBubble(canBubble == CanBubble::Yes) >+ , m_cancelable(isCancelable == IsCancelable::Yes) > , m_isTrusted(true) > , m_createTime(MonotonicTime::now()) > { > } > >-Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, MonotonicTime timestamp) >+Event::Event(const AtomicString& eventType, CanBubble canBubble, IsCancelable isCancelable, MonotonicTime timestamp) > : m_type(eventType) > , m_isInitialized(true) >- , m_canBubble(canBubbleArg) >- , m_cancelable(cancelableArg) >+ , m_canBubble(canBubble == CanBubble::Yes) >+ , m_cancelable(isCancelable == IsCancelable::Yes) > , m_isTrusted(true) > , m_createTime(timestamp) > { >@@ -73,9 +73,9 @@ Event::Event(const AtomicString& eventTy > > Event::~Event() = default; > >-Ref<Event> Event::create(const AtomicString& type, bool canBubble, bool cancelable) >+Ref<Event> Event::create(const AtomicString& type, CanBubble canBubble, IsCancelable isCancelable) > { >- return adoptRef(*new Event(type, canBubble, cancelable)); >+ return adoptRef(*new Event(type, canBubble, isCancelable)); > } > > Ref<Event> Event::createForBindings() >Index: Source/WebCore/dom/Event.h >=================================================================== >--- Source/WebCore/dom/Event.h (revision 234910) >+++ Source/WebCore/dom/Event.h (working copy) >@@ -41,6 +41,8 @@ class ScriptExecutionContext; > class Event : public ScriptWrappable, public RefCounted<Event> { > public: > enum class IsTrusted { No, Yes }; >+ enum class CanBubble { No, Yes }; >+ enum class IsCancelable { No, Yes }; > > enum PhaseType { > NONE = 0, >@@ -49,7 +51,7 @@ public: > BUBBLING_PHASE = 3 > }; > >- WEBCORE_EXPORT static Ref<Event> create(const AtomicString& type, bool canBubble, bool cancelable); >+ WEBCORE_EXPORT static Ref<Event> create(const AtomicString& type, CanBubble, IsCancelable); > static Ref<Event> createForBindings(); > static Ref<Event> create(const AtomicString& type, const EventInit&, IsTrusted = IsTrusted::No); > >@@ -139,8 +141,8 @@ public: > > protected: > explicit Event(IsTrusted = IsTrusted::No); >- Event(const AtomicString& type, bool canBubble, bool cancelable); >- Event(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp); >+ Event(const AtomicString& type, CanBubble, IsCancelable); >+ Event(const AtomicString& type, CanBubble, IsCancelable, MonotonicTime timestamp); > Event(const AtomicString& type, const EventInit&, IsTrusted); > > virtual void receivedTarget() { } >Index: Source/WebCore/dom/FocusEvent.cpp >=================================================================== >--- Source/WebCore/dom/FocusEvent.cpp (revision 234910) >+++ Source/WebCore/dom/FocusEvent.cpp (working copy) >@@ -40,7 +40,7 @@ bool FocusEvent::isFocusEvent() const > return true; > } > >-FocusEvent::FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail, RefPtr<EventTarget>&& relatedTarget) >+FocusEvent::FocusEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail, RefPtr<EventTarget>&& relatedTarget) > : UIEvent(type, canBubble, cancelable, WTFMove(view), detail) > , m_relatedTarget(WTFMove(relatedTarget)) > { >Index: Source/WebCore/dom/FocusEvent.h >=================================================================== >--- Source/WebCore/dom/FocusEvent.h (revision 234910) >+++ Source/WebCore/dom/FocusEvent.h (working copy) >@@ -35,7 +35,7 @@ class Node; > > class FocusEvent final : public UIEvent { > public: >- static Ref<FocusEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail, RefPtr<EventTarget>&& relatedTarget) >+ static Ref<FocusEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail, RefPtr<EventTarget>&& relatedTarget) > { > return adoptRef(*new FocusEvent(type, canBubble, cancelable, WTFMove(view), detail, WTFMove(relatedTarget))); > } >@@ -58,7 +58,7 @@ public: > > private: > FocusEvent() = default; >- FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, int, RefPtr<EventTarget>&&); >+ FocusEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<WindowProxy>&&, int, RefPtr<EventTarget>&&); > FocusEvent(const AtomicString& type, const Init&, IsTrusted); > > EventInterface eventInterface() const final; >Index: Source/WebCore/dom/HashChangeEvent.h >=================================================================== >--- Source/WebCore/dom/HashChangeEvent.h (revision 234910) >+++ Source/WebCore/dom/HashChangeEvent.h (working copy) >@@ -69,7 +69,7 @@ private: > } > > HashChangeEvent(const String& oldURL, const String& newURL) >- : Event(eventNames().hashchangeEvent, false, false) >+ : Event(eventNames().hashchangeEvent, CanBubble::No, IsCancelable::No) > , m_oldURL(oldURL) > , m_newURL(newURL) > { >Index: Source/WebCore/dom/InputEvent.cpp >=================================================================== >--- Source/WebCore/dom/InputEvent.cpp (revision 234910) >+++ Source/WebCore/dom/InputEvent.cpp (working copy) >@@ -33,12 +33,12 @@ > > namespace WebCore { > >-Ref<InputEvent> InputEvent::create(const AtomicString& eventType, const String& inputType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, const String& data, RefPtr<DataTransfer>&& dataTransfer, const Vector<RefPtr<StaticRange>>& targetRanges, int detail) >+Ref<InputEvent> InputEvent::create(const AtomicString& eventType, const String& inputType, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, const String& data, RefPtr<DataTransfer>&& dataTransfer, const Vector<RefPtr<StaticRange>>& targetRanges, int detail) > { > return adoptRef(*new InputEvent(eventType, inputType, canBubble, cancelable, WTFMove(view), data, WTFMove(dataTransfer), targetRanges, detail)); > } > >-InputEvent::InputEvent(const AtomicString& eventType, const String& inputType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, const String& data, RefPtr<DataTransfer>&& dataTransfer, const Vector<RefPtr<StaticRange>>& targetRanges, int detail) >+InputEvent::InputEvent(const AtomicString& eventType, const String& inputType, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, const String& data, RefPtr<DataTransfer>&& dataTransfer, const Vector<RefPtr<StaticRange>>& targetRanges, int detail) > : UIEvent(eventType, canBubble, cancelable, WTFMove(view), detail) > , m_inputType(inputType) > , m_data(data) >Index: Source/WebCore/dom/InputEvent.h >=================================================================== >--- Source/WebCore/dom/InputEvent.h (revision 234910) >+++ Source/WebCore/dom/InputEvent.h (working copy) >@@ -39,13 +39,15 @@ public: > String data; > }; > >- static Ref<InputEvent> create(const AtomicString& eventType, const String& inputType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, const String& data, RefPtr<DataTransfer>&&, const Vector<RefPtr<StaticRange>>& targetRanges, int detail); >+ static Ref<InputEvent> create(const AtomicString& eventType, const String& inputType, CanBubble, IsCancelable, RefPtr<WindowProxy>&& view, >+ const String& data, RefPtr<DataTransfer>&&, const Vector<RefPtr<StaticRange>>& targetRanges, int detail); >+ > static Ref<InputEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) > { > return adoptRef(*new InputEvent(type, initializer, isTrusted)); > } > >- InputEvent(const AtomicString& eventType, const String& inputType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, const String& data, RefPtr<DataTransfer>&&, const Vector<RefPtr<StaticRange>>& targetRanges, int detail); >+ InputEvent(const AtomicString& eventType, const String& inputType, CanBubble, IsCancelable, RefPtr<WindowProxy>&&, const String& data, RefPtr<DataTransfer>&&, const Vector<RefPtr<StaticRange>>& targetRanges, int detail); > InputEvent(const AtomicString& eventType, const Init&, IsTrusted); > > bool isInputEvent() const override { return true; } >Index: Source/WebCore/dom/KeyboardEvent.cpp >=================================================================== >--- Source/WebCore/dom/KeyboardEvent.cpp (revision 234910) >+++ Source/WebCore/dom/KeyboardEvent.cpp (working copy) >@@ -94,7 +94,9 @@ static inline KeyboardEvent::KeyLocation > inline KeyboardEvent::KeyboardEvent() = default; > > inline KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, RefPtr<WindowProxy>&& view) >- : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, key.timestamp().approximateMonotonicTime(), view.copyRef(), 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), false, key.modifiers().contains(PlatformEvent::Modifier::CapsLockKey)) >+ : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), CanBubble::Yes, IsCancelable::Yes, >+ key.timestamp().approximateMonotonicTime(), view.copyRef(), 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), >+ false, key.modifiers().contains(PlatformEvent::Modifier::CapsLockKey)) > , m_underlyingPlatformEvent(std::make_unique<PlatformKeyboardEvent>(key)) > #if ENABLE(KEYBOARD_KEY_ATTRIBUTE) > , m_key(key.key()) >Index: Source/WebCore/dom/MessageEvent.cpp >=================================================================== >--- Source/WebCore/dom/MessageEvent.cpp (revision 234910) >+++ Source/WebCore/dom/MessageEvent.cpp (working copy) >@@ -49,7 +49,7 @@ inline MessageEvent::MessageEvent(const > } > > inline MessageEvent::MessageEvent(DataType&& data, const String& origin, const String& lastEventId, std::optional<MessageEventSource>&& source, Vector<RefPtr<MessagePort>>&& ports) >- : Event(eventNames().messageEvent, false, false) >+ : Event(eventNames().messageEvent, CanBubble::No, IsCancelable::No) > , m_data(WTFMove(data)) > , m_origin(origin) > , m_lastEventId(lastEventId) >@@ -59,7 +59,7 @@ inline MessageEvent::MessageEvent(DataTy > } > > inline MessageEvent::MessageEvent(const AtomicString& type, Ref<SerializedScriptValue>&& data, const String& origin, const String& lastEventId) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_data(WTFMove(data)) > , m_origin(origin) > , m_lastEventId(lastEventId) >Index: Source/WebCore/dom/MouseEvent.cpp >=================================================================== >--- Source/WebCore/dom/MouseEvent.cpp (revision 234910) >+++ Source/WebCore/dom/MouseEvent.cpp (working copy) >@@ -47,8 +47,8 @@ Ref<MouseEvent> MouseEvent::create(const > Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, RefPtr<WindowProxy>&& view, const PlatformMouseEvent& event, int detail, Node* relatedTarget) > { > bool isMouseEnterOrLeave = eventType == eventNames().mouseenterEvent || eventType == eventNames().mouseleaveEvent; >- bool isCancelable = eventType != eventNames().mousemoveEvent && !isMouseEnterOrLeave; >- bool canBubble = !isMouseEnterOrLeave; >+ auto isCancelable = eventType != eventNames().mousemoveEvent && !isMouseEnterOrLeave ? IsCancelable::Yes : IsCancelable::No; >+ auto canBubble = !isMouseEnterOrLeave ? CanBubble::Yes : CanBubble::No; > > return MouseEvent::create(eventType, canBubble, isCancelable, event.timestamp().approximateMonotonicTime(), WTFMove(view), > detail, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), >@@ -59,7 +59,7 @@ Ref<MouseEvent> MouseEvent::create(const > relatedTarget, event.force(), event.syntheticClickType()); > } > >-Ref<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, int detail, int screenX, int screenY, int pageX, int pageY, >+Ref<MouseEvent> MouseEvent::create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, int detail, int screenX, int screenY, int pageX, int pageY, > #if ENABLE(POINTER_LOCK) > int movementX, int movementY, > #endif >@@ -73,14 +73,14 @@ Ref<MouseEvent> MouseEvent::create(const > ctrlKey, altKey, shiftKey, metaKey, button, buttons, relatedTarget, force, syntheticClickType, dataTransfer, isSimulated)); > } > >-Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget) >+Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget) > { > return adoptRef(*new MouseEvent(eventType, canBubble, cancelable, WTFMove(view), detail, { screenX, screenY }, { clientX, clientY }, ctrlKey, altKey, shiftKey, metaKey, button, buttons, syntheticClickType, relatedTarget)); > } > > MouseEvent::MouseEvent() = default; > >-MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, >+MouseEvent::MouseEvent(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, > #endif >@@ -100,7 +100,7 @@ MouseEvent::MouseEvent(const AtomicStrin > { > } > >-MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail, const IntPoint& screenLocation, const IntPoint& clientLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget) >+MouseEvent::MouseEvent(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail, const IntPoint& screenLocation, const IntPoint& clientLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget) > : MouseRelatedEvent(eventType, canBubble, cancelable, MonotonicTime::now(), WTFMove(view), detail, screenLocation, { }, > #if ENABLE(POINTER_LOCK) > { }, >Index: Source/WebCore/dom/MouseEvent.h >=================================================================== >--- Source/WebCore/dom/MouseEvent.h (revision 234910) >+++ Source/WebCore/dom/MouseEvent.h (working copy) >@@ -34,15 +34,19 @@ class PlatformMouseEvent; > > class MouseEvent : public MouseRelatedEvent { > public: >- WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, int detail, int screenX, int screenY, int pageX, int pageY, >+ WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, CanBubble, IsCancelable, MonotonicTime timestamp, >+ RefPtr<WindowProxy>&&, int detail, int screenX, int screenY, int pageX, int pageY, > #if ENABLE(POINTER_LOCK) > int movementX, int movementY, > #endif >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, EventTarget* relatedTarget, double force, unsigned short syntheticClickType, DataTransfer* = nullptr, bool isSimulated = false); >+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, >+ EventTarget* relatedTarget, double force, unsigned short syntheticClickType, DataTransfer* = nullptr, bool isSimulated = false); > > WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, RefPtr<WindowProxy>&&, const PlatformMouseEvent&, int detail, Node* relatedTarget); > >- static Ref<MouseEvent> create(const AtomicString& eventType, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget); >+ static Ref<MouseEvent> create(const AtomicString& eventType, CanBubble, IsCancelable, RefPtr<WindowProxy>&&, >+ int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget); > > static Ref<MouseEvent> createForBindings() { return adoptRef(*new MouseEvent); } > >@@ -50,8 +54,13 @@ public: > > virtual ~MouseEvent(); > >- WEBCORE_EXPORT void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, EventTarget* relatedTarget); >- void initMouseEventQuirk(JSC::ExecState&, ScriptExecutionContext&, const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, JSC::JSValue relatedTarget); >+ WEBCORE_EXPORT void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, >+ int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ unsigned short button, EventTarget* relatedTarget); >+ >+ void initMouseEventQuirk(JSC::ExecState&, ScriptExecutionContext&, const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, >+ int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, >+ unsigned short button, JSC::JSValue relatedTarget); > > unsigned short button() const { return m_button; } > unsigned short buttons() const { return m_buttons; } >@@ -71,7 +80,7 @@ public: > int which() const final; > > protected: >- MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, >+ MouseEvent(const AtomicString& type, CanBubble, IsCancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, > int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, >@@ -79,7 +88,7 @@ protected: > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short buttons, > EventTarget* relatedTarget, double force, unsigned short syntheticClickType, DataTransfer*, bool isSimulated); > >- MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, >+ MouseEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<WindowProxy>&&, > int detail, const IntPoint& screenLocation, const IntPoint& clientLocation, > bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, > unsigned short button, unsigned short buttons, unsigned short syntheticClickType, EventTarget* relatedTarget); >Index: Source/WebCore/dom/MouseRelatedEvent.cpp >=================================================================== >--- Source/WebCore/dom/MouseRelatedEvent.cpp (revision 234910) >+++ Source/WebCore/dom/MouseRelatedEvent.cpp (working copy) >@@ -33,7 +33,7 @@ > > namespace WebCore { > >-MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, >+MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, > int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, >Index: Source/WebCore/dom/MouseRelatedEvent.h >=================================================================== >--- Source/WebCore/dom/MouseRelatedEvent.h (revision 234910) >+++ Source/WebCore/dom/MouseRelatedEvent.h (working copy) >@@ -74,7 +74,7 @@ public: > > protected: > MouseRelatedEvent() = default; >- MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, >+ MouseRelatedEvent(const AtomicString& type, CanBubble, IsCancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, > int detail, const IntPoint& screenLocation, const IntPoint& windowLocation, > #if ENABLE(POINTER_LOCK) > const IntPoint& movementDelta, >Index: Source/WebCore/dom/MutationEvent.cpp >=================================================================== >--- Source/WebCore/dom/MutationEvent.cpp (revision 234910) >+++ Source/WebCore/dom/MutationEvent.cpp (working copy) >@@ -25,7 +25,7 @@ > > namespace WebCore { > >-MutationEvent::MutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode, const String& prevValue, const String& newValue) >+MutationEvent::MutationEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, Node* relatedNode, const String& prevValue, const String& newValue) > : Event(type, canBubble, cancelable) > , m_relatedNode(relatedNode) > , m_prevValue(prevValue) >Index: Source/WebCore/dom/MutationEvent.h >=================================================================== >--- Source/WebCore/dom/MutationEvent.h (revision 234910) >+++ Source/WebCore/dom/MutationEvent.h (working copy) >@@ -36,9 +36,9 @@ public: > REMOVAL = 3 > }; > >- static Ref<MutationEvent> create(const AtomicString& type, bool canBubble, Node* relatedNode = nullptr, const String& prevValue = String(), const String& newValue = String()) >+ static Ref<MutationEvent> create(const AtomicString& type, CanBubble canBubble, Node* relatedNode = nullptr, const String& prevValue = String(), const String& newValue = String()) > { >- return adoptRef(*new MutationEvent(type, canBubble, false, relatedNode, prevValue, newValue)); >+ return adoptRef(*new MutationEvent(type, canBubble, IsCancelable::No, relatedNode, prevValue, newValue)); > } > > static Ref<MutationEvent> createForBindings() >@@ -56,7 +56,7 @@ public: > > private: > MutationEvent() = default; >- MutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode, const String& prevValue, const String& newValue); >+ MutationEvent(const AtomicString& type, CanBubble, IsCancelable, Node* relatedNode, const String& prevValue, const String& newValue); > > EventInterface eventInterface() const final; > >Index: Source/WebCore/dom/Node.cpp >=================================================================== >--- Source/WebCore/dom/Node.cpp (revision 234910) >+++ Source/WebCore/dom/Node.cpp (working copy) >@@ -2342,14 +2342,14 @@ void Node::dispatchSubtreeModifiedEvent( > if (!parentNode() && !hasEventListeners(subtreeModifiedEventName)) > return; > >- dispatchScopedEvent(MutationEvent::create(subtreeModifiedEventName, true)); >+ dispatchScopedEvent(MutationEvent::create(subtreeModifiedEventName, Event::CanBubble::Yes)); > } > > void Node::dispatchDOMActivateEvent(Event& underlyingClickEvent) > { > ASSERT_WITH_SECURITY_IMPLICATION(ScriptDisallowedScope::InMainThread::isScriptAllowed()); > int detail = is<UIEvent>(underlyingClickEvent) ? downcast<UIEvent>(underlyingClickEvent).detail() : 0; >- auto event = UIEvent::create(eventNames().DOMActivateEvent, true, true, document().windowProxy(), detail); >+ auto event = UIEvent::create(eventNames().DOMActivateEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, document().windowProxy(), detail); > event->setUnderlyingEvent(&underlyingClickEvent); > dispatchScopedEvent(event); > if (event->defaultHandled()) >@@ -2369,7 +2369,7 @@ bool Node::dispatchBeforeLoadEvent(const > > void Node::dispatchInputEvent() > { >- dispatchScopedEvent(Event::create(eventNames().inputEvent, true, false)); >+ dispatchScopedEvent(Event::create(eventNames().inputEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void Node::defaultEventHandler(Event& event) >Index: Source/WebCore/dom/OverflowEvent.cpp >=================================================================== >--- Source/WebCore/dom/OverflowEvent.cpp (revision 234910) >+++ Source/WebCore/dom/OverflowEvent.cpp (working copy) >@@ -38,7 +38,7 @@ OverflowEvent::OverflowEvent() > } > > OverflowEvent::OverflowEvent(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow) >- : Event(eventNames().overflowchangedEvent, false, false) >+ : Event(eventNames().overflowchangedEvent, CanBubble::No, IsCancelable::No) > , m_horizontalOverflow(horizontalOverflow) > , m_verticalOverflow(verticalOverflow) > { >Index: Source/WebCore/dom/PageTransitionEvent.cpp >=================================================================== >--- Source/WebCore/dom/PageTransitionEvent.cpp (revision 234910) >+++ Source/WebCore/dom/PageTransitionEvent.cpp (working copy) >@@ -29,7 +29,7 @@ > namespace WebCore { > > PageTransitionEvent::PageTransitionEvent(const AtomicString& type, bool persisted) >- : Event(type, true, true) >+ : Event(type, CanBubble::Yes, IsCancelable::Yes) > , m_persisted(persisted) > { > } >Index: Source/WebCore/dom/PopStateEvent.cpp >=================================================================== >--- Source/WebCore/dom/PopStateEvent.cpp (revision 234910) >+++ Source/WebCore/dom/PopStateEvent.cpp (working copy) >@@ -40,7 +40,7 @@ PopStateEvent::PopStateEvent(const Atomi > } > > PopStateEvent::PopStateEvent(RefPtr<SerializedScriptValue>&& serializedState, History* history) >- : Event(eventNames().popstateEvent, false, false) >+ : Event(eventNames().popstateEvent, CanBubble::No, IsCancelable::No) > , m_serializedState(WTFMove(serializedState)) > , m_history(history) > { >Index: Source/WebCore/dom/ProgressEvent.cpp >=================================================================== >--- Source/WebCore/dom/ProgressEvent.cpp (revision 234910) >+++ Source/WebCore/dom/ProgressEvent.cpp (working copy) >@@ -37,7 +37,7 @@ ProgressEvent::ProgressEvent(const Atomi > } > > ProgressEvent::ProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_lengthComputable(lengthComputable) > , m_loaded(loaded) > , m_total(total) >Index: Source/WebCore/dom/ScriptElement.cpp >=================================================================== >--- Source/WebCore/dom/ScriptElement.cpp (revision 234910) >+++ Source/WebCore/dom/ScriptElement.cpp (working copy) >@@ -125,7 +125,7 @@ static bool isLegacySupportedJavaScriptL > > void ScriptElement::dispatchErrorEvent() > { >- m_element.dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ m_element.dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > std::optional<ScriptElement::ScriptType> ScriptElement::determineScriptType(LegacyTypeSupport supportLegacyTypes) const >Index: Source/WebCore/dom/SecurityPolicyViolationEvent.h >=================================================================== >--- Source/WebCore/dom/SecurityPolicyViolationEvent.h (revision 234910) >+++ Source/WebCore/dom/SecurityPolicyViolationEvent.h (working copy) >@@ -31,7 +31,7 @@ namespace WebCore { > > class SecurityPolicyViolationEvent final : public Event { > public: >- static Ref<SecurityPolicyViolationEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& documentURI, const String& referrer, const String& blockedURI, const String& violatedDirective, const String& effectiveDirective, const String& originalPolicy, const String& sourceFile, unsigned short statusCode, int lineNumber, int columnNumber) >+ static Ref<SecurityPolicyViolationEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, const String& documentURI, const String& referrer, const String& blockedURI, const String& violatedDirective, const String& effectiveDirective, const String& originalPolicy, const String& sourceFile, unsigned short statusCode, int lineNumber, int columnNumber) > { > return adoptRef(*new SecurityPolicyViolationEvent(type, canBubble, cancelable, documentURI, referrer, blockedURI, violatedDirective, effectiveDirective, originalPolicy, sourceFile, statusCode, lineNumber, columnNumber)); > } >@@ -80,7 +80,7 @@ private: > { > } > >- SecurityPolicyViolationEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& documentURI, const String& referrer, const String& blockedURI, const String& violatedDirective, const String& effectiveDirective, const String& originalPolicy, const String& sourceFile, unsigned short statusCode, int lineNumber, int columnNumber) >+ SecurityPolicyViolationEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, const String& documentURI, const String& referrer, const String& blockedURI, const String& violatedDirective, const String& effectiveDirective, const String& originalPolicy, const String& sourceFile, unsigned short statusCode, int lineNumber, int columnNumber) > : Event(type, canBubble, cancelable) > , m_documentURI(documentURI) > , m_referrer(referrer) >Index: Source/WebCore/dom/SimulatedClick.cpp >=================================================================== >--- Source/WebCore/dom/SimulatedClick.cpp (revision 234910) >+++ Source/WebCore/dom/SimulatedClick.cpp (working copy) >@@ -44,7 +44,7 @@ public: > > private: > SimulatedMouseEvent(const AtomicString& eventType, RefPtr<WindowProxy>&& view, RefPtr<Event>&& underlyingEvent, Element& target, SimulatedClickSource source) >- : MouseEvent(eventType, true, true, underlyingEvent ? underlyingEvent->timeStamp() : MonotonicTime::now(), WTFMove(view), 0, { }, { }, >+ : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, underlyingEvent ? underlyingEvent->timeStamp() : MonotonicTime::now(), WTFMove(view), 0, { }, { }, > #if ENABLE(POINTER_LOCK) > { }, > #endif >Index: Source/WebCore/dom/TextEvent.cpp >=================================================================== >--- Source/WebCore/dom/TextEvent.cpp (revision 234910) >+++ Source/WebCore/dom/TextEvent.cpp (working copy) >@@ -72,7 +72,7 @@ TextEvent::TextEvent() > } > > TextEvent::TextEvent(RefPtr<WindowProxy>&& view, const String& data, TextEventInputType inputType) >- : UIEvent(eventNames().textInputEvent, true, true, WTFMove(view), 0) >+ : UIEvent(eventNames().textInputEvent, CanBubble::Yes, IsCancelable::Yes, WTFMove(view), 0) > , m_inputType(inputType) > , m_data(data) > , m_shouldSmartReplace(false) >@@ -82,7 +82,7 @@ TextEvent::TextEvent(RefPtr<WindowProxy> > } > > TextEvent::TextEvent(RefPtr<WindowProxy>&& view, const String& data, RefPtr<DocumentFragment>&& pastingFragment, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling) >- : UIEvent(eventNames().textInputEvent, true, true, WTFMove(view), 0) >+ : UIEvent(eventNames().textInputEvent, CanBubble::Yes, IsCancelable::Yes, WTFMove(view), 0) > , m_inputType(TextEventInputPaste) > , m_data(data) > , m_pastingFragment(WTFMove(pastingFragment)) >@@ -93,7 +93,7 @@ TextEvent::TextEvent(RefPtr<WindowProxy> > } > > TextEvent::TextEvent(RefPtr<WindowProxy>&& view, const String& data, const Vector<DictationAlternative>& dictationAlternatives) >- : UIEvent(eventNames().textInputEvent, true, true, WTFMove(view), 0) >+ : UIEvent(eventNames().textInputEvent, CanBubble::Yes, IsCancelable::Yes, WTFMove(view), 0) > , m_inputType(TextEventInputDictation) > , m_data(data) > , m_shouldSmartReplace(false) >Index: Source/WebCore/dom/TouchEvent.cpp >=================================================================== >--- Source/WebCore/dom/TouchEvent.cpp (revision 234910) >+++ Source/WebCore/dom/TouchEvent.cpp (working copy) >@@ -36,16 +36,14 @@ namespace WebCore { > > TouchEvent::TouchEvent() = default; > >-TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, >- TouchList* changedTouches, const AtomicString& type, >- RefPtr<WindowProxy>&& view, int screenX, int screenY, int pageX, int pageY, >- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >- : MouseRelatedEvent(type, true, true, MonotonicTime::now(), WTFMove(view), 0, IntPoint(screenX, screenY), >- IntPoint(pageX, pageY), >+TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, TouchList* changedTouches, const AtomicString& type, >+ RefPtr<WindowProxy>&& view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >+ : MouseRelatedEvent(type, CanBubble::Yes, IsCancelable::Yes, MonotonicTime::now(), WTFMove(view), 0, IntPoint(screenX, screenY), >+ IntPoint(pageX, pageY), > #if ENABLE(POINTER_LOCK) >- IntPoint(0, 0), >+ IntPoint(0, 0), > #endif >- ctrlKey, altKey, shiftKey, metaKey) >+ ctrlKey, altKey, shiftKey, metaKey) > , m_touches(touches) > , m_targetTouches(targetTouches) > , m_changedTouches(changedTouches) >Index: Source/WebCore/dom/TransitionEvent.cpp >=================================================================== >--- Source/WebCore/dom/TransitionEvent.cpp (revision 234910) >+++ Source/WebCore/dom/TransitionEvent.cpp (working copy) >@@ -30,7 +30,7 @@ > namespace WebCore { > > TransitionEvent::TransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement) >- : Event(type, true, true) >+ : Event(type, CanBubble::Yes, IsCancelable::Yes) > , m_propertyName(propertyName) > , m_elapsedTime(elapsedTime) > , m_pseudoElement(pseudoElement) >Index: Source/WebCore/dom/UIEvent.cpp >=================================================================== >--- Source/WebCore/dom/UIEvent.cpp (revision 234910) >+++ Source/WebCore/dom/UIEvent.cpp (working copy) >@@ -32,15 +32,15 @@ UIEvent::UIEvent() > { > } > >-UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, RefPtr<WindowProxy>&& viewArg, int detailArg) >- : Event(eventType, canBubbleArg, cancelableArg) >+UIEvent::UIEvent(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& viewArg, int detailArg) >+ : Event(eventType, canBubble, cancelable) > , m_view(WTFMove(viewArg)) > , m_detail(detailArg) > { > } > >-UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, MonotonicTime timestamp, RefPtr<WindowProxy>&& viewArg, int detailArg) >- : Event(eventType, canBubbleArg, cancelableArg, timestamp) >+UIEvent::UIEvent(const AtomicString& eventType, CanBubble canBubble, IsCancelable cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& viewArg, int detailArg) >+ : Event(eventType, canBubble, cancelable, timestamp) > , m_view(WTFMove(viewArg)) > , m_detail(detailArg) > { >Index: Source/WebCore/dom/UIEvent.h >=================================================================== >--- Source/WebCore/dom/UIEvent.h (revision 234910) >+++ Source/WebCore/dom/UIEvent.h (working copy) >@@ -34,7 +34,7 @@ typedef WindowProxy AbstractView; > > class UIEvent : public Event { > public: >- static Ref<UIEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail) >+ static Ref<UIEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail) > { > return adoptRef(*new UIEvent(type, canBubble, cancelable, WTFMove(view), detail)); > } >@@ -65,8 +65,8 @@ public: > > protected: > UIEvent(); >- UIEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&&, int detail); >- UIEvent(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, int detail); >+ UIEvent(const AtomicString& type, CanBubble, IsCancelable, RefPtr<WindowProxy>&&, int detail); >+ UIEvent(const AtomicString& type, CanBubble, IsCancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&&, int detail); > UIEvent(const AtomicString&, const UIEventInit&, IsTrusted); > > private: >Index: Source/WebCore/dom/UIEventWithKeyState.h >=================================================================== >--- Source/WebCore/dom/UIEventWithKeyState.h (revision 234910) >+++ Source/WebCore/dom/UIEventWithKeyState.h (working copy) >@@ -40,7 +40,7 @@ public: > protected: > UIEventWithKeyState() = default; > >- UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<WindowProxy>&& view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) >+ UIEventWithKeyState(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, RefPtr<WindowProxy>&& view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) > : UIEvent(type, canBubble, cancelable, WTFMove(view), detail) > , m_ctrlKey(ctrlKey) > , m_altKey(altKey) >@@ -49,7 +49,7 @@ protected: > { > } > >- UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, >+ UIEventWithKeyState(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, MonotonicTime timestamp, RefPtr<WindowProxy>&& view, > int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey, bool capsLockKey) > : UIEvent(type, canBubble, cancelable, timestamp, WTFMove(view), detail) > , m_ctrlKey(ctrlKey) >Index: Source/WebCore/dom/WebKitAnimationEvent.cpp >=================================================================== >--- Source/WebCore/dom/WebKitAnimationEvent.cpp (revision 234910) >+++ Source/WebCore/dom/WebKitAnimationEvent.cpp (working copy) >@@ -36,7 +36,7 @@ WebKitAnimationEvent::WebKitAnimationEve > } > > WebKitAnimationEvent::WebKitAnimationEvent(const AtomicString& type, const String& animationName, double elapsedTime) >- : Event(type, true, true) >+ : Event(type, CanBubble::Yes, IsCancelable::Yes) > , m_animationName(animationName) > , m_elapsedTime(elapsedTime) > { >Index: Source/WebCore/dom/WebKitTransitionEvent.cpp >=================================================================== >--- Source/WebCore/dom/WebKitTransitionEvent.cpp (revision 234910) >+++ Source/WebCore/dom/WebKitTransitionEvent.cpp (working copy) >@@ -29,7 +29,7 @@ > namespace WebCore { > > WebKitTransitionEvent::WebKitTransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement) >- : Event(type, true, true) >+ : Event(type, CanBubble::Yes, IsCancelable::Yes) > , m_propertyName(propertyName) > , m_elapsedTime(elapsedTime) > , m_pseudoElement(pseudoElement) >Index: Source/WebCore/dom/WheelEvent.cpp >=================================================================== >--- Source/WebCore/dom/WheelEvent.cpp (revision 234910) >+++ Source/WebCore/dom/WheelEvent.cpp (working copy) >@@ -48,7 +48,7 @@ inline WheelEvent::WheelEvent(const Atom > } > > inline WheelEvent::WheelEvent(const PlatformWheelEvent& event, RefPtr<WindowProxy>&& view) >- : MouseEvent(eventNames().wheelEvent, true, true, event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.globalPosition(), event.position() >+ : MouseEvent(eventNames().wheelEvent, CanBubble::Yes, IsCancelable::Yes, event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.globalPosition(), event.position() > #if ENABLE(POINTER_LOCK) > , { } > #endif >Index: Source/WebCore/editing/Editor.cpp >=================================================================== >--- Source/WebCore/editing/Editor.cpp (revision 234910) >+++ Source/WebCore/editing/Editor.cpp (working copy) >@@ -110,12 +110,12 @@ > > namespace WebCore { > >-static bool dispatchBeforeInputEvent(Element& element, const AtomicString& inputType, const String& data = { }, RefPtr<DataTransfer>&& dataTransfer = nullptr, const Vector<RefPtr<StaticRange>>& targetRanges = { }, bool cancelable = true) >+static bool dispatchBeforeInputEvent(Element& element, const AtomicString& inputType, const String& data = { }, RefPtr<DataTransfer>&& dataTransfer = nullptr, const Vector<RefPtr<StaticRange>>& targetRanges = { }, Event::IsCancelable cancelable = Event::IsCancelable::Yes) > { > if (!element.document().settings().inputEventsEnabled()) > return true; > >- auto event = InputEvent::create(eventNames().beforeinputEvent, inputType, true, cancelable, element.document().windowProxy(), data, WTFMove(dataTransfer), targetRanges, 0); >+ auto event = InputEvent::create(eventNames().beforeinputEvent, inputType, Event::CanBubble::Yes, cancelable, element.document().windowProxy(), data, WTFMove(dataTransfer), targetRanges, 0); > element.dispatchEvent(event); > return !event->defaultPrevented(); > } >@@ -127,7 +127,8 @@ static void dispatchInputEvent(Element& > // but TypingCommands are special in that existing TypingCommands that are applied again fire input events *from within* the scope by calling typingAddedToOpenCommand. > // Instead, TypingCommands should always dispatch events synchronously after the end of the scoped queue in CompositeEditCommand::apply. To work around this for the > // time being, just revert back to calling dispatchScopedEvent. >- element.dispatchScopedEvent(InputEvent::create(eventNames().inputEvent, inputType, true, false, element.document().windowProxy(), data, WTFMove(dataTransfer), targetRanges, 0)); >+ element.dispatchScopedEvent(InputEvent::create(eventNames().inputEvent, inputType, Event::CanBubble::Yes, Event::IsCancelable::No, >+ element.document().windowProxy(), data, WTFMove(dataTransfer), targetRanges, 0)); > } else > element.dispatchInputEvent(); > } >@@ -1029,7 +1030,7 @@ static void notifyTextFromControls(Eleme > endingTextControl->didEditInnerTextValue(); > } > >-static bool dispatchBeforeInputEvents(RefPtr<Element> startRoot, RefPtr<Element> endRoot, const AtomicString& inputTypeName, const String& data = { }, RefPtr<DataTransfer>&& dataTransfer = nullptr, const Vector<RefPtr<StaticRange>>& targetRanges = { }, bool cancelable = true) >+static bool dispatchBeforeInputEvents(RefPtr<Element> startRoot, RefPtr<Element> endRoot, const AtomicString& inputTypeName, const String& data = { }, RefPtr<DataTransfer>&& dataTransfer = nullptr, const Vector<RefPtr<StaticRange>>& targetRanges = { }, Event::IsCancelable cancelable = Event::IsCancelable::Yes) > { > bool continueWithDefaultBehavior = true; > if (startRoot) >@@ -1056,7 +1057,8 @@ bool Editor::willApplyEditing(CompositeE > if (!composition) > return true; > >- return dispatchBeforeInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), command.inputEventTypeName(), command.inputEventData(), command.inputEventDataTransfer(), targetRanges, command.isBeforeInputEventCancelable()); >+ return dispatchBeforeInputEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement(), command.inputEventTypeName(), >+ command.inputEventData(), command.inputEventDataTransfer(), targetRanges, command.isBeforeInputEventCancelable() ? Event::IsCancelable::Yes : Event::IsCancelable::No); > } > > void Editor::appliedEditing(CompositeEditCommand& command) >Index: Source/WebCore/editing/FrameSelection.cpp >=================================================================== >--- Source/WebCore/editing/FrameSelection.cpp (revision 234910) >+++ Source/WebCore/editing/FrameSelection.cpp (working copy) >@@ -353,7 +353,7 @@ bool FrameSelection::setSelectionWithout > m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation(); > selectFrameElementInParentIfFullySelected(); > m_frame->editor().respondToChangedSelection(oldSelection, options); >- m_frame->document()->enqueueDocumentEvent(Event::create(eventNames().selectionchangeEvent, false, false)); >+ m_frame->document()->enqueueDocumentEvent(Event::create(eventNames().selectionchangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > return true; > } >@@ -1965,7 +1965,7 @@ void FrameSelection::selectAll() > return; > > if (selectStartTarget) { >- auto event = Event::create(eventNames().selectstartEvent, true, true); >+ auto event = Event::create(eventNames().selectstartEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes); > selectStartTarget->dispatchEvent(event); > if (event->defaultPrevented()) > return; >@@ -2425,7 +2425,7 @@ bool FrameSelection::dispatchSelectStart > if (!selectStartTarget) > return true; > >- auto event = Event::create(eventNames().selectstartEvent, true, true); >+ auto event = Event::create(eventNames().selectstartEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes); > selectStartTarget->dispatchEvent(event); > return !event->defaultPrevented(); > } >Index: Source/WebCore/html/HTMLDetailsElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLDetailsElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLDetailsElement.cpp (working copy) >@@ -142,7 +142,7 @@ bool HTMLDetailsElement::isActiveSummary > void HTMLDetailsElement::dispatchPendingEvent(DetailEventSender* eventSender) > { > ASSERT_UNUSED(eventSender, eventSender == &detailToggleEventSender()); >- dispatchEvent(Event::create(eventNames().toggleEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().toggleEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicString& value) >Index: Source/WebCore/html/HTMLFormControlElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLFormControlElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLFormControlElement.cpp (working copy) >@@ -317,7 +317,7 @@ void HTMLFormControlElement::setChangedS > > void HTMLFormControlElement::dispatchChangeEvent() > { >- dispatchScopedEvent(Event::create(eventNames().changeEvent, true, false)); >+ dispatchScopedEvent(Event::create(eventNames().changeEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void HTMLFormControlElement::dispatchFormControlChangeEvent() >@@ -474,7 +474,7 @@ bool HTMLFormControlElement::checkValidi > // An event handler can deref this object. > Ref<HTMLFormControlElement> protectedThis(*this); > Ref<Document> originalDocument(document()); >- auto event = Event::create(eventNames().invalidEvent, false, true); >+ auto event = Event::create(eventNames().invalidEvent, Event::CanBubble::No, Event::IsCancelable::Yes); > dispatchEvent(event); > if (!event->defaultPrevented() && unhandledInvalidControls && isConnected() && originalDocument.ptr() == &document()) > unhandledInvalidControls->append(this); >Index: Source/WebCore/html/HTMLFormElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLFormElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLFormElement.cpp (working copy) >@@ -283,7 +283,7 @@ void HTMLFormElement::prepareForSubmissi > > auto protectedThis = makeRef(*this); > >- auto submitEvent = Event::create(eventNames().submitEvent, true, true); >+ auto submitEvent = Event::create(eventNames().submitEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes); > dispatchEvent(submitEvent); > > // Event handling could have resulted in m_shouldSubmit becoming true as a side effect, too. >@@ -380,7 +380,7 @@ void HTMLFormElement::reset() > > SetForScope<bool> isInResetFunctionRestorer(m_isInResetFunction, true); > >- auto event = Event::create(eventNames().resetEvent, true, true); >+ auto event = Event::create(eventNames().resetEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes); > dispatchEvent(event); > if (!event->defaultPrevented()) > resetAssociatedFormControlElements(); >Index: Source/WebCore/html/HTMLImageLoader.cpp >=================================================================== >--- Source/WebCore/html/HTMLImageLoader.cpp (revision 234910) >+++ Source/WebCore/html/HTMLImageLoader.cpp (working copy) >@@ -58,7 +58,7 @@ void HTMLImageLoader::dispatchLoadEvent( > bool errorOccurred = image()->errorOccurred(); > if (!errorOccurred && image()->response().httpStatusCode() >= 400) > errorOccurred = is<HTMLObjectElement>(element()); // An <object> considers a 404 to be an error and should fire onerror. >- element().dispatchEvent(Event::create(errorOccurred ? eventNames().errorEvent : eventNames().loadEvent, false, false)); >+ element().dispatchEvent(Event::create(errorOccurred ? eventNames().errorEvent : eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > String HTMLImageLoader::sourceURI(const AtomicString& attr) const >Index: Source/WebCore/html/HTMLInputElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLInputElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLInputElement.cpp (working copy) >@@ -1484,7 +1484,7 @@ void HTMLInputElement::onSearch() > > if (m_inputType) > downcast<SearchInputType>(*m_inputType.get()).stopSearchEventTimer(); >- dispatchEvent(Event::create(eventNames().searchEvent, true, false)); >+ dispatchEvent(Event::create(eventNames().searchEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void HTMLInputElement::resumeFromDocumentSuspension() >Index: Source/WebCore/html/HTMLLinkElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLLinkElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLLinkElement.cpp (working copy) >@@ -495,9 +495,9 @@ void HTMLLinkElement::dispatchPendingEve > { > ASSERT_UNUSED(eventSender, eventSender == &linkLoadEventSender() || eventSender == &linkErrorEventSender()); > if (m_loadedResource) >- dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > else >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > DOMTokenList& HTMLLinkElement::relList() >Index: Source/WebCore/html/HTMLMediaElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLMediaElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLMediaElement.cpp (working copy) >@@ -1091,7 +1091,7 @@ void HTMLMediaElement::mediaPlayerActive > > void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) > { >- RefPtr<Event> event = Event::create(eventName, false, true); >+ RefPtr<Event> event = Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::Yes); > > // Don't set the event target, the event queue will set it in GenericEventQueue::timerFired and setting it here > // will trigger an ASSERT if this element has been marked for deletion. >@@ -1137,7 +1137,7 @@ void HTMLMediaElement::notifyAboutPlayin > Ref<HTMLMediaElement> protectedThis(*this); // The 'playing' event can make arbitrary DOM mutations. > m_playbackStartedTime = currentMediaTime().toDouble(); > m_hasEverNotifiedAboutPlaying = true; >- dispatchEvent(Event::create(eventNames().playingEvent, false, true)); >+ dispatchEvent(Event::create(eventNames().playingEvent, Event::CanBubble::No, Event::IsCancelable::Yes)); > resolvePendingPlayPromises(WTFMove(pendingPlayPromises)); > > schedulePlaybackControlsManagerUpdate(); >@@ -1897,19 +1897,19 @@ void HTMLMediaElement::updateActiveTextT > // correctly identifies the type of the event, if the startTime is > // less than the endTime in the cue. > if (eventTask.second->startTime() >= eventTask.second->endTime()) { >- auto enterEvent = Event::create(eventNames().enterEvent, false, false); >+ auto enterEvent = Event::create(eventNames().enterEvent, Event::CanBubble::No, Event::IsCancelable::No); > enterEvent->setTarget(eventTask.second); > m_asyncEventQueue.enqueueEvent(WTFMove(enterEvent)); > >- auto exitEvent = Event::create(eventNames().exitEvent, false, false); >+ auto exitEvent = Event::create(eventNames().exitEvent, Event::CanBubble::No, Event::IsCancelable::No); > exitEvent->setTarget(eventTask.second); > m_asyncEventQueue.enqueueEvent(WTFMove(exitEvent)); > } else { > RefPtr<Event> event; > if (eventTask.first == eventTask.second->startMediaTime()) >- event = Event::create(eventNames().enterEvent, false, false); >+ event = Event::create(eventNames().enterEvent, Event::CanBubble::No, Event::IsCancelable::No); > else >- event = Event::create(eventNames().exitEvent, false, false); >+ event = Event::create(eventNames().exitEvent, Event::CanBubble::No, Event::IsCancelable::No); > event->setTarget(eventTask.second); > m_asyncEventQueue.enqueueEvent(WTFMove(event)); > } >@@ -1922,14 +1922,14 @@ void HTMLMediaElement::updateActiveTextT > // 15 - For each text track in affected tracks, in the list order, queue a > // task to fire a simple event named cuechange at the TextTrack object, and, ... > for (auto& affectedTrack : affectedTracks) { >- auto event = Event::create(eventNames().cuechangeEvent, false, false); >+ auto event = Event::create(eventNames().cuechangeEvent, Event::CanBubble::No, Event::IsCancelable::No); > event->setTarget(affectedTrack); > m_asyncEventQueue.enqueueEvent(WTFMove(event)); > > // ... if the text track has a corresponding track element, to then fire a > // simple event named cuechange at the track element as well. > if (is<LoadableTextTrack>(*affectedTrack)) { >- auto event = Event::create(eventNames().cuechangeEvent, false, false); >+ auto event = Event::create(eventNames().cuechangeEvent, Event::CanBubble::No, Event::IsCancelable::No); > auto trackElement = makeRefPtr(downcast<LoadableTextTrack>(*affectedTrack).trackElement()); > ASSERT(trackElement); > event->setTarget(trackElement); >@@ -4395,7 +4395,7 @@ void HTMLMediaElement::layoutSizeChanged > if (auto frameView = makeRefPtr(document().view())) { > auto task = [this, protectedThis = makeRef(*this)] { > if (auto root = userAgentShadowRoot()) >- root->dispatchEvent(Event::create("resize", false, false)); >+ root->dispatchEvent(Event::create("resize", Event::CanBubble::No, Event::IsCancelable::No)); > }; > frameView->queuePostLayoutCallback(WTFMove(task)); > } >Index: Source/WebCore/html/HTMLPlugInImageElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLPlugInImageElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLPlugInImageElement.cpp (working copy) >@@ -612,7 +612,7 @@ void HTMLPlugInImageElement::checkSnapsh > } > > // Notify the shadow root that the size changed so that we may update the overlay layout. >- ensureUserAgentShadowRoot().dispatchEvent(Event::create(eventNames().resizeEvent, true, false)); >+ ensureUserAgentShadowRoot().dispatchEvent(Event::create(eventNames().resizeEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const URL& url) >Index: Source/WebCore/html/HTMLScriptElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLScriptElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLScriptElement.cpp (working copy) >@@ -176,7 +176,7 @@ void HTMLScriptElement::dispatchLoadEven > ASSERT(!haveFiredLoadEvent()); > setHaveFiredLoadEvent(true); > >- dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > Ref<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren(Document& targetDocument) >Index: Source/WebCore/html/HTMLSlotElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLSlotElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLSlotElement.cpp (working copy) >@@ -142,9 +142,7 @@ void HTMLSlotElement::dispatchSlotChange > { > m_inSignalSlotList = false; > >- bool bubbles = true; >- bool cancelable = false; >- Ref<Event> event = Event::create(eventNames().slotchangeEvent, bubbles, cancelable); >+ Ref<Event> event = Event::create(eventNames().slotchangeEvent, Event::CanBubble::Yes, Event::IsCancelable::No); > event->setTarget(this); > dispatchEvent(event); > } >Index: Source/WebCore/html/HTMLSourceElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLSourceElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLSourceElement.cpp (working copy) >@@ -115,7 +115,7 @@ void HTMLSourceElement::cancelPendingErr > void HTMLSourceElement::errorEventTimerFired() > { > LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); >- dispatchEvent(Event::create(eventNames().errorEvent, false, true)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::Yes)); > } > > bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const >Index: Source/WebCore/html/HTMLStyleElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLStyleElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLStyleElement.cpp (working copy) >@@ -130,9 +130,9 @@ void HTMLStyleElement::dispatchPendingEv > { > ASSERT_UNUSED(eventSender, eventSender == &styleLoadEventSender()); > if (m_loadedSheet) >- dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > else >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred) >Index: Source/WebCore/html/HTMLTextFormControlElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLTextFormControlElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLTextFormControlElement.cpp (working copy) >@@ -490,7 +490,7 @@ void HTMLTextFormControlElement::selecti > cacheSelection(computeSelectionStart(), computeSelectionEnd(), computeSelectionDirection()); > > if (shouldFireSelectEvent && m_cachedSelectionStart != m_cachedSelectionEnd) >- dispatchEvent(Event::create(eventNames().selectEvent, true, false)); >+ dispatchEvent(Event::create(eventNames().selectEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value) >Index: Source/WebCore/html/HTMLTrackElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLTrackElement.cpp (revision 234910) >+++ Source/WebCore/html/HTMLTrackElement.cpp (working copy) >@@ -247,7 +247,7 @@ void HTMLTrackElement::didCompleteLoad(L > > if (status == Failure) { > setReadyState(HTMLTrackElement::TRACK_ERROR); >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > return; > } > >@@ -258,7 +258,7 @@ void HTMLTrackElement::didCompleteLoad(L > > // 2. If the file was successfully processed, fire a simple event named load at the > // track element. >- dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > // NOTE: The values in the TextTrack::ReadinessState enum must stay in sync with those in HTMLTrackElement::ReadyState. >Index: Source/WebCore/html/MediaController.cpp >=================================================================== >--- Source/WebCore/html/MediaController.cpp (revision 234910) >+++ Source/WebCore/html/MediaController.cpp (working copy) >@@ -532,7 +532,7 @@ bool MediaController::hasEnded() const > > void MediaController::scheduleEvent(const AtomicString& eventName) > { >- m_pendingEvents.append(Event::create(eventName, false, true)); >+ m_pendingEvents.append(Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::Yes)); > if (!m_asyncEventTimer.isActive()) > m_asyncEventTimer.startOneShot(0_s); > } >Index: Source/WebCore/html/canvas/WebGLContextEvent.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGLContextEvent.cpp (revision 234910) >+++ Source/WebCore/html/canvas/WebGLContextEvent.cpp (working copy) >@@ -30,7 +30,7 @@ > > namespace WebCore { > >-WebGLContextEvent::WebGLContextEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) >+WebGLContextEvent::WebGLContextEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, const String& statusMessage) > : Event(type, canBubble, cancelable) > , m_statusMessage(statusMessage) > { >Index: Source/WebCore/html/canvas/WebGLContextEvent.h >=================================================================== >--- Source/WebCore/html/canvas/WebGLContextEvent.h (revision 234910) >+++ Source/WebCore/html/canvas/WebGLContextEvent.h (working copy) >@@ -31,7 +31,7 @@ namespace WebCore { > > class WebGLContextEvent final : public Event { > public: >- static Ref<WebGLContextEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) >+ static Ref<WebGLContextEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, const String& statusMessage) > { > return adoptRef(*new WebGLContextEvent(type, canBubble, cancelable, statusMessage)); > } >@@ -51,7 +51,7 @@ public: > EventInterface eventInterface() const override; > > private: >- WebGLContextEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage); >+ WebGLContextEvent(const AtomicString& type, CanBubble, IsCancelable, const String& statusMessage); > WebGLContextEvent(const AtomicString&, const Init&, IsTrusted); > > String m_statusMessage; >Index: Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (revision 234910) >+++ Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (working copy) >@@ -538,7 +538,8 @@ std::unique_ptr<WebGLRenderingContextBas > // The FrameLoaderClient might block creation of a new WebGL context despite the page settings; in > // particular, if WebGL contexts were lost one or more times via the GL_ARB_robustness extension. > if (!frame->loader().client().allowWebGL(frame->settings().webGLEnabled())) { >- canvasElement->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Web page was not allowed to create a WebGL context.")); >+ canvasElement->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, >+ Event::CanBubble::No, Event::IsCancelable::Yes, "Web page was not allowed to create a WebGL context.")); > return nullptr; > } > >@@ -601,8 +602,10 @@ std::unique_ptr<WebGLRenderingContextBas > > auto context = GraphicsContext3D::create(attributes, hostWindow); > if (!context || !context->makeContextCurrent()) { >- if (canvasElement) >- canvasElement->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Could not create a WebGL context.")); >+ if (canvasElement) { >+ canvasElement->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, >+ Event::CanBubble::No, Event::IsCancelable::Yes, "Could not create a WebGL context.")); >+ } > return nullptr; > } > >@@ -6017,7 +6020,7 @@ void WebGLRenderingContextBase::dispatch > if (!canvas) > return; > >- Ref<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, false, true, emptyString()); >+ Ref<WebGLContextEvent> event = WebGLContextEvent::create(eventNames().webglcontextlostEvent, Event::CanBubble::No, Event::IsCancelable::Yes, emptyString()); > canvas->dispatchEvent(event); > m_restoreAllowed = event->defaultPrevented(); > if (m_contextLostMode == RealLostContext && m_restoreAllowed) >@@ -6103,7 +6106,7 @@ void WebGLRenderingContextBase::maybeRes > setupFlags(); > initializeNewContext(); > initializeVertexArrayObjects(); >- canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, false, true, emptyString())); >+ canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextrestoredEvent, Event::CanBubble::No, Event::IsCancelable::Yes, emptyString())); > } > > void WebGLRenderingContextBase::dispatchContextChangedEvent() >@@ -6112,7 +6115,7 @@ void WebGLRenderingContextBase::dispatch > if (!canvas) > return; > >- canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextchangedEvent, false, true, emptyString())); >+ canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextchangedEvent, Event::CanBubble::No, Event::IsCancelable::Yes, emptyString())); > } > > void WebGLRenderingContextBase::simulateContextChanged() >Index: Source/WebCore/html/parser/HTMLScriptRunner.cpp >=================================================================== >--- Source/WebCore/html/parser/HTMLScriptRunner.cpp (revision 234910) >+++ Source/WebCore/html/parser/HTMLScriptRunner.cpp (working copy) >@@ -85,7 +85,7 @@ static URL documentURLForScriptExecution > > inline Ref<Event> createScriptLoadEvent() > { >- return Event::create(eventNames().loadEvent, false, false); >+ return Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No); > } > > bool HTMLScriptRunner::isPendingScriptReady(const PendingScript& script) >Index: Source/WebCore/html/track/TrackEvent.cpp >=================================================================== >--- Source/WebCore/html/track/TrackEvent.cpp (revision 234910) >+++ Source/WebCore/html/track/TrackEvent.cpp (working copy) >@@ -48,7 +48,7 @@ static inline std::optional<TrackEvent:: > return std::nullopt; > } > >-TrackEvent::TrackEvent(const AtomicString& type, bool canBubble, bool cancelable, Ref<TrackBase>&& track) >+TrackEvent::TrackEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, Ref<TrackBase>&& track) > : Event(type, canBubble, cancelable) > , m_track(convertToTrackEventTrack(WTFMove(track))) > { >Index: Source/WebCore/html/track/TrackEvent.h >=================================================================== >--- Source/WebCore/html/track/TrackEvent.h (revision 234910) >+++ Source/WebCore/html/track/TrackEvent.h (working copy) >@@ -38,7 +38,7 @@ class TrackEvent final : public Event { > public: > virtual ~TrackEvent(); > >- static Ref<TrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, Ref<TrackBase>&& track) >+ static Ref<TrackEvent> create(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable, Ref<TrackBase>&& track) > { > return adoptRef(*new TrackEvent(type, canBubble, cancelable, WTFMove(track))); > } >@@ -57,7 +57,7 @@ public: > std::optional<TrackEventTrack> track() const { return m_track; } > > private: >- TrackEvent(const AtomicString& type, bool canBubble, bool cancelable, Ref<TrackBase>&&); >+ TrackEvent(const AtomicString& type, CanBubble, IsCancelable, Ref<TrackBase>&&); > TrackEvent(const AtomicString& type, Init&& initializer, IsTrusted); > > EventInterface eventInterface() const override; >Index: Source/WebCore/html/track/TrackListBase.cpp >=================================================================== >--- Source/WebCore/html/track/TrackListBase.cpp (revision 234910) >+++ Source/WebCore/html/track/TrackListBase.cpp (working copy) >@@ -95,7 +95,7 @@ bool TrackListBase::contains(TrackBase& > > void TrackListBase::scheduleTrackEvent(const AtomicString& eventName, Ref<TrackBase>&& track) > { >- m_asyncEventQueue.enqueueEvent(TrackEvent::create(eventName, false, false, WTFMove(track))); >+ m_asyncEventQueue.enqueueEvent(TrackEvent::create(eventName, Event::CanBubble::No, Event::IsCancelable::No, WTFMove(track))); > } > > void TrackListBase::scheduleAddTrackEvent(Ref<TrackBase>&& track) >@@ -158,7 +158,7 @@ void TrackListBase::scheduleChangeEvent( > // Whenever a track in a VideoTrackList that was previously not selected is > // selected, the user agent must queue a task to fire a simple event named > // change at the VideoTrackList object. >- m_asyncEventQueue.enqueueEvent(Event::create(eventNames().changeEvent, false, false)); >+ m_asyncEventQueue.enqueueEvent(Event::create(eventNames().changeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > bool TrackListBase::isChangeEventScheduled() const >Index: Source/WebCore/loader/DocumentLoader.cpp >=================================================================== >--- Source/WebCore/loader/DocumentLoader.cpp (revision 234910) >+++ Source/WebCore/loader/DocumentLoader.cpp (working copy) >@@ -731,7 +731,7 @@ void DocumentLoader::stopLoadingAfterXFr > InspectorInstrumentation::continueAfterXFrameOptionsDenied(*m_frame, identifier, *this, response); > m_frame->document()->enforceSandboxFlags(SandboxOrigin); > if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) >- ownerElement->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ ownerElement->dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > // The load event might have detached this frame. In that case, the load will already have been cancelled during detach. > if (FrameLoader* frameLoader = this->frameLoader()) >Index: Source/WebCore/loader/FrameLoader.cpp >=================================================================== >--- Source/WebCore/loader/FrameLoader.cpp (revision 234910) >+++ Source/WebCore/loader/FrameLoader.cpp (working copy) >@@ -3155,7 +3155,7 @@ void FrameLoader::dispatchUnloadEvents(U > // https://bugs.webkit.org/show_bug.cgi?id=116770 > > if (m_frame.document()->pageCacheState() == Document::NotInPageCache) { >- Ref<Event> unloadEvent(Event::create(eventNames().unloadEvent, false, false)); >+ Ref<Event> unloadEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > // The DocumentLoader (and thus its LoadTiming) might get destroyed > // while dispatching the event, so protect it to prevent writing the end > // time into freed memory. >Index: Source/WebCore/loader/ImageLoader.cpp >=================================================================== >--- Source/WebCore/loader/ImageLoader.cpp (revision 234910) >+++ Source/WebCore/loader/ImageLoader.cpp (working copy) >@@ -505,7 +505,7 @@ void ImageLoader::dispatchPendingErrorEv > return; > m_hasPendingErrorEvent = false; > if (element().document().hasLivingRenderTree()) >- element().dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ element().dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > // Only consider updating the protection ref-count of the Element immediately before returning > // from this function as doing so might result in the destruction of this ImageLoader. >Index: Source/WebCore/loader/PolicyChecker.cpp >=================================================================== >--- Source/WebCore/loader/PolicyChecker.cpp (revision 234910) >+++ Source/WebCore/loader/PolicyChecker.cpp (working copy) >@@ -132,7 +132,7 @@ void PolicyChecker::checkNavigationPolic > if (m_frame.ownerElement()) { > // Fire a load event (even though we were blocked by CSP) as timing attacks would otherwise > // reveal that the frame was blocked. This way, it looks like any other cross-origin page load. >- m_frame.ownerElement()->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ m_frame.ownerElement()->dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > function(WTFMove(request), { }, ShouldContinue::No); > return; >Index: Source/WebCore/loader/appcache/ApplicationCacheHost.cpp >=================================================================== >--- Source/WebCore/loader/appcache/ApplicationCacheHost.cpp (revision 234910) >+++ Source/WebCore/loader/appcache/ApplicationCacheHost.cpp (working copy) >@@ -374,7 +374,7 @@ static Ref<Event> createApplicationCache > { > if (eventType == eventNames().progressEvent) > return ProgressEvent::create(eventType, true, done, total); >- return Event::create(eventType, false, false); >+ return Event::create(eventType, Event::CanBubble::No, Event::IsCancelable::No); > } > > void ApplicationCacheHost::dispatchDOMEvent(const AtomicString& eventType, int total, int done) >Index: Source/WebCore/page/DOMWindow.cpp >=================================================================== >--- Source/WebCore/page/DOMWindow.cpp (revision 234910) >+++ Source/WebCore/page/DOMWindow.cpp (working copy) >@@ -307,7 +307,7 @@ void DOMWindow::dispatchAllPendingUnload > continue; > > window->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), window->document()); >- window->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), window->document()); >+ window->dispatchEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No), window->document()); > > window->enableSuddenTermination(); > } >@@ -1991,7 +1991,7 @@ bool DOMWindow::removeEventListener(cons > void DOMWindow::languagesChanged() > { > if (auto* document = this->document()) >- document->enqueueWindowEvent(Event::create(eventNames().languagechangeEvent, false, false)); >+ document->enqueueWindowEvent(Event::create(eventNames().languagechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void DOMWindow::dispatchLoadEvent() >@@ -2005,7 +2005,7 @@ void DOMWindow::dispatchLoadEvent() > if (shouldMarkLoadEventTimes) > protectedLoader->timing().markLoadEventStart(); > >- dispatchEvent(Event::create(eventNames().loadEvent, false, false), document()); >+ dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No), document()); > > if (shouldMarkLoadEventTimes) > protectedLoader->timing().markLoadEventEnd(); >@@ -2013,7 +2013,7 @@ void DOMWindow::dispatchLoadEvent() > // Send a separate load event to the element that owns this frame. > if (frame()) { > if (auto* owner = frame()->ownerElement()) >- owner->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ owner->dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > InspectorInstrumentation::loadEventFired(frame()); >Index: Source/WebCore/page/EventHandler.cpp >=================================================================== >--- Source/WebCore/page/EventHandler.cpp (revision 234910) >+++ Source/WebCore/page/EventHandler.cpp (working copy) >@@ -472,7 +472,7 @@ static inline bool dispatchSelectStart(N > if (!node || !node->renderer()) > return true; > >- auto event = Event::create(eventNames().selectstartEvent, true, true); >+ auto event = Event::create(eventNames().selectstartEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes); > node->dispatchEvent(event); > return !event->defaultPrevented(); > } >@@ -2213,7 +2213,7 @@ bool EventHandler::dispatchDragEvent(con > > view->disableLayerFlushThrottlingTemporarilyForInteraction(); > Ref<MouseEvent> me = MouseEvent::create(eventType, >- true, true, event.timestamp().approximateMonotonicTime(), &m_frame.windowProxy(), >+ Event::CanBubble::Yes, Event::IsCancelable::Yes, event.timestamp().approximateMonotonicTime(), &m_frame.windowProxy(), > 0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), > #if ENABLE(POINTER_LOCK) > event.movementDelta().x(), event.movementDelta().y(), >Index: Source/WebCore/page/EventSource.cpp >=================================================================== >--- Source/WebCore/page/EventSource.cpp (revision 234910) >+++ Source/WebCore/page/EventSource.cpp (working copy) >@@ -140,7 +140,7 @@ void EventSource::scheduleReconnect() > { > m_state = CONNECTING; > m_connectTimer.startOneShot(1_ms * m_reconnectDelay); >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void EventSource::close() >@@ -196,13 +196,13 @@ void EventSource::didReceiveResponse(uns > > if (!responseIsValid(response)) { > m_loader->cancel(); >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > return; > } > > m_eventStreamOrigin = SecurityOriginData::fromURL(response.url()).toString(); > m_state = OPEN; >- dispatchEvent(Event::create(eventNames().openEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().openEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void EventSource::didReceiveData(const char* data, int length) >@@ -264,7 +264,7 @@ void EventSource::abortConnectionAttempt > } > > ASSERT(m_state == CLOSED); >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > void EventSource::parseEventStream() >Index: Source/WebCore/page/FocusController.cpp >=================================================================== >--- Source/WebCore/page/FocusController.cpp (revision 234910) >+++ Source/WebCore/page/FocusController.cpp (working copy) >@@ -278,7 +278,7 @@ static inline void dispatchEventsOnWindo > > if (!focused && document->focusedElement()) > document->focusedElement()->dispatchBlurEvent(nullptr); >- document->dispatchWindowEvent(Event::create(focused ? eventNames().focusEvent : eventNames().blurEvent, false, false)); >+ document->dispatchWindowEvent(Event::create(focused ? eventNames().focusEvent : eventNames().blurEvent, Event::CanBubble::No, Event::IsCancelable::No)); > if (focused && document->focusedElement()) > document->focusedElement()->dispatchFocusEvent(nullptr, FocusDirectionNone); > } >@@ -331,12 +331,12 @@ void FocusController::setFocusedFrame(Fr > // Now that the frame is updated, fire events and update the selection focused states of both frames. > if (oldFrame && oldFrame->view()) { > oldFrame->selection().setFocused(false); >- oldFrame->document()->dispatchWindowEvent(Event::create(eventNames().blurEvent, false, false)); >+ oldFrame->document()->dispatchWindowEvent(Event::create(eventNames().blurEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > if (newFrame && newFrame->view() && isFocused()) { > newFrame->selection().setFocused(true); >- newFrame->document()->dispatchWindowEvent(Event::create(eventNames().focusEvent, false, false)); >+ newFrame->document()->dispatchWindowEvent(Event::create(eventNames().focusEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > m_page.chrome().focusedFrameChanged(newFrame.get()); >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 234910) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -3323,7 +3323,7 @@ void FrameView::sendResizeEventIfNeeded( > > LOG(Events, "FrameView %p sendResizeEventIfNeeded sending resize event, size %dx%d (canSendResizeEventSynchronously %d)", this, currentSize.width(), currentSize.height(), canSendResizeEventSynchronously); > >- Ref<Event> resizeEvent = Event::create(eventNames().resizeEvent, false, false); >+ Ref<Event> resizeEvent = Event::create(eventNames().resizeEvent, Event::CanBubble::No, Event::IsCancelable::No); > if (canSendResizeEventSynchronously) > frame().document()->dispatchWindowEvent(resizeEvent); > else { >Index: Source/WebCore/page/Page.cpp >=================================================================== >--- Source/WebCore/page/Page.cpp (revision 234910) >+++ Source/WebCore/page/Page.cpp (working copy) >@@ -188,7 +188,7 @@ static void networkStateChanged(bool isO > for (auto& frame : frames) { > if (!frame->document()) > continue; >- frame->document()->dispatchWindowEvent(Event::create(eventName, false, false)); >+ frame->document()->dispatchWindowEvent(Event::create(eventName, Event::CanBubble::No, Event::IsCancelable::No)); > } > } > >Index: Source/WebCore/page/Performance.cpp >=================================================================== >--- Source/WebCore/page/Performance.cpp (revision 234910) >+++ Source/WebCore/page/Performance.cpp (working copy) >@@ -215,7 +215,7 @@ void Performance::resourceTimingBufferFu > ASSERT(m_backupResourceTimingBuffer.isEmpty()); > > m_resourceTimingBufferFullFlag = true; >- dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, true, false)); >+ dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); > > if (m_resourceTimingBufferFullFlag) { > for (auto& entry : backupBuffer) >Index: Source/WebCore/page/PointerLockController.cpp >=================================================================== >--- Source/WebCore/page/PointerLockController.cpp (revision 234910) >+++ Source/WebCore/page/PointerLockController.cpp (working copy) >@@ -207,7 +207,7 @@ void PointerLockController::enqueueEvent > void PointerLockController::enqueueEvent(const AtomicString& type, Document* document) > { > if (document) >- document->enqueueDocumentEvent(Event::create(type, true, false)); >+ document->enqueueDocumentEvent(Event::create(type, Event::CanBubble::Yes, Event::IsCancelable::No)); > } > > } // namespace WebCore >Index: Source/WebCore/page/VisualViewport.cpp >=================================================================== >--- Source/WebCore/page/VisualViewport.cpp (revision 234910) >+++ Source/WebCore/page/VisualViewport.cpp (working copy) >@@ -180,9 +180,7 @@ void VisualViewport::enqueueResizeEvent( > if (!m_frame) > return; > >- bool bubbles = false; >- bool cancelable = false; >- m_frame->document()->eventQueue().enqueueResizeEvent(*this, bubbles, cancelable); >+ m_frame->document()->eventQueue().enqueueResizeEvent(*this, Event::CanBubble::No, Event::IsCancelable::No); > } > > void VisualViewport::enqueueScrollEvent() >@@ -190,9 +188,7 @@ void VisualViewport::enqueueScrollEvent( > if (!m_frame) > return; > >- bool bubbles = false; >- bool cancelable = false; >- m_frame->document()->eventQueue().enqueueScrollEvent(*this, bubbles, cancelable); >+ m_frame->document()->eventQueue().enqueueScrollEvent(*this, Event::CanBubble::No, Event::IsCancelable::No); > } > > } // namespace WebCore >Index: Source/WebCore/storage/StorageEvent.cpp >=================================================================== >--- Source/WebCore/storage/StorageEvent.cpp (revision 234910) >+++ Source/WebCore/storage/StorageEvent.cpp (working copy) >@@ -50,7 +50,7 @@ Ref<StorageEvent> StorageEvent::create(c > } > > StorageEvent::StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea) >- : Event(type, false, false) >+ : Event(type, CanBubble::No, IsCancelable::No) > , m_key(key) > , m_oldValue(oldValue) > , m_newValue(newValue) >Index: Source/WebCore/svg/SVGElement.cpp >=================================================================== >--- Source/WebCore/svg/SVGElement.cpp (revision 234910) >+++ Source/WebCore/svg/SVGElement.cpp (working copy) >@@ -603,7 +603,7 @@ void SVGElement::sendSVGLoadEventIfPossi > if (sendParentLoadEvents) > parent = currentTarget->parentOrShadowHostElement(); // save the next parent to dispatch too incase dispatching the event changes the tree > if (hasLoadListener(currentTarget.get())) >- currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); >+ currentTarget->dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > currentTarget = (parent && parent->isSVGElement()) ? static_pointer_cast<SVGElement>(parent) : RefPtr<SVGElement>(); > SVGElement* element = currentTarget.get(); > if (!element || !element->isOutermostSVGSVGElement()) >Index: Source/WebCore/svg/SVGImageLoader.cpp >=================================================================== >--- Source/WebCore/svg/SVGImageLoader.cpp (revision 234910) >+++ Source/WebCore/svg/SVGImageLoader.cpp (working copy) >@@ -39,7 +39,7 @@ SVGImageLoader::~SVGImageLoader() = defa > void SVGImageLoader::dispatchLoadEvent() > { > if (image()->errorOccurred()) >- element().dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ element().dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > else { > if (downcast<SVGImageElement>(element()).externalResourcesRequired()) > downcast<SVGImageElement>(ImageLoader::element()).sendSVGLoadEventIfPossible(true); >Index: Source/WebCore/svg/SVGUseElement.cpp >=================================================================== >--- Source/WebCore/svg/SVGUseElement.cpp (revision 234910) >+++ Source/WebCore/svg/SVGUseElement.cpp (working copy) >@@ -559,7 +559,7 @@ void SVGUseElement::notifyFinished(Cache > ASSERT(ScriptDisallowedScope::InMainThread::isScriptAllowed()); > invalidateShadowTree(); > if (resource.errorOccurred()) >- dispatchEvent(Event::create(eventNames().errorEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); > else if (!resource.wasCanceled()) > SVGExternalResourcesRequired::dispatchLoadEvent(); > } >Index: Source/WebCore/svg/animation/SVGSMILElement.cpp >=================================================================== >--- Source/WebCore/svg/animation/SVGSMILElement.cpp (revision 234910) >+++ Source/WebCore/svg/animation/SVGSMILElement.cpp (working copy) >@@ -1222,7 +1222,7 @@ void SVGSMILElement::dispatchPendingEven > { > ASSERT(eventSender == &smilBeginEventSender() || eventSender == &smilEndEventSender()); > const AtomicString& eventType = eventSender->eventType(); >- dispatchEvent(Event::create(eventType, false, false)); >+ dispatchEvent(Event::create(eventType, Event::CanBubble::No, Event::IsCancelable::No)); > } > > } >Index: Source/WebCore/workers/Worker.cpp >=================================================================== >--- Source/WebCore/workers/Worker.cpp (revision 234910) >+++ Source/WebCore/workers/Worker.cpp (working copy) >@@ -181,7 +181,7 @@ void Worker::notifyFinished() > PAL::SessionID sessionID = context ? context->sessionID() : PAL::SessionID(); > > if (m_scriptLoader->failed() || !sessionID.isValid()) >- dispatchEvent(Event::create(eventNames().errorEvent, false, true)); >+ dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::Yes)); > else { > bool isOnline = platformStrategies()->loaderStrategy()->isOnLine(); > const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders = m_contentSecurityPolicyResponseHeaders ? m_contentSecurityPolicyResponseHeaders.value() : scriptExecutionContext()->contentSecurityPolicy()->responseHeaders(); >Index: Source/WebCore/workers/WorkerMessagingProxy.cpp >=================================================================== >--- Source/WebCore/workers/WorkerMessagingProxy.cpp (revision 234910) >+++ Source/WebCore/workers/WorkerMessagingProxy.cpp (working copy) >@@ -227,7 +227,7 @@ void WorkerMessagingProxy::notifyNetwork > m_workerThread->runLoop().postTask([isOnline] (ScriptExecutionContext& context) { > auto& globalScope = downcast<WorkerGlobalScope>(context); > globalScope.setIsOnline(isOnline); >- globalScope.dispatchEvent(Event::create(isOnline ? eventNames().onlineEvent : eventNames().offlineEvent, false, false)); >+ globalScope.dispatchEvent(Event::create(isOnline ? eventNames().onlineEvent : eventNames().offlineEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }); > } > >Index: Source/WebCore/workers/service/ExtendableEvent.cpp >=================================================================== >--- Source/WebCore/workers/service/ExtendableEvent.cpp (revision 234910) >+++ Source/WebCore/workers/service/ExtendableEvent.cpp (working copy) >@@ -39,8 +39,8 @@ ExtendableEvent::ExtendableEvent(const A > { > } > >-ExtendableEvent::ExtendableEvent(const AtomicString& type, bool bubbles, bool cancelable) >- : Event(type, bubbles, cancelable) >+ExtendableEvent::ExtendableEvent(const AtomicString& type, CanBubble canBubble, IsCancelable cancelable) >+ : Event(type, canBubble, cancelable) > { > } > >Index: Source/WebCore/workers/service/ExtendableEvent.h >=================================================================== >--- Source/WebCore/workers/service/ExtendableEvent.h (revision 234910) >+++ Source/WebCore/workers/service/ExtendableEvent.h (working copy) >@@ -53,7 +53,7 @@ public: > > protected: > WEBCORE_EXPORT ExtendableEvent(const AtomicString&, const ExtendableEventInit&, IsTrusted); >- ExtendableEvent(const AtomicString&, bool bubbles, bool cancelable); >+ ExtendableEvent(const AtomicString&, CanBubble, IsCancelable); > > void addExtendLifetimePromise(Ref<DOMPromise>&&); > >Index: Source/WebCore/workers/service/ExtendableMessageEvent.cpp >=================================================================== >--- Source/WebCore/workers/service/ExtendableMessageEvent.cpp (revision 234910) >+++ Source/WebCore/workers/service/ExtendableMessageEvent.cpp (working copy) >@@ -48,7 +48,7 @@ ExtendableMessageEvent::ExtendableMessag > } > > ExtendableMessageEvent::ExtendableMessageEvent(RefPtr<SerializedScriptValue>&& data, const String& origin, const String& lastEventId, std::optional<ExtendableMessageEventSource>&& source, Vector<RefPtr<MessagePort>>&& ports) >- : ExtendableEvent(eventNames().messageEvent, false, false) >+ : ExtendableEvent(eventNames().messageEvent, CanBubble::No, IsCancelable::No) > , m_data(WTFMove(data)) > , m_origin(origin) > , m_lastEventId(lastEventId) >Index: Source/WebCore/workers/service/ServiceWorker.cpp >=================================================================== >--- Source/WebCore/workers/service/ServiceWorker.cpp (revision 234910) >+++ Source/WebCore/workers/service/ServiceWorker.cpp (working copy) >@@ -86,7 +86,7 @@ void ServiceWorker::scheduleTaskToUpdate > m_data.state = state; > if (state != State::Installing && !m_isStopped) { > ASSERT(m_pendingActivityForEventDispatch); >- dispatchEvent(Event::create(eventNames().statechangeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().statechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > > updatePendingActivityForEventDispatch(); >Index: Source/WebCore/workers/service/ServiceWorkerContainer.cpp >=================================================================== >--- Source/WebCore/workers/service/ServiceWorkerContainer.cpp (revision 234910) >+++ Source/WebCore/workers/service/ServiceWorkerContainer.cpp (working copy) >@@ -611,7 +611,7 @@ void ServiceWorkerContainer::scheduleTas > if (m_isStopped) > return; > >- dispatchEvent(Event::create(eventNames().controllerchangeEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().controllerchangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }); > } > >Index: Source/WebCore/workers/service/ServiceWorkerRegistration.cpp >=================================================================== >--- Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (revision 234910) >+++ Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (working copy) >@@ -215,7 +215,7 @@ void ServiceWorkerRegistration::schedule > REGISTRATION_RELEASE_LOG_IF_ALLOWED("scheduleTaskToFireUpdateFoundEvent: Firing updatefound event for registration %llu", identifier().toUInt64()); > > ASSERT(m_pendingActivityForEventDispatch); >- dispatchEvent(Event::create(eventNames().updatefoundEvent, false, false)); >+ dispatchEvent(Event::create(eventNames().updatefoundEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }); > } > >Index: Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp >=================================================================== >--- Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp (revision 234910) >+++ Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp (working copy) >@@ -181,7 +181,7 @@ void ServiceWorkerThreadProxy::notifyNet > postTaskForModeToWorkerGlobalScope([isOnline] (ScriptExecutionContext& context) { > auto& globalScope = downcast<WorkerGlobalScope>(context); > globalScope.setIsOnline(isOnline); >- globalScope.dispatchEvent(Event::create(isOnline ? eventNames().onlineEvent : eventNames().offlineEvent, false, false)); >+ globalScope.dispatchEvent(Event::create(isOnline ? eventNames().onlineEvent : eventNames().offlineEvent, Event::CanBubble::No, Event::IsCancelable::No)); > }, WorkerRunLoop::defaultMode()); > } > >Index: Source/WebCore/xml/XMLHttpRequest.cpp >=================================================================== >--- Source/WebCore/xml/XMLHttpRequest.cpp (revision 234910) >+++ Source/WebCore/xml/XMLHttpRequest.cpp (working copy) >@@ -302,8 +302,10 @@ void XMLHttpRequest::callReadyStateChang > // Check whether sending load and loadend events before sending readystatechange event, as it may change m_error/m_state values. > bool shouldSendLoadEvent = (m_state == DONE && !m_error); > >- if (m_async || (m_state <= OPENED || m_state == DONE)) >- m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(eventNames().readystatechangeEvent, false, false), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent); >+ if (m_async || (m_state <= OPENED || m_state == DONE)) { >+ m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(eventNames().readystatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No), >+ m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent); >+ } > > if (shouldSendLoadEvent) { > m_progressEventThrottle.dispatchProgressEvent(eventNames().loadEvent); >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234976) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2018-08-16 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Replace canBubble and cancelable booleans in Event by enum classes >+ https://bugs.webkit.org/show_bug.cgi?id=188692 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): >+ > 2018-08-16 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r234958. >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 234910) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -1355,7 +1355,8 @@ void WebPage::navigateToPDFLinkWithSimul > return; > > const int singleClick = 1; >- RefPtr<MouseEvent> mouseEvent = MouseEvent::create(eventNames().clickEvent, true, true, MonotonicTime::now(), nullptr, singleClick, screenPoint.x(), screenPoint.y(), documentPoint.x(), documentPoint.y(), >+ RefPtr<MouseEvent> mouseEvent = MouseEvent::create(eventNames().clickEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, >+ MonotonicTime::now(), nullptr, singleClick, screenPoint.x(), screenPoint.y(), documentPoint.x(), documentPoint.y(), > #if ENABLE(POINTER_LOCK) > 0, 0, > #endif >Index: Source/WebKitLegacy/ios/ChangeLog >=================================================================== >--- Source/WebKitLegacy/ios/ChangeLog (revision 234910) >+++ Source/WebKitLegacy/ios/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2018-08-16 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Replace canBubble and cancelable booleans in Event by enum classes >+ https://bugs.webkit.org/show_bug.cgi?id=188692 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebPDFViewPlaceholder.mm: >+ (-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]): >+ > 2018-08-13 Alex Christensen <achristensen@webkit.org> > > Use a 1-byte enum class for TextDirection >Index: Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm >=================================================================== >--- Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm (revision 234910) >+++ Source/WebKitLegacy/ios/WebView/WebPDFViewPlaceholder.mm (working copy) >@@ -479,7 +479,7 @@ - (void)simulateClickOnLinkToURL:(NSURL > return; > > // Construct an event to simulate a click. >- RefPtr<Event> event = MouseEvent::create(eventNames().clickEvent, true, true, MonotonicTime::now(), 0, 1, 0, 0, 0, 0, >+ RefPtr<Event> event = MouseEvent::create(eventNames().clickEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, MonotonicTime::now(), 0, 1, 0, 0, 0, 0, > #if ENABLE(POINTER_LOCK) > 0, 0, > #endif >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 234910) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-16 Ryosuke Niwa <rniwa@webkit.org> >+ >+ Replace canBubble and cancelable booleans in Event by enum classes >+ https://bugs.webkit.org/show_bug.cgi?id=188692 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebPDFView.mm: >+ (-[WebPDFView PDFViewWillClickOnLink:withURL:]): >+ * WebView/WebView.mm: >+ (-[WebView _dispatchUnloadEvent]): >+ > 2018-08-15 Tim Horton <timothy_horton@apple.com> > > Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey: >Index: Source/WebKitLegacy/mac/WebView/WebPDFView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebPDFView.mm (revision 234910) >+++ Source/WebKitLegacy/mac/WebView/WebPDFView.mm (working copy) >@@ -1030,7 +1030,7 @@ - (void)PDFViewWillClickOnLink:(PDFView > break; > } > if (button != noButton) { >- event = MouseEvent::create(eventNames().clickEvent, true, true, MonotonicTime::now(), 0, [nsEvent clickCount], 0, 0, 0, 0, >+ event = MouseEvent::create(eventNames().clickEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes, MonotonicTime::now(), 0, [nsEvent clickCount], 0, 0, 0, 0, > #if ENABLE(POINTER_LOCK) > 0, 0, > #endif >Index: Source/WebKitLegacy/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebView.mm (revision 234910) >+++ Source/WebKitLegacy/mac/WebView/WebView.mm (working copy) >@@ -2144,7 +2144,7 @@ - (void)_dispatchUnloadEvent > if (coreMainFrame) { > Document *document = coreMainFrame->document(); > if (document) >- document->dispatchWindowEvent(Event::create(eventNames().unloadEvent, false, false)); >+ document->dispatchWindowEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No)); > } > }); > }
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
Flags:
achristensen
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188692
:
347351
| 347352