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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } | 914 } |
915 | 915 |
916 if (Selection().ComputeVisibleSelectionInFlatTree() != | 916 if (Selection().ComputeVisibleSelectionInFlatTree() != |
917 CreateVisibleSelection(builder.Build())) { | 917 CreateVisibleSelection(builder.Build())) { |
918 Selection().SetSelection(builder.Build()); | 918 Selection().SetSelection(builder.Build()); |
919 } | 919 } |
920 | 920 |
921 handled = true; | 921 handled = true; |
922 } | 922 } |
923 | 923 |
924 Selection().NotifyLayoutObjectOfSelectionChange(kUserTriggered); | 924 Selection().NotifyTextControlOfSelectionChange(kUserTriggered); |
925 | 925 |
926 Selection().SelectFrameElementInParentIfFullySelected(); | 926 Selection().SelectFrameElementInParentIfFullySelected(); |
927 | 927 |
928 if (event.Event().button == WebPointerProperties::Button::kMiddle && | 928 if (event.Event().button == WebPointerProperties::Button::kMiddle && |
929 !event.IsOverLink()) { | 929 !event.IsOverLink()) { |
930 // Ignore handled, since we want to paste to where the caret was placed | 930 // Ignore handled, since we want to paste to where the caret was placed |
931 // anyway. | 931 // anyway. |
932 handled = HandlePasteGlobalSelection(event.Event()) || handled; | 932 handled = HandlePasteGlobalSelection(event.Event()) || handled; |
933 } | 933 } |
934 | 934 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 | 1134 |
1135 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { | 1135 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { |
1136 bool is_mouse_down_on_link_or_image = | 1136 bool is_mouse_down_on_link_or_image = |
1137 event.IsOverLink() || event.GetHitTestResult().GetImage(); | 1137 event.IsOverLink() || event.GetHitTestResult().GetImage(); |
1138 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != | 1138 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != |
1139 0 && | 1139 0 && |
1140 !is_mouse_down_on_link_or_image; | 1140 !is_mouse_down_on_link_or_image; |
1141 } | 1141 } |
1142 | 1142 |
1143 } // namespace blink | 1143 } // namespace blink |
OLD | NEW |