+2016-01-12 Gyuyoung Kim <gyuyoung.kim@webkit.org>
+
+ Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
+ https://bugs.webkit.org/show_bug.cgi?id=152829
+
+ Reviewed by Darin Adler.
+
+ As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
+ Nobody hands us ownership when making one of these objects.
+
+ * dom/FocusEvent.cpp:
+ (WebCore::FocusEvent::FocusEvent):
+ * dom/FocusEvent.h:
+ * dom/KeyboardEvent.cpp:
+ (WebCore::KeyboardEvent::KeyboardEvent):
+ * dom/MouseEvent.cpp:
+ (WebCore::MouseEvent::create):
+ (WebCore::MouseEvent::MouseEvent):
+ (WebCore::MouseEvent::initMouseEvent):
+ (WebCore::SimulatedMouseEvent::create):
+ (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
+ * dom/MouseEvent.h:
+ * dom/MouseRelatedEvent.cpp:
+ (WebCore::MouseRelatedEvent::MouseRelatedEvent):
+ * dom/MouseRelatedEvent.h:
+ * dom/TextEvent.cpp:
+ (WebCore::TextEvent::create):
+ (WebCore::TextEvent::createForPlainTextPaste):
+ (WebCore::TextEvent::createForFragmentPaste):
+ (WebCore::TextEvent::createForDrop):
+ (WebCore::TextEvent::createForDictation):
+ (WebCore::TextEvent::TextEvent):
+ (WebCore::TextEvent::initTextEvent):
+ * dom/TextEvent.h:
+ * dom/TouchEvent.cpp:
+ (WebCore::TouchEvent::TouchEvent):
+ (WebCore::TouchEvent::initTouchEvent):
+ * dom/TouchEvent.h:
+ * dom/UIEvent.cpp:
+ (WebCore::UIEvent::UIEvent):
+ (WebCore::UIEvent::initUIEvent):
+ * dom/UIEvent.h:
+ (WebCore::UIEvent::create):
+ (WebCore::UIEvent::view):
+ * dom/UIEventWithKeyState.h:
+ (WebCore::UIEventWithKeyState::UIEventWithKeyState):
+
2016-01-12 Csaba Osztrogonác <ossy@webkit.org>
Fix unused-private-field warnings in DisplayListItems.h
return adoptRef(*new UIRequestEvent(type, initializer));
}
-Ref<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, AbstractView* view, int detail, PassRefPtr<EventTarget> receiver)
{
return adoptRef(*new UIRequestEvent(type, bubbles, cancelable, view, detail, receiver));
}
UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
- : UIEvent(type, initializer.bubbles, initializer.cancelable, initializer.view, initializer.detail)
+ : UIEvent(type, initializer.bubbles, initializer.cancelable, initializer.view.get(), initializer.detail)
, m_receiver(initializer.receiver)
{
}
-UIRequestEvent::UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView> view, int detail, PassRefPtr<EventTarget> receiver)
+UIRequestEvent::UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView* view, int detail, PassRefPtr<EventTarget> receiver)
: UIEvent(type, bubbles, cancelable, view, detail)
, m_receiver(receiver)
{
class UIRequestEvent : public UIEvent {
public:
static Ref<UIRequestEvent> create();
- static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
+ static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, PassRefPtr<EventTarget> receiver);
static Ref<UIRequestEvent> create(const AtomicString& eventType, const UIRequestEventInit&);
EventTarget* receiver() const { return m_receiver.get(); }
protected:
- UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, PassRefPtr<AbstractView>, int detail, PassRefPtr<EventTarget> receiver);
+ UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, PassRefPtr<EventTarget> receiver);
UIRequestEvent(const AtomicString& type, const UIRequestEventInit&);
{
}
-FocusEvent::FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<AbstractView>&& view, int detail, RefPtr<EventTarget>&& relatedTarget)
- : UIEvent(type, canBubble, cancelable, WTFMove(view), detail)
+FocusEvent::FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail, RefPtr<EventTarget>&& relatedTarget)
+ : UIEvent(type, canBubble, cancelable, view, detail)
, m_relatedTarget(WTFMove(relatedTarget))
{
}
return adoptRef(*new FocusEvent);
}
- static Ref<FocusEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<AbstractView>&& view, int detail, RefPtr<EventTarget>&& relatedTarget)
+ static Ref<FocusEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail, RefPtr<EventTarget>&& relatedTarget)
{
- return adoptRef(*new FocusEvent(type, canBubble, cancelable, WTFMove(view), detail, WTFMove(relatedTarget)));
+ return adoptRef(*new FocusEvent(type, canBubble, cancelable, view, detail, WTFMove(relatedTarget)));
}
static Ref<FocusEvent> create(const AtomicString& type, const FocusEventInit& initializer)
private:
FocusEvent();
- FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<AbstractView>&&, int, RefPtr<EventTarget>&&);
+ FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, int, RefPtr<EventTarget>&&);
FocusEvent(const AtomicString& type, const FocusEventInit&);
virtual bool isFocusEvent() const override;
}
KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventInit& initializer)
- : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable, initializer.view, initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey)
+ : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable, initializer.view.get(), initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey)
, m_keyIdentifier(initializer.keyIdentifier)
, m_location(initializer.location)
, m_altGraphKey(false)
return adoptRef(*new MouseEvent(type, initializer));
}
-Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget)
+Ref<MouseEvent> MouseEvent::create(const AtomicString& eventType, AbstractView* view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget)
{
bool isMouseEnterOrLeave = eventType == eventNames().mouseenterEvent || eventType == eventNames().mouseleaveEvent;
bool isCancelable = eventType != eventNames().mousemoveEvent && !isMouseEnterOrLeave;
relatedTarget, event.force());
}
-Ref<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, AbstractView* view,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, 0, false);
}
-Ref<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, AbstractView* view,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
{
}
-MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
+MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double timestamp, AbstractView* view,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
}
MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& initializer)
- : MouseRelatedEvent(eventType, initializer.bubbles, initializer.cancelable, currentTime(), initializer.view, initializer.detail, IntPoint(initializer.screenX, initializer.screenY),
+ : MouseRelatedEvent(eventType, initializer.bubbles, initializer.cancelable, currentTime(), initializer.view.get(), initializer.detail, IntPoint(initializer.screenX, initializer.screenY),
IntPoint(0 /* pageX */, 0 /* pageY */),
#if ENABLE(POINTER_LOCK)
IntPoint(0 /* movementX */, 0 /* movementY */),
{
}
-void MouseEvent::initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view,
+void MouseEvent::initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
int detail, int screenX, int screenY, int clientX, int clientY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
unsigned short button, PassRefPtr<EventTarget> relatedTarget)
return clonedMouseEvent.release();
}
-Ref<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, PassRefPtr<AbstractView> view, PassRefPtr<Event> underlyingEvent, Element* target)
+Ref<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, AbstractView* view, PassRefPtr<Event> underlyingEvent, Element* target)
{
return adoptRef(*new SimulatedMouseEvent(eventType, view, underlyingEvent, target));
}
{
}
-SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView> view, PassRefPtr<Event> underlyingEvent, Element* target)
+SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, AbstractView* view, PassRefPtr<Event> underlyingEvent, Element* target)
: MouseEvent(eventType, true, true, underlyingEvent ? underlyingEvent->timeStamp() : currentTime(), view, 0, 0, 0, 0, 0,
#if ENABLE(POINTER_LOCK)
0, 0,
return adoptRef(*new MouseEvent);
}
- static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
+ static Ref<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, AbstractView*,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
PassRefPtr<EventTarget> relatedTarget, double force);
- WEBCORE_EXPORT static Ref<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, AbstractView*,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
PassRefPtr<EventTarget> relatedTarget, double force, PassRefPtr<DataTransfer>, bool isSimulated = false);
- WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
+ WEBCORE_EXPORT static Ref<MouseEvent> create(const AtomicString& eventType, AbstractView*, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
static Ref<MouseEvent> create(const AtomicString& eventType, const MouseEventInit&);
virtual ~MouseEvent();
- void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>,
+ void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*,
int detail, int screenX, int screenY, int clientX, int clientY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
unsigned short button, PassRefPtr<EventTarget> relatedTarget);
virtual PassRefPtr<Event> cloneFor(HTMLIFrameElement*) const override;
protected:
- MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
+ MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, AbstractView*,
int detail, int screenX, int screenY, int pageX, int pageY,
#if ENABLE(POINTER_LOCK)
int movementX, int movementY,
class SimulatedMouseEvent final : public MouseEvent {
public:
- static Ref<SimulatedMouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent, Element* target);
+ static Ref<SimulatedMouseEvent> create(const AtomicString& eventType, AbstractView*, PassRefPtr<Event> underlyingEvent, Element* target);
virtual ~SimulatedMouseEvent();
private:
- SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent, Element* target);
+ SimulatedMouseEvent(const AtomicString& eventType, AbstractView*, PassRefPtr<Event> underlyingEvent, Element* target);
};
} // namespace WebCore
#endif
}
-MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> abstractView,
+MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double timestamp, AbstractView* abstractView,
int detail, const IntPoint& screenLocation, const IntPoint& windowLocation,
#if ENABLE(POINTER_LOCK)
const IntPoint& movementDelta,
protected:
MouseRelatedEvent();
- MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>,
+ MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, AbstractView*,
int detail, const IntPoint& screenLocation, const IntPoint& windowLocation,
#if ENABLE(POINTER_LOCK)
const IntPoint& movementDelta,
return adoptRef(*new TextEvent);
}
-Ref<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const String& data, TextEventInputType inputType)
+Ref<TextEvent> TextEvent::create(AbstractView* view, const String& data, TextEventInputType inputType)
{
return adoptRef(*new TextEvent(view, data, inputType));
}
-Ref<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtr<AbstractView> view, const String& data, bool shouldSmartReplace)
+Ref<TextEvent> TextEvent::createForPlainTextPaste(AbstractView* view, const String& data, bool shouldSmartReplace)
{
return adoptRef(*new TextEvent(view, data, 0, shouldSmartReplace, false, MailBlockquoteHandling::RespectBlockquote));
}
-Ref<TextEvent> TextEvent::createForFragmentPaste(PassRefPtr<AbstractView> view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
+Ref<TextEvent> TextEvent::createForFragmentPaste(AbstractView* view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
{
return adoptRef(*new TextEvent(view, "", data, shouldSmartReplace, shouldMatchStyle, mailBlockquoteHandling));
}
-Ref<TextEvent> TextEvent::createForDrop(PassRefPtr<AbstractView> view, const String& data)
+Ref<TextEvent> TextEvent::createForDrop(AbstractView* view, const String& data)
{
return adoptRef(*new TextEvent(view, data, TextEventInputDrop));
}
-Ref<TextEvent> TextEvent::createForDictation(PassRefPtr<AbstractView> view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
+Ref<TextEvent> TextEvent::createForDictation(AbstractView* view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
{
return adoptRef(*new TextEvent(view, data, dictationAlternatives));
}
{
}
-TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, TextEventInputType inputType)
+TextEvent::TextEvent(AbstractView* view, const String& data, TextEventInputType inputType)
: UIEvent(eventNames().textInputEvent, true, true, view, 0)
, m_inputType(inputType)
, m_data(data)
{
}
-TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, PassRefPtr<DocumentFragment> pastingFragment, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
+TextEvent::TextEvent(AbstractView* view, const String& data, PassRefPtr<DocumentFragment> pastingFragment, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling mailBlockquoteHandling)
: UIEvent(eventNames().textInputEvent, true, true, view, 0)
, m_inputType(TextEventInputPaste)
, m_data(data)
{
}
-TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
+TextEvent::TextEvent(AbstractView* view, const String& data, const Vector<DictationAlternative>& dictationAlternatives)
: UIEvent(eventNames().textInputEvent, true, true, view, 0)
, m_inputType(TextEventInputDictation)
, m_data(data)
{
}
-void TextEvent::initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, const String& data)
+void TextEvent::initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, const String& data)
{
if (dispatched())
return;
public:
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);
+ static Ref<TextEvent> create(AbstractView*, const String& data, TextEventInputType = TextEventInputKeyboard);
+ static Ref<TextEvent> createForPlainTextPaste(AbstractView*, const String& data, bool shouldSmartReplace);
+ static Ref<TextEvent> createForFragmentPaste(AbstractView*, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling);
+ static Ref<TextEvent> createForDrop(AbstractView*, const String& data);
+ static Ref<TextEvent> createForDictation(AbstractView*, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
virtual ~TextEvent();
- void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data);
+ void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, const String& data);
String data() const { return m_data; }
private:
TextEvent();
- TextEvent(PassRefPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
- TextEvent(PassRefPtr<AbstractView>, const String& data, PassRefPtr<DocumentFragment>, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling);
- TextEvent(PassRefPtr<AbstractView>, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
+ TextEvent(AbstractView*, const String& data, TextEventInputType = TextEventInputKeyboard);
+ TextEvent(AbstractView*, const String& data, PassRefPtr<DocumentFragment>, bool shouldSmartReplace, bool shouldMatchStyle, MailBlockquoteHandling);
+ TextEvent(AbstractView*, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
virtual bool isTextEvent() const override;
TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
TouchList* changedTouches, const AtomicString& type,
- PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY,
+ AbstractView* view, int screenX, int screenY, int pageX, int pageY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
: MouseRelatedEvent(type, true, true, currentTime(), view, 0, IntPoint(screenX, screenY),
IntPoint(pageX, pageY),
void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches,
TouchList* changedTouches, const AtomicString& type,
- PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, int clientY,
+ AbstractView* view, int screenX, int screenY, int clientX, int clientY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
{
if (dispatched())
}
static Ref<TouchEvent> create(TouchList* touches,
TouchList* targetTouches, TouchList* changedTouches,
- const AtomicString& type, PassRefPtr<AbstractView> view,
+ const AtomicString& type, AbstractView* view,
int screenX, int screenY, int pageX, int pageY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
{
void initTouchEvent(TouchList* touches, TouchList* targetTouches,
TouchList* changedTouches, const AtomicString& type,
- PassRefPtr<AbstractView> view, int screenX, int screenY,
+ AbstractView*, int screenX, int screenY,
int clientX, int clientY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
TouchEvent();
TouchEvent(TouchList* touches, TouchList* targetTouches,
TouchList* changedTouches, const AtomicString& type,
- PassRefPtr<AbstractView>, int screenX, int screenY, int pageX,
+ AbstractView*, int screenX, int screenY, int pageX,
int pageY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
{
}
-UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
+UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, AbstractView* viewArg, int detailArg)
: Event(eventType, canBubbleArg, cancelableArg)
, m_view(viewArg)
, m_detail(detailArg)
{
}
-UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, double timestamp, PassRefPtr<AbstractView> viewArg, int detailArg)
+UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, double timestamp, AbstractView* viewArg, int detailArg)
: Event(eventType, canBubbleArg, cancelableArg, timestamp)
, m_view(viewArg)
, m_detail(detailArg)
UIEvent::UIEvent(const AtomicString& eventType, const UIEventInit& initializer)
: Event(eventType, initializer)
- , m_view(initializer.view)
+ , m_view(initializer.view.get())
, m_detail(initializer.detail)
{
}
{
}
-void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtr<AbstractView> viewArg, int detailArg)
+void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, AbstractView* viewArg, int detailArg)
{
if (dispatched())
return;
{
return adoptRef(*new UIEvent);
}
- static Ref<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, AbstractView* view, int detail)
{
return adoptRef(*new UIEvent(type, canBubble, cancelable, view, detail));
}
}
virtual ~UIEvent();
- void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, int detail);
+ void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, int detail);
AbstractView* view() const { return m_view.get(); }
int detail() const { return m_detail; }
protected:
UIEvent();
- UIEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, int detail);
- UIEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView>, int detail);
+ UIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*, int detail);
+ UIEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, AbstractView*, int detail);
UIEvent(const AtomicString&, const UIEventInit&);
private:
{
}
- UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view,
+ UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
: UIEvent(type, canBubble, cancelable, view, detail)
, m_ctrlKey(ctrlKey)
{
}
- UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, PassRefPtr<AbstractView> view,
+ UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, AbstractView* view,
int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
: UIEvent(type, canBubble, cancelable, timestamp, view, detail)
, m_ctrlKey(ctrlKey)