diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc b/chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc index f70a84fce9b..eae70876639 100644 --- a/chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc +++ b/chromium/third_party/blink/renderer/core/html/forms/image_input_type.cc @@ -107,12 +107,8 @@ void ImageInputType::HandleDOMActivateEvent(Event& event) { LayoutObject* ImageInputType::CreateLayoutObject(const ComputedStyle& style, LegacyLayout legacy) const { - if (use_fallback_content_) { - if (style.Display() == EDisplay::kInline) - return new LayoutInline(&GetElement()); - - return LayoutObjectFactory::CreateBlockFlow(GetElement(), style, legacy); - } + if (use_fallback_content_) + return LayoutObject::CreateObject(&GetElement(), style, legacy); LayoutImage* image = new LayoutImage(&GetElement()); image->SetImageResource(MakeGarbageCollected<LayoutImageResource>()); return image; @@ -149,9 +145,6 @@ void ImageInputType::OnAttachWithLayoutObject() { HTMLImageLoader& image_loader = GetElement().EnsureImageLoader(); image_loader.UpdateFromElement(); - LayoutImageResource* image_resource = - To<LayoutImage>(layout_object)->ImageResource(); - image_resource->SetImageResource(image_loader.GetContent()); } bool ImageInputType::ShouldRespectAlignAttribute() { |