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

Unified Diff: third_party/WebKit/Source/core/paint/ThemePainterMac.mm

Issue 2438843003: Continue to use _NSDrawCarbonThemeBezel to draw text field borders. (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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ThemePainterMac.mm
diff --git a/third_party/WebKit/Source/core/paint/ThemePainterMac.mm b/third_party/WebKit/Source/core/paint/ThemePainterMac.mm
index 7afb12ee7c6c868d5a37226c3ac73f02ee8ac334..5b3f2910851bb3ff68146b1c608c5b9c26c6d407 100644
--- a/third_party/WebKit/Source/core/paint/ThemePainterMac.mm
+++ b/third_party/WebKit/Source/core/paint/ThemePainterMac.mm
@@ -62,24 +62,20 @@ bool ThemePainterMac::paintTextField(const LayoutObject& o,
const IntRect& r) {
LocalCurrentGraphicsContext localContext(paintInfo.context, r);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
bool useNSTextFieldCell = o.styleRef().hasAppearance() &&
o.styleRef().visitedDependentColor(
CSSPropertyBackgroundColor) == Color::white &&
!o.styleRef().hasBackgroundImage();
- // We do not use NSTextFieldCell to draw styled text fields on Lion and
- // SnowLeopard because there are a number of bugs on those platforms that
- // require NSTextFieldCell to be in charge of painting its own
- // background. We need WebCore to paint styled backgrounds, so we'll use
- // this AppKit SPI function instead.
+ // We do not use NSTextFieldCell to draw styled text fields since it induces a
+ // behavior change while remaining a fragile solution.
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
if (!useNSTextFieldCell) {
_NSDrawCarbonThemeBezel(
r, LayoutTheme::isEnabled(o) && !LayoutTheme::isReadOnlyControl(o),
YES);
return false;
}
-#endif
NSTextFieldCell* textField = m_layoutTheme.textField();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698