2006-01-21 Anders Carlsson <andersca@mac.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jan 2006 21:58:03 +0000 (21:58 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jan 2006 21:58:03 +0000 (21:58 +0000)
commit6db2c2b566e079970a52ab605db2e8190e11f411
tree0c06ee705fb6591518a6ac203fc6684eb0eb7f01
parent0ce37fb0f818dc4a6f35040554362c133f1a8b24
2006-01-21  Anders Carlsson  <andersca@mac.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=3869
        Should use HTML Image element instead of JS Image object

        * khtml/ecma/kjs_events.cpp:
        (KJS::ClipboardProtoFunc::callAsFunction):
        Don't check Image object. Instead, if the element passed in
        is an image element which isn't in any document, use its pixmap.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::imageGetter):
        Add complete.

        (KJS::ImageConstructorImp::construct):
        Take a QPixmap instead of an Image.

        (KJS::KJS::Context2DFunction::callAsFunction):
        Remove usage of Image and use HTMLImageElementImpl instead.

        * khtml/ecma/kjs_html.h:
        Remove Image class.

        (KJS::HTMLElement::):
        Add ImgComplete.

        * khtml/html/html_imageimpl.cpp:
        (WebCore::HTMLImageElementImpl::width):
        (WebCore::HTMLImageElementImpl::height):
        If the element has no renderer but its image size is known
        return that instead.

        (WebCore::HTMLImageElementImpl::complete):
        New function, returns true if an image has finished loading.

        * khtml/html/html_imageimpl.h:
        Add complete.

        * manual-tests/drag-image.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/image-object-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/image-object-in-canvas-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/image-object-in-canvas-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/image-object-in-canvas-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/image-object-in-canvas.html [new file with mode: 0644]
LayoutTests/fast/dom/image-object.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_html.h
WebCore/khtml/html/html_imageimpl.cpp
WebCore/khtml/html/html_imageimpl.h
WebCore/manual-tests/drag-image.html [new file with mode: 0644]