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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "core/html/HTMLElement.h" | 27 #include "core/html/HTMLElement.h" |
28 #include "core/html/HTMLImageLoader.h" | 28 #include "core/html/HTMLImageLoader.h" |
29 #include "core/html/canvas/CanvasImageSource.h" | 29 #include "core/html/canvas/CanvasImageSource.h" |
30 #include "platform/graphics/GraphicsTypes.h" | 30 #include "platform/graphics/GraphicsTypes.h" |
31 #include "wtf/WeakPtr.h" | 31 #include "wtf/WeakPtr.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class HTMLFormElement; | 35 class HTMLFormElement; |
| 36 class ImageCandidate; |
36 | 37 |
37 class HTMLImageElement FINAL : public HTMLElement, public CanvasImageSource { | 38 class HTMLImageElement FINAL : public HTMLElement, public CanvasImageSource { |
38 public: | 39 public: |
39 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&); | 40 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&); |
40 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&, HTMLFormEl
ement*); | 41 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&, HTMLFormEl
ement*); |
41 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum
ent&, int width, int height); | 42 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum
ent&, int width, int height); |
42 | 43 |
43 virtual ~HTMLImageElement(); | 44 virtual ~HTMLImageElement(); |
44 | 45 |
45 int width(bool ignorePendingStylesheets = false); | 46 int width(bool ignorePendingStylesheets = false); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 virtual bool draggable() const OVERRIDE; | 117 virtual bool draggable() const OVERRIDE; |
117 | 118 |
118 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 119 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
119 virtual void removedFrom(ContainerNode*) OVERRIDE; | 120 virtual void removedFrom(ContainerNode*) OVERRIDE; |
120 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } | 121 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } |
121 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} | 122 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} |
122 virtual bool isInteractiveContent() const OVERRIDE; | 123 virtual bool isInteractiveContent() const OVERRIDE; |
123 virtual Image* imageContents() OVERRIDE; | 124 virtual Image* imageContents() OVERRIDE; |
124 | 125 |
125 void resetFormOwner(); | 126 void resetFormOwner(); |
| 127 ImageCandidate findBestFitImageFromPictureParent(); |
| 128 void setBestFitURLAndDPRFromImageCandidate(const ImageCandidate&); |
126 | 129 |
127 HTMLImageLoader m_imageLoader; | 130 HTMLImageLoader m_imageLoader; |
128 // m_form should be a strong reference in Oilpan. | 131 // m_form should be a strong reference in Oilpan. |
129 WeakPtr<HTMLFormElement> m_form; | 132 WeakPtr<HTMLFormElement> m_form; |
130 CompositeOperator m_compositeOperator; | 133 CompositeOperator m_compositeOperator; |
131 AtomicString m_bestFitImageURL; | 134 AtomicString m_bestFitImageURL; |
132 float m_imageDevicePixelRatio; | 135 float m_imageDevicePixelRatio; |
133 bool m_formWasSetByParser; | 136 bool m_formWasSetByParser; |
134 }; | 137 }; |
135 | 138 |
136 } //namespace | 139 } //namespace |
137 | 140 |
138 #endif | 141 #endif |
OLD | NEW |