diff options
author | Cary Clark <cary@android.com> | 2011-02-16 09:45:27 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2011-02-16 09:45:27 -0500 |
commit | f3a90aec9c4763a497ef64d704da10e9625e0da0 (patch) | |
tree | 1f0920cace2722b1e7d8bb6d66c378111993d7ba /WebCore/platform/android | |
parent | ee4f4c91344b2610f2ac5714d5f37763e2efc3c0 (diff) | |
download | external_webkit-f3a90aec9c4763a497ef64d704da10e9625e0da0.zip external_webkit-f3a90aec9c4763a497ef64d704da10e9625e0da0.tar.gz external_webkit-f3a90aec9c4763a497ef64d704da10e9625e0da0.tar.bz2 |
match UI text selection background color
bug:3451973
Change-Id: Ie334c54ebb6b5b1083616739f9a90b8e8f3b6693
Diffstat (limited to 'WebCore/platform/android')
-rw-r--r-- | WebCore/platform/android/RenderThemeAndroid.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/WebCore/platform/android/RenderThemeAndroid.cpp b/WebCore/platform/android/RenderThemeAndroid.cpp index b43e0e6..66f034d 100644 --- a/WebCore/platform/android/RenderThemeAndroid.cpp +++ b/WebCore/platform/android/RenderThemeAndroid.cpp @@ -52,9 +52,15 @@ namespace WebCore { // dropdowns, we want a much smaller height, which encompasses the text. const int listboxPadding = 5; -// This is the color of selection in a textfield. It was obtained by checking -// the color of selection in TextViews in the system. -const RGBA32 selectionColor = makeRGB(255, 146, 0); +// This is the color of selection in a textfield. It was computed from +// frameworks/base/core/res/res/values/colors.xml, which uses #9983CC39 +// (decimal a = 153, r = 131, g = 204, b = 57) +// for all four highlighted text values. Blending this with white yields: +// R = (131 * 153 + 255 * (255 - 153)) / 255 -> 180.6 +// G = (204 * 153 + 255 * (255 - 153)) / 255 -> 224.4 +// B = ( 57 * 153 + 255 * (255 - 153)) / 255 -> 136.2 + +const RGBA32 selectionColor = makeRGB(181, 224, 136); static SkCanvas* getCanvasFromInfo(const PaintInfo& info) { |