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

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

Issue 419563003: Adding a word to dictionary should remove spelling markers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed my own nit Created 6 years, 4 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 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 if (m_textFinder && m_textFinder->scopingInProgress()) { 1826 if (m_textFinder && m_textFinder->scopingInProgress()) {
1827 1827
1828 // There is a possibility that the frame being detached was the only 1828 // There is a possibility that the frame being detached was the only
1829 // pending one. We need to make sure final replies can be sent. 1829 // pending one. We need to make sure final replies can be sent.
1830 m_textFinder->flushCurrentScoping(); 1830 m_textFinder->flushCurrentScoping();
1831 1831
1832 m_textFinder->cancelPendingScopingEffort(); 1832 m_textFinder->cancelPendingScopingEffort();
1833 } 1833 }
1834 } 1834 }
1835 1835
1836 void WebLocalFrameImpl::removeSpellingMarkersUnderWords(const WebVector<WebStrin g>& words)
1837 {
1838 WTF::Vector<String> convertedWords(words.size());
tkent 2014/08/14 01:17:14 |WTF::Vector| should be |Vector|.
Klemen Forstnerič 2014/08/14 16:42:54 Done.
1839 std::copy(words.data(), words.data() + words.size(), std::begin(convertedWor ds));
tkent 2014/08/14 01:17:15 This works and is ok. However, convertedWords
Klemen Forstnerič 2014/08/14 16:42:54 You're right, it seems easier to understand. I've
1840
1841 frame()->spellChecker().removeSpellingMarkersUnderWords(convertedWords);
1842 }
1843
1836 WebLocalFrameImpl* WebLocalFrameImpl::activeMatchFrame() const 1844 WebLocalFrameImpl* WebLocalFrameImpl::activeMatchFrame() const
1837 { 1845 {
1838 ASSERT(!parent()); 1846 ASSERT(!parent());
1839 1847
1840 if (m_textFinder) 1848 if (m_textFinder)
1841 return m_textFinder->activeMatchFrame(); 1849 return m_textFinder->activeMatchFrame();
1842 return 0; 1850 return 0;
1843 } 1851 }
1844 1852
1845 blink::Range* WebLocalFrameImpl::activeMatch() const 1853 blink::Range* WebLocalFrameImpl::activeMatch() const
(...skipping 23 matching lines...) Expand all
1869 1877
1870 void WebLocalFrameImpl::invalidateAll() const 1878 void WebLocalFrameImpl::invalidateAll() const
1871 { 1879 {
1872 ASSERT(frame() && frame()->view()); 1880 ASSERT(frame() && frame()->view());
1873 FrameView* view = frame()->view(); 1881 FrameView* view = frame()->view();
1874 view->invalidateRect(view->frameRect()); 1882 view->invalidateRect(view->frameRect());
1875 invalidateScrollbar(); 1883 invalidateScrollbar();
1876 } 1884 }
1877 1885
1878 } // namespace blink 1886 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698