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

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

Issue 2827913002: Change WebLocalFrame::SpellingMarkerOffsetsForTest to a local function in WebFrameTest (Closed)
Patch Set: Created 3 years, 8 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 // needs to be audited. see http://crbug.com/590369 for more details. 1108 // needs to be audited. see http://crbug.com/590369 for more details.
1109 GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); 1109 GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
1110 1110
1111 GetFrame()->GetSpellChecker().ReplaceMisspelledRange(text); 1111 GetFrame()->GetSpellChecker().ReplaceMisspelledRange(text);
1112 } 1112 }
1113 1113
1114 void WebLocalFrameImpl::RemoveSpellingMarkers() { 1114 void WebLocalFrameImpl::RemoveSpellingMarkers() {
1115 GetFrame()->GetSpellChecker().RemoveSpellingMarkers(); 1115 GetFrame()->GetSpellChecker().RemoveSpellingMarkers();
1116 } 1116 }
1117 1117
1118 void WebLocalFrameImpl::SpellingMarkerOffsetsForTest(
1119 WebVector<unsigned>* offsets) {
1120 Vector<unsigned> result;
1121 const DocumentMarkerVector& document_markers =
1122 GetFrame()->GetDocument()->Markers().Markers();
1123 for (size_t i = 0; i < document_markers.size(); ++i)
1124 result.push_back(document_markers[i]->StartOffset());
1125 offsets->Assign(result);
1126 }
1127
1128 void WebLocalFrameImpl::RemoveSpellingMarkersUnderWords( 1118 void WebLocalFrameImpl::RemoveSpellingMarkersUnderWords(
1129 const WebVector<WebString>& words) { 1119 const WebVector<WebString>& words) {
1130 Vector<String> converted_words; 1120 Vector<String> converted_words;
1131 converted_words.Append(words.Data(), words.size()); 1121 converted_words.Append(words.Data(), words.size());
1132 GetFrame()->RemoveSpellingMarkersUnderWords(converted_words); 1122 GetFrame()->RemoveSpellingMarkersUnderWords(converted_words);
1133 } 1123 }
1134 1124
1135 bool WebLocalFrameImpl::HasSelection() const { 1125 bool WebLocalFrameImpl::HasSelection() const {
1136 WebPluginContainerImpl* plugin_container = 1126 WebPluginContainerImpl* plugin_container =
1137 PluginContainerFromFrame(GetFrame()); 1127 PluginContainerFromFrame(GetFrame());
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { 2575 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const {
2586 return *text_checker_client_; 2576 return *text_checker_client_;
2587 } 2577 }
2588 2578
2589 void WebLocalFrameImpl::SetTextCheckClient( 2579 void WebLocalFrameImpl::SetTextCheckClient(
2590 WebTextCheckClient* text_check_client) { 2580 WebTextCheckClient* text_check_client) {
2591 text_check_client_ = text_check_client; 2581 text_check_client_ = text_check_client;
2592 } 2582 }
2593 2583
2594 } // namespace blink 2584 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698