diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 17:59:03 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 17:59:03 +0000 |
commit | 843c804a75a846f980f8ded32f62148d933fb685 (patch) | |
tree | a6b4b567601387d503cec6b3e58b933ea244f8fe /webkit/api/src | |
parent | 9a9f43a3057d229113de3d690d6a96420fcec306 (diff) | |
download | chromium_src-843c804a75a846f980f8ded32f62148d933fb685.zip chromium_src-843c804a75a846f980f8ded32f62148d933fb685.tar.gz chromium_src-843c804a75a846f980f8ded32f62148d933fb685.tar.bz2 |
Let ChromiumBridge::paintTextField check if the Color object passed in is valid
or not. If not valid, just pass white to ThemeEngine.
This change was motivated by the issue
http://code.google.com/p/chromium/issues/detail?id=2756, but it has been
resolved by only the upstream change
https://bugs.webkit.org/show_bug.cgi?id=25742.
However, this verification code is still useful.
BUG=2756
Checked in for tyoshino@google.com
Original review: http://codereview.chromium.org/113165
Review URL: http://codereview.chromium.org/113907
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api/src')
-rw-r--r-- | webkit/api/src/ChromiumBridge.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index 5469747..b82bc28 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -313,9 +313,12 @@ void ChromiumBridge::paintTextField( 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( |