Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use selection object in the same tree. #2003

Merged
merged 1 commit into from
Jul 16, 2015

Conversation

TakayoshiKochi
Copy link
Member

This test used Selection object from different TreeScope.
At this point the spec has some ambiguity, but at least if the test uses
a Selection object from the same TreeScope, it should work as expected.

The current spec says (note: in non-normative section):
https://w3c.github.io/webcomponents/spec/shadow/#ranges-and-selections
> Accordingly, selections may only exist within one node tree, because
> they are defined by a single range. The selection, returned by the
> window.getSelection() method never returns a selection within a shadow
> tree.

This test used to use a Selection object from window.getSelection()
to select a range in a shadow root, which failed.
Instead, use getSelection() from the shadow root to select the range
under the shadow root.
@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/5558

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@TakayoshiKochi
Copy link
Member Author

@hayatoito PTAL

hayatoito added a commit that referenced this pull request Jul 16, 2015
Use selection object in the same tree.
@hayatoito hayatoito merged commit 8ab2249 into web-platform-tests:master Jul 16, 2015
@TakayoshiKochi TakayoshiKochi deleted the selection branch July 16, 2015 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants