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

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

Issue 2674253004: [refactor] Remove WebWidget::applyReplacementRange (Closed)
Patch Set: Rebased 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; 689 DLOG(ERROR) << "Could not retrieve character rectangle at " << i;
690 return false; 690 return false;
691 } 691 }
692 result[i] = webrect; 692 result[i] = webrect;
693 } 693 }
694 694
695 bounds.swap(result); 695 bounds.swap(result);
696 return true; 696 return true;
697 } 697 }
698 698
699 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
700 // code needs to be refactored (http://crbug.com/629721).
701 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) {
702 if (LocalFrame* frame = focusedLocalFrameInWidget()) {
703 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems
704 // silly. What is going on here?
705 WebLocalFrameImpl::fromFrame(frame)->selectRange(range);
706 }
707 }
708
709 void WebFrameWidgetImpl::setRemoteViewportIntersection( 699 void WebFrameWidgetImpl::setRemoteViewportIntersection(
710 const WebRect& viewportIntersection) { 700 const WebRect& viewportIntersection) {
711 // Remote viewports are only applicable to local frames with remote ancestors. 701 // Remote viewports are only applicable to local frames with remote ancestors.
712 DCHECK(m_localRoot->parent() && m_localRoot->parent()->isWebRemoteFrame()); 702 DCHECK(m_localRoot->parent() && m_localRoot->parent()->isWebRemoteFrame());
713 703
714 if (m_localRoot->frameView()) { 704 if (m_localRoot->frameView()) {
715 m_localRoot->frameView()->setViewportIntersectionFromParent( 705 m_localRoot->frameView()->setViewportIntersectionFromParent(
716 viewportIntersection); 706 viewportIntersection);
717 } 707 }
718 } 708 }
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 return nullptr; 1122 return nullptr;
1133 } 1123 }
1134 1124
1135 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1125 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1136 if (!m_imeAcceptEvents) 1126 if (!m_imeAcceptEvents)
1137 return nullptr; 1127 return nullptr;
1138 return focusedLocalFrameInWidget(); 1128 return focusedLocalFrameInWidget();
1139 } 1129 }
1140 1130
1141 } // namespace blink 1131 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebInputMethodControllerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698