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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 scroll = mainFrameImpl()->frameView()->rootFrameToContents(scroll); | 1385 scroll = mainFrameImpl()->frameView()->rootFrameToContents(scroll); |
1386 scroll = page()->frameHost().visualViewport().clampDocumentOffsetAtScale( | 1386 scroll = page()->frameHost().visualViewport().clampDocumentOffsetAtScale( |
1387 scroll, scale); | 1387 scroll, scale); |
1388 } | 1388 } |
1389 | 1389 |
1390 static Node* findCursorDefiningAncestor(Node* node, LocalFrame* frame) { | 1390 static Node* findCursorDefiningAncestor(Node* node, LocalFrame* frame) { |
1391 // Go up the tree to find the node that defines a mouse cursor style | 1391 // Go up the tree to find the node that defines a mouse cursor style |
1392 while (node) { | 1392 while (node) { |
1393 if (node->layoutObject()) { | 1393 if (node->layoutObject()) { |
1394 ECursor cursor = node->layoutObject()->style()->cursor(); | 1394 ECursor cursor = node->layoutObject()->style()->cursor(); |
1395 if (cursor != ECursor::Auto || | 1395 if (cursor != ECursor::kAuto || |
1396 frame->eventHandler().useHandCursor(node, node->isLink())) | 1396 frame->eventHandler().useHandCursor(node, node->isLink())) |
1397 break; | 1397 break; |
1398 } | 1398 } |
1399 node = LayoutTreeBuilderTraversal::parent(*node); | 1399 node = LayoutTreeBuilderTraversal::parent(*node); |
1400 } | 1400 } |
1401 | 1401 |
1402 return node; | 1402 return node; |
1403 } | 1403 } |
1404 | 1404 |
1405 static bool showsHandCursor(Node* node, LocalFrame* frame) { | 1405 static bool showsHandCursor(Node* node, LocalFrame* frame) { |
1406 if (!node || !node->layoutObject()) | 1406 if (!node || !node->layoutObject()) |
1407 return false; | 1407 return false; |
1408 | 1408 |
1409 ECursor cursor = node->layoutObject()->style()->cursor(); | 1409 ECursor cursor = node->layoutObject()->style()->cursor(); |
1410 return cursor == ECursor::Pointer || | 1410 return cursor == ECursor::kPointer || |
1411 (cursor == ECursor::Auto && | 1411 (cursor == ECursor::kAuto && |
1412 frame->eventHandler().useHandCursor(node, node->isLink())); | 1412 frame->eventHandler().useHandCursor(node, node->isLink())); |
1413 } | 1413 } |
1414 | 1414 |
1415 Node* WebViewImpl::bestTapNode( | 1415 Node* WebViewImpl::bestTapNode( |
1416 const GestureEventWithHitTestResults& targetedTapEvent) { | 1416 const GestureEventWithHitTestResults& targetedTapEvent) { |
1417 TRACE_EVENT0("input", "WebViewImpl::bestTapNode"); | 1417 TRACE_EVENT0("input", "WebViewImpl::bestTapNode"); |
1418 | 1418 |
1419 if (!m_page || !m_page->mainFrame()) | 1419 if (!m_page || !m_page->mainFrame()) |
1420 return nullptr; | 1420 return nullptr; |
1421 | 1421 |
(...skipping 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
4192 return nullptr; | 4192 return nullptr; |
4193 return focusedFrame; | 4193 return focusedFrame; |
4194 } | 4194 } |
4195 | 4195 |
4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4198 } | 4198 } |
4199 | 4199 |
4200 } // namespace blink | 4200 } // namespace blink |
OLD | NEW |