Event construction helpers should return Ref instead of PassRefPtr.
<https://webkit.org/b/139625>
Reviewed by Antti Koivisto.
Change all the FooEvent::create() construction helpers to return Ref<FooEvent>
instead of PassRefPtr<FooEvent>.
This allows the compiler to omit null checks at each call site, since we know
that these functions always return valid objects.
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
(WebCore::MediaKeyMessageEvent::create):
* Modules/encryptedmedia/MediaKeyNeededEvent.h:
(WebCore::MediaKeyNeededEvent::create):
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create):
* Modules/indexeddb/IDBVersionChangeEvent.h:
(WebCore::IDBVersionChangeEvent::create):
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::create):
* Modules/indieui/UIRequestEvent.h:
* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::create):
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
(WebCore::MediaStreamTrackEvent::create):
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
(WebCore::RTCDTMFToneChangeEvent::create):
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
(WebCore::RTCDataChannelEvent::create):
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCIceCandidateEvent.cpp:
(WebCore::RTCIceCandidateEvent::create):
* Modules/mediastream/RTCIceCandidateEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
(WebCore::SpeechSynthesisEvent::create):
* Modules/speech/SpeechSynthesisEvent.h:
* Modules/webaudio/AudioProcessingEvent.cpp:
(WebCore::AudioProcessingEvent::create):
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
(WebCore::OfflineAudioCompletionEvent::create):
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create):
* dom/AnimationEvent.h:
* dom/AutocompleteErrorEvent.h:
* dom/BeforeLoadEvent.h:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.h:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.h:
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.h:
* dom/ErrorEvent.h:
* dom/Event.h:
(WebCore::Event::create):
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
* dom/KeyboardEvent.h:
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::SimulatedMouseEvent::create):
* dom/MouseEvent.h:
(WebCore::MouseEvent::create):
* dom/MutationEvent.h:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.h:
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::create):
* dom/PopStateEvent.h:
* dom/ProgressEvent.h:
(WebCore::ProgressEvent::create):
* dom/TextEvent.cpp:
(WebCore::TextEvent::create):
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::createForDrop):
(WebCore::TextEvent::createForDictation):
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
(WebCore::UIEvent::create):
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* html/MediaKeyEvent.h:
* html/canvas/WebGLContextEvent.h:
* html/track/TrackEvent.h:
* storage/StorageEvent.cpp:
(WebCore::StorageEvent::create):
* storage/StorageEvent.h:
* svg/SVGZoomEvent.h:
(WebCore::SVGZoomEvent::create):
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::create):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 701ab79..9f4fe57 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,110 @@
+2014-12-14 Andreas Kling <akling@apple.com>
+
+ Event construction helpers should return Ref instead of PassRefPtr.
+ <https://webkit.org/b/139625>
+
+ Reviewed by Antti Koivisto.
+
+ Change all the FooEvent::create() construction helpers to return Ref<FooEvent>
+ instead of PassRefPtr<FooEvent>.
+
+ This allows the compiler to omit null checks at each call site, since we know
+ that these functions always return valid objects.
+
+ * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
+ (WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
+ * Modules/encryptedmedia/MediaKeyMessageEvent.h:
+ (WebCore::MediaKeyMessageEvent::create):
+ * Modules/encryptedmedia/MediaKeyNeededEvent.h:
+ (WebCore::MediaKeyNeededEvent::create):
+ * Modules/gamepad/GamepadEvent.h:
+ (WebCore::GamepadEvent::create):
+ * Modules/indexeddb/IDBVersionChangeEvent.h:
+ (WebCore::IDBVersionChangeEvent::create):
+ * Modules/indieui/UIRequestEvent.cpp:
+ (WebCore::UIRequestEvent::create):
+ * Modules/indieui/UIRequestEvent.h:
+ * Modules/mediastream/MediaStreamEvent.cpp:
+ (WebCore::MediaStreamEvent::create):
+ * Modules/mediastream/MediaStreamEvent.h:
+ * Modules/mediastream/MediaStreamTrackEvent.cpp:
+ (WebCore::MediaStreamTrackEvent::create):
+ * Modules/mediastream/MediaStreamTrackEvent.h:
+ * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
+ (WebCore::RTCDTMFToneChangeEvent::create):
+ * Modules/mediastream/RTCDTMFToneChangeEvent.h:
+ * Modules/mediastream/RTCDataChannelEvent.cpp:
+ (WebCore::RTCDataChannelEvent::create):
+ * Modules/mediastream/RTCDataChannelEvent.h:
+ * Modules/mediastream/RTCIceCandidateEvent.cpp:
+ (WebCore::RTCIceCandidateEvent::create):
+ * Modules/mediastream/RTCIceCandidateEvent.h:
+ * Modules/speech/SpeechSynthesisEvent.cpp:
+ (WebCore::SpeechSynthesisEvent::create):
+ * Modules/speech/SpeechSynthesisEvent.h:
+ * Modules/webaudio/AudioProcessingEvent.cpp:
+ (WebCore::AudioProcessingEvent::create):
+ * Modules/webaudio/AudioProcessingEvent.h:
+ * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
+ (WebCore::OfflineAudioCompletionEvent::create):
+ * Modules/webaudio/OfflineAudioCompletionEvent.h:
+ * Modules/websockets/CloseEvent.h:
+ (WebCore::CloseEvent::create):
+ * dom/AnimationEvent.h:
+ * dom/AutocompleteErrorEvent.h:
+ * dom/BeforeLoadEvent.h:
+ * dom/BeforeTextInsertedEvent.h:
+ * dom/BeforeUnloadEvent.h:
+ * dom/ClipboardEvent.h:
+ * dom/CompositionEvent.h:
+ * dom/CustomEvent.h:
+ * dom/DeviceMotionEvent.h:
+ * dom/DeviceOrientationEvent.h:
+ * dom/ErrorEvent.h:
+ * dom/Event.h:
+ (WebCore::Event::create):
+ * dom/FocusEvent.h:
+ * dom/HashChangeEvent.h:
+ * dom/KeyboardEvent.h:
+ * dom/MessageEvent.h:
+ * dom/MouseEvent.cpp:
+ (WebCore::MouseEvent::create):
+ (WebCore::SimulatedMouseEvent::create):
+ * dom/MouseEvent.h:
+ (WebCore::MouseEvent::create):
+ * dom/MutationEvent.h:
+ * dom/OverflowEvent.h:
+ * dom/PageTransitionEvent.h:
+ * dom/PopStateEvent.cpp:
+ (WebCore::PopStateEvent::create):
+ * dom/PopStateEvent.h:
+ * dom/ProgressEvent.h:
+ (WebCore::ProgressEvent::create):
+ * dom/TextEvent.cpp:
+ (WebCore::TextEvent::create):
+ (WebCore::TextEvent::createForPlainTextPaste):
+ (WebCore::TextEvent::createForFragmentPaste):
+ (WebCore::TextEvent::createForDrop):
+ (WebCore::TextEvent::createForDictation):
+ * dom/TextEvent.h:
+ * dom/TouchEvent.h:
+ * dom/TransitionEvent.h:
+ * dom/UIEvent.h:
+ (WebCore::UIEvent::create):
+ * dom/WebKitAnimationEvent.h:
+ * dom/WebKitTransitionEvent.h:
+ * dom/WheelEvent.h:
+ * html/MediaKeyEvent.h:
+ * html/canvas/WebGLContextEvent.h:
+ * html/track/TrackEvent.h:
+ * storage/StorageEvent.cpp:
+ (WebCore::StorageEvent::create):
+ * storage/StorageEvent.h:
+ * svg/SVGZoomEvent.h:
+ (WebCore::SVGZoomEvent::create):
+ * xml/XMLHttpRequestProgressEvent.h:
+ (WebCore::XMLHttpRequestProgressEvent::create):
+
2014-12-14 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r160182): Fragment parser doesn't close a form element with a close tag
diff --git a/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h b/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h
index 493bd66..ece3df0 100644
--- a/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h
+++ b/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h
@@ -44,19 +44,19 @@
public:
~WebKitPlaybackTargetAvailabilityEvent() { }
- static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create()
+ static Ref<WebKitPlaybackTargetAvailabilityEvent> create()
{
- return adoptRef(new WebKitPlaybackTargetAvailabilityEvent);
+ return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent);
}
- static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, bool available)
+ static Ref<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, bool available)
{
- return adoptRef(new WebKitPlaybackTargetAvailabilityEvent(eventType, available));
+ return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent(eventType, available));
}
- static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
+ static Ref<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
{
- return adoptRef(new WebKitPlaybackTargetAvailabilityEvent(eventType, initializer));
+ return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent(eventType, initializer));
}
String availability() const { return m_availability; }
diff --git a/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h b/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h
index ac35203..bf586b2 100644
--- a/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h
+++ b/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h
@@ -45,14 +45,14 @@
public:
virtual ~MediaKeyMessageEvent();
- static PassRefPtr<MediaKeyMessageEvent> create()
+ static Ref<MediaKeyMessageEvent> create()
{
- return adoptRef(new MediaKeyMessageEvent);
+ return adoptRef(*new MediaKeyMessageEvent);
}
- static PassRefPtr<MediaKeyMessageEvent> create(const AtomicString& type, const MediaKeyMessageEventInit& initializer)
+ static Ref<MediaKeyMessageEvent> create(const AtomicString& type, const MediaKeyMessageEventInit& initializer)
{
- return adoptRef(new MediaKeyMessageEvent(type, initializer));
+ return adoptRef(*new MediaKeyMessageEvent(type, initializer));
}
virtual EventInterface eventInterface() const override;
diff --git a/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h b/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h
index a98e918..8806bc0 100644
--- a/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h
+++ b/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h
@@ -43,14 +43,14 @@
public:
virtual ~MediaKeyNeededEvent();
- static PassRefPtr<MediaKeyNeededEvent> create()
+ static Ref<MediaKeyNeededEvent> create()
{
- return adoptRef(new MediaKeyNeededEvent);
+ return adoptRef(*new MediaKeyNeededEvent);
}
- static PassRefPtr<MediaKeyNeededEvent> create(const AtomicString& type, const MediaKeyNeededEventInit& initializer)
+ static Ref<MediaKeyNeededEvent> create(const AtomicString& type, const MediaKeyNeededEventInit& initializer)
{
- return adoptRef(new MediaKeyNeededEvent(type, initializer));
+ return adoptRef(*new MediaKeyNeededEvent(type, initializer));
}
virtual EventInterface eventInterface() const override;
diff --git a/Source/WebCore/Modules/gamepad/GamepadEvent.h b/Source/WebCore/Modules/gamepad/GamepadEvent.h
index 142d2e4..81eb46e 100644
--- a/Source/WebCore/Modules/gamepad/GamepadEvent.h
+++ b/Source/WebCore/Modules/gamepad/GamepadEvent.h
@@ -45,19 +45,19 @@
public:
~GamepadEvent() { }
- static PassRefPtr<GamepadEvent> create()
+ static Ref<GamepadEvent> create()
{
- return adoptRef(new GamepadEvent);
+ return adoptRef(*new GamepadEvent);
}
- static PassRefPtr<GamepadEvent> create(const AtomicString& eventType, Gamepad& gamepad)
+ static Ref<GamepadEvent> create(const AtomicString& eventType, Gamepad& gamepad)
{
- return adoptRef(new GamepadEvent(eventType, gamepad));
+ return adoptRef(*new GamepadEvent(eventType, gamepad));
}
- static PassRefPtr<GamepadEvent> create(const AtomicString& eventType, const GamepadEventInit& initializer)
+ static Ref<GamepadEvent> create(const AtomicString& eventType, const GamepadEventInit& initializer)
{
- return adoptRef(new GamepadEvent(eventType, initializer));
+ return adoptRef(*new GamepadEvent(eventType, initializer));
}
Gamepad* gamepad() const { return m_gamepad.get(); }
diff --git a/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h b/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h
index c8d2008..1b2dd18 100644
--- a/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h
+++ b/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h
@@ -38,9 +38,9 @@
class IDBVersionChangeEvent : public Event {
public:
- static PassRefPtr<IDBVersionChangeEvent> create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::VersionNullness::Null, const AtomicString& eventType = AtomicString())
+ static Ref<IDBVersionChangeEvent> create(unsigned long long oldVersion = 0, unsigned long long newVersion = 0, IndexedDB::VersionNullness newVersionNullness = IndexedDB::VersionNullness::Null, const AtomicString& eventType = AtomicString())
{
- return adoptRef(new IDBVersionChangeEvent(oldVersion, newVersion, newVersionNullness, eventType));
+ return adoptRef(*new IDBVersionChangeEvent(oldVersion, newVersion, newVersionNullness, eventType));
}
virtual ~IDBVersionChangeEvent();
diff --git a/Source/WebCore/Modules/indieui/UIRequestEvent.cpp b/Source/WebCore/Modules/indieui/UIRequestEvent.cpp
index c19feb0..a4c1ec8 100644
--- a/Source/WebCore/Modules/indieui/UIRequestEvent.cpp
+++ b/Source/WebCore/Modules/indieui/UIRequestEvent.cpp
@@ -36,19 +36,19 @@
{
}
-PassRefPtr<UIRequestEvent> UIRequestEvent::create()
+Ref<UIRequestEvent> UIRequestEvent::create()
{
- return adoptRef(new UIRequestEvent);
+ return adoptRef(*new UIRequestEvent);
}
-PassRefPtr<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, const UIRequestEventInit& initializer)
+Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, const UIRequestEventInit& initializer)
{
- return adoptRef(new UIRequestEvent(type, initializer));
+ return adoptRef(*new UIRequestEvent(type, initializer));
}
-PassRefPtr<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> receiver)
+Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> receiver)
{
- return adoptRef(new UIRequestEvent(type, bubbles, cancelable, view, detail, receiver));
+ return adoptRef(*new UIRequestEvent(type, bubbles, cancelable, view, detail, receiver));
}
UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
diff --git a/Source/WebCore/Modules/indieui/UIRequestEvent.h b/Source/WebCore/Modules/indieui/UIRequestEvent.h
index d83ae4e..7adc4f6 100644
--- a/Source/WebCore/Modules/indieui/UIRequestEvent.h
+++ b/Source/WebCore/Modules/indieui/UIRequestEvent.h
@@ -41,10 +41,10 @@
class UIRequestEvent : public UIEvent {
public:
- static PassRefPtr<UIRequestEvent> create();
- static PassRefPtr<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
+ static Ref<UIRequestEvent> create();
+ static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
- static PassRefPtr<UIRequestEvent> create(const AtomicString& eventType, const UIRequestEventInit&);
+ static Ref<UIRequestEvent> create(const AtomicString& eventType, const UIRequestEventInit&);
virtual ~UIRequestEvent();
diff --git a/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp b/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp
index 92f6bb1..cbc0246 100644
--- a/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp
@@ -37,19 +37,19 @@
{
}
-PassRefPtr<MediaStreamEvent> MediaStreamEvent::create()
+Ref<MediaStreamEvent> MediaStreamEvent::create()
{
- return adoptRef(new MediaStreamEvent);
+ return adoptRef(*new MediaStreamEvent);
}
-PassRefPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream)
+Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream)
{
- return adoptRef(new MediaStreamEvent(type, canBubble, cancelable, stream));
+ return adoptRef(*new MediaStreamEvent(type, canBubble, cancelable, stream));
}
-PassRefPtr<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, const MediaStreamEventInit& initializer)
+Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, const MediaStreamEventInit& initializer)
{
- return adoptRef(new MediaStreamEvent(type, initializer));
+ return adoptRef(*new MediaStreamEvent(type, initializer));
}
MediaStreamEvent::MediaStreamEvent()
diff --git a/Source/WebCore/Modules/mediastream/MediaStreamEvent.h b/Source/WebCore/Modules/mediastream/MediaStreamEvent.h
index bad394e..b61520e 100644
--- a/Source/WebCore/Modules/mediastream/MediaStreamEvent.h
+++ b/Source/WebCore/Modules/mediastream/MediaStreamEvent.h
@@ -43,9 +43,9 @@
public:
virtual ~MediaStreamEvent();
- static PassRefPtr<MediaStreamEvent> create();
- static PassRefPtr<MediaStreamEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream>);
- static PassRefPtr<MediaStreamEvent> create(const AtomicString& type, const MediaStreamEventInit& initializer);
+ static Ref<MediaStreamEvent> create();
+ static Ref<MediaStreamEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream>);
+ static Ref<MediaStreamEvent> create(const AtomicString& type, const MediaStreamEventInit& initializer);
MediaStream* stream() const;
diff --git a/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp b/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp
index 6d884fc..efebebe 100644
--- a/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp
@@ -37,19 +37,19 @@
{
}
-PassRefPtr<MediaStreamTrackEvent> MediaStreamTrackEvent::create()
+Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create()
{
- return adoptRef(new MediaStreamTrackEvent);
+ return adoptRef(*new MediaStreamTrackEvent);
}
-PassRefPtr<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack> track)
+Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack> track)
{
- return adoptRef(new MediaStreamTrackEvent(type, canBubble, cancelable, track));
+ return adoptRef(*new MediaStreamTrackEvent(type, canBubble, cancelable, track));
}
-PassRefPtr<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, const MediaStreamTrackEventInit& initializer)
+Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, const MediaStreamTrackEventInit& initializer)
{
- return adoptRef(new MediaStreamTrackEvent(type, initializer));
+ return adoptRef(*new MediaStreamTrackEvent(type, initializer));
}
MediaStreamTrackEvent::MediaStreamTrackEvent()
diff --git a/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h b/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h
index b0818ab..d875154 100644
--- a/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h
+++ b/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h
@@ -44,9 +44,9 @@
public:
virtual ~MediaStreamTrackEvent();
- static PassRefPtr<MediaStreamTrackEvent> create();
- static PassRefPtr<MediaStreamTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack>);
- static PassRefPtr<MediaStreamTrackEvent> create(const AtomicString& type, const MediaStreamTrackEventInit& initializer);
+ static Ref<MediaStreamTrackEvent> create();
+ static Ref<MediaStreamTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack>);
+ static Ref<MediaStreamTrackEvent> create(const AtomicString& type, const MediaStreamTrackEventInit& initializer);
MediaStreamTrack* track() const;
diff --git a/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp b/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp
index 526ef2c..cf37d4e 100644
--- a/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.cpp
@@ -32,20 +32,20 @@
namespace WebCore {
-PassRefPtr<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create()
+Ref<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create()
{
- return adoptRef(new RTCDTMFToneChangeEvent);
+ return adoptRef(*new RTCDTMFToneChangeEvent);
}
-PassRefPtr<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create(const String& tone)
+Ref<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create(const String& tone)
{
- return adoptRef(new RTCDTMFToneChangeEvent(tone));
+ return adoptRef(*new RTCDTMFToneChangeEvent(tone));
}
-PassRefPtr<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create(const AtomicString& type, const RTCDTMFToneChangeEventInit& initializer)
+Ref<RTCDTMFToneChangeEvent> RTCDTMFToneChangeEvent::create(const AtomicString& type, const RTCDTMFToneChangeEventInit& initializer)
{
ASSERT_UNUSED(type, type == eventNames().tonechangeEvent);
- return adoptRef(new RTCDTMFToneChangeEvent(initializer));
+ return adoptRef(*new RTCDTMFToneChangeEvent(initializer));
}
RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent()
diff --git a/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.h b/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.h
index 0693db6..01f36a8 100644
--- a/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.h
+++ b/Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.h
@@ -41,9 +41,9 @@
public:
virtual ~RTCDTMFToneChangeEvent();
- static PassRefPtr<RTCDTMFToneChangeEvent> create();
- static PassRefPtr<RTCDTMFToneChangeEvent> create(const String& tone);
- static PassRefPtr<RTCDTMFToneChangeEvent> create(const AtomicString& type, const RTCDTMFToneChangeEventInit& initializer);
+ static Ref<RTCDTMFToneChangeEvent> create();
+ static Ref<RTCDTMFToneChangeEvent> create(const String& tone);
+ static Ref<RTCDTMFToneChangeEvent> create(const AtomicString& type, const RTCDTMFToneChangeEventInit& initializer);
const String& tone() const;
diff --git a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
index 1365813..61c9852 100644
--- a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
@@ -32,17 +32,16 @@
namespace WebCore {
-PassRefPtr<RTCDataChannelEvent> RTCDataChannelEvent::create()
+Ref<RTCDataChannelEvent> RTCDataChannelEvent::create()
{
- return adoptRef(new RTCDataChannelEvent);
+ return adoptRef(*new RTCDataChannelEvent);
}
-PassRefPtr<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
+Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
{
- return adoptRef(new RTCDataChannelEvent(type, canBubble, cancelable, channel));
+ return adoptRef(*new RTCDataChannelEvent(type, canBubble, cancelable, channel));
}
-
RTCDataChannelEvent::RTCDataChannelEvent()
{
}
diff --git a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h
index 41b0036..b322c2e 100644
--- a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h
+++ b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h
@@ -37,8 +37,8 @@
public:
virtual ~RTCDataChannelEvent();
- static PassRefPtr<RTCDataChannelEvent> create();
- static PassRefPtr<RTCDataChannelEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel>);
+ static Ref<RTCDataChannelEvent> create();
+ static Ref<RTCDataChannelEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel>);
RTCDataChannel* channel() const;
diff --git a/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp b/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp
index 1c28e58..178c5e0 100644
--- a/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp
@@ -33,14 +33,14 @@
namespace WebCore {
-PassRefPtr<RTCIceCandidateEvent> RTCIceCandidateEvent::create()
+Ref<RTCIceCandidateEvent> RTCIceCandidateEvent::create()
{
- return adoptRef(new RTCIceCandidateEvent);
+ return adoptRef(*new RTCIceCandidateEvent);
}
-PassRefPtr<RTCIceCandidateEvent> RTCIceCandidateEvent::create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate> candidate)
+Ref<RTCIceCandidateEvent> RTCIceCandidateEvent::create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate> candidate)
{
- return adoptRef(new RTCIceCandidateEvent(canBubble, cancelable, candidate));
+ return adoptRef(*new RTCIceCandidateEvent(canBubble, cancelable, candidate));
}
RTCIceCandidateEvent::RTCIceCandidateEvent()
diff --git a/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h b/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h
index 4666368..df90ac0 100644
--- a/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h
+++ b/Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h
@@ -37,8 +37,8 @@
public:
virtual ~RTCIceCandidateEvent();
- static PassRefPtr<RTCIceCandidateEvent> create();
- static PassRefPtr<RTCIceCandidateEvent> create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate>);
+ static Ref<RTCIceCandidateEvent> create();
+ static Ref<RTCIceCandidateEvent> create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate>);
RTCIceCandidate* candidate() const;
diff --git a/Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp b/Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp
index b510d83..2fc3004 100644
--- a/Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp
+++ b/Source/WebCore/Modules/speech/SpeechSynthesisEvent.cpp
@@ -30,14 +30,14 @@
namespace WebCore {
-PassRefPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create()
+Ref<SpeechSynthesisEvent> SpeechSynthesisEvent::create()
{
- return adoptRef(new SpeechSynthesisEvent());
+ return adoptRef(*new SpeechSynthesisEvent());
}
-PassRefPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name)
+Ref<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name)
{
- return adoptRef(new SpeechSynthesisEvent(type, charIndex, elapsedTime, name));
+ return adoptRef(*new SpeechSynthesisEvent(type, charIndex, elapsedTime, name));
}
SpeechSynthesisEvent::SpeechSynthesisEvent()
diff --git a/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h b/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h
index f97a8b9..b509640 100644
--- a/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h
+++ b/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h
@@ -35,8 +35,8 @@
class SpeechSynthesisEvent : public Event {
public:
- static PassRefPtr<SpeechSynthesisEvent> create();
- static PassRefPtr<SpeechSynthesisEvent> create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name);
+ static Ref<SpeechSynthesisEvent> create();
+ static Ref<SpeechSynthesisEvent> create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name);
unsigned long charIndex() const { return m_charIndex; }
float elapsedTime() const { return m_elapsedTime; }
diff --git a/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp b/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp
index be8fece..82387ce 100644
--- a/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioProcessingEvent.cpp
@@ -33,14 +33,14 @@
namespace WebCore {
-PassRefPtr<AudioProcessingEvent> AudioProcessingEvent::create()
+Ref<AudioProcessingEvent> AudioProcessingEvent::create()
{
- return adoptRef(new AudioProcessingEvent);
+ return adoptRef(*new AudioProcessingEvent);
}
-PassRefPtr<AudioProcessingEvent> AudioProcessingEvent::create(PassRefPtr<AudioBuffer> inputBuffer, PassRefPtr<AudioBuffer> outputBuffer, double playbackTime)
+Ref<AudioProcessingEvent> AudioProcessingEvent::create(PassRefPtr<AudioBuffer> inputBuffer, PassRefPtr<AudioBuffer> outputBuffer, double playbackTime)
{
- return adoptRef(new AudioProcessingEvent(inputBuffer, outputBuffer, playbackTime));
+ return adoptRef(*new AudioProcessingEvent(inputBuffer, outputBuffer, playbackTime));
}
AudioProcessingEvent::AudioProcessingEvent()
diff --git a/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h b/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h
index 96c88f3..80740e7 100644
--- a/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h
+++ b/Source/WebCore/Modules/webaudio/AudioProcessingEvent.h
@@ -36,8 +36,8 @@
class AudioProcessingEvent : public Event {
public:
- static PassRefPtr<AudioProcessingEvent> create();
- static PassRefPtr<AudioProcessingEvent> create(PassRefPtr<AudioBuffer> inputBuffer, PassRefPtr<AudioBuffer> outputBuffer, double playbackTime);
+ static Ref<AudioProcessingEvent> create();
+ static Ref<AudioProcessingEvent> create(PassRefPtr<AudioBuffer> inputBuffer, PassRefPtr<AudioBuffer> outputBuffer, double playbackTime);
virtual ~AudioProcessingEvent();
diff --git a/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp b/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp
index 7db5d78..edd8fa9 100644
--- a/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp
+++ b/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.cpp
@@ -33,14 +33,14 @@
namespace WebCore {
-PassRefPtr<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create()
+Ref<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create()
{
- return adoptRef(new OfflineAudioCompletionEvent);
+ return adoptRef(*new OfflineAudioCompletionEvent);
}
-PassRefPtr<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create(PassRefPtr<AudioBuffer> renderedBuffer)
+Ref<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create(PassRefPtr<AudioBuffer> renderedBuffer)
{
- return adoptRef(new OfflineAudioCompletionEvent(renderedBuffer));
+ return adoptRef(*new OfflineAudioCompletionEvent(renderedBuffer));
}
OfflineAudioCompletionEvent::OfflineAudioCompletionEvent()
diff --git a/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.h b/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.h
index 72a7b79..ed24f41 100644
--- a/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.h
+++ b/Source/WebCore/Modules/webaudio/OfflineAudioCompletionEvent.h
@@ -36,8 +36,8 @@
class OfflineAudioCompletionEvent : public Event {
public:
- static PassRefPtr<OfflineAudioCompletionEvent> create();
- static PassRefPtr<OfflineAudioCompletionEvent> create(PassRefPtr<AudioBuffer> renderedBuffer);
+ static Ref<OfflineAudioCompletionEvent> create();
+ static Ref<OfflineAudioCompletionEvent> create(PassRefPtr<AudioBuffer> renderedBuffer);
virtual ~OfflineAudioCompletionEvent();
diff --git a/Source/WebCore/Modules/websockets/CloseEvent.h b/Source/WebCore/Modules/websockets/CloseEvent.h
index fda51d8..88fff363 100644
--- a/Source/WebCore/Modules/websockets/CloseEvent.h
+++ b/Source/WebCore/Modules/websockets/CloseEvent.h
@@ -50,19 +50,19 @@
class CloseEvent : public Event {
public:
- static PassRefPtr<CloseEvent> create()
+ static Ref<CloseEvent> create()
{
- return adoptRef(new CloseEvent());
+ return adoptRef(*new CloseEvent());
}
- static PassRefPtr<CloseEvent> create(bool wasClean, unsigned short code, const String& reason)
+ static Ref<CloseEvent> create(bool wasClean, unsigned short code, const String& reason)
{
- return adoptRef(new CloseEvent(wasClean, code, reason));
+ return adoptRef(*new CloseEvent(wasClean, code, reason));
}
- static PassRefPtr<CloseEvent> create(const AtomicString& type, const CloseEventInit& initializer)
+ static Ref<CloseEvent> create(const AtomicString& type, const CloseEventInit& initializer)
{
- return adoptRef(new CloseEvent(type, initializer));
+ return adoptRef(*new CloseEvent(type, initializer));
}
bool wasClean() const { return m_wasClean; }
diff --git a/Source/WebCore/dom/AnimationEvent.h b/Source/WebCore/dom/AnimationEvent.h
index fbf1306..7397002 100644
--- a/Source/WebCore/dom/AnimationEvent.h
+++ b/Source/WebCore/dom/AnimationEvent.h
@@ -39,17 +39,17 @@
class AnimationEvent final : public Event {
public:
- static PassRefPtr<AnimationEvent> create()
+ static Ref<AnimationEvent> create()
{
- return adoptRef(new AnimationEvent);
+ return adoptRef(*new AnimationEvent);
}
- static PassRefPtr<AnimationEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
+ static Ref<AnimationEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
{
- return adoptRef(new AnimationEvent(type, animationName, elapsedTime));
+ return adoptRef(*new AnimationEvent(type, animationName, elapsedTime));
}
- static PassRefPtr<AnimationEvent> create(const AtomicString& type, const AnimationEventInit& initializer)
+ static Ref<AnimationEvent> create(const AtomicString& type, const AnimationEventInit& initializer)
{
- return adoptRef(new AnimationEvent(type, initializer));
+ return adoptRef(*new AnimationEvent(type, initializer));
}
virtual ~AnimationEvent();
diff --git a/Source/WebCore/dom/AutocompleteErrorEvent.h b/Source/WebCore/dom/AutocompleteErrorEvent.h
index 493eb4f..29197ed 100644
--- a/Source/WebCore/dom/AutocompleteErrorEvent.h
+++ b/Source/WebCore/dom/AutocompleteErrorEvent.h
@@ -38,19 +38,19 @@
class AutocompleteErrorEvent final : public Event {
public:
- static PassRefPtr<AutocompleteErrorEvent> create()
+ static Ref<AutocompleteErrorEvent> create()
{
return adoptRef(new AutocompleteErrorEvent);
}
- static PassRefPtr<AutocompleteErrorEvent> create(const String& reason)
+ static Ref<AutocompleteErrorEvent> create(const String& reason)
{
- return adoptRef(new AutocompleteErrorEvent(reason));
+ return adoptRef(*new AutocompleteErrorEvent(reason));
}
- static PassRefPtr<AutocompleteErrorEvent> create(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
+ static Ref<AutocompleteErrorEvent> create(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
{
- return adoptRef(new AutocompleteErrorEvent(eventType, initializer));
+ return adoptRef(*new AutocompleteErrorEvent(eventType, initializer));
}
const String& reason() const { return m_reason; }
diff --git a/Source/WebCore/dom/BeforeLoadEvent.h b/Source/WebCore/dom/BeforeLoadEvent.h
index 79373df..0d95bb3 100644
--- a/Source/WebCore/dom/BeforeLoadEvent.h
+++ b/Source/WebCore/dom/BeforeLoadEvent.h
@@ -42,19 +42,19 @@
class BeforeLoadEvent final : public Event {
public:
- static PassRefPtr<BeforeLoadEvent> create()
+ static Ref<BeforeLoadEvent> create()
{
- return adoptRef(new BeforeLoadEvent);
+ return adoptRef(*new BeforeLoadEvent);
}
- static PassRefPtr<BeforeLoadEvent> create(const String& url)
+ static Ref<BeforeLoadEvent> create(const String& url)
{
- return adoptRef(new BeforeLoadEvent(url));
+ return adoptRef(*new BeforeLoadEvent(url));
}
- static PassRefPtr<BeforeLoadEvent> create(const AtomicString& type, const BeforeLoadEventInit& initializer)
+ static Ref<BeforeLoadEvent> create(const AtomicString& type, const BeforeLoadEventInit& initializer)
{
- return adoptRef(new BeforeLoadEvent(type, initializer));
+ return adoptRef(*new BeforeLoadEvent(type, initializer));
}
const String& url() const { return m_url; }
diff --git a/Source/WebCore/dom/BeforeTextInsertedEvent.h b/Source/WebCore/dom/BeforeTextInsertedEvent.h
index 1e4b35d..3483a11 100644
--- a/Source/WebCore/dom/BeforeTextInsertedEvent.h
+++ b/Source/WebCore/dom/BeforeTextInsertedEvent.h
@@ -34,9 +34,9 @@
public:
virtual ~BeforeTextInsertedEvent();
- static PassRefPtr<BeforeTextInsertedEvent> create(const String& text)
+ static Ref<BeforeTextInsertedEvent> create(const String& text)
{
- return adoptRef(new BeforeTextInsertedEvent(text));
+ return adoptRef(*new BeforeTextInsertedEvent(text));
}
virtual EventInterface eventInterface() const override;
diff --git a/Source/WebCore/dom/BeforeUnloadEvent.h b/Source/WebCore/dom/BeforeUnloadEvent.h
index 5876696..aef90bf 100644
--- a/Source/WebCore/dom/BeforeUnloadEvent.h
+++ b/Source/WebCore/dom/BeforeUnloadEvent.h
@@ -33,9 +33,9 @@
public:
virtual ~BeforeUnloadEvent();
- static PassRefPtr<BeforeUnloadEvent> create()
+ static Ref<BeforeUnloadEvent> create()
{
- return adoptRef(new BeforeUnloadEvent);
+ return adoptRef(*new BeforeUnloadEvent);
}
String returnValue() const { return m_returnValue; }
diff --git a/Source/WebCore/dom/ClipboardEvent.h b/Source/WebCore/dom/ClipboardEvent.h
index db84c43..0f16a70 100644
--- a/Source/WebCore/dom/ClipboardEvent.h
+++ b/Source/WebCore/dom/ClipboardEvent.h
@@ -34,13 +34,13 @@
public:
virtual ~ClipboardEvent();
- static PassRefPtr<ClipboardEvent> create()
+ static Ref<ClipboardEvent> create()
{
- return adoptRef(new ClipboardEvent);
+ return adoptRef(*new ClipboardEvent);
}
- static PassRefPtr<ClipboardEvent> create(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<DataTransfer> clipboardArg)
+ static Ref<ClipboardEvent> create(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<DataTransfer> clipboardArg)
{
- return adoptRef(new ClipboardEvent(type, canBubbleArg, cancelableArg, clipboardArg));
+ return adoptRef(*new ClipboardEvent(type, canBubbleArg, cancelableArg, clipboardArg));
}
virtual DataTransfer* internalDataTransfer() const override { return m_dataTransfer.get(); }
diff --git a/Source/WebCore/dom/CompositionEvent.h b/Source/WebCore/dom/CompositionEvent.h
index fd1dd96..d7d9f10 100644
--- a/Source/WebCore/dom/CompositionEvent.h
+++ b/Source/WebCore/dom/CompositionEvent.h
@@ -39,19 +39,19 @@
class CompositionEvent final : public UIEvent {
public:
- static PassRefPtr<CompositionEvent> create()
+ static Ref<CompositionEvent> create()
{
- return adoptRef(new CompositionEvent);
+ return adoptRef(*new CompositionEvent);
}
- static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
+ static Ref<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
{
- return adoptRef(new CompositionEvent(type, view, data));
+ return adoptRef(*new CompositionEvent(type, view, data));
}
- static PassRefPtr<CompositionEvent> create(const AtomicString& type, const CompositionEventInit& initializer)
+ static Ref<CompositionEvent> create(const AtomicString& type, const CompositionEventInit& initializer)
{
- return adoptRef(new CompositionEvent(type, initializer));
+ return adoptRef(*new CompositionEvent(type, initializer));
}
virtual ~CompositionEvent();
diff --git a/Source/WebCore/dom/CustomEvent.h b/Source/WebCore/dom/CustomEvent.h
index a3ae28b..9940fb2 100644
--- a/Source/WebCore/dom/CustomEvent.h
+++ b/Source/WebCore/dom/CustomEvent.h
@@ -42,14 +42,14 @@
public:
virtual ~CustomEvent();
- static PassRefPtr<CustomEvent> create()
+ static Ref<CustomEvent> create()
{
- return adoptRef(new CustomEvent);
+ return adoptRef(*new CustomEvent);
}
- static PassRefPtr<CustomEvent> create(const AtomicString& type, const CustomEventInit& initializer)
+ static Ref<CustomEvent> create(const AtomicString& type, const CustomEventInit& initializer)
{
- return adoptRef(new CustomEvent(type, initializer));
+ return adoptRef(*new CustomEvent(type, initializer));
}
void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const Deprecated::ScriptValue& detail);
diff --git a/Source/WebCore/dom/DeviceMotionEvent.h b/Source/WebCore/dom/DeviceMotionEvent.h
index f78a29e..9ea5da4 100644
--- a/Source/WebCore/dom/DeviceMotionEvent.h
+++ b/Source/WebCore/dom/DeviceMotionEvent.h
@@ -35,13 +35,13 @@
class DeviceMotionEvent final : public Event {
public:
virtual ~DeviceMotionEvent();
- static PassRefPtr<DeviceMotionEvent> create()
+ static Ref<DeviceMotionEvent> create()
{
- return adoptRef(new DeviceMotionEvent);
+ return adoptRef(*new DeviceMotionEvent);
}
- static PassRefPtr<DeviceMotionEvent> create(const AtomicString& eventType, DeviceMotionData* deviceMotionData)
+ static Ref<DeviceMotionEvent> create(const AtomicString& eventType, DeviceMotionData* deviceMotionData)
{
- return adoptRef(new DeviceMotionEvent(eventType, deviceMotionData));
+ return adoptRef(*new DeviceMotionEvent(eventType, deviceMotionData));
}
void initDeviceMotionEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceMotionData*);
diff --git a/Source/WebCore/dom/DeviceOrientationEvent.h b/Source/WebCore/dom/DeviceOrientationEvent.h
index 2e7d941..e044ef9 100644
--- a/Source/WebCore/dom/DeviceOrientationEvent.h
+++ b/Source/WebCore/dom/DeviceOrientationEvent.h
@@ -35,13 +35,13 @@
class DeviceOrientationEvent final : public Event {
public:
virtual ~DeviceOrientationEvent();
- static PassRefPtr<DeviceOrientationEvent> create()
+ static Ref<DeviceOrientationEvent> create()
{
- return adoptRef(new DeviceOrientationEvent);
+ return adoptRef(*new DeviceOrientationEvent);
}
- static PassRefPtr<DeviceOrientationEvent> create(const AtomicString& eventType, DeviceOrientationData* orientation)
+ static Ref<DeviceOrientationEvent> create(const AtomicString& eventType, DeviceOrientationData* orientation)
{
- return adoptRef(new DeviceOrientationEvent(eventType, orientation));
+ return adoptRef(*new DeviceOrientationEvent(eventType, orientation));
}
void initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceOrientationData*);
diff --git a/Source/WebCore/dom/ErrorEvent.h b/Source/WebCore/dom/ErrorEvent.h
index b51d7a6..01c6100 100644
--- a/Source/WebCore/dom/ErrorEvent.h
+++ b/Source/WebCore/dom/ErrorEvent.h
@@ -47,17 +47,17 @@
class ErrorEvent final : public Event {
public:
- static PassRefPtr<ErrorEvent> create()
+ static Ref<ErrorEvent> create()
{
- return adoptRef(new ErrorEvent);
+ return adoptRef(*new ErrorEvent);
}
- static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber)
+ static Ref<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber)
{
- return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumber));
+ return adoptRef(*new ErrorEvent(message, fileName, lineNumber, columnNumber));
}
- static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEventInit& initializer)
+ static Ref<ErrorEvent> create(const AtomicString& type, const ErrorEventInit& initializer)
{
- return adoptRef(new ErrorEvent(type, initializer));
+ return adoptRef(*new ErrorEvent(type, initializer));
}
virtual ~ErrorEvent();
diff --git a/Source/WebCore/dom/Event.h b/Source/WebCore/dom/Event.h
index 67f426e..a7c8cd2 100644
--- a/Source/WebCore/dom/Event.h
+++ b/Source/WebCore/dom/Event.h
@@ -83,18 +83,18 @@
CHANGE = 32768
};
- static PassRefPtr<Event> create()
+ static Ref<Event> create()
{
- return adoptRef(new Event);
+ return adoptRef(*new Event);
}
- WEBCORE_EXPORT static PassRefPtr<Event> create(const AtomicString& type, bool canBubble, bool cancelable)
+ WEBCORE_EXPORT static Ref<Event> create(const AtomicString& type, bool canBubble, bool cancelable)
{
- return adoptRef(new Event(type, canBubble, cancelable));
+ return adoptRef(*new Event(type, canBubble, cancelable));
}
- static PassRefPtr<Event> create(const AtomicString& type, const EventInit& initializer)
+ static Ref<Event> create(const AtomicString& type, const EventInit& initializer)
{
- return adoptRef(new Event(type, initializer));
+ return adoptRef(*new Event(type, initializer));
}
virtual ~Event();
diff --git a/Source/WebCore/dom/FocusEvent.h b/Source/WebCore/dom/FocusEvent.h
index f8088a8..7e84dd8 100644
--- a/Source/WebCore/dom/FocusEvent.h
+++ b/Source/WebCore/dom/FocusEvent.h
@@ -41,19 +41,19 @@
class FocusEvent final : public UIEvent {
public:
- static PassRefPtr<FocusEvent> create()
+ static Ref<FocusEvent> create()
{
- return adoptRef(new FocusEvent);
+ return adoptRef(*new FocusEvent);
}
- static PassRefPtr<FocusEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> relatedTarget)
+ static Ref<FocusEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> relatedTarget)
{
- return adoptRef(new FocusEvent(type, canBubble, cancelable, view, detail, relatedTarget));
+ return adoptRef(*new FocusEvent(type, canBubble, cancelable, view, detail, relatedTarget));
}
- static PassRefPtr<FocusEvent> create(const AtomicString& type, const FocusEventInit& initializer)
+ static Ref<FocusEvent> create(const AtomicString& type, const FocusEventInit& initializer)
{
- return adoptRef(new FocusEvent(type, initializer));
+ return adoptRef(*new FocusEvent(type, initializer));
}
virtual EventTarget* relatedTarget() const override { return m_relatedTarget.get(); }
diff --git a/Source/WebCore/dom/HashChangeEvent.h b/Source/WebCore/dom/HashChangeEvent.h
index 7e2ab53..e267633 100644
--- a/Source/WebCore/dom/HashChangeEvent.h
+++ b/Source/WebCore/dom/HashChangeEvent.h
@@ -37,19 +37,19 @@
class HashChangeEvent final : public Event {
public:
- static PassRefPtr<HashChangeEvent> create()
+ static Ref<HashChangeEvent> create()
{
- return adoptRef(new HashChangeEvent);
+ return adoptRef(*new HashChangeEvent);
}
- static PassRefPtr<HashChangeEvent> create(const String& oldURL, const String& newURL)
+ static Ref<HashChangeEvent> create(const String& oldURL, const String& newURL)
{
- return adoptRef(new HashChangeEvent(oldURL, newURL));
+ return adoptRef(*new HashChangeEvent(oldURL, newURL));
}
- static PassRefPtr<HashChangeEvent> create(const AtomicString& type, const HashChangeEventInit& initializer)
+ static Ref<HashChangeEvent> create(const AtomicString& type, const HashChangeEventInit& initializer)
{
- return adoptRef(new HashChangeEvent(type, initializer));
+ return adoptRef(*new HashChangeEvent(type, initializer));
}
void initHashChangeEvent(const AtomicString& eventType, bool canBubble, bool cancelable, const String& oldURL, const String& newURL)
diff --git a/Source/WebCore/dom/KeyboardEvent.h b/Source/WebCore/dom/KeyboardEvent.h
index 3712e83..7a8777e 100644
--- a/Source/WebCore/dom/KeyboardEvent.h
+++ b/Source/WebCore/dom/KeyboardEvent.h
@@ -57,19 +57,19 @@
// DOM_KEY_LOCATION_JOYSTICK = 0x05
};
- static PassRefPtr<KeyboardEvent> create()
+ static Ref<KeyboardEvent> create()
{
- return adoptRef(new KeyboardEvent);
+ return adoptRef(*new KeyboardEvent);
}
- static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view)
+ static Ref<KeyboardEvent> create(const PlatformKeyboardEvent& platformEvent, AbstractView* view)
{
- return adoptRef(new KeyboardEvent(platformEvent, view));
+ return adoptRef(*new KeyboardEvent(platformEvent, view));
}
- static PassRefPtr<KeyboardEvent> create(const AtomicString& type, const KeyboardEventInit& initializer)
+ static Ref<KeyboardEvent> create(const AtomicString& type, const KeyboardEventInit& initializer)
{
- return adoptRef(new KeyboardEvent(type, initializer));
+ return adoptRef(*new KeyboardEvent(type, initializer));
}
virtual ~KeyboardEvent();
diff --git a/Source/WebCore/dom/MessageEvent.h b/Source/WebCore/dom/MessageEvent.h
index cba4c1f..9eb39dd 100644
--- a/Source/WebCore/dom/MessageEvent.h
+++ b/Source/WebCore/dom/MessageEvent.h
@@ -53,33 +53,33 @@
class MessageEvent final : public Event {
public:
- static PassRefPtr<MessageEvent> create()
+ static Ref<MessageEvent> create()
{
- return adoptRef(new MessageEvent);
+ return adoptRef(*new MessageEvent);
}
- static PassRefPtr<MessageEvent> create(std::unique_ptr<MessagePortArray> ports, const Deprecated::ScriptValue& data = Deprecated::ScriptValue(), const String& origin = String(), const String& lastEventId = String(), PassRefPtr<EventTarget> source = 0)
+ static Ref<MessageEvent> create(std::unique_ptr<MessagePortArray> ports, const Deprecated::ScriptValue& data = Deprecated::ScriptValue(), const String& origin = String(), const String& lastEventId = String(), PassRefPtr<EventTarget> source = 0)
{
- return adoptRef(new MessageEvent(data, origin, lastEventId, source, WTF::move(ports)));
+ return adoptRef(*new MessageEvent(data, origin, lastEventId, source, WTF::move(ports)));
}
- static PassRefPtr<MessageEvent> create(std::unique_ptr<MessagePortArray> ports, PassRefPtr<SerializedScriptValue> data, const String& origin = String(), const String& lastEventId = String(), PassRefPtr<EventTarget> source = 0)
+ static Ref<MessageEvent> create(std::unique_ptr<MessagePortArray> ports, PassRefPtr<SerializedScriptValue> data, const String& origin = String(), const String& lastEventId = String(), PassRefPtr<EventTarget> source = 0)
{
- return adoptRef(new MessageEvent(data, origin, lastEventId, source, WTF::move(ports)));
+ return adoptRef(*new MessageEvent(data, origin, lastEventId, source, WTF::move(ports)));
}
- static PassRefPtr<MessageEvent> create(const String& data, const String& origin = String())
+ static Ref<MessageEvent> create(const String& data, const String& origin = String())
{
- return adoptRef(new MessageEvent(data, origin));
+ return adoptRef(*new MessageEvent(data, origin));
}
- static PassRefPtr<MessageEvent> create(PassRefPtr<Blob> data, const String& origin = String())
+ static Ref<MessageEvent> create(PassRefPtr<Blob> data, const String& origin = String())
{
- return adoptRef(new MessageEvent(data, origin));
+ return adoptRef(*new MessageEvent(data, origin));
}
- static PassRefPtr<MessageEvent> create(PassRefPtr<ArrayBuffer> data, const String& origin = String())
+ static Ref<MessageEvent> create(PassRefPtr<ArrayBuffer> data, const String& origin = String())
{
- return adoptRef(new MessageEvent(data, origin));
+ return adoptRef(*new MessageEvent(data, origin));
}
- static PassRefPtr<MessageEvent> create(const AtomicString& type, const MessageEventInit& initializer)
+ static Ref<MessageEvent> create(const AtomicString& type, const MessageEventInit& initializer)
{
- return adoptRef(new MessageEvent(type, initializer));
+ return adoptRef(*new MessageEvent(type, initializer));
}
virtual ~MessageEvent();
diff --git a/Source/WebCore/dom/MouseEvent.cpp b/Source/WebCore/dom/MouseEvent.cpp
index 1875089..7b7cbd1 100644
--- a/Source/WebCore/dom/MouseEvent.cpp
+++ b/Source/WebCore/dom/MouseEvent.cpp
@@ -47,12 +47,12 @@
{
}
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, const MouseEventInit& initializer)
+Ref<MouseEvent> MouseEvent::create(const AtomicString& type, const MouseEventInit& initializer)
{
- return adoptRef(new MouseEvent(type, initializer));
+ return adoptRef(*new MouseEvent(type, initializer));
}
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget)
+Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget)
{
ASSERT(event.type() == PlatformEvent::MouseMoved || event.button() != NoButton);
@@ -69,7 +69,7 @@
relatedTarget);
}
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
+Ref<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
@@ -86,7 +86,7 @@
ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, 0, false);
}
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
+Ref<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
@@ -94,7 +94,7 @@
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
{
- return adoptRef(new MouseEvent(type, canBubble, cancelable, timestamp, view,
+ return adoptRef(*new MouseEvent(type, canBubble, cancelable, timestamp, view,
detail, screenX, screenY, pageX, pageY,
#if ENABLE(POINTER_LOCK)
movementX, movementY,
@@ -257,9 +257,9 @@
return clonedMouseEvent.release();
}
-PassRefPtr<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, PassRefPtr<Event> underlyingEvent, Element* target)
+Ref<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, PassRefPtr<Event> underlyingEvent, Element* target)
{
- return adoptRef(new SimulatedMouseEvent(eventType, view, underlyingEvent, target));
+ return adoptRef(*new SimulatedMouseEvent(eventType, view, underlyingEvent, target));
}
SimulatedMouseEvent::~SimulatedMouseEvent()
diff --git a/Source/WebCore/dom/MouseEvent.h b/Source/WebCore/dom/MouseEvent.h
index 1fa8a3a..9deb803 100644
--- a/Source/WebCore/dom/MouseEvent.h
+++ b/Source/WebCore/dom/MouseEvent.h
@@ -48,12 +48,12 @@
class MouseEvent : public MouseRelatedEvent {
public:
- static PassRefPtr<MouseEvent> create()
+ static Ref<MouseEvent> create()
{
- return adoptRef(new MouseEvent);
+ return adoptRef(*new MouseEvent);
}
- WEBCORE_EXPORT static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
+ WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
@@ -61,7 +61,7 @@
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
PassRefPtr<EventTarget> relatedTarget);
- WEBCORE_EXPORT static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
+ WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
@@ -69,9 +69,9 @@
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated = false);
- WEBCORE_EXPORT static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
+ WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
- static PassRefPtr<MouseEvent> create(const AtomicString& eventType, const MouseEventInit&);
+ static Ref<MouseEvent> create(const AtomicString& eventType, const MouseEventInit&);
virtual ~MouseEvent();
@@ -127,7 +127,7 @@
class SimulatedMouseEvent final : public MouseEvent {
public:
- static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent, Element* target);
+ static Ref<SimulatedMouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent, Element* target);
virtual ~SimulatedMouseEvent();
private:
diff --git a/Source/WebCore/dom/MutationEvent.h b/Source/WebCore/dom/MutationEvent.h
index 4d05314..58f6cb5 100644
--- a/Source/WebCore/dom/MutationEvent.h
+++ b/Source/WebCore/dom/MutationEvent.h
@@ -39,15 +39,15 @@
REMOVAL = 3
};
- static PassRefPtr<MutationEvent> create()
+ static Ref<MutationEvent> create()
{
- return adoptRef(new MutationEvent);
+ return adoptRef(*new MutationEvent);
}
- static PassRefPtr<MutationEvent> create(const AtomicString& type, bool canBubble, PassRefPtr<Node> relatedNode = 0,
+ static Ref<MutationEvent> create(const AtomicString& type, bool canBubble, PassRefPtr<Node> relatedNode = 0,
const String& prevValue = String(), const String& newValue = String(), const String& attrName = String(), unsigned short attrChange = 0)
{
- return adoptRef(new MutationEvent(type, canBubble, false, relatedNode, prevValue, newValue, attrName, attrChange));
+ return adoptRef(*new MutationEvent(type, canBubble, false, relatedNode, prevValue, newValue, attrName, attrChange));
}
void initMutationEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<Node> relatedNode,
diff --git a/Source/WebCore/dom/OverflowEvent.h b/Source/WebCore/dom/OverflowEvent.h
index d4cd337..20edc88 100644
--- a/Source/WebCore/dom/OverflowEvent.h
+++ b/Source/WebCore/dom/OverflowEvent.h
@@ -46,17 +46,17 @@
BOTH = 2
};
- static PassRefPtr<OverflowEvent> create()
+ static Ref<OverflowEvent> create()
{
- return adoptRef(new OverflowEvent);
+ return adoptRef(*new OverflowEvent);
}
- static PassRefPtr<OverflowEvent> create(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow)
+ static Ref<OverflowEvent> create(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow)
{
- return adoptRef(new OverflowEvent(horizontalOverflowChanged, horizontalOverflow, verticalOverflowChanged, verticalOverflow));
+ return adoptRef(*new OverflowEvent(horizontalOverflowChanged, horizontalOverflow, verticalOverflowChanged, verticalOverflow));
}
- static PassRefPtr<OverflowEvent> create(const AtomicString& type, const OverflowEventInit& initializer)
+ static Ref<OverflowEvent> create(const AtomicString& type, const OverflowEventInit& initializer)
{
- return adoptRef(new OverflowEvent(type, initializer));
+ return adoptRef(*new OverflowEvent(type, initializer));
}
void initOverflowEvent(unsigned short orient, bool horizontalOverflow, bool verticalOverflow);
diff --git a/Source/WebCore/dom/PageTransitionEvent.h b/Source/WebCore/dom/PageTransitionEvent.h
index 8883dc4..327aeab 100644
--- a/Source/WebCore/dom/PageTransitionEvent.h
+++ b/Source/WebCore/dom/PageTransitionEvent.h
@@ -38,17 +38,17 @@
class PageTransitionEvent final : public Event {
public:
- static PassRefPtr<PageTransitionEvent> create()
+ static Ref<PageTransitionEvent> create()
{
- return adoptRef(new PageTransitionEvent);
+ return adoptRef(*new PageTransitionEvent);
}
- static PassRefPtr<PageTransitionEvent> create(const AtomicString& type, bool persisted)
+ static Ref<PageTransitionEvent> create(const AtomicString& type, bool persisted)
{
- return adoptRef(new PageTransitionEvent(type, persisted));
+ return adoptRef(*new PageTransitionEvent(type, persisted));
}
- static PassRefPtr<PageTransitionEvent> create(const AtomicString& type, const PageTransitionEventInit& initializer)
+ static Ref<PageTransitionEvent> create(const AtomicString& type, const PageTransitionEventInit& initializer)
{
- return adoptRef(new PageTransitionEvent(type, initializer));
+ return adoptRef(*new PageTransitionEvent(type, initializer));
}
virtual ~PageTransitionEvent();
diff --git a/Source/WebCore/dom/PopStateEvent.cpp b/Source/WebCore/dom/PopStateEvent.cpp
index 0ff5238..dffa43d 100644
--- a/Source/WebCore/dom/PopStateEvent.cpp
+++ b/Source/WebCore/dom/PopStateEvent.cpp
@@ -64,19 +64,19 @@
{
}
-PassRefPtr<PopStateEvent> PopStateEvent::create()
+Ref<PopStateEvent> PopStateEvent::create()
{
- return adoptRef(new PopStateEvent);
+ return adoptRef(*new PopStateEvent);
}
-PassRefPtr<PopStateEvent> PopStateEvent::create(PassRefPtr<SerializedScriptValue> serializedState, PassRefPtr<History> history)
+Ref<PopStateEvent> PopStateEvent::create(PassRefPtr<SerializedScriptValue> serializedState, PassRefPtr<History> history)
{
- return adoptRef(new PopStateEvent(serializedState, history));
+ return adoptRef(*new PopStateEvent(serializedState, history));
}
-PassRefPtr<PopStateEvent> PopStateEvent::create(const AtomicString& type, const PopStateEventInit& initializer)
+Ref<PopStateEvent> PopStateEvent::create(const AtomicString& type, const PopStateEventInit& initializer)
{
- return adoptRef(new PopStateEvent(type, initializer));
+ return adoptRef(*new PopStateEvent(type, initializer));
}
EventInterface PopStateEvent::eventInterface() const
diff --git a/Source/WebCore/dom/PopStateEvent.h b/Source/WebCore/dom/PopStateEvent.h
index b67627c..a1e1940 100644
--- a/Source/WebCore/dom/PopStateEvent.h
+++ b/Source/WebCore/dom/PopStateEvent.h
@@ -44,9 +44,9 @@
class PopStateEvent final : public Event {
public:
virtual ~PopStateEvent();
- static PassRefPtr<PopStateEvent> create();
- static PassRefPtr<PopStateEvent> create(PassRefPtr<SerializedScriptValue>, PassRefPtr<History>);
- static PassRefPtr<PopStateEvent> create(const AtomicString&, const PopStateEventInit&);
+ static Ref<PopStateEvent> create();
+ static Ref<PopStateEvent> create(PassRefPtr<SerializedScriptValue>, PassRefPtr<History>);
+ static Ref<PopStateEvent> create(const AtomicString&, const PopStateEventInit&);
PassRefPtr<SerializedScriptValue> serializedState() const { return m_serializedState; }
const Deprecated::ScriptValue& state() const { return m_state; }
diff --git a/Source/WebCore/dom/ProgressEvent.h b/Source/WebCore/dom/ProgressEvent.h
index f9f1d45..05ec715 100644
--- a/Source/WebCore/dom/ProgressEvent.h
+++ b/Source/WebCore/dom/ProgressEvent.h
@@ -40,17 +40,17 @@
class ProgressEvent : public Event {
public:
- static PassRefPtr<ProgressEvent> create()
+ static Ref<ProgressEvent> create()
{
- return adoptRef(new ProgressEvent);
+ return adoptRef(*new ProgressEvent);
}
- static PassRefPtr<ProgressEvent> create(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total)
+ static Ref<ProgressEvent> create(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total)
{
- return adoptRef(new ProgressEvent(type, lengthComputable, loaded, total));
+ return adoptRef(*new ProgressEvent(type, lengthComputable, loaded, total));
}
- static PassRefPtr<ProgressEvent> create(const AtomicString& type, const ProgressEventInit& initializer)
+ static Ref<ProgressEvent> create(const AtomicString& type, const ProgressEventInit& initializer)
{
- return adoptRef(new ProgressEvent(type, initializer));
+ return adoptRef(*new ProgressEvent(type, initializer));
}
bool lengthComputable() const { return m_lengthComputable; }
diff --git a/Source/WebCore/dom/TextEvent.cpp b/Source/WebCore/dom/TextEvent.cpp
index 4a31411..69644a5 100644
--- a/Source/WebCore/dom/TextEvent.cpp
+++ b/Source/WebCore/dom/TextEvent.cpp
@@ -32,34 +32,34 @@
namespace WebCore {
-PassRefPtr<TextEvent> TextEvent::create()
+Ref<TextEvent> TextEvent::create()
{
- return adoptRef(new TextEvent);
+ return adoptRef(*new TextEvent);
}
-PassRefPtr<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const String& data, TextEventInputType inputType)
+Ref<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const String& data, TextEventInputType inputType)
{
- return adoptRef(new TextEvent(view, data, inputType));
+ return adoptRef(*new TextEvent(view, data, inputType));
}
-PassRefPtr<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtr<AbstractView> view, const String& data, bool shouldSmartReplace)
+Ref<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtr<AbstractView> view, const String& data, bool shouldSmartReplace)
{
- return adoptRef(new TextEvent(view, data, 0, shouldSmartReplace, false, MailBlockquoteHandling::RespectBlockquote));
+ return adoptRef(*new TextEvent(view, data, 0, shouldSmartReplace, false, MailBlockquoteHandling::RespectBlockquote));
}
-PassRefPtr<TextEvent> TextEvent::createForFragmentPaste(PassRefPtr<AbstractView> view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
+Ref<TextEvent> TextEvent::createForFragmentPaste(PassRefPtr<AbstractView> view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
{
- return adoptRef(new TextEvent(view, "", data, shouldSmartReplace, shouldMatchStyle, mailBlockquoteHandling));
+ return adoptRef(*new TextEvent(view, "", data, shouldSmartReplace, shouldMatchStyle, mailBlockquoteHandling));
}
-PassRefPtr<TextEvent> TextEvent::createForDrop(PassRefPtr<AbstractView> view, const String& data)
+Ref<TextEvent> TextEvent::createForDrop(PassRefPtr<AbstractView> view, const String& data)
{
- return adoptRef(new TextEvent(view, data, TextEventInputDrop));
+ return adoptRef(*new TextEvent(view, data, TextEventInputDrop));
}
-PassRefPtr<TextEvent> TextEvent::createForDictation(PassRefPtr<AbstractView> view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
+Ref<TextEvent> TextEvent::createForDictation(PassRefPtr<AbstractView> view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
{
- return adoptRef(new TextEvent(view, data, dictationAlternatives));
+ return adoptRef(*new TextEvent(view, data, dictationAlternatives));
}
TextEvent::TextEvent()
diff --git a/Source/WebCore/dom/TextEvent.h b/Source/WebCore/dom/TextEvent.h
index aef573a..df08b19 100644
--- a/Source/WebCore/dom/TextEvent.h
+++ b/Source/WebCore/dom/TextEvent.h
@@ -40,12 +40,12 @@
class TextEvent final : public UIEvent {
public:
- static PassRefPtr<TextEvent> create();
- static PassRefPtr<TextEvent> create(PassRefPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
- static PassRefPtr<TextEvent> createForPlainTextPaste(PassRefPtr<AbstractView>, const String& data, bool shouldSmartReplace);
- static PassRefPtr<TextEvent> createForFragmentPaste(PassRefPtr<AbstractView>, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling);
- static PassRefPtr<TextEvent> createForDrop(PassRefPtr<AbstractView>, const String& data);
- static PassRefPtr<TextEvent> createForDictation(PassRefPtr<AbstractView>, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
+ static Ref<TextEvent> create();
+ static Ref<TextEvent> create(PassRefPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
+ static Ref<TextEvent> createForPlainTextPaste(PassRefPtr<AbstractView>, const String& data, bool shouldSmartReplace);
+ static Ref<TextEvent> createForFragmentPaste(PassRefPtr<AbstractView>, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling);
+ static Ref<TextEvent> createForDrop(PassRefPtr<AbstractView>, const String& data);
+ static Ref<TextEvent> createForDictation(PassRefPtr<AbstractView>, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
virtual ~TextEvent();
diff --git a/Source/WebCore/dom/TouchEvent.h b/Source/WebCore/dom/TouchEvent.h
index aa06795..bcf09a1 100644
--- a/Source/WebCore/dom/TouchEvent.h
+++ b/Source/WebCore/dom/TouchEvent.h
@@ -40,9 +40,9 @@
public:
virtual ~TouchEvent();
- static PassRefPtr<TouchEvent> create()
+ static Ref<TouchEvent> create()
{
- return adoptRef(new TouchEvent);
+ return adoptRef(*new TouchEvent);
}
static PassRefPtr<TouchEvent> create(TouchList* touches,
TouchList* targetTouches, TouchList* changedTouches,
diff --git a/Source/WebCore/dom/TransitionEvent.h b/Source/WebCore/dom/TransitionEvent.h
index 3eadb22..42a8fed 100644
--- a/Source/WebCore/dom/TransitionEvent.h
+++ b/Source/WebCore/dom/TransitionEvent.h
@@ -41,17 +41,17 @@
class TransitionEvent final : public Event {
public:
- static PassRefPtr<TransitionEvent> create()
+ static Ref<TransitionEvent> create()
{
- return adoptRef(new TransitionEvent);
+ return adoptRef(*new TransitionEvent);
}
- static PassRefPtr<TransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
+ static Ref<TransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
{
- return adoptRef(new TransitionEvent(type, propertyName, elapsedTime, pseudoElement));
+ return adoptRef(*new TransitionEvent(type, propertyName, elapsedTime, pseudoElement));
}
- static PassRefPtr<TransitionEvent> create(const AtomicString& type, const TransitionEventInit& initializer)
+ static Ref<TransitionEvent> create(const AtomicString& type, const TransitionEventInit& initializer)
{
- return adoptRef(new TransitionEvent(type, initializer));
+ return adoptRef(*new TransitionEvent(type, initializer));
}
virtual ~TransitionEvent();
diff --git a/Source/WebCore/dom/UIEvent.h b/Source/WebCore/dom/UIEvent.h
index f9fe144..6690fef 100644
--- a/Source/WebCore/dom/UIEvent.h
+++ b/Source/WebCore/dom/UIEvent.h
@@ -41,17 +41,17 @@
class UIEvent : public Event {
public:
- static PassRefPtr<UIEvent> create()
+ static Ref<UIEvent> create()
{
- return adoptRef(new UIEvent);
+ return adoptRef(*new UIEvent);
}
- static PassRefPtr<UIEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, int detail)
+ static Ref<UIEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, int detail)
{
- return adoptRef(new UIEvent(type, canBubble, cancelable, view, detail));
+ return adoptRef(*new UIEvent(type, canBubble, cancelable, view, detail));
}
- static PassRefPtr<UIEvent> create(const AtomicString& type, const UIEventInit& initializer)
+ static Ref<UIEvent> create(const AtomicString& type, const UIEventInit& initializer)
{
- return adoptRef(new UIEvent(type, initializer));
+ return adoptRef(*new UIEvent(type, initializer));
}
virtual ~UIEvent();
diff --git a/Source/WebCore/dom/WebKitAnimationEvent.h b/Source/WebCore/dom/WebKitAnimationEvent.h
index 2a317f4..dbc9780 100644
--- a/Source/WebCore/dom/WebKitAnimationEvent.h
+++ b/Source/WebCore/dom/WebKitAnimationEvent.h
@@ -39,17 +39,17 @@
class WebKitAnimationEvent final : public Event {
public:
- static PassRefPtr<WebKitAnimationEvent> create()
+ static Ref<WebKitAnimationEvent> create()
{
- return adoptRef(new WebKitAnimationEvent);
+ return adoptRef(*new WebKitAnimationEvent);
}
- static PassRefPtr<WebKitAnimationEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
+ static Ref<WebKitAnimationEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
{
- return adoptRef(new WebKitAnimationEvent(type, animationName, elapsedTime));
+ return adoptRef(*new WebKitAnimationEvent(type, animationName, elapsedTime));
}
- static PassRefPtr<WebKitAnimationEvent> create(const AtomicString& type, const WebKitAnimationEventInit& initializer)
+ static Ref<WebKitAnimationEvent> create(const AtomicString& type, const WebKitAnimationEventInit& initializer)
{
- return adoptRef(new WebKitAnimationEvent(type, initializer));
+ return adoptRef(*new WebKitAnimationEvent(type, initializer));
}
virtual ~WebKitAnimationEvent();
diff --git a/Source/WebCore/dom/WebKitTransitionEvent.h b/Source/WebCore/dom/WebKitTransitionEvent.h
index c1df372..afd9749 100644
--- a/Source/WebCore/dom/WebKitTransitionEvent.h
+++ b/Source/WebCore/dom/WebKitTransitionEvent.h
@@ -40,17 +40,17 @@
class WebKitTransitionEvent final : public Event {
public:
- static PassRefPtr<WebKitTransitionEvent> create()
+ static Ref<WebKitTransitionEvent> create()
{
- return adoptRef(new WebKitTransitionEvent);
+ return adoptRef(*new WebKitTransitionEvent);
}
- static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
+ static Ref<WebKitTransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
{
- return adoptRef(new WebKitTransitionEvent(type, propertyName, elapsedTime, pseudoElement));
+ return adoptRef(*new WebKitTransitionEvent(type, propertyName, elapsedTime, pseudoElement));
}
- static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const WebKitTransitionEventInit& initializer)
+ static Ref<WebKitTransitionEvent> create(const AtomicString& type, const WebKitTransitionEventInit& initializer)
{
- return adoptRef(new WebKitTransitionEvent(type, initializer));
+ return adoptRef(*new WebKitTransitionEvent(type, initializer));
}
virtual ~WebKitTransitionEvent();
diff --git a/Source/WebCore/dom/WheelEvent.h b/Source/WebCore/dom/WheelEvent.h
index 94ccf43..5d15bbd 100644
--- a/Source/WebCore/dom/WheelEvent.h
+++ b/Source/WebCore/dom/WheelEvent.h
@@ -54,19 +54,19 @@
DOM_DELTA_PAGE
};
- static PassRefPtr<WheelEvent> create()
+ static Ref<WheelEvent> create()
{
- return adoptRef(new WheelEvent);
+ return adoptRef(*new WheelEvent);
}
- static PassRefPtr<WheelEvent> create(const AtomicString& type, const WheelEventInit& initializer)
+ static Ref<WheelEvent> create(const AtomicString& type, const WheelEventInit& initializer)
{
- return adoptRef(new WheelEvent(type, initializer));
+ return adoptRef(*new WheelEvent(type, initializer));
}
- static PassRefPtr<WheelEvent> create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view)
+ static Ref<WheelEvent> create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view)
{
- return adoptRef(new WheelEvent(event, view));
+ return adoptRef(*new WheelEvent(event, view));
}
void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView>,
diff --git a/Source/WebCore/html/MediaKeyEvent.h b/Source/WebCore/html/MediaKeyEvent.h
index 80aef0c..774de30 100644
--- a/Source/WebCore/html/MediaKeyEvent.h
+++ b/Source/WebCore/html/MediaKeyEvent.h
@@ -49,14 +49,14 @@
public:
virtual ~MediaKeyEvent();
- static PassRefPtr<MediaKeyEvent> create()
+ static Ref<MediaKeyEvent> create()
{
- return adoptRef(new MediaKeyEvent);
+ return adoptRef(*new MediaKeyEvent);
}
- static PassRefPtr<MediaKeyEvent> create(const AtomicString& type, const MediaKeyEventInit& initializer)
+ static Ref<MediaKeyEvent> create(const AtomicString& type, const MediaKeyEventInit& initializer)
{
- return adoptRef(new MediaKeyEvent(type, initializer));
+ return adoptRef(*new MediaKeyEvent(type, initializer));
}
virtual EventInterface eventInterface() const override;
diff --git a/Source/WebCore/html/canvas/WebGLContextEvent.h b/Source/WebCore/html/canvas/WebGLContextEvent.h
index d7529f0..20565e6 100644
--- a/Source/WebCore/html/canvas/WebGLContextEvent.h
+++ b/Source/WebCore/html/canvas/WebGLContextEvent.h
@@ -38,17 +38,17 @@
class WebGLContextEvent final : public Event {
public:
- static PassRefPtr<WebGLContextEvent> create()
+ static Ref<WebGLContextEvent> create()
{
- return adoptRef(new WebGLContextEvent);
+ return adoptRef(*new WebGLContextEvent);
}
- static PassRefPtr<WebGLContextEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage)
+ static Ref<WebGLContextEvent> create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage)
{
- return adoptRef(new WebGLContextEvent(type, canBubble, cancelable, statusMessage));
+ return adoptRef(*new WebGLContextEvent(type, canBubble, cancelable, statusMessage));
}
- static PassRefPtr<WebGLContextEvent> create(const AtomicString& type, const WebGLContextEventInit& initializer)
+ static Ref<WebGLContextEvent> create(const AtomicString& type, const WebGLContextEventInit& initializer)
{
- return adoptRef(new WebGLContextEvent(type, initializer));
+ return adoptRef(*new WebGLContextEvent(type, initializer));
}
virtual ~WebGLContextEvent();
diff --git a/Source/WebCore/html/track/TrackEvent.h b/Source/WebCore/html/track/TrackEvent.h
index aae7d82..ca40831 100644
--- a/Source/WebCore/html/track/TrackEvent.h
+++ b/Source/WebCore/html/track/TrackEvent.h
@@ -43,14 +43,14 @@
public:
virtual ~TrackEvent();
- static PassRefPtr<TrackEvent> create()
+ static Ref<TrackEvent> create()
{
- return adoptRef(new TrackEvent);
+ return adoptRef(*new TrackEvent);
}
- static PassRefPtr<TrackEvent> create(const AtomicString& type, const TrackEventInit& initializer)
+ static Ref<TrackEvent> create(const AtomicString& type, const TrackEventInit& initializer)
{
- return adoptRef(new TrackEvent(type, initializer));
+ return adoptRef(*new TrackEvent(type, initializer));
}
virtual EventInterface eventInterface() const override;
diff --git a/Source/WebCore/storage/StorageEvent.cpp b/Source/WebCore/storage/StorageEvent.cpp
index e7d73d5..ed1171b 100644
--- a/Source/WebCore/storage/StorageEvent.cpp
+++ b/Source/WebCore/storage/StorageEvent.cpp
@@ -35,9 +35,9 @@
{
}
-PassRefPtr<StorageEvent> StorageEvent::create()
+Ref<StorageEvent> StorageEvent::create()
{
- return adoptRef(new StorageEvent);
+ return adoptRef(*new StorageEvent);
}
StorageEvent::StorageEvent()
@@ -48,14 +48,14 @@
{
}
-PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea)
+Ref<StorageEvent> StorageEvent::create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea)
{
- return adoptRef(new StorageEvent(type, key, oldValue, newValue, url, storageArea));
+ return adoptRef(*new StorageEvent(type, key, oldValue, newValue, url, storageArea));
}
-PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const StorageEventInit& initializer)
+Ref<StorageEvent> StorageEvent::create(const AtomicString& type, const StorageEventInit& initializer)
{
- return adoptRef(new StorageEvent(type, initializer));
+ return adoptRef(*new StorageEvent(type, initializer));
}
StorageEvent::StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea)
diff --git a/Source/WebCore/storage/StorageEvent.h b/Source/WebCore/storage/StorageEvent.h
index 783a626..962a427 100644
--- a/Source/WebCore/storage/StorageEvent.h
+++ b/Source/WebCore/storage/StorageEvent.h
@@ -45,9 +45,9 @@
class StorageEvent : public Event {
public:
- static PassRefPtr<StorageEvent> create();
- static PassRefPtr<StorageEvent> create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea);
- static PassRefPtr<StorageEvent> create(const AtomicString&, const StorageEventInit&);
+ static Ref<StorageEvent> create();
+ static Ref<StorageEvent> create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& url, Storage* storageArea);
+ static Ref<StorageEvent> create(const AtomicString&, const StorageEventInit&);
virtual ~StorageEvent();
const String& key() const { return m_key; }
diff --git a/Source/WebCore/svg/SVGZoomEvent.h b/Source/WebCore/svg/SVGZoomEvent.h
index 4d1bf18..a03abda 100644
--- a/Source/WebCore/svg/SVGZoomEvent.h
+++ b/Source/WebCore/svg/SVGZoomEvent.h
@@ -30,7 +30,7 @@
class SVGZoomEvent : public UIEvent {
public:
- static PassRefPtr<SVGZoomEvent> create() { return adoptRef(new SVGZoomEvent); }
+ static Ref<SVGZoomEvent> create() { return adoptRef(*new SVGZoomEvent); }
// 'SVGZoomEvent' functions
FloatRect zoomRectScreen() const;
diff --git a/Source/WebCore/xml/XMLHttpRequestProgressEvent.h b/Source/WebCore/xml/XMLHttpRequestProgressEvent.h
index 4d58150..967026e 100644
--- a/Source/WebCore/xml/XMLHttpRequestProgressEvent.h
+++ b/Source/WebCore/xml/XMLHttpRequestProgressEvent.h
@@ -33,13 +33,13 @@
class XMLHttpRequestProgressEvent : public ProgressEvent {
public:
- static PassRefPtr<XMLHttpRequestProgressEvent> create()
+ static Ref<XMLHttpRequestProgressEvent> create()
{
- return adoptRef(new XMLHttpRequestProgressEvent);
+ return adoptRef(*new XMLHttpRequestProgressEvent);
}
- static PassRefPtr<XMLHttpRequestProgressEvent> create(const AtomicString& type, bool lengthComputable = false, unsigned long long loaded = 0, unsigned long long total = 0)
+ static Ref<XMLHttpRequestProgressEvent> create(const AtomicString& type, bool lengthComputable = false, unsigned long long loaded = 0, unsigned long long total = 0)
{
- return adoptRef(new XMLHttpRequestProgressEvent(type, lengthComputable, loaded, total));
+ return adoptRef(*new XMLHttpRequestProgressEvent(type, lengthComputable, loaded, total));
}
// Those 2 synonyms are included for compatibility with Firefox.
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index 49a9c34..befd785 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -2252,7 +2252,7 @@
if (isKeyboardEventValid && event.type() == WebEvent::KeyDown) {
PlatformKeyboardEvent platformEvent(platform(event));
platformEvent.disambiguateKeyDownEvent(PlatformEvent::RawKeyDown);
- m_page->focusController().setInitialFocus(forward ? FocusDirectionForward : FocusDirectionBackward, KeyboardEvent::create(platformEvent, frame.document()->defaultView()).get());
+ m_page->focusController().setInitialFocus(forward ? FocusDirectionForward : FocusDirectionBackward, &KeyboardEvent::create(platformEvent, frame.document()->defaultView()).get());
return;
}