Chromium Code Reviews| 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 * | 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 if (result.GetScrollbar()) { | 538 if (result.GetScrollbar()) { |
| 539 return PointerCursor(); | 539 return PointerCursor(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 const bool is_over_link = | 542 const bool is_over_link = |
| 543 !GetSelectionController().MouseDownMayStartSelect() && | 543 !GetSelectionController().MouseDownMayStartSelect() && |
| 544 result.IsOverLink(); | 544 result.IsOverLink(); |
| 545 if (UseHandCursor(node, is_over_link)) | 545 if (UseHandCursor(node, is_over_link)) |
| 546 return HandCursor(); | 546 return HandCursor(); |
| 547 | 547 |
| 548 // During selection, use an I-beam no matter what we're over. | 548 // During selection, use an I-beam no matter what we're over. |
|
hugoh_UTC2
2017/07/11 09:36:39
http://crbug.com/735852 shows that this comment is
| |
| 549 // If a drag may be starting or we're capturing mouse events for a particular | 549 // If a drag may be starting or we're capturing mouse events for a particular |
| 550 // node, don't treat this as a selection. Note calling | 550 // node, don't treat this as a selection. Note calling |
| 551 // ComputeVisibleSelectionInDOMTreeDeprecated may update layout. | 551 // ComputeVisibleSelectionInDOMTreeDeprecated may update layout. |
| 552 if (mouse_event_manager_->MousePressed() && | 552 if (mouse_event_manager_->MousePressed() && |
| 553 GetSelectionController().MouseDownMayStartSelect() && | 553 GetSelectionController().MouseDownMayStartSelect() && |
| 554 !mouse_event_manager_->MouseDownMayStartDrag() && | 554 !mouse_event_manager_->MouseDownMayStartDrag() && |
| 555 !frame_->Selection() | 555 frame_->Selection() |
|
yosin_UTC9
2017/07/05 01:27:45
The issue is caused by hidden selection regarding
| |
| 556 .ComputeVisibleSelectionInDOMTreeDeprecated() | 556 .ComputeVisibleSelectionInDOMTreeDeprecated() |
| 557 .IsNone() && | 557 .IsRange() && |
| 558 !capturing_mouse_events_node_) { | 558 !capturing_mouse_events_node_) { |
| 559 return i_beam; | 559 return i_beam; |
| 560 } | 560 } |
| 561 | 561 |
| 562 if (ShouldShowIBeamForNode(node, result)) | 562 if (ShouldShowIBeamForNode(node, result)) |
| 563 return i_beam; | 563 return i_beam; |
| 564 return PointerCursor(); | 564 return PointerCursor(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 WebInputEventResult EventHandler::HandleMousePressEvent( | 567 WebInputEventResult EventHandler::HandleMousePressEvent( |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2096 MouseEventWithHitTestResults& mev, | 2096 MouseEventWithHitTestResults& mev, |
| 2097 LocalFrame* subframe) { | 2097 LocalFrame* subframe) { |
| 2098 WebInputEventResult result = | 2098 WebInputEventResult result = |
| 2099 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2099 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
| 2100 if (result != WebInputEventResult::kNotHandled) | 2100 if (result != WebInputEventResult::kNotHandled) |
| 2101 return result; | 2101 return result; |
| 2102 return WebInputEventResult::kHandledSystem; | 2102 return WebInputEventResult::kHandledSystem; |
| 2103 } | 2103 } |
| 2104 | 2104 |
| 2105 } // namespace blink | 2105 } // namespace blink |
| OLD | NEW |