| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |