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

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

Issue 2316963003: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in InputMethodController::setComposit… (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 TRACE_EVENT0("blink", "WebLocalFrameImpl::setCompositionFromExistingText"); 1228 TRACE_EVENT0("blink", "WebLocalFrameImpl::setCompositionFromExistingText");
1229 if (!frame()->editor().canEdit()) 1229 if (!frame()->editor().canEdit())
1230 return false; 1230 return false;
1231 1231
1232 InputMethodController& inputMethodController = frame()->inputMethodControlle r(); 1232 InputMethodController& inputMethodController = frame()->inputMethodControlle r();
1233 inputMethodController.cancelComposition(); 1233 inputMethodController.cancelComposition();
1234 1234
1235 if (compositionStart == compositionEnd) 1235 if (compositionStart == compositionEnd)
1236 return true; 1236 return true;
1237 1237
1238 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
1239 // needs to be audited. See http://crbug.com/590369 for more details.
1240 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1241
1238 inputMethodController.setCompositionFromExistingText(CompositionUnderlineVec torBuilder(underlines), compositionStart, compositionEnd); 1242 inputMethodController.setCompositionFromExistingText(CompositionUnderlineVec torBuilder(underlines), compositionStart, compositionEnd);
1239 1243
1240 return true; 1244 return true;
1241 } 1245 }
1242 1246
1243 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after) 1247 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
1244 { 1248 {
1245 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete"); 1249 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
1246 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { 1250 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1247 plugin->extendSelectionAndDelete(before, after); 1251 plugin->extendSelectionAndDelete(before, after);
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2226 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2223 } else if (metric == "wasAlternateProtocolAvailable") { 2227 } else if (metric == "wasAlternateProtocolAvailable") {
2224 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2228 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2225 } else if (metric == "connectionInfo") { 2229 } else if (metric == "connectionInfo") {
2226 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2230 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2227 } 2231 }
2228 UseCounter::count(frame(), feature); 2232 UseCounter::count(frame(), feature);
2229 } 2233 }
2230 2234
2231 } // namespace blink 2235 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698