New issue
Advanced search Search tips

Issue 591001 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

FrameSelection::selectAll() should not call selectionFromContentsOfNode() with detached node

Project Member Reported by yosin@chromium.org, Mar 1 2016

Issue description

LayoutTests/editing/selection/select-start-remove-root-crash.html makes this situation by removing contents of document by "selectstart" event handler.


 

Comment 1 by yosin@chromium.org, Mar 1 2016

Summary: FrameSelection::selectAll() should not call selectionFromContentsOfNode() with detached node (was: FrameSelection::selectAll) should not call selectionFromContentsOfNode() with detached node)
Sorry I don't understand this issue. Can we have an offline discussion?

Comment 3 by yosin@chromium.org, Mar 4 2016

void FrameSelection::selectAll()
{
...
 root = ...

   if (selectStartTarget && selectStartTarget->dispatchEvent(Event::createCancelableBubble(EventTypeNames::selectstart)) != DispatchEventResult::NotCanceled)
        return;
   // |root| may be removed
  VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root.get()));
  // selectionFromContentsOfNode() is called with removed |root|





Project Member

Comment 4 by bugdroid1@chromium.org, Mar 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f52d88ac2c0e7814a7af9250f7cb89d6134794ae

commit f52d88ac2c0e7814a7af9250f7cb89d6134794ae
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Mar 04 08:25:11 2016

FrameSelection::selectAll() should not call selectionFromContentsOfNode() with detached node

BUG= 591001 

Review URL: https://codereview.chromium.org/1768483002

Cr-Commit-Position: refs/heads/master@{#379247}

[modify] https://crrev.com/f52d88ac2c0e7814a7af9250f7cb89d6134794ae/third_party/WebKit/Source/core/editing/FrameSelection.cpp

Status: Fixed (was: Assigned)

Comment 6 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Sign in to add a comment