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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTheme.cpp

Issue 2405633002: Reformat comments in core/layout (Closed)
Patch Set: 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/layout/LayoutTheme.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
index ce9cb7fa7c696ad49d85c86e7a20e3efd43dc4b9..67172468b37d91a93a6c724ba2a9d353db141f8e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
@@ -78,7 +78,8 @@ LayoutTheme::LayoutTheme(Theme* platformTheme)
void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) {
ASSERT(style.hasAppearance());
- // Force inline and table display styles to be inline-block (except for table- which is block)
+ // Force inline and table display styles to be inline-block (except for table-
+ // which is block)
ControlPart part = style.appearance();
if (style.display() == EDisplay::Inline ||
style.display() == EDisplay::InlineTable ||
@@ -168,7 +169,8 @@ void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) {
// Width / Height
// The width and height here are affected by the zoom.
- // FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
+ // FIXME: Check is flawed, since it doesn't take min-width/max-width
+ // into account.
LengthSize controlSize = m_platformTheme->controlSize(
part, style.font().getFontDescription(),
LengthSize(style.width(), style.height()), style.effectiveZoom());
@@ -207,7 +209,8 @@ void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) {
}
if (!m_platformTheme) {
- // Call the appropriate style adjustment method based off the appearance value.
+ // Call the appropriate style adjustment method based off the appearance
+ // value.
switch (style.appearance()) {
case CheckboxPart:
return adjustCheckboxStyle(style);
@@ -224,7 +227,8 @@ void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) {
}
}
- // Call the appropriate style adjustment method based off the appearance value.
+ // Call the appropriate style adjustment method based off the appearance
+ // value.
switch (style.appearance()) {
case MenulistPart:
return adjustMenuListStyle(style, e);
@@ -397,8 +401,8 @@ int LayoutTheme::baselinePosition(const LayoutObject* o) const {
}
bool LayoutTheme::isControlContainer(ControlPart appearance) const {
- // There are more leaves than this, but we'll patch this function as we add support for
- // more controls.
+ // There are more leaves than this, but we'll patch this function as we add
+ // support for more controls.
return appearance != CheckboxPart && appearance != RadioPart;
}
@@ -451,7 +455,8 @@ bool LayoutTheme::controlStateChanged(LayoutObject& o,
if (!o.styleRef().hasAppearance())
return false;
- // Default implementation assumes the controls don't respond to changes in :hover state
+ // Default implementation assumes the controls don't respond to changes in
+ // :hover state
if (state == HoverControlState && !supportsHover(o.styleRef()))
return false;
@@ -580,29 +585,33 @@ bool LayoutTheme::isSpinUpButtonPartHovered(const LayoutObject& o) {
void LayoutTheme::adjustCheckboxStyle(ComputedStyle& style) const {
// A summary of the rules for checkbox designed to match WinIE:
- // width/height - honored (WinIE actually scales its control for small widths, but lets it overflow for small heights.)
- // font-size - not honored (control has no text), but we use it to decide which control size to use.
+ // width/height - honored (WinIE actually scales its control for small widths,
+ // but lets it overflow for small heights.)
+ // font-size - not honored (control has no text), but we use it to decide
+ // which control size to use.
setCheckboxSize(style);
// padding - not honored by WinIE, needs to be removed.
style.resetPadding();
- // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
- // for now, we will not honor it.
+ // border - honored by WinIE, but looks terrible (just paints in the control
+ // box and turns off the Windows XP theme) for now, we will not honor it.
style.resetBorder();
}
void LayoutTheme::adjustRadioStyle(ComputedStyle& style) const {
// A summary of the rules for checkbox designed to match WinIE:
- // width/height - honored (WinIE actually scales its control for small widths, but lets it overflow for small heights.)
- // font-size - not honored (control has no text), but we use it to decide which control size to use.
+ // width/height - honored (WinIE actually scales its control for small widths,
+ // but lets it overflow for small heights.)
+ // font-size - not honored (control has no text), but we use it to decide
+ // which control size to use.
setRadioSize(style);
// padding - not honored by WinIE, needs to be removed.
style.resetPadding();
- // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
- // for now, we will not honor it.
+ // border - honored by WinIE, but looks terrible (just paints in the control
+ // box and turns off the Windows XP theme) for now, we will not honor it.
style.resetBorder();
}
@@ -894,7 +903,8 @@ void LayoutTheme::adjustCheckboxStyleUsingFallbackTheme(
// padding - not honored by WinIE, needs to be removed.
style.resetPadding();
- // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
+ // border - honored by WinIE, but looks terrible (just paints in the control
+ // box and turns off the Windows XP theme)
// for now, we will not honor it.
style.resetBorder();
}
@@ -915,7 +925,8 @@ void LayoutTheme::adjustRadioStyleUsingFallbackTheme(
// padding - not honored by WinIE, needs to be removed.
style.resetPadding();
- // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
+ // border - honored by WinIE, but looks terrible (just paints in the control
+ // box and turns off the Windows XP theme)
// for now, we will not honor it.
style.resetBorder();
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.h ('k') | third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698