SelectionController::selectClosestWordFromHitTestResult should check user-select:none at beginning of function |
|||
Issue descriptionselectClosestWordFromHitTestResult does user-select:none check at end of function with updateSelectionForMouseDownDispatchingSelectStart() call then abort if double-clicking on user-select:none. This means computation of selection isn't used. We should make selectClosestWordFromHitTestResult not to do unused computation.
,
Mar 20 2017
cr: Patch details. https://codereview.chromium.org/2757863003/
,
Mar 21 2017
Note: user-select:none is checked in:
bool SelectionController::updateSelectionForMouseDownDispatchingSelectStart(
Node* targetNode,
const VisibleSelectionInFlatTree& selection,
TextGranularity granularity,
HandleVisibility handleVisibility) {
if (targetNode && targetNode->layoutObject() &&
!targetNode->layoutObject()->isSelectable())
return false;
,
Mar 21 2017
yosin@ is a virtual owner.
,
Mar 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4b59469154ec17254ae526c9327931ecf0f51b9b commit 4b59469154ec17254ae526c9327931ecf0f51b9b Author: tanvir.rizvi <tanvir.rizvi@samsung.com> Date: Tue Mar 21 05:13:57 2017 Avoid unused Computations in SelectionController::selectClosestWordFromHitTestResult Currently if style has user-select none for a node, selectClosestWordFromHitTestResult() does all the calculations for VisibleSelection but then returns as false making all VisibleSelection calculation meaningless. This CL avoids the unused computations by checking for user-select state before calculating VisibleSelection. BUG= 701657 Review-Url: https://codereview.chromium.org/2757863003 Cr-Commit-Position: refs/heads/master@{#458317} [modify] https://crrev.com/4b59469154ec17254ae526c9327931ecf0f51b9b/third_party/WebKit/Source/core/editing/SelectionController.cpp
,
Mar 23 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tanvir.r...@samsung.com
, Mar 15 2017