| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/html/HTMLImageFallbackHelper.h" | 5 #include "core/html/HTMLImageFallbackHelper.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/InputTypeNames.h" | 8 #include "core/InputTypeNames.h" |
| 9 #include "core/dom/ElementRareData.h" | 9 #include "core/dom/ElementRareData.h" |
| 10 #include "core/dom/Text.h" | 10 #include "core/dom/Text.h" |
| 11 #include "core/dom/shadow/ShadowRoot.h" | 11 #include "core/dom/shadow/ShadowRoot.h" |
| 12 #include "core/html/HTMLDivElement.h" | 12 #include "core/html/HTMLDivElement.h" |
| 13 #include "core/html/HTMLElement.h" | 13 #include "core/html/HTMLElement.h" |
| 14 #include "core/html/HTMLImageElement.h" | 14 #include "core/html/HTMLImageElement.h" |
| 15 #include "core/html/HTMLImageLoader.h" | 15 #include "core/html/HTMLImageLoader.h" |
| 16 #include "core/html/HTMLInputElement.h" | 16 #include "core/html/HTMLInputElement.h" |
| 17 #include "core/html/HTMLStyleElement.h" | 17 #include "core/html/HTMLStyleElement.h" |
| 18 #include "wtf/text/StringBuilder.h" | 18 #include "platform/wtf/text/StringBuilder.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 using namespace HTMLNames; | 22 using namespace HTMLNames; |
| 23 | 23 |
| 24 static bool NoImageSourceSpecified(const Element& element) { | 24 static bool NoImageSourceSpecified(const Element& element) { |
| 25 bool no_src_specified = !element.hasAttribute(srcAttr) || | 25 bool no_src_specified = !element.hasAttribute(srcAttr) || |
| 26 element.getAttribute(srcAttr).IsNull() || | 26 element.getAttribute(srcAttr).IsNull() || |
| 27 element.getAttribute(srcAttr).IsEmpty(); | 27 element.getAttribute(srcAttr).IsEmpty(); |
| 28 bool no_srcset_specified = !element.hasAttribute(srcsetAttr) || | 28 bool no_srcset_specified = !element.hasAttribute(srcsetAttr) || |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // managed by LayoutImage. | 131 // managed by LayoutImage. |
| 132 if (NoImageSourceSpecified(element)) | 132 if (NoImageSourceSpecified(element)) |
| 133 broken_image->SetInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); | 133 broken_image->SetInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
| 134 else | 134 else |
| 135 broken_image->SetInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); | 135 broken_image->SetInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); |
| 136 | 136 |
| 137 return new_style; | 137 return new_style; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| OLD | NEW |