Index: Source/core/html/shadow/TextControlInnerElements.cpp |
diff --git a/Source/core/html/shadow/TextControlInnerElements.cpp b/Source/core/html/shadow/TextControlInnerElements.cpp |
index 06931b489b3ada88b54df5d159ffc69d9bb1dc54..72db7d2c1e36af3863305ef3c952f9f37e445fa8 100644 |
--- a/Source/core/html/shadow/TextControlInnerElements.cpp |
+++ b/Source/core/html/shadow/TextControlInnerElements.cpp |
@@ -146,7 +146,7 @@ const AtomicString& SearchFieldResultsButtonElement::shadowPseudoId() const |
Element* host = shadowHost(); |
if (!host) |
return resultsId; |
- if (HTMLInputElement* input = host->toInputElement()) { |
+ if (Handle<HTMLInputElement> input = host->toInputElement()) { |
if (input->maxResults() < 0) |
return decorationId; |
if (input->maxResults() > 0) |
@@ -159,7 +159,7 @@ const AtomicString& SearchFieldResultsButtonElement::shadowPseudoId() const |
void SearchFieldResultsButtonElement::defaultEventHandler(Event* event) |
{ |
// On mousedown, bring up a menu, if needed |
- HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); |
+ Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (input && event->type() == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) { |
input->focus(); |
input->select(); |
@@ -212,7 +212,7 @@ void SearchFieldCancelButtonElement::detach() |
void SearchFieldCancelButtonElement::defaultEventHandler(Event* event) |
{ |
// If the element is visible, on mouseup, clear the value, and set selection |
- RefPtr<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
+ Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (!input || input->isDisabledOrReadOnly()) { |
if (!event->defaultHandled()) |
HTMLDivElement::defaultEventHandler(event); |
@@ -251,7 +251,7 @@ void SearchFieldCancelButtonElement::defaultEventHandler(Event* event) |
bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() |
{ |
- const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); |
+ Handle<const HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (input && !input->isDisabledOrReadOnly()) |
return true; |
@@ -296,7 +296,7 @@ void InputFieldSpeechButtonElement::defaultEventHandler(Event* event) |
// The call to focus() below dispatches a focus event, and an event handler in the page might |
// remove the input element from DOM. To make sure it remains valid until we finish our work |
// here, we take a temporary reference. |
- RefPtr<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
+ Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (!input || input->isDisabledOrReadOnly()) { |
if (!event->defaultHandled()) |
@@ -348,7 +348,7 @@ void InputFieldSpeechButtonElement::defaultEventHandler(Event* event) |
bool InputFieldSpeechButtonElement::willRespondToMouseClickEvents() |
{ |
- const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); |
+ Handle<const HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (input && !input->isDisabledOrReadOnly()) |
return true; |
@@ -385,7 +385,7 @@ void InputFieldSpeechButtonElement::setRecognitionResult(int, const SpeechInputR |
// The call to setValue() below dispatches an event, and an event handler in the page might |
// remove the input element from DOM. To make sure it remains valid until we finish our work |
// here, we take a temporary reference. |
- RefPtr<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
+ Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
if (!input || input->isDisabledOrReadOnly()) |
return; |
@@ -438,7 +438,7 @@ void InputFieldSpeechButtonElement::startSpeechInput() |
if (m_state != Idle) |
return; |
- RefPtr<HTMLInputElement> input = static_cast<HTMLInputElement*>(shadowHost()); |
+ Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); |
AtomicString language = input->computeInheritedLanguage(); |
String grammar = input->getAttribute(webkitgrammarAttr); |
IntRect rect = document()->view()->contentsToRootView(pixelSnappedBoundingBox()); |