OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
6 * Copyright (C) 2015 Google Inc. All rights reserved. | 6 * Copyright (C) 2015 Google Inc. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 17 matching lines...) Expand all Loading... |
28 */ | 28 */ |
29 | 29 |
30 #include "core/editing/SelectionController.h" | 30 #include "core/editing/SelectionController.h" |
31 | 31 |
32 #include "core/HTMLNames.h" | 32 #include "core/HTMLNames.h" |
33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
34 #include "core/editing/EditingUtilities.h" | 34 #include "core/editing/EditingUtilities.h" |
35 #include "core/editing/Editor.h" | 35 #include "core/editing/Editor.h" |
36 #include "core/editing/FrameSelection.h" | 36 #include "core/editing/FrameSelection.h" |
37 #include "core/editing/RenderedPosition.h" | 37 #include "core/editing/RenderedPosition.h" |
| 38 #include "core/editing/TextSuggestionController.h" |
38 #include "core/editing/iterators/TextIterator.h" | 39 #include "core/editing/iterators/TextIterator.h" |
39 #include "core/editing/markers/DocumentMarkerController.h" | 40 #include "core/editing/markers/DocumentMarkerController.h" |
40 #include "core/events/Event.h" | 41 #include "core/events/Event.h" |
41 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
42 #include "core/frame/LocalFrameView.h" | 43 #include "core/frame/LocalFrameView.h" |
43 #include "core/frame/Settings.h" | 44 #include "core/frame/Settings.h" |
44 #include "core/input/EventHandler.h" | 45 #include "core/input/EventHandler.h" |
45 #include "core/layout/LayoutView.h" | 46 #include "core/layout/LayoutView.h" |
46 #include "core/layout/api/LayoutViewItem.h" | 47 #include "core/layout/api/LayoutViewItem.h" |
47 #include "core/page/FocusController.h" | 48 #include "core/page/FocusController.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 UpdateSelectionForMouseDownDispatchingSelectStart( | 273 UpdateSelectionForMouseDownDispatchingSelectStart( |
273 inner_node, | 274 inner_node, |
274 ExpandSelectionToRespectUserSelectAll( | 275 ExpandSelectionToRespectUserSelectAll( |
275 inner_node, CreateVisibleSelection( | 276 inner_node, CreateVisibleSelection( |
276 SelectionInFlatTree::Builder() | 277 SelectionInFlatTree::Builder() |
277 .Collapse(visible_pos.ToPositionWithAffinity()) | 278 .Collapse(visible_pos.ToPositionWithAffinity()) |
278 .Build())), | 279 .Build())), |
279 kCharacterGranularity, | 280 kCharacterGranularity, |
280 is_handle_visible ? HandleVisibility::kVisible | 281 is_handle_visible ? HandleVisibility::kVisible |
281 : HandleVisibility::kNotVisible); | 282 : HandleVisibility::kNotVisible); |
| 283 |
| 284 frame_->GetTextSuggestionController().HandlePotentialMisspelledWordTap(); |
| 285 |
282 return false; | 286 return false; |
283 } | 287 } |
284 | 288 |
285 static bool TargetPositionIsBeforeDragStartPosition( | 289 static bool TargetPositionIsBeforeDragStartPosition( |
286 Node* drag_start_node, | 290 Node* drag_start_node, |
287 const LayoutPoint& drag_start_point, | 291 const LayoutPoint& drag_start_point, |
288 Node* target, | 292 Node* target, |
289 const LayoutPoint& hit_test_point) { | 293 const LayoutPoint& hit_test_point) { |
290 const PositionInFlatTree& target_position = | 294 const PositionInFlatTree& target_position = |
291 ToPositionInFlatTree(target->GetLayoutObject() | 295 ToPositionInFlatTree(target->GetLayoutObject() |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 | 1167 |
1164 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { | 1168 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { |
1165 bool is_mouse_down_on_link_or_image = | 1169 bool is_mouse_down_on_link_or_image = |
1166 event.IsOverLink() || event.GetHitTestResult().GetImage(); | 1170 event.IsOverLink() || event.GetHitTestResult().GetImage(); |
1167 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != | 1171 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != |
1168 0 && | 1172 0 && |
1169 !is_mouse_down_on_link_or_image; | 1173 !is_mouse_down_on_link_or_image; |
1170 } | 1174 } |
1171 | 1175 |
1172 } // namespace blink | 1176 } // namespace blink |
OLD | NEW |