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 * Copyright (C) 2015 Google Inc. All rights reserved. | 5 * Copyright (C) 2015 Google Inc. All rights reserved. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return createVisiblePosition( | 116 return createVisiblePosition( |
117 fromPositionInDOMTree<EditingInFlatTreeStrategy>(hitTestResult.innerNode
()->layoutObject()->positionForPoint(hitTestResult.localPoint()))); | 117 fromPositionInDOMTree<EditingInFlatTreeStrategy>(hitTestResult.innerNode
()->layoutObject()->positionForPoint(hitTestResult.localPoint()))); |
118 } | 118 } |
119 | 119 |
120 } // namespace | 120 } // namespace |
121 | 121 |
122 bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithH
itTestResults& event) | 122 bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithH
itTestResults& event) |
123 { | 123 { |
124 TRACE_EVENT0("blink", "SelectionController::handleMousePressEventSingleClick
"); | 124 TRACE_EVENT0("blink", "SelectionController::handleMousePressEventSingleClick
"); |
125 | 125 |
126 m_frame->document()->updateLayoutIgnorePendingStylesheets(); | 126 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
127 Node* innerNode = event.innerNode(); | 127 Node* innerNode = event.innerNode(); |
128 if (!(innerNode && innerNode->layoutObject() && m_mouseDownMayStartSelect)) | 128 if (!(innerNode && innerNode->layoutObject() && m_mouseDownMayStartSelect)) |
129 return false; | 129 return false; |
130 | 130 |
131 // Extend the selection if the Shift key is down, unless the click is in a l
ink. | 131 // Extend the selection if the Shift key is down, unless the click is in a l
ink. |
132 bool extendSelection = event.event().shiftKey() && !event.isOverLink(); | 132 bool extendSelection = event.event().shiftKey() && !event.isOverLink(); |
133 | 133 |
134 // Don't restart the selection when the mouse is pressed on an | 134 // Don't restart the selection when the mouse is pressed on an |
135 // existing selection so we can allow for text dragging. | 135 // existing selection so we can allow for text dragging. |
136 if (FrameView* view = m_frame->view()) { | 136 if (FrameView* view = m_frame->view()) { |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 { | 629 { |
630 return m_frame->selection(); | 630 return m_frame->selection(); |
631 } | 631 } |
632 | 632 |
633 bool isLinkSelection(const MouseEventWithHitTestResults& event) | 633 bool isLinkSelection(const MouseEventWithHitTestResults& event) |
634 { | 634 { |
635 return event.event().altKey() && event.isOverLink(); | 635 return event.event().altKey() && event.isOverLink(); |
636 } | 636 } |
637 | 637 |
638 } // namespace blink | 638 } // namespace blink |
OLD | NEW |