Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
Committed: https://crrev.com/d148a25d4b552d08fe0971faf9464c17cedc7e8f
Cr-Commit-Position: refs/heads/master@{#402625}
Description was changed from ========== Document/ShadowRoot split of pointerLockElement BUG= ========== to ========== Document/ShadowRoot split ...
4 years, 6 months ago
(2016-06-23 07:11:06 UTC)
#1
Description was changed from
==========
Document/ShadowRoot split of pointerLockElement
BUG=
==========
to
==========
Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
==========
kochi
Patchset #2 (id:20001) has been deleted
4 years, 6 months ago
(2016-06-23 07:59:46 UTC)
#2
Patchset #2 (id:20001) has been deleted
kochi
The CQ bit was checked by kochi@chromium.org to run a CQ dry run
4 years, 6 months ago
(2016-06-23 11:07:01 UTC)
#3
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/251221)
4 years, 6 months ago
(2016-06-23 12:14:07 UTC)
#6
PTAL I'll update chromestatus entry for this and announce to blink-dev.
4 years, 6 months ago
(2016-06-24 05:42:31 UTC)
#10
PTAL
I'll update chromestatus entry for this and announce
to blink-dev.
hayato
On 2016/06/24 at 05:42:31, kochi wrote: > PTAL > > I'll update chromestatus entry for ...
4 years, 6 months ago
(2016-06-24 05:57:51 UTC)
#11
On 2016/06/24 at 05:42:31, kochi wrote:
> PTAL
>
> I'll update chromestatus entry for this and announce
> to blink-dev.
No. Adjust only for v1 shadow trees. If it's in a v0 shadow tree, return it as
is.
kochi
On 2016/06/24 05:57:51, hayato wrote: > On 2016/06/24 at 05:42:31, kochi wrote: > > PTAL ...
4 years, 6 months ago
(2016-06-24 06:01:05 UTC)
#12
On 2016/06/24 05:57:51, hayato wrote:
> On 2016/06/24 at 05:42:31, kochi wrote:
> > PTAL
> >
> > I'll update chromestatus entry for this and announce
> > to blink-dev.
>
> No. Adjust only for v1 shadow trees. If it's in a v0 shadow tree, return it as
> is.
Do we want to hide ShadowRoot.pointerLockElement interface itself if the tree is
v0?
hayato
On 2016/06/24 at 06:01:05, kochi wrote: > On 2016/06/24 05:57:51, hayato wrote: > > On ...
4 years, 6 months ago
(2016-06-24 06:09:25 UTC)
#13
On 2016/06/24 at 06:01:05, kochi wrote:
> On 2016/06/24 05:57:51, hayato wrote:
> > On 2016/06/24 at 05:42:31, kochi wrote:
> > > PTAL
> > >
> > > I'll update chromestatus entry for this and announce
> > > to blink-dev.
> >
> > No. Adjust only for v1 shadow trees. If it's in a v0 shadow tree, return it
as
> > is.
>
> Do we want to hide ShadowRoot.pointerLockElement interface itself if the tree
is v0?
I do not care. Hiding sounds safer option to me.
kochi
On 2016/06/24 06:09:25, hayato wrote: > On 2016/06/24 at 06:01:05, kochi wrote: > > On ...
4 years, 6 months ago
(2016-06-24 06:14:49 UTC)
#14
On 2016/06/24 06:09:25, hayato wrote:
> On 2016/06/24 at 06:01:05, kochi wrote:
> > On 2016/06/24 05:57:51, hayato wrote:
> > > On 2016/06/24 at 05:42:31, kochi wrote:
> > > > PTAL
> > > >
> > > > I'll update chromestatus entry for this and announce
> > > > to blink-dev.
> > >
> > > No. Adjust only for v1 shadow trees. If it's in a v0 shadow tree, return
it
> as
> > > is.
> >
> > Do we want to hide ShadowRoot.pointerLockElement interface itself if the
tree
> is v0?
>
> I do not care. Hiding sounds safer option to me.
Okay, I'll try doing that unless it makes the change too complex.
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
4 years, 6 months ago
(2016-06-24 06:40:27 UTC)
#15
4 years, 6 months ago
(2016-06-24 06:40:28 UTC)
#16
Dry run: This issue passed the CQ dry run.
kochi
On 2016/06/24 06:14:49, kochi wrote: > On 2016/06/24 06:09:25, hayato wrote: > > On 2016/06/24 ...
4 years, 6 months ago
(2016-06-24 06:42:26 UTC)
#17
On 2016/06/24 06:14:49, kochi wrote:
> On 2016/06/24 06:09:25, hayato wrote:
> > On 2016/06/24 at 06:01:05, kochi wrote:
> > > On 2016/06/24 05:57:51, hayato wrote:
> > > > On 2016/06/24 at 05:42:31, kochi wrote:
> > > > > PTAL
> > > > >
> > > > > I'll update chromestatus entry for this and announce
> > > > > to blink-dev.
> > > >
> > > > No. Adjust only for v1 shadow trees. If it's in a v0 shadow tree, return
> it
> > as
> > > > is.
> > >
> > > Do we want to hide ShadowRoot.pointerLockElement interface itself if the
> tree
> > is v0?
> >
> > I do not care. Hiding sounds safer option to me.
>
> Okay, I'll try doing that unless it makes the change too complex.
I'm not sure the following case
(A)
document
hostV1
+shadow (V1)
hostV0
+shadow (V0)
+pointer locked element
document.pointerLockElement = pointer locked element
V1root.poitnerLockElement = hostV0 or null?
V0root.poitnerLockElement = undefined
For this case, it will not be any interoperability issue,
V1root.pointerLockElement could be either way - hostV0 should be fine.
(B)
document
hostV0
+shadow (V0)
hostV1
+shadow (V1)
+pointer locked element
document.pointerLockElement = hostV0 or hostV1?
V0root.poitnerLockElement = undefined
V1root.poitnerLockElement = pointer locked element
In this case, in terms of encapsulation, document.pointerLockElement
can never be pointer locked element.
Probably for the sake of backward compatibility, returning hostV1,
even though it is in V0 shadow makes sense?
This also ensures document.pointerLockElement.shadowRoot.pointerLockElement
to work in this case.
What do you think?
hayato
Use you best judge in either cases. There is no risk to break compatibility in ...
4 years, 6 months ago
(2016-06-24 07:17:38 UTC)
#18
Use you best judge in either cases. There is no risk to break compatibility in
either cases, and we do not need to support these cases in the long term.
kochi
On 2016/06/24 07:17:38, hayato wrote: > Use you best judge in either cases. There is ...
4 years, 6 months ago
(2016-06-24 10:41:37 UTC)
#19
On 2016/06/24 07:17:38, hayato wrote:
> Use you best judge in either cases. There is no risk to break compatibility in
> either cases, and we do not need to support these cases in the long term.
Okay, so I'd like to go with the following:
Document.pointerLockedElement :=
pointer locked element if it is in V0 (at any level)
otherwise: the shallowest shadow host of V1 shadow root if pointer locked
element is in V1 (at any level)
ShadowRoot.pointerLockElement :=
null if ShadowRoot is V0
if ShadowRoot is V1:
null if pointer lock element is neither in the same tree nor in
shadow-including descendant
pointer locked element if pointer locked element is in the same tree, or
all descendant shadow trees are V0
otherwise: shadow host of the nearest descendant V1 shadow root
So for the above examples: ((*) indicates diff)
(A)
document
hostV1
+shadow (V1)
hostV0
+shadow (V0)
+pointer locked element
document.pointerLockElement = pointer locked element
V1root.poitnerLockElement = pointer locked element (*)
V0root.poitnerLockElement = null (*)
(B)
document
hostV0
+shadow (V0)
hostV1
+shadow (V1)
+pointer locked element
document.pointerLockElement = hostV1 (*)
V0root.poitnerLockElement = null (*)
V1root.poitnerLockElement = pointer locked element
kochi
Patchset #5 (id:100001) has been deleted
4 years, 6 months ago
(2016-06-24 11:00:58 UTC)
#20
Patchset #5 (id:100001) has been deleted
kochi
The CQ bit was checked by kochi@chromium.org to run a CQ dry run
4 years, 6 months ago
(2016-06-24 11:01:11 UTC)
#21
Split DocumentPointerLockElement to DocumentPointerLockElement and ShadowRootPointerLockElement. Also added DocumentPointerLockElementInV0Shadow for deprecation. And merged https://codereview.chromium.org/2094933002/ (counter ...
4 years, 5 months ago
(2016-06-27 05:34:36 UTC)
#31
Split DocumentPointerLockElement to DocumentPointerLockElement and
ShadowRootPointerLockElement.
Also added DocumentPointerLockElementInV0Shadow for deprecation.
And merged https://codereview.chromium.org/2094933002/ (counter for
.requestPointerLock() usage
for elements in shadow tree).
PTAL.
hayato
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html File third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html (right): https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html#newcode8 third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html:8: <slot></slot> slot is invalid in v0 shadow trees. https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html ...
4 years, 5 months ago
(2016-06-27 06:43:13 UTC)
#32
4 years, 5 months ago
(2016-06-27 06:46:15 UTC)
#33
Patchset #7 (id:180001) has been deleted
kochi
Thanks for the review! Please hold on further review until I update another patchset to ...
4 years, 5 months ago
(2016-06-27 07:11:37 UTC)
#34
Thanks for the review!
Please hold on further review until I update another patchset to clarify the
difference between activeElement and pointerLockElement.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Lay...
File third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html
(right):
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html:8:
<slot></slot>
On 2016/06/27 06:43:13, hayato wrote:
> slot is invalid in v0 shadow trees.
Oops!
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/dom/Document.idl (right):
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/Document.idl:157: // For pointerLockElement,
see DocumentOrShadowRoot.idl.
On 2016/06/27 06:43:13, hayato wrote:
> Do we need this comment? I do not think other methods defined in
> DocumentOrShadowRoot have such a comment in Document.idl.
Removed the comment.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h (right):
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:51: static Element*
retargetPointerLockElement(TreeScope& scope, const Element* target)
On 2016/06/27 06:43:13, hayato wrote:
> Make a target a reference: const Element& target
Done.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:52: {
On 2016/06/27 06:43:13, hayato wrote:
> This is not a spec compliant.
>
> Please see the definition of the activeElement carefully. Strictly speaking,
it
> is not the result of retargeting.
> There is one more additional check for activeElement:
>
> > if the result and the context object are in the same tree.
>
> Thus, this function is actually like emulating the behavior of activeElement,
> but not retargeting.
>
> It would be better to add a test to find the difference between
> *activeElement-like behavior* and *retargeting*.
>
> e.g.
>
> Put a pointer Locked element in an ancestor tree of a shadow tree.
This was intentional because if Shadow V1 hosts V0 shadow, and the real
locked element is in V0 shadow, V1 returns the element as it is.
I'd like to do the same for fullscreenElement, so I think now I'd better
have a design doc for this describing why (not just in the review comment).
I'll add a comment in this function, update the spec patch, and double-check
tests.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:66: const Element*
target = document.pointerLockElement();
On 2016/06/27 06:43:13, hayato wrote:
> Return early if target is null.
Done.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:76: if
(!shadowRoot.isV1())
On 2016/06/27 06:43:13, hayato wrote:
> Could you add a comment here so that we can remove this special handling in
> confident in the future?
Done.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:76: if
(!shadowRoot.isV1())
On 2016/06/27 06:43:13, hayato wrote:
> Could you add a comment here so that we can remove this special handling in
> confident in the future?
Done.
https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h:79: const Element*
target = shadowRoot.document().pointerLockElement();
On 2016/06/27 06:43:13, hayato wrote:
> Return early if target is null.
Done.
kochi
Patchset #8 (id:220001) has been deleted
4 years, 5 months ago
(2016-06-28 05:28:03 UTC)
#35
Patchset #8 (id:220001) has been deleted
kochi
Patchset #7 (id:200001) has been deleted
4 years, 5 months ago
(2016-06-28 05:28:16 UTC)
#36
Patchset #7 (id:200001) has been deleted
kochi
PTAL (I also updated the spec change proposal in https://github.com/w3c/pointerlock/pull/4 ) https://codereview.chromium.org/2086293004/diff/160001/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html File third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html (right): ...
4 years, 5 months ago
(2016-06-28 06:34:07 UTC)
#37
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/208307)
4 years, 5 months ago
(2016-06-28 08:41:31 UTC)
#44
Description was changed from ========== Document/ShadowRoot split of pointerLockElement As discussed in https://github.com/w3c/webcomponents/issues/192 document.pointerLockElement should ...
4 years, 5 months ago
(2016-06-29 00:53:38 UTC)
#51
Message was sent while issue was closed.
Description was changed from
==========
Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
==========
to
==========
Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
==========
commit-bot: I haz the power
Committed patchset #8 (id:260001)
4 years, 5 months ago
(2016-06-29 00:53:40 UTC)
#52
Message was sent while issue was closed.
Committed patchset #8 (id:260001)
commit-bot: I haz the power
Description was changed from ========== Document/ShadowRoot split of pointerLockElement As discussed in https://github.com/w3c/webcomponents/issues/192 document.pointerLockElement should ...
4 years, 5 months ago
(2016-06-29 00:56:06 UTC)
#53
Message was sent while issue was closed.
Description was changed from
==========
Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
==========
to
==========
Document/ShadowRoot split of pointerLockElement
As discussed in
https://github.com/w3c/webcomponents/issues/192
document.pointerLockElement should be now shadow-dom aware,
and it gets adjusted to its node tree.
ShadowRoot.pointerLockElement is also added so it should
work similar to how document/ShadowRoot.activeElement works.
BUG=622584
Committed: https://crrev.com/d148a25d4b552d08fe0971faf9464c17cedc7e8f
Cr-Commit-Position: refs/heads/master@{#402625}
==========
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/d148a25d4b552d08fe0971faf9464c17cedc7e8f Cr-Commit-Position: refs/heads/master@{#402625}
4 years, 5 months ago
(2016-06-29 00:56:09 UTC)
#54
Issue 2086293004: Document/ShadowRoot split of pointerLockElement
(Closed)
Created 4 years, 6 months ago by kochi
Modified 4 years, 5 months ago
Reviewers: tkent, hayato, Ilya Sherman
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 30