Purge PassRefPtr from FocusEvent code.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Dec 2014 19:17:04 +0000 (19:17 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Dec 2014 19:17:04 +0000 (19:17 +0000)
commit2921e642b5dc9490b1db82b989e81508381a355a
tree94ab3dfce29cbdb3eb7e83b0e6289ca2e24fc0fb
parent33fe87ac2a05e2c01d1c47517dd0e7ca7b5d14ea
Purge PassRefPtr from FocusEvent code.
<https://webkit.org/b/139647>

Reviewed by Anders Carlsson.

Source/WebCore:

Convert FocusEvent-related code from using PassRefPtr to using RefPtr&& instead.

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
* dom/Element.h:
* dom/FocusEvent.cpp:
(WebCore::FocusEvent::FocusEvent):
* dom/FocusEvent.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLFormControlElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedElement):

Source/WTF:

Add a RefPtr::copyRef() to use when passing a RefPtr to a RefPtr&& without
transferring the ownership.

* wtf/RefPtr.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/RefPtr.h
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/FocusEvent.cpp
Source/WebCore/dom/FocusEvent.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/page/FocusController.cpp