summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-02-21 15:43:45 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-21 15:43:45 -0800
commit489cc2648aba682fde7acdd19a71631429c5d8f8 (patch)
tree3bce8326f6c9d51b8f77661eb8c2bce0e8434889 /Source/WebCore
parentcb3b415105a884d70ac845b228f6bb87807f9f34 (diff)
parentf404d29266675808fffe9d71b065bc03b555b58d (diff)
downloadexternal_webkit-489cc2648aba682fde7acdd19a71631429c5d8f8.zip
external_webkit-489cc2648aba682fde7acdd19a71631429c5d8f8.tar.gz
external_webkit-489cc2648aba682fde7acdd19a71631429c5d8f8.tar.bz2
Merge "Improve keyboard navigation cursor rings"
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/android/RenderThemeAndroid.cpp24
-rw-r--r--Source/WebCore/platform/android/RenderThemeAndroid.h2
2 files changed, 6 insertions, 20 deletions
diff --git a/Source/WebCore/platform/android/RenderThemeAndroid.cpp b/Source/WebCore/platform/android/RenderThemeAndroid.cpp
index 97110ee..ee406c2 100644
--- a/Source/WebCore/platform/android/RenderThemeAndroid.cpp
+++ b/Source/WebCore/platform/android/RenderThemeAndroid.cpp
@@ -633,30 +633,16 @@ bool RenderThemeAndroid::paintMenuListButton(RenderObject* obj, const PaintInfo&
Color RenderThemeAndroid::platformFocusRingColor() const
{
- static Color focusRingColor(0x66, 0x33, 0xB5, 0xE5);
+ static Color focusRingColor(0x33, 0xB5, 0xE5, 0x66);
return focusRingColor;
}
bool RenderThemeAndroid::supportsFocusRing(const RenderStyle* style) const
{
- // TODO: Draw this on the UI side
- // For now, just return false to let WebKit draw the focus ring. We only
- // draw this ring when navigating via the keyboard, this does not affect
- // the touch ring
- return false;
- return style->opacity() > 0
- && style->hasAppearance()
- && style->appearance() != TextFieldPart
- && style->appearance() != SearchFieldPart
- && style->appearance() != TextAreaPart
- && style->appearance() != CheckboxPart
- && style->appearance() != RadioPart
- && style->appearance() != PushButtonPart
- && style->appearance() != SquareButtonPart
- && style->appearance() != ButtonPart
- && style->appearance() != ButtonBevelPart
- && style->appearance() != MenulistPart
- && style->appearance() != MenulistButtonPart;
+ // Draw the focus ring ourselves unless it is a text area (webkit does borders better)
+ if (!style || !style->hasAppearance())
+ return true;
+ return style->appearance() != TextFieldPart && style->appearance() != TextAreaPart;
}
} // namespace WebCore
diff --git a/Source/WebCore/platform/android/RenderThemeAndroid.h b/Source/WebCore/platform/android/RenderThemeAndroid.h
index 165abf8..ed4d07f 100644
--- a/Source/WebCore/platform/android/RenderThemeAndroid.h
+++ b/Source/WebCore/platform/android/RenderThemeAndroid.h
@@ -48,7 +48,7 @@ public:
~RenderThemeAndroid();
virtual bool stateChanged(RenderObject*, ControlState) const;
-
+
virtual bool supportsFocusRing(const RenderStyle*) const;
// A method asking if the theme's controls actually care about redrawing when hovered.
virtual bool supportsHover(const RenderStyle* style) const { return style->affectedByHoverRules(); }