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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp

Issue 1837963002: Use fallback in LayoutThemeMobile on mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test 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/Source/core/layout/LayoutThemeMobile.h ('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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (LayoutTestSupport::isRunningLayoutTest()) { 69 if (LayoutTestSupport::isRunningLayoutTest()) {
70 // Match Linux spin button style in layout tests. 70 // Match Linux spin button style in layout tests.
71 // FIXME: Consider removing the conditional if a future Android theme ma tches this. 71 // FIXME: Consider removing the conditional if a future Android theme ma tches this.
72 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngin e::PartInnerSpinButton); 72 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngin e::PartInnerSpinButton);
73 73
74 style.setWidth(Length(size.width(), Fixed)); 74 style.setWidth(Length(size.width(), Fixed));
75 style.setMinWidth(Length(size.width(), Fixed)); 75 style.setMinWidth(Length(size.width(), Fixed));
76 } 76 }
77 } 77 }
78 78
79 bool LayoutThemeMobile::shouldUseFallbackTheme(const ComputedStyle& style) const
80 {
81 #if OS(MACOSX)
82 // Mac WebThemeEngine cannot handle these controls.
83 ControlPart part = style.appearance();
84 if (part == CheckboxPart || part == RadioPart)
85 return true;
86 #endif
87 return LayoutThemeDefault::shouldUseFallbackTheme(style);
88 }
89
79 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMobile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698