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

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

Issue 476303002: Remove obsolete HitTestResult.targetNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/mac/WebSubstringUtil.mm » ('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) 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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent) 1206 Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent)
1207 { 1207 {
1208 TRACE_EVENT0("input", "WebViewImpl::bestTapNode"); 1208 TRACE_EVENT0("input", "WebViewImpl::bestTapNode");
1209 1209
1210 if (!m_page || !m_page->mainFrame()) 1210 if (!m_page || !m_page->mainFrame())
1211 return 0; 1211 return 0;
1212 1212
1213 // FIXME: Rely on earlier hit test instead of hit testing again. 1213 // FIXME: Rely on earlier hit test instead of hit testing again.
1214 GestureEventWithHitTestResults targetedEvent = 1214 GestureEventWithHitTestResults targetedEvent =
1215 m_page->deprecatedLocalMainFrame()->eventHandler().targetGestureEvent(ta pEvent, true); 1215 m_page->deprecatedLocalMainFrame()->eventHandler().targetGestureEvent(ta pEvent, true);
1216 Node* bestTouchNode = targetedEvent.hitTestResult().targetNode(); 1216 Node* bestTouchNode = targetedEvent.hitTestResult().innerNode();
1217 1217
1218 // We might hit something like an image map that has no renderer on it 1218 // We might hit something like an image map that has no renderer on it
1219 // Walk up the tree until we have a node with an attached renderer 1219 // Walk up the tree until we have a node with an attached renderer
1220 // FIXME: This wants to walk composed tree with NodeRenderingTraversal::pare nt(). 1220 // FIXME: This wants to walk composed tree with NodeRenderingTraversal::pare nt().
1221 while (bestTouchNode && !bestTouchNode->renderer()) 1221 while (bestTouchNode && !bestTouchNode->renderer())
1222 bestTouchNode = NodeRenderingTraversal::parent(bestTouchNode); 1222 bestTouchNode = NodeRenderingTraversal::parent(bestTouchNode);
1223 1223
1224 Node* cursorDefiningAncestor = 1224 Node* cursorDefiningAncestor =
1225 findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFra me()); 1225 findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFra me());
1226 // We show a highlight on tap only when the current node shows a hand cursor 1226 // We show a highlight on tap only when the current node shows a hand cursor
(...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4290 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4291 4291
4292 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4292 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4293 return false; 4293 return false;
4294 4294
4295 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4295 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4296 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4296 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4297 } 4297 }
4298 4298
4299 } // namespace blink 4299 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/mac/WebSubstringUtil.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698