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

Unified Diff: webkit/api/src/ChromiumBridge.cpp

Issue 113165: Let ChromiumBridge::paintTextField check if the Color object passed in is valid or not. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/ChromiumBridge.cpp
===================================================================
--- webkit/api/src/ChromiumBridge.cpp (revision 16584)
+++ webkit/api/src/ChromiumBridge.cpp (working copy)
@@ -311,9 +311,12 @@
const IntRect& rect, const Color& color, bool fillContentArea,
bool drawEdges)
{
+ // Fallback to white when |color| is invalid.
+ RGBA32 backgroundColor = color.isValid() ? color.rgb() : Color::white;
+
webKitClient()->themeEngine()->paintTextField(
gc->platformContext()->canvas(), part, state, classicState, rect,
- color.rgb(), fillContentArea, drawEdges);
+ backgroundColor, fillContentArea, drawEdges);
}
void ChromiumBridge::paintTrackbar(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698