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(); |
} |