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

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

Issue 2640713002: Standardize ECursor enum value names (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « third_party/WebKit/Source/core/style/ComputedStyleConstants.h ('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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyleConstants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698