New issue
Advanced search Search tips

Issue 701657 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

SelectionController::selectClosestWordFromHitTestResult should check user-select:none at beginning of function

Project Member Reported by yosin@chromium.org, Mar 15 2017

Issue description

selectClosestWordFromHitTestResult 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.


 
I will work on this
cr: Patch details. https://codereview.chromium.org/2757863003/

Comment 3 by yosin@chromium.org, 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;


Comment 4 by yosin@chromium.org, Mar 21 2017

Owner: yosin@chromium.org
Status: Assigned (was: Available)
yosin@ is a virtual owner.
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Comment 6 by yosin@chromium.org, Mar 23 2017

Owner: ----
Status: Fixed (was: Assigned)

Sign in to add a comment