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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp b/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp
index 0d90850b4e4307ff708a3b7814086ac65c16489d..a09e7642b6185f591e77851739b0ddfff9250862 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp
@@ -72,8 +72,9 @@ void HTMLImageFallbackHelper::createAltTextShadowTree(Element& element) {
PassRefPtr<ComputedStyle> HTMLImageFallbackHelper::customStyleForAltText(
Element& element,
PassRefPtr<ComputedStyle> newStyle) {
- // If we have an author shadow root or have not created the UA shadow root yet, bail early. We can't
- // use ensureUserAgentShadowRoot() here because that would alter the DOM tree during style recalc.
+ // If we have an author shadow root or have not created the UA shadow root
+ // yet, bail early. We can't use ensureUserAgentShadowRoot() here because that
+ // would alter the DOM tree during style recalc.
if (element.authorShadowRoot() || !element.userAgentShadowRoot())
return newStyle;
@@ -81,12 +82,14 @@ PassRefPtr<ComputedStyle> HTMLImageFallbackHelper::customStyleForAltText(
element.userAgentShadowRoot()->getElementById("alttext-container");
Element* brokenImage =
element.userAgentShadowRoot()->getElementById("alttext-image");
- // Input elements have a UA shadow root of their own. We may not have replaced it with fallback content yet.
+ // Input elements have a UA shadow root of their own. We may not have replaced
+ // it with fallback content yet.
if (!placeHolder || !brokenImage)
return newStyle;
if (element.document().inQuirksMode()) {
- // Mimic the behaviour of the image host by setting symmetric dimensions if only one dimension is specified.
+ // Mimic the behaviour of the image host by setting symmetric dimensions if
+ // only one dimension is specified.
if (newStyle->width().isSpecifiedOrIntrinsic() &&
newStyle->height().isAuto())
newStyle->setHeight(newStyle->width());
@@ -100,7 +103,8 @@ PassRefPtr<ComputedStyle> HTMLImageFallbackHelper::customStyleForAltText(
}
}
- // If the image has specified dimensions allow the alt-text container expand to fill them.
+ // If the image has specified dimensions allow the alt-text container expand
+ // to fill them.
if (newStyle->width().isSpecifiedOrIntrinsic() &&
newStyle->height().isSpecifiedOrIntrinsic()) {
placeHolder->setInlineStyleProperty(
@@ -109,7 +113,8 @@ PassRefPtr<ComputedStyle> HTMLImageFallbackHelper::customStyleForAltText(
CSSPropertyHeight, 100, CSSPrimitiveValue::UnitType::Percentage);
}
- // Make sure the broken image icon appears on the appropriate side of the image for the element's writing direction.
+ // Make sure the broken image icon appears on the appropriate side of the
+ // image for the element's writing direction.
brokenImage->setInlineStyleProperty(
CSSPropertyFloat,
AtomicString(newStyle->direction() == LTR ? "left" : "right"));
@@ -121,7 +126,8 @@ PassRefPtr<ComputedStyle> HTMLImageFallbackHelper::customStyleForAltText(
toHTMLElement(element).altText().isEmpty())
newStyle->setDisplay(EDisplay::None);
- // This preserves legacy behaviour originally defined when alt-text was managed by LayoutImage.
+ // This preserves legacy behaviour originally defined when alt-text was
+ // managed by LayoutImage.
if (noImageSourceSpecified(element))
brokenImage->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
else
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElementTest.cpp ('k') | third_party/WebKit/Source/core/html/HTMLImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698