diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/bindings/js/JSImageConstructor.cpp | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/bindings/js/JSImageConstructor.cpp')
-rw-r--r-- | WebCore/bindings/js/JSImageConstructor.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/WebCore/bindings/js/JSImageConstructor.cpp b/WebCore/bindings/js/JSImageConstructor.cpp index c1e4630..0dc55b4 100644 --- a/WebCore/bindings/js/JSImageConstructor.cpp +++ b/WebCore/bindings/js/JSImageConstructor.cpp @@ -21,6 +21,7 @@ #include "JSImageConstructor.h" #include "HTMLImageElement.h" +#include "HTMLNames.h" #include "JSNode.h" #include "ScriptExecutionContext.h" @@ -33,7 +34,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSImageConstructor) const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", 0, 0, 0 }; JSImageConstructor::JSImageConstructor(ExecState* exec, ScriptExecutionContext* context) - : DOMObject(JSImageConstructor::createStructureID(exec->lexicalGlobalObject()->objectPrototype())) + : DOMObject(JSImageConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) { ASSERT(context->isDocument()); m_document = static_cast<JSDocument*>(asObject(toJS(exec, static_cast<Document*>(context)))); @@ -47,11 +48,11 @@ static JSObject* constructImage(ExecState* exec, JSObject* constructor, const Ar int height = 0; if (args.size() > 0) { widthSet = true; - width = args.at(exec, 0)->toInt32(exec); + width = args.at(exec, 0).toInt32(exec); } if (args.size() > 1) { heightSet = true; - height = args.at(exec, 1)->toInt32(exec); + height = args.at(exec, 1).toInt32(exec); } Document* document = static_cast<JSImageConstructor*>(constructor)->document(); @@ -61,7 +62,7 @@ static JSObject* constructImage(ExecState* exec, JSObject* constructor, const Ar // will be called (which will cause the image element to be marked if necessary). toJS(exec, document); - RefPtr<HTMLImageElement> image = new HTMLImageElement(document); + RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document); if (widthSet) image->setWidth(width); if (heightSet) |