diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp b/chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp index a8a8d5143ca..e10beef9621 100644 --- a/chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp +++ b/chromium/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp @@ -23,8 +23,8 @@ #include "config.h" #include "core/html/forms/ImageInputType.h" -#include "HTMLNames.h" -#include "InputTypeNames.h" +#include "core/HTMLNames.h" +#include "core/InputTypeNames.h" #include "core/events/MouseEvent.h" #include "core/fetch/ImageResource.h" #include "core/html/FormDataList.h" @@ -45,9 +45,9 @@ inline ImageInputType::ImageInputType(HTMLInputElement& element) { } -PassRefPtr<InputType> ImageInputType::create(HTMLInputElement& element) +PassRefPtrWillBeRawPtr<InputType> ImageInputType::create(HTMLInputElement& element) { - return adoptRef(new ImageInputType(element)); + return adoptRefWillBeNoop(new ImageInputType(element)); } const AtomicString& ImageInputType::formControlType() const @@ -107,7 +107,7 @@ static IntPoint extractClickLocation(Event* event) void ImageInputType::handleDOMActivateEvent(Event* event) { - RefPtr<HTMLInputElement> element(this->element()); + RefPtrWillBeRawPtr<HTMLInputElement> element(this->element()); if (element->isDisabledFormControl() || !element->form()) return; element->setActivatedSubmit(true); @@ -150,9 +150,6 @@ void ImageInputType::startResourceLoading() if (!renderer) return; - if (imageLoader->hasPendingBeforeLoadEvent()) - return; - RenderImageResource* imageResource = renderer->imageResource(); imageResource->setImageResource(imageLoader->image()); @@ -189,7 +186,7 @@ bool ImageInputType::shouldRespectHeightAndWidthAttributes() unsigned ImageInputType::height() const { - RefPtr<HTMLInputElement> element(this->element()); + RefPtrWillBeRawPtr<HTMLInputElement> element(this->element()); if (!element->renderer()) { // Check the attribute first for an explicit pixel value. @@ -213,7 +210,7 @@ unsigned ImageInputType::height() const unsigned ImageInputType::width() const { - RefPtr<HTMLInputElement> element(this->element()); + RefPtrWillBeRawPtr<HTMLInputElement> element(this->element()); if (!element->renderer()) { // Check the attribute first for an explicit pixel value. @@ -235,4 +232,14 @@ unsigned ImageInputType::width() const return box ? adjustForAbsoluteZoom(box->contentWidth(), box) : 0; } +bool ImageInputType::hasLegalLinkAttribute(const QualifiedName& name) const +{ + return name == srcAttr || BaseButtonInputType::hasLegalLinkAttribute(name); +} + +const QualifiedName& ImageInputType::subResourceAttributeName() const +{ + return srcAttr; +} + } // namespace WebCore |