summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2011-02-24 12:34:42 -0500
committerLeon Scroggins <scroggo@google.com>2011-02-24 13:23:59 -0500
commit94f12574c74b11db011b994e462f64a112952a47 (patch)
tree257473b2429f11621095d5c7c43c9b175bb0954f /WebCore
parent17c9af86d88ba238f6574f45cc821ce7e68d1fa1 (diff)
downloadexternal_webkit-94f12574c74b11db011b994e462f64a112952a47.zip
external_webkit-94f12574c74b11db011b994e462f64a112952a47.tar.gz
external_webkit-94f12574c74b11db011b994e462f64a112952a47.tar.bz2
Stop the blinking caret when moving to another field.
Bug:2930013 Requires a change in frameworks/base. Change-Id: I892fcdd9b9a0abdcf82e5bb26c930b68ae8b10fa
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/config.h3
-rw-r--r--WebCore/editing/SelectionController.cpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/config.h b/WebCore/config.h
index 6117fef..a74acd6 100644
--- a/WebCore/config.h
+++ b/WebCore/config.h
@@ -157,6 +157,9 @@
// thread
#define ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS
+// Allow us to turn off the blinking caret as desired.
+#define ANDROID_ALLOW_TURNING_OFF_CARET
+
#define ANDROID_META_SUPPORT
// Converts ListBoxes to dropdown popup lists.
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index bc6ef24..42802ca 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -58,6 +58,9 @@
#include "TypingCommand.h"
#include "htmlediting.h"
#include "visible_units.h"
+#ifdef ANDROID_ALLOW_TURNING_OFF_CARET
+#include "WebViewCore.h"
+#endif
#include <stdio.h>
#include <wtf/text/CString.h>
@@ -1079,6 +1082,10 @@ void SelectionController::invalidateCaretRect()
void SelectionController::paintCaret(GraphicsContext* context, int tx, int ty, const IntRect& clipRect)
{
+#ifdef ANDROID_ALLOW_TURNING_OFF_CARET
+ if (m_frame && !android::WebViewCore::getWebViewCore(m_frame->view())->shouldPaintCaret())
+ return;
+#endif
#if ENABLE(TEXT_CARET)
if (!m_caretVisible)
return;