Index: Source/core/html/HTMLImageElement.cpp |
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp |
index 10cce1cd25f858b53d1ef8bf067cdfb9c26d4111..53794d46bdc4f45799d6fe22826972d2b1d10bed 100644 |
--- a/Source/core/html/HTMLImageElement.cpp |
+++ b/Source/core/html/HTMLImageElement.cpp |
@@ -142,13 +142,26 @@ void HTMLImageElement::notifyViewportChanged() |
selectSourceURL(ImageLoader::UpdateSizeChanged); |
} |
+PassRefPtrWillBeRawPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document& document) |
+{ |
+ RefPtrWillBeRawPtr<HTMLImageElement> image = adoptRefWillBeNoop(new HTMLImageElement(document)); |
+ image->m_elementCreatedByParser = false; |
+ return image.release(); |
+} |
+ |
+PassRefPtrWillBeRawPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document& document, int width) |
+{ |
+ RefPtrWillBeRawPtr<HTMLImageElement> image = adoptRefWillBeNoop(new HTMLImageElement(document)); |
+ image->setWidth(width); |
+ image->m_elementCreatedByParser = false; |
+ return image.release(); |
+} |
+ |
PassRefPtrWillBeRawPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document& document, int width, int height) |
{ |
RefPtrWillBeRawPtr<HTMLImageElement> image = adoptRefWillBeNoop(new HTMLImageElement(document)); |
- if (width) |
- image->setWidth(width); |
- if (height) |
- image->setHeight(height); |
+ image->setWidth(width); |
+ image->setHeight(height); |
image->m_elementCreatedByParser = false; |
return image.release(); |
} |