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

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

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 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"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 brokenImage->setInlineStyleProperty( 117 brokenImage->setInlineStyleProperty(
118 CSSPropertyFloat, 118 CSSPropertyFloat,
119 AtomicString(newStyle->direction() == TextDirection::kLtr ? "left" 119 AtomicString(newStyle->direction() == TextDirection::kLtr ? "left"
120 : "right")); 120 : "right"));
121 121
122 // This is an <img> with no attributes, so don't display anything. 122 // This is an <img> with no attributes, so don't display anything.
123 if (noImageSourceSpecified(element) && 123 if (noImageSourceSpecified(element) &&
124 !newStyle->width().isSpecifiedOrIntrinsic() && 124 !newStyle->width().isSpecifiedOrIntrinsic() &&
125 !newStyle->height().isSpecifiedOrIntrinsic() && 125 !newStyle->height().isSpecifiedOrIntrinsic() &&
126 toHTMLElement(element).altText().isEmpty()) 126 toHTMLElement(element).altText().isEmpty())
127 newStyle->setDisplay(EDisplay::None); 127 newStyle->setDisplay(EDisplay::kNone);
128 128
129 // This preserves legacy behaviour originally defined when alt-text was 129 // This preserves legacy behaviour originally defined when alt-text was
130 // managed by LayoutImage. 130 // managed by LayoutImage.
131 if (noImageSourceSpecified(element)) 131 if (noImageSourceSpecified(element))
132 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 132 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
133 else 133 else
134 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); 134 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline);
135 135
136 return newStyle; 136 return newStyle;
137 } 137 }
138 138
139 } // namespace blink 139 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698