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

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

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 8 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 | « Source/web/WebDevToolsAgentImpl.cpp ('k') | 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) 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 } 1298 }
1299 1299
1300 void WebLocalFrameImpl::setCaretVisible(bool visible) 1300 void WebLocalFrameImpl::setCaretVisible(bool visible)
1301 { 1301 {
1302 frame()->selection().setCaretVisible(visible); 1302 frame()->selection().setCaretVisible(visible);
1303 } 1303 }
1304 1304
1305 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport) 1305 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport)
1306 { 1306 {
1307 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping; 1307 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping;
1308 HitTestResult result(frame()->view()->viewportToContents(pointInViewport)); 1308 HitTestResult result(request, frame()->view()->viewportToContents(pointInVie wport));
1309 frame()->document()->layoutView()->layer()->hitTest(request, result); 1309 frame()->document()->layoutView()->layer()->hitTest(result);
1310 1310
1311 if (Node* node = result.innerNode()) 1311 if (Node* node = result.innerNode())
1312 return frame()->selection().selection().visiblePositionRespectingEditing Boundary(result.localPoint(), node); 1312 return frame()->selection().selection().visiblePositionRespectingEditing Boundary(result.localPoint(), node);
1313 return VisiblePosition(); 1313 return VisiblePosition();
1314 } 1314 }
1315 1315
1316 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() 1316 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported()
1317 { 1317 {
1318 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo de(frame(), WebNode(frame()->document()->focusedElement())); 1318 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo de(frame(), WebNode(frame()->document()->focusedElement()));
1319 if (container && container->supportsInputMethod()) 1319 if (container && container->supportsInputMethod())
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 { 2086 {
2087 m_frameWidget = frameWidget; 2087 m_frameWidget = frameWidget;
2088 } 2088 }
2089 2089
2090 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const 2090 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const
2091 { 2091 {
2092 return m_frameWidget; 2092 return m_frameWidget;
2093 } 2093 }
2094 2094
2095 } // namespace blink 2095 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698