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

Unified Diff: Source/core/html/forms/BaseCheckableInputType.cpp

Issue 27746003: Have InputType factories take an HTMLInputElement reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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/forms/BaseCheckableInputType.cpp
diff --git a/Source/core/html/forms/BaseCheckableInputType.cpp b/Source/core/html/forms/BaseCheckableInputType.cpp
index 70abbd3c57d7aba99aa077f93b56b2d62e9a0014..7c2d8d963c142ed6394841913b8df6bcb922ff2a 100644
--- a/Source/core/html/forms/BaseCheckableInputType.cpp
+++ b/Source/core/html/forms/BaseCheckableInputType.cpp
@@ -44,19 +44,19 @@ using namespace HTMLNames;
FormControlState BaseCheckableInputType::saveFormControlState() const
{
- return FormControlState(element()->checked() ? "on" : "off");
+ return FormControlState(element().checked() ? "on" : "off");
}
void BaseCheckableInputType::restoreFormControlState(const FormControlState& state)
{
- element()->setChecked(state[0] == "on");
+ element().setChecked(state[0] == "on");
}
bool BaseCheckableInputType::appendFormData(FormDataList& encoding, bool) const
{
- if (!element()->checked())
+ if (!element().checked())
return false;
- encoding.appendData(element()->name(), element()->value());
+ encoding.appendData(element().name(), element().value());
return true;
}
@@ -64,7 +64,7 @@ void BaseCheckableInputType::handleKeydownEvent(KeyboardEvent* event)
{
const String& key = event->keyIdentifier();
if (key == "U+0020") {
- element()->setActive(true, true);
+ element().setActive(true, true);
// No setDefaultHandled(), because IE dispatches a keypress in this case
// and the caller will only dispatch a keypress if we don't call setDefaultHandled().
}
@@ -88,7 +88,7 @@ void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
{
InputType::accessKeyAction(sendMouseEvents);
- element()->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ element().dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
String BaseCheckableInputType::fallbackValue() const
@@ -103,7 +103,7 @@ bool BaseCheckableInputType::storesValueSeparateFromAttribute()
void BaseCheckableInputType::setValue(const String& sanitizedValue, bool, TextFieldEventBehavior)
{
- element()->setAttribute(valueAttr, sanitizedValue);
+ element().setAttribute(valueAttr, sanitizedValue);
}
bool BaseCheckableInputType::isCheckable()
« no previous file with comments | « Source/core/html/forms/BaseCheckableInputType.h ('k') | Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698