/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#ifndef ImageDocument_h
#define ImageDocument_h
namespace WebCore {
-class DOMImplementation;
-class FrameView;
-class HTMLImageElement;
+class ImageDocumentElement;
-class ImageDocument : public HTMLDocument
-{
+class ImageDocument : public HTMLDocument {
public:
ImageDocument(DOMImplementation*, Frame*);
virtual Tokenizer* createTokenizer();
CachedImage* cachedImage();
- HTMLImageElement* imageElement() const { return m_imageElement; }
+ ImageDocumentElement* imageElement() const { return m_imageElement; }
+ void disconnectImageElement() { m_imageElement = 0; }
void windowSizeChanged();
void imageChanged();
void imageClicked(int x, int y);
+
private:
void createDocumentStructure();
void resizeImageToFit();
bool shouldShrinkToFit() const;
float scale() const;
- HTMLImageElement* m_imageElement;
+ ImageDocumentElement* m_imageElement;
// Whether enough of the image has been loaded to determine its size
bool m_imageSizeIsKnown;