| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 if (FrameView* view = m_frame->view()) { | 537 if (FrameView* view = m_frame->view()) { |
| 538 LayoutPoint vPoint = view->windowToContents(event.event().position()); | 538 LayoutPoint vPoint = view->windowToContents(event.event().position()); |
| 539 if (!extendSelection && m_frame->selection()->contains(vPoint)) { | 539 if (!extendSelection && m_frame->selection()->contains(vPoint)) { |
| 540 m_mouseDownWasSingleClickInSelection = true; | 540 m_mouseDownWasSingleClickInSelection = true; |
| 541 return false; | 541 return false; |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 | 544 |
| 545 VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(event.loc
alPoint())); | 545 VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(event.loc
alPoint())); |
| 546 if (visiblePos.isNull()) | 546 if (visiblePos.isNull()) |
| 547 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(innerNode.raw()
), DOWNSTREAM); | 547 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(innerNode), DOW
NSTREAM); |
| 548 Position pos = visiblePos.deepEquivalent(); | 548 Position pos = visiblePos.deepEquivalent(); |
| 549 | 549 |
| 550 VisibleSelection newSelection = m_frame->selection()->selection(); | 550 VisibleSelection newSelection = m_frame->selection()->selection(); |
| 551 TextGranularity granularity = CharacterGranularity; | 551 TextGranularity granularity = CharacterGranularity; |
| 552 | 552 |
| 553 if (extendSelection && newSelection.isCaretOrRange()) { | 553 if (extendSelection && newSelection.isCaretOrRange()) { |
| 554 VisibleSelection selectionInUserSelectAll = expandSelectionToRespectUser
SelectAll(innerNode, VisibleSelection(pos)); | 554 VisibleSelection selectionInUserSelectAll = expandSelectionToRespectUser
SelectAll(innerNode, VisibleSelection(pos)); |
| 555 if (selectionInUserSelectAll.isRange()) { | 555 if (selectionInUserSelectAll.isRange()) { |
| 556 if (comparePositions(selectionInUserSelectAll.start(), newSelection.
start()) < 0) | 556 if (comparePositions(selectionInUserSelectAll.start(), newSelection.
start()) < 0) |
| 557 pos = selectionInUserSelectAll.start(); | 557 pos = selectionInUserSelectAll.start(); |
| (...skipping 3443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4001 unsigned EventHandler::accessKeyModifiers() | 4001 unsigned EventHandler::accessKeyModifiers() |
| 4002 { | 4002 { |
| 4003 #if OS(DARWIN) | 4003 #if OS(DARWIN) |
| 4004 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4004 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 4005 #else | 4005 #else |
| 4006 return PlatformEvent::AltKey; | 4006 return PlatformEvent::AltKey; |
| 4007 #endif | 4007 #endif |
| 4008 } | 4008 } |
| 4009 | 4009 |
| 4010 } // namespace WebCore | 4010 } // namespace WebCore |
| OLD | NEW |