Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1193)

Unified Diff: Source/core/html/shadow/TextControlInnerElements.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « Source/core/html/shadow/SliderThumbElement.cpp ('k') | Source/core/html/shadow/TextFieldDecorationElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698