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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 if (!cursorDefiningAncestor || !showsHandCursor(cursorDefiningAncestor, m_pa
ge->deprecatedLocalMainFrame())) { | 1219 if (!cursorDefiningAncestor || !showsHandCursor(cursorDefiningAncestor, m_pa
ge->deprecatedLocalMainFrame())) { |
1220 return 0; | 1220 return 0; |
1221 } | 1221 } |
1222 | 1222 |
1223 // We should pick the largest enclosing node with hand cursor set. We do thi
s by first jumping | 1223 // We should pick the largest enclosing node with hand cursor set. We do thi
s by first jumping |
1224 // up to cursorDefiningAncestor (which is already known to have hand cursor
set). Then we locate | 1224 // up to cursorDefiningAncestor (which is already known to have hand cursor
set). Then we locate |
1225 // the next cursor-defining ancestor up in the the tree and repeat the jumps
as long as the node | 1225 // the next cursor-defining ancestor up in the the tree and repeat the jumps
as long as the node |
1226 // has hand cursor set. | 1226 // has hand cursor set. |
1227 do { | 1227 do { |
1228 bestTouchNode = cursorDefiningAncestor; | 1228 bestTouchNode = cursorDefiningAncestor; |
1229 cursorDefiningAncestor = findCursorDefiningAncestor(bestTouchNode->paren
tNode(), m_page->deprecatedLocalMainFrame()); | 1229 cursorDefiningAncestor = findCursorDefiningAncestor(NodeRenderingTravers
al::parent(bestTouchNode), |
| 1230 m_page->deprecatedLocalMainFrame()); |
1230 } while (cursorDefiningAncestor && showsHandCursor(cursorDefiningAncestor, m
_page->deprecatedLocalMainFrame())); | 1231 } while (cursorDefiningAncestor && showsHandCursor(cursorDefiningAncestor, m
_page->deprecatedLocalMainFrame())); |
1231 | 1232 |
1232 return bestTouchNode; | 1233 return bestTouchNode; |
1233 } | 1234 } |
1234 | 1235 |
1235 void WebViewImpl::enableTapHighlightAtPoint(const PlatformGestureEvent& tapEvent
) | 1236 void WebViewImpl::enableTapHighlightAtPoint(const PlatformGestureEvent& tapEvent
) |
1236 { | 1237 { |
1237 Node* touchNode = bestTapNode(tapEvent); | 1238 Node* touchNode = bestTapNode(tapEvent); |
1238 | 1239 |
1239 WillBeHeapVector<RawPtrWillBeMember<Node> > highlightNodes; | 1240 WillBeHeapVector<RawPtrWillBeMember<Node> > highlightNodes; |
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4265 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4266 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4266 | 4267 |
4267 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4268 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4268 return false; | 4269 return false; |
4269 | 4270 |
4270 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4271 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4271 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4272 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4272 } | 4273 } |
4273 | 4274 |
4274 } // namespace blink | 4275 } // namespace blink |
OLD | NEW |