Commit 79819af0 authored by ekaramad's avatar ekaramad Committed by Commit bot

Fix a bug in TextInputManager::GetCompositionRangeInfo

After the CL: https://codereview.chromium.org/2235283003 which implemented composition
range information tracking on the browser side for Mac, the method TIM::GetCompositionRangeInfo
was changed to take the RenderWidgetHostView for which the information is required. However,
the view pointer is not actually used and the method returns the stored information for |active_view_|
instead.

BUG=NONE

Review-Url: https://codereview.chromium.org/2814443003
Cr-Commit-Position: refs/heads/master@{#463391}
parent 460ffe75
......@@ -72,11 +72,7 @@ const TextInputManager::SelectionRegion* TextInputManager::GetSelectionRegion(
}
const TextInputManager::CompositionRangeInfo*
TextInputManager::GetCompositionRangeInfo(
RenderWidgetHostViewBase* view) const {
DCHECK(!view || IsRegistered(view));
if (!view)
view = active_view_;
TextInputManager::GetCompositionRangeInfo() const {
return active_view_ ? &composition_range_info_map_.at(active_view_) : nullptr;
}
......
......@@ -157,10 +157,8 @@ class CONTENT_EXPORT TextInputManager {
RenderWidgetHostViewBase* view = nullptr) const;
// Returns the composition range and character bounds information for the
// |view|. If |view| == nullptr, it will assume |active_view_| and return its
// state. If |active_view_| == nullptr, this method will return nullptr.
const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo(
RenderWidgetHostViewBase* view = nullptr) const;
// |active_view_|. Returns nullptr If |active_view_| == nullptr.
const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo() const;
// The following method returns the text selection state for the given |view|.
// If |view| == nullptr, it will assume |active_view_| and return its state.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment