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

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

Issue 2240333002: ABANDONED CL: Let's remove spellchecking code and see what tests (if any) break. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 3729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3740 UserGestureIndicator gesture(DefinitelyProcessingNewUserGesture); 3740 UserGestureIndicator gesture(DefinitelyProcessingNewUserGesture);
3741 m_page->dragController().performDrag(&dragData); 3741 m_page->dragController().performDrag(&dragData);
3742 3742
3743 m_dragOperation = WebDragOperationNone; 3743 m_dragOperation = WebDragOperationNone;
3744 m_currentDragData = nullptr; 3744 m_currentDragData = nullptr;
3745 } 3745 }
3746 3746
3747 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers) 3747 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers)
3748 { 3748 {
3749 Vector<uint32_t> result; 3749 Vector<uint32_t> result;
3750 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) {
3751 if (!frame->isLocalFrame())
3752 continue;
3753 const DocumentMarkerVector& documentMarkers = toLocalFrame(frame)->docum ent()->markers().markers();
3754 for (size_t i = 0; i < documentMarkers.size(); ++i)
3755 result.append(documentMarkers[i]->hash());
3756 }
3757 markers->assign(result); 3750 markers->assign(result);
3758 } 3751 }
3759 3752
3760 void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& wo rds) 3753 void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& wo rds)
3761 { 3754 {
3762 Vector<String> convertedWords;
3763 convertedWords.append(words.data(), words.size());
3764
3765 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) {
3766 if (frame->isLocalFrame())
3767 toLocalFrame(frame)->removeSpellingMarkersUnderWords(convertedWords) ;
3768 }
3769 } 3755 }
3770 3756
3771 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int modifiers) 3757 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int modifiers)
3772 { 3758 {
3773 DCHECK(m_currentDragData); 3759 DCHECK(m_currentDragData);
3774 3760
3775 m_currentDragData->setModifiers(modifiers); 3761 m_currentDragData->setModifiers(modifiers);
3776 DragData dragData( 3762 DragData dragData(
3777 m_currentDragData.get(), 3763 m_currentDragData.get(),
3778 clientPoint, 3764 clientPoint,
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 return nullptr; 4585 return nullptr;
4600 return focusedFrame; 4586 return focusedFrame;
4601 } 4587 }
4602 4588
4603 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const 4589 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const
4604 { 4590 {
4605 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4591 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4606 } 4592 }
4607 4593
4608 } // namespace blink 4594 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698