| 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, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 virtual void notifyMediaQueryChanged() override | 66 virtual void notifyMediaQueryChanged() override |
| 67 { | 67 { |
| 68 if (m_element) | 68 if (m_element) |
| 69 m_element->notifyViewportChanged(); | 69 m_element->notifyViewportChanged(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 #if !ENABLE(OILPAN) | 72 #if !ENABLE(OILPAN) |
| 73 void clearElement() { m_element = nullptr; } | 73 void clearElement() { m_element = nullptr; } |
| 74 #endif | 74 #endif |
| 75 virtual void trace(Visitor* visitor) override | 75 DEFINE_INLINE_VIRTUAL_TRACE() |
| 76 { | 76 { |
| 77 visitor->trace(m_element); | 77 visitor->trace(m_element); |
| 78 MediaQueryListListener::trace(visitor); | 78 MediaQueryListListener::trace(visitor); |
| 79 } | 79 } |
| 80 private: | 80 private: |
| 81 explicit ViewportChangeListener(HTMLImageElement* element) : m_element(eleme
nt) { } | 81 explicit ViewportChangeListener(HTMLImageElement* element) : m_element(eleme
nt) { } |
| 82 RawPtrWillBeMember<HTMLImageElement> m_element; | 82 RawPtrWillBeMember<HTMLImageElement> m_element; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 HTMLImageElement::HTMLImageElement(Document& document, HTMLFormElement* form, bo
ol createdByParser) | 85 HTMLImageElement::HTMLImageElement(Document& document, HTMLFormElement* form, bo
ol createdByParser) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 #if !ENABLE(OILPAN) | 120 #if !ENABLE(OILPAN) |
| 121 if (m_listener) { | 121 if (m_listener) { |
| 122 document().mediaQueryMatcher().removeViewportListener(m_listener.get()); | 122 document().mediaQueryMatcher().removeViewportListener(m_listener.get()); |
| 123 m_listener->clearElement(); | 123 m_listener->clearElement(); |
| 124 } | 124 } |
| 125 if (m_form) | 125 if (m_form) |
| 126 m_form->disassociate(*this); | 126 m_form->disassociate(*this); |
| 127 #endif | 127 #endif |
| 128 } | 128 } |
| 129 | 129 |
| 130 void HTMLImageElement::trace(Visitor* visitor) | 130 DEFINE_TRACE(HTMLImageElement) |
| 131 { | 131 { |
| 132 visitor->trace(m_imageLoader); | 132 visitor->trace(m_imageLoader); |
| 133 visitor->trace(m_listener); | 133 visitor->trace(m_listener); |
| 134 visitor->trace(m_form); | 134 visitor->trace(m_form); |
| 135 HTMLElement::trace(visitor); | 135 HTMLElement::trace(visitor); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void HTMLImageElement::notifyViewportChanged() | 138 void HTMLImageElement::notifyViewportChanged() |
| 139 { | 139 { |
| 140 // Re-selecting the source URL in order to pick a more fitting resource | 140 // Re-selecting the source URL in order to pick a more fitting resource |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 ensureUserAgentShadowRoot(); | 726 ensureUserAgentShadowRoot(); |
| 727 } | 727 } |
| 728 | 728 |
| 729 bool HTMLImageElement::isOpaque() const | 729 bool HTMLImageElement::isOpaque() const |
| 730 { | 730 { |
| 731 Image* image = const_cast<HTMLImageElement*>(this)->imageContents(); | 731 Image* image = const_cast<HTMLImageElement*>(this)->imageContents(); |
| 732 return image && image->currentFrameKnownToBeOpaque(); | 732 return image && image->currentFrameKnownToBeOpaque(); |
| 733 } | 733 } |
| 734 | 734 |
| 735 } | 735 } |
| OLD | NEW |