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

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

Issue 2199523002: Convert WebRange to be a simple pair of numbers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot the exports. 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 | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | 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) 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } 892 }
893 result[i] = webrect; 893 result[i] = webrect;
894 } 894 }
895 bounds.swap(result); 895 bounds.swap(result);
896 return true; 896 return true;
897 } 897 }
898 898
899 void WebFrameWidgetImpl::applyReplacementRange(int start, int length) 899 void WebFrameWidgetImpl::applyReplacementRange(int start, int length)
900 { 900 {
901 if (LocalFrame* frame = focusedLocalFrameInWidget()) { 901 if (LocalFrame* frame = focusedLocalFrameInWidget()) {
902 WebLocalFrameImpl* webLocalFrame = WebLocalFrameImpl::fromFrame(frame); 902 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems
903 WebRange webrange = WebRange::fromDocumentRange(webLocalFrame, start, le ngth); 903 // silly. What is going on here?
904 if (!webrange.isNull()) 904 WebLocalFrameImpl::fromFrame(frame)->selectRange(WebRange(start, length) );
905 webLocalFrame->selectRange(webrange);
906 } 905 }
907 } 906 }
908 907
909 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event) 908 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, const WebMouseE vent& event)
910 { 909 {
911 // FIXME: WebWidget doesn't have the method below. 910 // FIXME: WebWidget doesn't have the method below.
912 // m_client->setMouseOverURL(WebURL()); 911 // m_client->setMouseOverURL(WebURL());
913 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); 912 PageWidgetEventHandler::handleMouseLeave(mainFrame, event);
914 } 913 }
915 914
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 } 1458 }
1460 1459
1461 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const 1460 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const
1462 { 1461 {
1463 if (!m_imeAcceptEvents) 1462 if (!m_imeAcceptEvents)
1464 return nullptr; 1463 return nullptr;
1465 return focusedLocalFrameInWidget(); 1464 return focusedLocalFrameInWidget();
1466 } 1465 }
1467 1466
1468 } // namespace blink 1467 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698