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

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

Issue 2291943002: Ensure clean layout for spellchecker (Closed)
Patch Set: Fix broken test 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/spellcheck/SpellChecker.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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 1061
1062 bool WebLocalFrameImpl::isSpellCheckingEnabled() const 1062 bool WebLocalFrameImpl::isSpellCheckingEnabled() const
1063 { 1063 {
1064 return frame()->spellChecker().isSpellCheckingEnabled(); 1064 return frame()->spellChecker().isSpellCheckingEnabled();
1065 } 1065 }
1066 1066
1067 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement) 1067 void WebLocalFrameImpl::requestTextChecking(const WebElement& webElement)
1068 { 1068 {
1069 if (webElement.isNull()) 1069 if (webElement.isNull())
1070 return; 1070 return;
1071
1072 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
1073 // see http://crbug.com/590369 for more details.
1074 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1075
1076 DocumentLifecycle::DisallowTransitionScope(frame()->document()->lifecycle()) ;
1077
1071 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element> ()); 1078 frame()->spellChecker().requestTextChecking(*webElement.constUnwrap<Element> ());
1072 } 1079 }
1073 1080
1074 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) 1081 void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text)
1075 { 1082 {
1076 // If this caret selection has two or more markers, this function replace th e range covered by the first marker with the specified word as Microsoft Word do es. 1083 // If this caret selection has two or more markers, this function replace th e range covered by the first marker with the specified word as Microsoft Word do es.
1077 if (pluginContainerFromFrame(frame())) 1084 if (pluginContainerFromFrame(frame()))
1078 return; 1085 return;
1079 frame()->spellChecker().replaceMisspelledRange(text); 1086 frame()->spellChecker().replaceMisspelledRange(text);
1080 } 1087 }
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2196 } else if (metric == "wasAlternateProtocolAvailable") { 2203 } else if (metric == "wasAlternateProtocolAvailable") {
2197 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2198 } else if (metric == "connectionInfo") { 2205 } else if (metric == "connectionInfo") {
2199 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2206 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2200 } 2207 }
2201 UseCounter::count(frame(), feature); 2208 UseCounter::count(frame(), feature);
2202 } 2209 }
2203 2210
2204 } // namespace blink 2211 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698