OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2311 } | 2311 } |
2312 #if OS(ANDROID) | 2312 #if OS(ANDROID) |
2313 bool shouldLongPressSelectWord = true; | 2313 bool shouldLongPressSelectWord = true; |
2314 #else | 2314 #else |
2315 bool shouldLongPressSelectWord = m_frame->settings() && m_frame->settings()-
>touchEditingEnabled(); | 2315 bool shouldLongPressSelectWord = m_frame->settings() && m_frame->settings()-
>touchEditingEnabled(); |
2316 #endif | 2316 #endif |
2317 if (shouldLongPressSelectWord) { | 2317 if (shouldLongPressSelectWord) { |
2318 IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.p
osition()); | 2318 IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.p
osition()); |
2319 HitTestResult result = hitTestResultAtPoint(hitTestPoint); | 2319 HitTestResult result = hitTestResultAtPoint(hitTestPoint); |
2320 Node* innerNode = result.innerNode(); | 2320 Node* innerNode = result.innerNode(); |
2321 if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable()
|| innerNode->isTextNode())) { | 2321 if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable()
|| innerNode->isTextNode() || innerNode->canStartSelection())) { |
2322 selectClosestWordFromHitTestResult(result, DontAppendTrailingWhitesp
ace); | 2322 selectClosestWordFromHitTestResult(result, DontAppendTrailingWhitesp
ace); |
2323 if (m_frame->selection().isRange()) { | 2323 if (m_frame->selection().isRange()) { |
2324 focusDocumentView(); | 2324 focusDocumentView(); |
2325 return true; | 2325 return true; |
2326 } | 2326 } |
2327 } | 2327 } |
2328 } | 2328 } |
2329 return sendContextMenuEventForGesture(targetedEvent); | 2329 return sendContextMenuEventForGesture(targetedEvent); |
2330 } | 2330 } |
2331 | 2331 |
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3874 unsigned EventHandler::accessKeyModifiers() | 3874 unsigned EventHandler::accessKeyModifiers() |
3875 { | 3875 { |
3876 #if OS(MACOSX) | 3876 #if OS(MACOSX) |
3877 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3877 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3878 #else | 3878 #else |
3879 return PlatformEvent::AltKey; | 3879 return PlatformEvent::AltKey; |
3880 #endif | 3880 #endif |
3881 } | 3881 } |
3882 | 3882 |
3883 } // namespace blink | 3883 } // namespace blink |
OLD | NEW |