diff options
author | Steve Block <steveblock@google.com> | 2011-05-09 17:47:02 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-13 11:32:28 +0100 |
commit | 5b8c725c6846b6f59ba9a5e6f562774f74046622 (patch) | |
tree | 9fbbe94d1093de8e37a04556d34cc6fe97be4c84 /Source/WebCore/html/HTMLInputElement.cpp | |
parent | 0fa866435a202d26c06a48475da734e9e98c2879 (diff) | |
download | external_webkit-5b8c725c6846b6f59ba9a5e6f562774f74046622.zip external_webkit-5b8c725c6846b6f59ba9a5e6f562774f74046622.tar.gz external_webkit-5b8c725c6846b6f59ba9a5e6f562774f74046622.tar.bz2 |
Merge WebKit at r75315: Fix conflicts
- HTMLInputElement.cpp
Conflict due to ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS
See http://trac.webkit.org/changeset/74895
- HTMLInputElement.cpp and RangeInputType.cpp
Conflict due to refactoring of event handling on input elements
See http://trac.webkit.org/changeset/74549
- DOMWindow.cpp
Conflict due to DOMWindow::clearDOMStorage()
See http://trac.webkit.org/changeset/74800
- EventHandler.cpp
Conflict due to longpress and doubletap vs touch event refactoring
See http://trac.webkit.org/changeset/74553
- History.cpp
Trivial conflict due to cherry-pick
See http://trac.webkit.org/changeset/74853
- GraphicsContext.cpp
Conflict due to PLATFORM(ANDROID) guard
See http://trac.webkit.org/changeset/74662
- InlineTextBox.cpp
Conflict due to ANDROID_DISABLE_ROUNDING_HACKS
See http://trac.webkit.org/changeset/74971
Change-Id: I5c1abe54b9d78f667a41e83a871e9a21be0a89d5
Diffstat (limited to 'Source/WebCore/html/HTMLInputElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLInputElement.cpp | 72 |
1 files changed, 7 insertions, 65 deletions
diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp index 5ebd640..49888f1 100644 --- a/Source/WebCore/html/HTMLInputElement.cpp +++ b/Source/WebCore/html/HTMLInputElement.cpp @@ -49,19 +49,14 @@ #include "RenderTheme.h" #include "RuntimeEnabledFeatures.h" #include "ScriptEventListener.h" -<<<<<<< HEAD:WebCore/html/HTMLInputElement.cpp -#include "Settings.h" -#include "StepRange.h" -#include "TextEvent.h" -#ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS -#include "PlatformBridge.h" -#endif -======= ->>>>>>> webkit.org at r75315:Source/WebCore/html/HTMLInputElement.cpp #include "WheelEvent.h" #include <wtf/MathExtras.h> #include <wtf/StdLibExtras.h> +#ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS +#include "PlatformBridge.h" +#endif + using namespace std; namespace WebCore { @@ -431,54 +426,13 @@ void HTMLInputElement::setType(const String& type) void HTMLInputElement::updateType() { const AtomicString& typeString = fastGetAttribute(typeAttr); -<<<<<<< HEAD:WebCore/html/HTMLInputElement.cpp - DeprecatedInputType newType = typeString.isEmpty() ? TEXT : typeMap->get(typeString); + + OwnPtr<InputType> newType = InputType::create(this, typeString); #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS - if (newType == PASSWORD && document()->focusedNode() == this) + if (newType->isPasswordField() && document()->focusedNode() == this) PlatformBridge::updateTextfield(document()->view(), this, true, String()); #endif - // IMPORTANT: Don't allow the type to be changed to FILE after the first - // type change, otherwise a JavaScript programmer would be able to set a text - // field's value to something like /etc/passwd and then change it to a file field. - if (deprecatedInputType() != newType) { - if (newType == FILE && m_haveType) - // Set the attribute back to the old value. - // Useful in case we were called from inside parseMappedAttribute. - setAttribute(typeAttr, type()); - else { - checkedRadioButtons().removeButton(this); - - if (newType == FILE && !m_fileList) - m_fileList = FileList::create(); - - bool wasAttached = attached(); - if (wasAttached) - detach(); - - bool didStoreValue = storesValueSeparateFromAttribute(); - bool wasPasswordField = deprecatedInputType() == PASSWORD; - bool didRespectHeightAndWidth = respectHeightAndWidthAttrs(); - m_deprecatedTypeNumber = newType; - m_inputType = InputType::create(this, typeString); - setNeedsWillValidateCheck(); - bool willStoreValue = storesValueSeparateFromAttribute(); - bool isPasswordField = deprecatedInputType() == PASSWORD; - bool willRespectHeightAndWidth = respectHeightAndWidthAttrs(); - - if (didStoreValue && !willStoreValue && !m_data.value().isNull()) { - setAttribute(valueAttr, m_data.value()); - m_data.setValue(String()); - } - if (!didStoreValue && willStoreValue) - m_data.setValue(sanitizeValue(getAttribute(valueAttr))); - else - InputElement::updateValueIfNeeded(m_data, this); -======= ->>>>>>> webkit.org at r75315:Source/WebCore/html/HTMLInputElement.cpp - - OwnPtr<InputType> newType = InputType::create(this, typeString); - if (m_hasType && !newType->canChangeFromAnotherType()) { // Set the attribute back to the old value. // Useful in case we were called from inside parseMappedAttribute. @@ -1087,19 +1041,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt) return; } -<<<<<<< HEAD:WebCore/html/HTMLInputElement.cpp - if (deprecatedInputType() == RANGE - && renderer() - && (evt->isMouseEvent() -#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS) - || evt->isTouchEvent() -#endif - || evt->isDragEvent() - || evt->isWheelEvent())) - toRenderSlider(renderer())->forwardEvent(evt); -======= m_inputType->forwardEvent(evt); ->>>>>>> webkit.org at r75315:Source/WebCore/html/HTMLInputElement.cpp if (!callBaseClassEarly && !evt->defaultHandled()) HTMLFormControlElementWithState::defaultEventHandler(evt); |