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

Unified Diff: trunk/src/ui/views/controls/textfield/native_textfield_views.cc

Issue 77173004: Revert 233759 "Make NativeTextfieldViews update the win system c..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/ui/views/controls/textfield/native_textfield_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/views/controls/textfield/native_textfield_views.cc
===================================================================
--- trunk/src/ui/views/controls/textfield/native_textfield_views.cc (revision 236197)
+++ trunk/src/ui/views/controls/textfield/native_textfield_views.cc (working copy)
@@ -51,11 +51,6 @@
#include "base/win/win_util.h"
#endif
-#if defined(OS_WIN)
-#include "ui/base/win/accessibility_misc_utils.h"
-#include "ui/views/win/hwnd_util.h"
-#endif
-
namespace {
void ConvertRectToScreen(const views::View* src, gfx::Rect* r) {
@@ -702,8 +697,6 @@
RepaintCursor();
}
- PlatformHideSystemCaret();
-
touch_selection_controller_.reset();
}
@@ -1170,7 +1163,6 @@
gfx::Rect r(GetRenderText()->GetUpdatedCursorBounds());
r.Inset(-1, -1, -1, -1);
SchedulePaintInRect(r);
- PlatformUpdateSystemCaret();
}
void NativeTextfieldViews::PaintTextAndCursor(gfx::Canvas* canvas) {
@@ -1543,33 +1535,4 @@
}
}
-
-void NativeTextfieldViews::PlatformUpdateSystemCaret() {
-#if defined(OS_WIN)
- if (!GetRenderText()->focused())
- return;
-
- // Move an invisible system caret to this location for accessibility.
- if (!is_drop_cursor_visible_) {
- gfx::Rect caret_rect(GetRenderText()->GetUpdatedCursorBounds());
- caret_rect = ConvertRectToWidget(caret_rect);
- caret_rect += GetWidget()->GetClientAreaBoundsInScreen().OffsetFromOrigin();
- if (caret_rect != last_caret_rect_) {
- base::win::SetInvisibleSystemCaretRect(HWNDForView(this), caret_rect);
- last_caret_rect_ = caret_rect;
- }
- } else {
- DestroyCaret();
- last_caret_rect_ = gfx::Rect();
- }
-#endif
-}
-
-void NativeTextfieldViews::PlatformHideSystemCaret() {
-#if defined(OS_WIN)
- DestroyCaret();
- last_caret_rect_ = gfx::Rect();
-#endif
-}
-
} // namespace views
« no previous file with comments | « trunk/src/ui/views/controls/textfield/native_textfield_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698