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 | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
5 * reserved. | 5 * reserved. |
6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 visitor->trace(m_element); | 79 visitor->trace(m_element); |
80 MediaQueryListListener::trace(visitor); | 80 MediaQueryListListener::trace(visitor); |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 explicit ViewportChangeListener(HTMLImageElement* element) | 84 explicit ViewportChangeListener(HTMLImageElement* element) |
85 : m_element(element) {} | 85 : m_element(element) {} |
86 Member<HTMLImageElement> m_element; | 86 Member<HTMLImageElement> m_element; |
87 }; | 87 }; |
88 | 88 |
89 HTMLImageElement::HTMLImageElement(Document& document, | 89 HTMLImageElement::HTMLImageElement(Document& document, bool createdByParser) |
90 bool createdByParser) | |
91 : HTMLElement(imgTag, document), | 90 : HTMLElement(imgTag, document), |
92 ActiveScriptWrappable(this), | |
93 m_imageLoader(HTMLImageLoader::create(this)), | 91 m_imageLoader(HTMLImageLoader::create(this)), |
94 m_imageDevicePixelRatio(1.0f), | 92 m_imageDevicePixelRatio(1.0f), |
95 m_source(nullptr), | 93 m_source(nullptr), |
96 m_layoutDisposition(LayoutDisposition::PrimaryContent), | 94 m_layoutDisposition(LayoutDisposition::PrimaryContent), |
97 m_formWasSetByParser(false), | 95 m_formWasSetByParser(false), |
98 m_elementCreatedByParser(createdByParser), | 96 m_elementCreatedByParser(createdByParser), |
99 m_isFallbackImage(false), | 97 m_isFallbackImage(false), |
100 m_referrerPolicy(ReferrerPolicyDefault) { | 98 m_referrerPolicy(ReferrerPolicyDefault) { |
101 setHasCustomStyleCallbacks(); | 99 setHasCustomStyleCallbacks(); |
102 } | 100 } |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 void HTMLImageElement::associateWith(HTMLFormElement* form) { | 909 void HTMLImageElement::associateWith(HTMLFormElement* form) { |
912 if (form && form->isConnected()) { | 910 if (form && form->isConnected()) { |
913 m_form = form; | 911 m_form = form; |
914 m_formWasSetByParser = true; | 912 m_formWasSetByParser = true; |
915 m_form->associate(*this); | 913 m_form->associate(*this); |
916 m_form->didAssociateByParser(); | 914 m_form->didAssociateByParser(); |
917 } | 915 } |
918 }; | 916 }; |
919 | 917 |
920 } // namespace blink | 918 } // namespace blink |
OLD | NEW |