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

Unified Diff: third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp

Issue 2910223003: [refactor] - Rename and Move WebWidget::CaretOrSelectionRange to WebInputMethodController::GetSelec… (Closed)
Patch Set: Rebase Created 3 years, 5 months 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
Index: third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
diff --git a/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp b/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
index ca88ac0c0da3056f83952947762107a9d7e407d3..add8980677a26631e790d15e98e6c70e8d3d734d 100644
--- a/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
@@ -5,6 +5,7 @@
#include "core/exported/WebInputMethodControllerImpl.h"
#include "core/InputTypeNames.h"
+#include "core/dom/Document.h"
#include "core/dom/UserGestureIndicator.h"
#include "core/editing/CompositionUnderlineVectorBuilder.h"
#include "core/editing/EditingUtilities.h"
@@ -138,6 +139,14 @@ WebTextInputType WebInputMethodControllerImpl::TextInputType() {
return GetFrame()->GetInputMethodController().TextInputType();
}
+WebRange WebInputMethodControllerImpl::GetSelectionOffsets() const {
+ // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
+
+ return GetFrame()->GetInputMethodController().GetSelectionOffsets();
+}
+
LocalFrame* WebInputMethodControllerImpl::GetFrame() const {
return web_frame_->GetFrame();
}

Powered by Google App Engine
This is Rietveld 408576698