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

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

Issue 2674253004: [refactor] Remove WebWidget::applyReplacementRange (Closed)
Patch Set: more refactoring Created 3 years, 10 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; 698 DLOG(ERROR) << "Could not retrieve character rectangle at " << i;
699 return false; 699 return false;
700 } 700 }
701 result[i] = webrect; 701 result[i] = webrect;
702 } 702 }
703 703
704 bounds.swap(result); 704 bounds.swap(result);
705 return true; 705 return true;
706 } 706 }
707 707
708 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
709 // code needs to be refactored (http://crbug.com/629721).
710 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) {
711 if (LocalFrame* frame = focusedLocalFrameInWidget()) {
dcheng 2017/02/07 07:58:42 Is the reason it's OK to lose this call is because
EhsanK 2017/02/07 17:14:47 Yes. The IME IPC from RenderWidget of local root e
712 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems
713 // silly. What is going on here?
714 WebLocalFrameImpl::fromFrame(frame)->selectRange(range);
715 }
716 }
717
718 void WebFrameWidgetImpl::setRemoteViewportIntersection( 708 void WebFrameWidgetImpl::setRemoteViewportIntersection(
719 const WebRect& viewportIntersection) { 709 const WebRect& viewportIntersection) {
720 // Remote viewports are only applicable to local frames with remote ancestors. 710 // Remote viewports are only applicable to local frames with remote ancestors.
721 DCHECK(m_localRoot->parent() && m_localRoot->parent()->isWebRemoteFrame()); 711 DCHECK(m_localRoot->parent() && m_localRoot->parent()->isWebRemoteFrame());
722 712
723 if (m_localRoot->frameView()) { 713 if (m_localRoot->frameView()) {
724 m_localRoot->frameView()->setViewportIntersectionFromParent( 714 m_localRoot->frameView()->setViewportIntersectionFromParent(
725 viewportIntersection); 715 viewportIntersection);
726 } 716 }
727 } 717 }
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 return nullptr; 1131 return nullptr;
1142 } 1132 }
1143 1133
1144 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1134 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1145 if (!m_imeAcceptEvents) 1135 if (!m_imeAcceptEvents)
1146 return nullptr; 1136 return nullptr;
1147 return focusedLocalFrameInWidget(); 1137 return focusedLocalFrameInWidget();
1148 } 1138 }
1149 1139
1150 } // namespace blink 1140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698