Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/fetch/ImageResource.h" 12 #include "core/fetch/ImageResource.h"
13 #include "core/html/HTMLDivElement.h" 13 #include "core/html/HTMLDivElement.h"
14 #include "core/html/HTMLElement.h" 14 #include "core/html/HTMLElement.h"
15 #include "core/html/HTMLImageElement.h" 15 #include "core/html/HTMLImageElement.h"
16 #include "core/html/HTMLImageLoader.h" 16 #include "core/html/HTMLImageLoader.h"
17 #include "core/html/HTMLInputElement.h" 17 #include "core/html/HTMLInputElement.h"
18 #include "core/html/HTMLStyleElement.h" 18 #include "core/html/HTMLStyleElement.h"
19 #include "wtf/PassOwnPtr.h"
19 #include "wtf/text/StringBuilder.h" 20 #include "wtf/text/StringBuilder.h"
20 21
21 namespace blink { 22 namespace blink {
22 23
23 using namespace HTMLNames; 24 using namespace HTMLNames;
24 25
25 static bool noImageSourceSpecified(const Element& element) 26 static bool noImageSourceSpecified(const Element& element)
26 { 27 {
27 bool noSrcSpecified = !element.hasAttribute(srcAttr) || element.getAttribute (srcAttr).isNull() || element.getAttribute(srcAttr).isEmpty(); 28 bool noSrcSpecified = !element.hasAttribute(srcAttr) || element.getAttribute (srcAttr).isNull() || element.getAttribute(srcAttr).isEmpty();
28 bool noSrcsetSpecified = !element.hasAttribute(srcsetAttr) || element.getAtt ribute(srcsetAttr).isNull() || element.getAttribute(srcsetAttr).isEmpty(); 29 bool noSrcsetSpecified = !element.hasAttribute(srcsetAttr) || element.getAtt ribute(srcsetAttr).isNull() || element.getAttribute(srcsetAttr).isEmpty();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // This preserves legacy behaviour originally defined when alt-text was mana ged by LayoutImage. 105 // This preserves legacy behaviour originally defined when alt-text was mana ged by LayoutImage.
105 if (noImageSourceSpecified(element)) 106 if (noImageSourceSpecified(element))
106 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 107 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
107 else 108 else
108 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); 109 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline);
109 110
110 return newStyle; 111 return newStyle;
111 } 112 }
112 113
113 } // namespace blink 114 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698