New issue
Advanced search Search tips

Issue 695277 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 138439



Sign in to add a comment

Study when VisibleSelection.isNone() != SelectionInDOMTree.isNone()

Project Member Reported by yosin@chromium.org, Feb 23 2017

Issue description

From http://crrev.com/2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout

We should know when VisibleSelection.isNone() != SelectionInDOMTree.isNone()
for replacing FrameSelection.computeVisibleSelectionInDOMTree().isNone() to
FrameSelection.selectionInDOMTree().isNone()


On 2017/02/23 at 00:14:56, yosin wrote:
> On 2017/02/22 at 23:00:34, tkent wrote:
> > lgtm.
> > 
> > On 2017/02/22 at 17:45:50, xiaochengh wrote:
> > > Is there still any intuitive way to check whether FS is none?
> > 
> > IMO, we should not re-introduce isNone() for VisibleSelection in order to help hoisting.  We may have isNone() for SelectionInDOMTree on FrameSelection, but it might not have many users.
> 
> At first glance, FS::isVisibleNone() is attractive, but it is not.
> Since it does not imply it causes layout updating == slow.
> We think "isXXX()" is cheap and does not cause side-effect, but isVisibleNone() is not.
> 
> On rewriting frameSelection().computeVisibleSelectionInDOMTree().isNone(), we need to think we really need to do so.
> I think most of case we can use selectionInDOMTree().isNone() or we should go toward this route.
> 
> Just change frameSelection().computeVisibleSelectionInDOMTree().isNone() to frameSelection().selectionInDOMTree().isNone() then
> which layout tests are failed.
> 
> I have not had simple sample of when VS.isNone() != SelectionInDOM.isNone(), since visible canonicalization moves to visible position
> when HTML have some visible thing, positions go there.

Sounds like something doesn't work correctly...

What's the crucial difference between a "visibly none" selection (i.e., none after canonicalization) and a "truly none" selection (i.e., already none before canonicalization)? Do many clients care about that?
Reply

 

Comment 1 by yosin@chromium.org, Feb 23 2017

The implementation of VisibleSeleciton.isNone()

VisibleSelection::isNone() == { return m_selectionType == NoSeleciton; }
m_selectionType == VS::computeSelectionType()
NoSelection =~ m_start.isNull(); end.isNull() too
m_start: VS::validate
 1. VP(base)
 1.5 Exit if base or extent is null => start = end = null
 2. expand by granularity
 3. tree boundary adjustment
 4. editing boundary adjustment
 5. For range, mostForwardCaretPosition()/mostBackwardCaretPosition

BTW, using selectionIsDOMTree().isNone() as FrameSeleciton::isNone(), we pass editing/ but following
tests seems to be failed:

+fast/dom/shadow/shadow-boundary-events.html
+fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
+fast/forms/label/label-contains-other-interactive-content.html
+fast/forms/setrangetext-within-events.html


Let's see all result in http://crrev.com/2712843003


Blocking: 138439
Labels: Type-Task
Project Member

Comment 4 by sheriffbot@chromium.org, Nov 14

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment