~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/bindings/js/JSImageConstructor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090515183058-50q5exjo9b1kxy9s
Tags: 1.1.7-1
* New upstream release
* debian/libwebkit-1.0-2.symbols:
- updated with the new symbols in 1.1.7
* debian/libwebkit-dev.install, debian/libwebkit-dev.links,
  debian/rules:
- Build, and ship gtk-doc documentation (Closes: #526683)
* debian/copyright:
- updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "JSHTMLImageElement.h"
26
26
#include "JSNode.h"
27
27
#include "ScriptExecutionContext.h"
 
28
#include <runtime/Error.h>
28
29
 
29
30
using namespace JSC;
30
31
 
57
58
    int height = 0;
58
59
    if (args.size() > 0) {
59
60
        widthSet = true;
60
 
        width = args.at(exec, 0).toInt32(exec);
 
61
        width = args.at(0).toInt32(exec);
61
62
    }
62
63
    if (args.size() > 1) {
63
64
        heightSet = true;
64
 
        height = args.at(exec, 1).toInt32(exec);
 
65
        height = args.at(1).toInt32(exec);
65
66
    }
66
67
 
67
68
    Document* document = static_cast<JSImageConstructor*>(constructor)->document();
 
69
    if (!document)
 
70
        return throwError(exec, ReferenceError, "Image constructor associated document is unavailable");
68
71
 
69
72
    // Calling toJS on the document causes the JS document wrapper to be
70
73
    // added to the window object. This is done to ensure that JSDocument::mark