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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2020973002: Reland: Fix setComposingText with empty text when newCursorPosition != 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a unit test. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 if (!editable) 1174 if (!editable)
1175 return; 1175 return;
1176 1176
1177 VisiblePosition position = visiblePositionForViewportPoint(pointInViewport); 1177 VisiblePosition position = visiblePositionForViewportPoint(pointInViewport);
1178 frame()->selection().moveTo(position, UserTriggered); 1178 frame()->selection().moveTo(position, UserTriggered);
1179 } 1179 }
1180 1180
1181 bool WebLocalFrameImpl::setEditableSelectionOffsets(int start, int end) 1181 bool WebLocalFrameImpl::setEditableSelectionOffsets(int start, int end)
1182 { 1182 {
1183 TRACE_EVENT0("blink", "WebLocalFrameImpl::setEditableSelectionOffsets"); 1183 TRACE_EVENT0("blink", "WebLocalFrameImpl::setEditableSelectionOffsets");
1184 return frame()->inputMethodController().setEditableSelectionOffsets(PlainTex tRange(start, end)); 1184 return frame()->inputMethodController().setEditableSelectionOffsets(start, e nd);
1185 } 1185 }
1186 1186
1187 bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) 1187 bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines)
1188 { 1188 {
1189 TRACE_EVENT0("blink", "WebLocalFrameImpl::setCompositionFromExistingText"); 1189 TRACE_EVENT0("blink", "WebLocalFrameImpl::setCompositionFromExistingText");
1190 if (!frame()->editor().canEdit()) 1190 if (!frame()->editor().canEdit())
1191 return false; 1191 return false;
1192 1192
1193 InputMethodController& inputMethodController = frame()->inputMethodControlle r(); 1193 InputMethodController& inputMethodController = frame()->inputMethodControlle r();
1194 inputMethodController.cancelComposition(); 1194 inputMethodController.cancelComposition();
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 return WebSandboxFlags::None; 2092 return WebSandboxFlags::None;
2093 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2093 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2094 } 2094 }
2095 2095
2096 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2096 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2097 { 2097 {
2098 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2098 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2099 } 2099 }
2100 2100
2101 } // namespace blink 2101 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698