| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 void removeClient(ImageLoaderClient* client) { imageLoader().removeClient(cl
ient); } | 83 void removeClient(ImageLoaderClient* client) { imageLoader().removeClient(cl
ient); } |
| 84 | 84 |
| 85 virtual const AtomicString imageSourceURL() const override; | 85 virtual const AtomicString imageSourceURL() const override; |
| 86 | 86 |
| 87 // CanvasImageSourceImplementations | 87 // CanvasImageSourceImplementations |
| 88 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma
geStatus*) const; | 88 virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceIma
geStatus*) const; |
| 89 virtual FloatSize sourceSize() const override; | 89 virtual FloatSize sourceSize() const override; |
| 90 virtual FloatSize defaultDestinationSize() const override; | 90 virtual FloatSize defaultDestinationSize() const override; |
| 91 virtual const KURL& sourceURL() const override; | 91 virtual const KURL& sourceURL() const override; |
| 92 | 92 |
| 93 // public so that HTMLPictureElement can call this as well. | |
| 94 void selectSourceURL(ImageLoader::UpdateFromElementBehavior); | |
| 95 protected: | 93 protected: |
| 96 explicit HTMLImageElement(Document&, bool createdByParser = false); | 94 explicit HTMLImageElement(Document&, bool createdByParser = false); |
| 97 | 95 |
| 98 virtual void didMoveToNewDocument(Document& oldDocument) override; | 96 virtual void didMoveToNewDocument(Document& oldDocument) override; |
| 99 | 97 |
| 100 private: | 98 private: |
| 101 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 99 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
| 102 | 100 |
| 101 void selectSourceURL(ImageLoader::UpdateFromElementBehavior); |
| 102 |
| 103 virtual void attach(const AttachContext& = AttachContext()) override; | 103 virtual void attach(const AttachContext& = AttachContext()) override; |
| 104 virtual RenderObject* createRenderer(RenderStyle*) override; | 104 virtual RenderObject* createRenderer(RenderStyle*) override; |
| 105 | 105 |
| 106 virtual bool canStartSelection() const override; | 106 virtual bool canStartSelection() const override; |
| 107 | 107 |
| 108 virtual bool isURLAttribute(const Attribute&) const override; | 108 virtual bool isURLAttribute(const Attribute&) const override; |
| 109 | 109 |
| 110 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 110 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 111 virtual void removedFrom(ContainerNode*) override; | 111 virtual void removedFrom(ContainerNode*) override; |
| 112 virtual Image* imageContents() override; | 112 virtual Image* imageContents() override; |
| 113 | 113 |
| 114 ImageCandidate findBestFitImageFromPictureParent(); | |
| 115 void setBestFitURLAndDPRFromImageCandidate(const ImageCandidate&); | 114 void setBestFitURLAndDPRFromImageCandidate(const ImageCandidate&); |
| 116 HTMLImageLoader& imageLoader() const { return *m_imageLoader; } | 115 HTMLImageLoader& imageLoader() const { return *m_imageLoader; } |
| 117 void notifyViewportChanged(); | 116 void notifyViewportChanged(); |
| 118 void createMediaQueryListIfDoesNotExist(); | 117 void createMediaQueryListIfDoesNotExist(); |
| 119 | 118 |
| 120 OwnPtr<HTMLImageLoader> m_imageLoader; | 119 OwnPtr<HTMLImageLoader> m_imageLoader; |
| 121 RefPtr<ViewportChangeListener> m_listener; | 120 RefPtr<ViewportChangeListener> m_listener; |
| 122 CompositeOperator m_compositeOperator; | 121 CompositeOperator m_compositeOperator; |
| 123 AtomicString m_bestFitImageURL; | 122 AtomicString m_bestFitImageURL; |
| 124 float m_imageDevicePixelRatio; | 123 float m_imageDevicePixelRatio; |
| 125 unsigned m_elementCreatedByParser : 1; | 124 unsigned m_elementCreatedByParser : 1; |
| 126 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for
the picked resource. | 125 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for
the picked resource. |
| 127 unsigned m_intrinsicSizingViewportDependant : 1; | 126 unsigned m_intrinsicSizingViewportDependant : 1; |
| 128 // Effective size is viewport dependant if the sizes attribute's effective s
ize used v* length units. | 127 // Effective size is viewport dependant if the sizes attribute's effective s
ize used v* length units. |
| 129 unsigned m_effectiveSizeViewportDependant : 1; | 128 unsigned m_effectiveSizeViewportDependant : 1; |
| 130 }; | 129 }; |
| 131 | 130 |
| 132 } // namespace blink | 131 } // namespace blink |
| 133 | 132 |
| 134 #endif // HTMLImageElement_h | 133 #endif // HTMLImageElement_h |
| OLD | NEW |