| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/html/HTMLImageLoader.h" | 28 #include "core/html/HTMLImageLoader.h" |
| 29 #include "core/platform/graphics/GraphicsTypes.h" | 29 #include "core/platform/graphics/GraphicsTypes.h" |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 class HTMLFormElement; | 33 class HTMLFormElement; |
| 34 | 34 |
| 35 class HTMLImageElement FINAL : public HTMLElement { | 35 class HTMLImageElement FINAL : public HTMLElement { |
| 36 friend class HTMLFormElement; | 36 friend class HTMLFormElement; |
| 37 public: | 37 public: |
| 38 static PassRefPtr<HTMLImageElement> create(Document*); | 38 static PassRefPtr<HTMLImageElement> create(Document&); |
| 39 static PassRefPtr<HTMLImageElement> create(const QualifiedName&, Document*,
HTMLFormElement*); | 39 static PassRefPtr<HTMLImageElement> create(const QualifiedName&, Document&,
HTMLFormElement*); |
| 40 static PassRefPtr<HTMLImageElement> createForJSConstructor(Document*, const
int* optionalWidth, const int* optionalHeight); | 40 static PassRefPtr<HTMLImageElement> createForJSConstructor(Document&, const
int* optionalWidth, const int* optionalHeight); |
| 41 | 41 |
| 42 virtual ~HTMLImageElement(); | 42 virtual ~HTMLImageElement(); |
| 43 | 43 |
| 44 int width(bool ignorePendingStylesheets = false); | 44 int width(bool ignorePendingStylesheets = false); |
| 45 int height(bool ignorePendingStylesheets = false); | 45 int height(bool ignorePendingStylesheets = false); |
| 46 | 46 |
| 47 int naturalWidth() const; | 47 int naturalWidth() const; |
| 48 int naturalHeight() const; | 48 int naturalHeight() const; |
| 49 | 49 |
| 50 bool isServerMap() const; | 50 bool isServerMap() const; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 73 bool complete() const; | 73 bool complete() const; |
| 74 | 74 |
| 75 bool hasPendingActivity() const { return m_imageLoader.hasPendingActivity();
} | 75 bool hasPendingActivity() const { return m_imageLoader.hasPendingActivity();
} |
| 76 | 76 |
| 77 virtual bool canContainRangeEndPoint() const { return false; } | 77 virtual bool canContainRangeEndPoint() const { return false; } |
| 78 | 78 |
| 79 void addClient(ImageLoaderClient* client) { m_imageLoader.addClient(client);
} | 79 void addClient(ImageLoaderClient* client) { m_imageLoader.addClient(client);
} |
| 80 void removeClient(ImageLoaderClient* client) { m_imageLoader.removeClient(cl
ient); } | 80 void removeClient(ImageLoaderClient* client) { m_imageLoader.removeClient(cl
ient); } |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 HTMLImageElement(const QualifiedName&, Document*, HTMLFormElement* = 0); | 83 HTMLImageElement(const QualifiedName&, Document&, HTMLFormElement* = 0); |
| 84 | 84 |
| 85 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; | 85 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | 88 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } |
| 89 | 89 |
| 90 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 90 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 91 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 91 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
| 92 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 92 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
| 93 | 93 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 122 | 122 |
| 123 inline const HTMLImageElement* toHTMLImageElement(const Node* node) | 123 inline const HTMLImageElement* toHTMLImageElement(const Node* node) |
| 124 { | 124 { |
| 125 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); | 125 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); |
| 126 return static_cast<const HTMLImageElement*>(node); | 126 return static_cast<const HTMLImageElement*>(node); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } //namespace | 129 } //namespace |
| 130 | 130 |
| 131 #endif | 131 #endif |
| OLD | NEW |