| Index: Source/core/html/HTMLButtonElement.cpp
|
| diff --git a/Source/core/html/HTMLButtonElement.cpp b/Source/core/html/HTMLButtonElement.cpp
|
| index ff5e93197be8f42c862c36420be27bdcf34a4f4d..70f007e25d3828e3fdcbdd67a201fec7821e4c2b 100644
|
| --- a/Source/core/html/HTMLButtonElement.cpp
|
| +++ b/Source/core/html/HTMLButtonElement.cpp
|
| @@ -64,18 +64,18 @@ LayoutObject* HTMLButtonElement::createLayoutObject(const ComputedStyle&)
|
| const AtomicString& HTMLButtonElement::formControlType() const
|
| {
|
| switch (m_type) {
|
| - case SUBMIT: {
|
| - DEFINE_STATIC_LOCAL(const AtomicString, submit, ("submit", AtomicString::ConstructFromLiteral));
|
| - return submit;
|
| - }
|
| - case BUTTON: {
|
| - DEFINE_STATIC_LOCAL(const AtomicString, button, ("button", AtomicString::ConstructFromLiteral));
|
| - return button;
|
| - }
|
| - case RESET: {
|
| - DEFINE_STATIC_LOCAL(const AtomicString, reset, ("reset", AtomicString::ConstructFromLiteral));
|
| - return reset;
|
| - }
|
| + case SUBMIT: {
|
| + DEFINE_STATIC_LOCAL(const AtomicString, submit, ("submit", AtomicString::ConstructFromLiteral));
|
| + return submit;
|
| + }
|
| + case BUTTON: {
|
| + DEFINE_STATIC_LOCAL(const AtomicString, button, ("button", AtomicString::ConstructFromLiteral));
|
| + return button;
|
| + }
|
| + case RESET: {
|
| + DEFINE_STATIC_LOCAL(const AtomicString, reset, ("reset", AtomicString::ConstructFromLiteral));
|
| + return reset;
|
| + }
|
| }
|
|
|
| ASSERT_NOT_REACHED();
|
| @@ -103,8 +103,9 @@ void HTMLButtonElement::parseAttribute(const QualifiedName& name, const AtomicSt
|
| else
|
| m_type = SUBMIT;
|
| setNeedsWillValidateCheck();
|
| - } else
|
| + } else {
|
| HTMLFormControlElement::parseAttribute(name, value);
|
| + }
|
| }
|
|
|
| void HTMLButtonElement::defaultEventHandler(Event* event)
|
| @@ -130,14 +131,14 @@ void HTMLButtonElement::defaultEventHandler(Event* event)
|
| }
|
| if (event->type() == EventTypeNames::keypress) {
|
| switch (toKeyboardEvent(event)->charCode()) {
|
| - case '\r':
|
| - dispatchSimulatedClick(event);
|
| - event->setDefaultHandled();
|
| - return;
|
| - case ' ':
|
| - // Prevent scrolling down the page.
|
| - event->setDefaultHandled();
|
| - return;
|
| + case '\r':
|
| + dispatchSimulatedClick(event);
|
| + event->setDefaultHandled();
|
| + return;
|
| + case ' ':
|
| + // Prevent scrolling down the page.
|
| + event->setDefaultHandled();
|
| + return;
|
| }
|
| }
|
| if (event->type() == EventTypeNames::keyup && toKeyboardEvent(event)->keyIdentifier() == "U+0020") {
|
|
|