| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 const String& str = PlainText( | 514 const String& str = PlainText( |
| 515 range, | 515 range, |
| 516 TextIteratorBehavior::Builder() | 516 TextIteratorBehavior::Builder() |
| 517 .SetEmitsObjectReplacementCharacter(HasEditableStyle(*inner_node)) | 517 .SetEmitsObjectReplacementCharacter(HasEditableStyle(*inner_node)) |
| 518 .Build()); | 518 .Build()); |
| 519 if (str.IsEmpty() || str.SimplifyWhiteSpace().ContainsOnlyWhitespace()) | 519 if (str.IsEmpty() || str.SimplifyWhiteSpace().ContainsOnlyWhitespace()) |
| 520 return false; | 520 return false; |
| 521 | 521 |
| 522 if (new_selection.RootEditableElement() && | 522 if (new_selection.RootEditableElement() && |
| 523 pos.DeepEquivalent() == VisiblePositionInFlatTree::LastPositionInNode( | 523 pos.DeepEquivalent() == VisiblePositionInFlatTree::LastPositionInNode( |
| 524 new_selection.RootEditableElement()) | 524 *new_selection.RootEditableElement()) |
| 525 .DeepEquivalent()) | 525 .DeepEquivalent()) |
| 526 return false; | 526 return false; |
| 527 | 527 |
| 528 visibility = HandleVisibility::kVisible; | 528 visibility = HandleVisibility::kVisible; |
| 529 } | 529 } |
| 530 | 530 |
| 531 if (append_trailing_whitespace == AppendTrailingWhitespace::kShouldAppend) | 531 if (append_trailing_whitespace == AppendTrailingWhitespace::kShouldAppend) |
| 532 new_selection.AppendTrailingWhitespace(); | 532 new_selection.AppendTrailingWhitespace(); |
| 533 | 533 |
| 534 return UpdateSelectionForMouseDownDispatchingSelectStart( | 534 return UpdateSelectionForMouseDownDispatchingSelectStart( |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 | 1211 |
| 1212 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { | 1212 bool IsExtendingSelection(const MouseEventWithHitTestResults& event) { |
| 1213 bool is_mouse_down_on_link_or_image = | 1213 bool is_mouse_down_on_link_or_image = |
| 1214 event.IsOverLink() || event.GetHitTestResult().GetImage(); | 1214 event.IsOverLink() || event.GetHitTestResult().GetImage(); |
| 1215 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != | 1215 return (event.Event().GetModifiers() & WebInputEvent::Modifiers::kShiftKey) != |
| 1216 0 && | 1216 0 && |
| 1217 !is_mouse_down_on_link_or_image; | 1217 !is_mouse_down_on_link_or_image; |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 } // namespace blink | 1220 } // namespace blink |
| OLD | NEW |