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

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

Issue 1877733002: Revert a part of the patch from https://crrev.com/1657483003 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/fast/dom/Range/range-clone-contents-expected.txt ('k') | no next file » | 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 "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 26 matching lines...) Expand all
37 RawPtr<HTMLDivElement> container = HTMLDivElement::create(element.document() ); 37 RawPtr<HTMLDivElement> container = HTMLDivElement::create(element.document() );
38 root.appendChild(container); 38 root.appendChild(container);
39 container->setAttribute(idAttr, AtomicString("alttext-container")); 39 container->setAttribute(idAttr, AtomicString("alttext-container"));
40 container->setInlineStyleProperty(CSSPropertyOverflow, CSSValueHidden); 40 container->setInlineStyleProperty(CSSPropertyOverflow, CSSValueHidden);
41 container->setInlineStyleProperty(CSSPropertyBorderWidth, 1, CSSPrimitiveVal ue::UnitType::Pixels); 41 container->setInlineStyleProperty(CSSPropertyBorderWidth, 1, CSSPrimitiveVal ue::UnitType::Pixels);
42 container->setInlineStyleProperty(CSSPropertyBorderStyle, CSSValueSolid); 42 container->setInlineStyleProperty(CSSPropertyBorderStyle, CSSValueSolid);
43 container->setInlineStyleProperty(CSSPropertyBorderColor, CSSValueSilver); 43 container->setInlineStyleProperty(CSSPropertyBorderColor, CSSValueSilver);
44 container->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInlineBlock); 44 container->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInlineBlock);
45 container->setInlineStyleProperty(CSSPropertyBoxSizing, CSSValueBorderBox); 45 container->setInlineStyleProperty(CSSPropertyBoxSizing, CSSValueBorderBox);
46 container->setInlineStyleProperty(CSSPropertyPadding, 1, CSSPrimitiveValue:: UnitType::Pixels); 46 container->setInlineStyleProperty(CSSPropertyPadding, 1, CSSPrimitiveValue:: UnitType::Pixels);
47 container->setInlineStyleProperty(CSSPropertyBorderRadius, ("inherit"));
48 47
49 RawPtr<HTMLImageElement> brokenImage = HTMLImageElement::create(element.docu ment()); 48 RawPtr<HTMLImageElement> brokenImage = HTMLImageElement::create(element.docu ment());
50 container->appendChild(brokenImage); 49 container->appendChild(brokenImage);
51 brokenImage->setIsFallbackImage(); 50 brokenImage->setIsFallbackImage();
52 brokenImage->setAttribute(idAttr, AtomicString("alttext-image")); 51 brokenImage->setAttribute(idAttr, AtomicString("alttext-image"));
53 brokenImage->setAttribute(widthAttr, AtomicString("16")); 52 brokenImage->setAttribute(widthAttr, AtomicString("16"));
54 brokenImage->setAttribute(heightAttr, AtomicString("16")); 53 brokenImage->setAttribute(heightAttr, AtomicString("16"));
55 brokenImage->setAttribute(alignAttr, AtomicString("left")); 54 brokenImage->setAttribute(alignAttr, AtomicString("left"));
56 brokenImage->setInlineStyleProperty(CSSPropertyMargin, 0, CSSPrimitiveValue: :UnitType::Pixels); 55 brokenImage->setInlineStyleProperty(CSSPropertyMargin, 0, CSSPrimitiveValue: :UnitType::Pixels);
57 56
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // 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.
107 if (noImageSourceSpecified(element)) 106 if (noImageSourceSpecified(element))
108 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 107 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
109 else 108 else
110 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline); 109 brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueInline);
111 110
112 return newStyle; 111 return newStyle;
113 } 112 }
114 113
115 } // namespace blink 114 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/Range/range-clone-contents-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698