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

Unified Diff: Source/core/html/TextFieldInputType.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
« no previous file with comments | « Source/core/html/TextFieldInputType.h ('k') | Source/core/html/TextInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/TextFieldInputType.cpp
diff --git a/Source/core/html/TextFieldInputType.cpp b/Source/core/html/TextFieldInputType.cpp
index 9cfb9d3915977f3443f7060b267cfeff7b9d3821..eebc54d2abed113ab615fd52a29f904a268ed922 100644
--- a/Source/core/html/TextFieldInputType.cpp
+++ b/Source/core/html/TextFieldInputType.cpp
@@ -59,7 +59,7 @@ namespace WebCore {
using namespace HTMLNames;
-TextFieldInputType::TextFieldInputType(HTMLInputElement* element)
+TextFieldInputType::TextFieldInputType(Handle<HTMLInputElement> element)
: InputType(element)
{
}
@@ -99,7 +99,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
{
// Grab this input element to keep reference even if JS event handler
// changes input type.
- RefPtr<HTMLInputElement> input(element());
+ Handle<HTMLInputElement> input(element());
// We don't ask InputType::setValue to dispatch events because
// TextFieldInputType dispatches events different way from InputType.
@@ -147,7 +147,7 @@ void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event)
if (!element()->focused())
return;
Frame* frame = element()->document()->frame();
- if (!frame || !frame->editor()->doTextFieldCommandFromEvent(element(), event))
+ if (!frame || !frame->editor()->doTextFieldCommandFromEvent(Handle<HTMLInputElement>(element()).raw(), event))
return;
event->setDefaultHandled();
}
@@ -205,7 +205,7 @@ bool TextFieldInputType::shouldSubmitImplicitly(Event* event)
RenderObject* TextFieldInputType::createRenderer(RenderArena* arena, RenderStyle*) const
{
- return new (arena) RenderTextControlSingleLine(element());
+ return new (arena) RenderTextControlSingleLine(Handle<HTMLInputElement>(element()).raw());
}
bool TextFieldInputType::needsContainer() const
@@ -479,8 +479,8 @@ void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state)
return;
if (Frame* frame = element()->document()->frame()) {
if (state == ValueChangeStateNone)
- frame->editor()->textFieldDidBeginEditing(element());
- frame->editor()->textDidChangeInTextField(element());
+ frame->editor()->textFieldDidBeginEditing(Handle<HTMLInputElement>(element()).raw());
+ frame->editor()->textDidChangeInTextField(Handle<HTMLInputElement>(element()).raw());
}
}
@@ -509,7 +509,7 @@ void TextFieldInputType::updateInnerTextValue()
void TextFieldInputType::focusAndSelectSpinButtonOwner()
{
- RefPtr<HTMLInputElement> input(element());
+ Handle<HTMLInputElement> input(element());
input->focus();
input->select();
}
« no previous file with comments | « Source/core/html/TextFieldInputType.h ('k') | Source/core/html/TextInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698