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

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

Issue 923953002: Move rendering/RenderImage* to layout/LayoutImage* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/html/HTMLImageFallbackHelper.h" 6 #include "core/html/HTMLImageFallbackHelper.h"
7 7
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/InputTypeNames.h" 9 #include "core/InputTypeNames.h"
10 #include "core/dom/ElementRareData.h" 10 #include "core/dom/ElementRareData.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 placeHolder->setInlineStyleProperty(CSSPropertyHeight, 100, CSSPrimitive Value::CSS_PERCENTAGE); 97 placeHolder->setInlineStyleProperty(CSSPropertyHeight, 100, CSSPrimitive Value::CSS_PERCENTAGE);
98 } 98 }
99 99
100 // Make sure the broken image icon appears on the appropriate side of the im age for the element's writing direction. 100 // Make sure the broken image icon appears on the appropriate side of the im age for the element's writing direction.
101 brokenImage->setInlineStyleProperty(CSSPropertyFloat, AtomicString(newStyle- >direction() == LTR ? "left" : "right")); 101 brokenImage->setInlineStyleProperty(CSSPropertyFloat, AtomicString(newStyle- >direction() == LTR ? "left" : "right"));
102 102
103 // This is an <img> with no attributes, so don't display anything. 103 // This is an <img> with no attributes, so don't display anything.
104 if (noImageSourceSpecified(element) && !newStyle->width().isSpecifiedOrIntri nsic() && !newStyle->height().isSpecifiedOrIntrinsic() && toHTMLElement(element) .altText().isEmpty()) 104 if (noImageSourceSpecified(element) && !newStyle->width().isSpecifiedOrIntri nsic() && !newStyle->height().isSpecifiedOrIntrinsic() && toHTMLElement(element) .altText().isEmpty())
105 newStyle->setDisplay(NONE); 105 newStyle->setDisplay(NONE);
106 106
107 // This preserves legacy behaviour originally defined when alt-text was mana ged by RenderImage. 107 // This preserves legacy behaviour originally defined when alt-text was mana ged by LayoutImage.
108 if (noImageSourceSpecified(element)) 108 if (noImageSourceSpecified(element))
109 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 109 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
110 else 110 else
111 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); 111 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline);
112 112
113 return newStyle; 113 return newStyle;
114 } 114 }
115 115
116 } // namespace blink 116 } // namespace blink
117 117
OLDNEW
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698