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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "core/imagebitmap/ImageBitmapOptions.h" | 45 #include "core/imagebitmap/ImageBitmapOptions.h" |
46 #include "core/inspector/ConsoleMessage.h" | 46 #include "core/inspector/ConsoleMessage.h" |
47 #include "core/layout/LayoutBlockFlow.h" | 47 #include "core/layout/LayoutBlockFlow.h" |
48 #include "core/layout/LayoutImage.h" | 48 #include "core/layout/LayoutImage.h" |
49 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
50 #include "core/style/ContentData.h" | 50 #include "core/style/ContentData.h" |
51 #include "core/svg/graphics/SVGImageForContainer.h" | 51 #include "core/svg/graphics/SVGImageForContainer.h" |
52 #include "platform/ContentType.h" | 52 #include "platform/ContentType.h" |
53 #include "platform/EventDispatchForbiddenScope.h" | 53 #include "platform/EventDispatchForbiddenScope.h" |
54 #include "platform/MIMETypeRegistry.h" | 54 #include "platform/MIMETypeRegistry.h" |
55 #include "platform/RuntimeEnabledFeatures.h" | |
56 #include "platform/weborigin/SecurityPolicy.h" | 55 #include "platform/weborigin/SecurityPolicy.h" |
57 | 56 |
58 namespace blink { | 57 namespace blink { |
59 | 58 |
60 using namespace HTMLNames; | 59 using namespace HTMLNames; |
61 | 60 |
62 class HTMLImageElement::ViewportChangeListener final : public MediaQueryListList
ener { | 61 class HTMLImageElement::ViewportChangeListener final : public MediaQueryListList
ener { |
63 public: | 62 public: |
64 static RefPtrWillBeRawPtr<ViewportChangeListener> create(HTMLImageElement* e
lement) | 63 static RefPtrWillBeRawPtr<ViewportChangeListener> create(HTMLImageElement* e
lement) |
65 { | 64 { |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 if (userAgentShadowRoot()) { | 276 if (userAgentShadowRoot()) { |
278 Element* text = userAgentShadowRoot()->getElementById("alttext"); | 277 Element* text = userAgentShadowRoot()->getElementById("alttext"); |
279 String value = altText(); | 278 String value = altText(); |
280 if (text && text->textContent() != value) | 279 if (text && text->textContent() != value) |
281 text->setTextContent(altText()); | 280 text->setTextContent(altText()); |
282 } | 281 } |
283 } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) { | 282 } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) { |
284 selectSourceURL(ImageLoader::UpdateIgnorePreviousError); | 283 selectSourceURL(ImageLoader::UpdateIgnorePreviousError); |
285 } else if (name == usemapAttr) { | 284 } else if (name == usemapAttr) { |
286 setIsLink(!value.isNull()); | 285 setIsLink(!value.isNull()); |
287 } else if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled() && name
== referrerpolicyAttr) { | 286 } else if (name == referrerpolicyAttr) { |
288 m_referrerPolicy = ReferrerPolicyDefault; | 287 m_referrerPolicy = ReferrerPolicyDefault; |
289 if (!value.isNull()) | 288 if (!value.isNull()) |
290 SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy); | 289 SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy); |
291 } else { | 290 } else { |
292 HTMLElement::parseAttribute(name, oldValue, value); | 291 HTMLElement::parseAttribute(name, oldValue, value); |
293 } | 292 } |
294 } | 293 } |
295 | 294 |
296 String HTMLImageElement::altText() const | 295 String HTMLImageElement::altText() const |
297 { | 296 { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 { | 811 { |
813 ImageResource* image = cachedImage(); | 812 ImageResource* image = cachedImage(); |
814 if (!image) | 813 if (!image) |
815 return IntSize(); | 814 return IntSize(); |
816 LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientat
ion(layoutObject()), 1.0f); | 815 LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientat
ion(layoutObject()), 1.0f); |
817 ASSERT(lSize.fraction().isZero()); | 816 ASSERT(lSize.fraction().isZero()); |
818 return IntSize(lSize.width(), lSize.height()); | 817 return IntSize(lSize.width(), lSize.height()); |
819 } | 818 } |
820 | 819 |
821 } // namespace blink | 820 } // namespace blink |
OLD | NEW |