4 years, 10 months ago
(2015-06-11 10:10:33 UTC)
#10
Dry run: This issue passed the CQ dry run.
hayato
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/ContainerNode.cpp#newcode1087 Source/core/dom/ContainerNode.cpp:1087: // Recurse up the shadow trees to mark shadow ...
4 years, 10 months ago
(2015-06-12 04:37:57 UTC)
#11
Thanks for the review! https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/ContainerNode.cpp#newcode1087 Source/core/dom/ContainerNode.cpp:1087: // Recurse up the shadow ...
4 years, 10 months ago
(2015-06-12 07:34:17 UTC)
#12
Thanks for the review!
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/Contain...
File Source/core/dom/ContainerNode.cpp (right):
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/Contain...
Source/core/dom/ContainerNode.cpp:1087: // Recurse up the shadow trees to mark
shadow hosts if it matches :focus.
On 2015/06/12 04:37:57, hayato wrote:
> Could you add a layout test which involves a dom mutation?
>
> If a focused element is moved to somewhere, the focus state of each nodes are
> set (or unset) correctly?
Added 'focus-with-dom-mutation.html' layout test which tests :focus
state is properly cleared when focused element is moved out of shadow tree.
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/Contain...
Source/core/dom/ContainerNode.cpp:1088: if (isInShadowTree() &&
shadowHost()->shadowRoot())
On 2015/06/12 04:37:57, hayato wrote:
> Not intuitive to me. Is this checking that `this` is in an author shadow tree
or
> not?
Yes, it's author shadow only.
Updated the comment and moved the TODO comment below (line 1093) here.
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/Contain...
Source/core/dom/ContainerNode.cpp:1096: Element* host = toElement(this);
On 2015/06/12 04:37:57, hayato wrote:
> 1. Looks isElementNode() is used in L1112.
> `this` is always Element here?
>
> 2. `host` looks confusing name to me since `this` is not always a shadow host,
> at least until 1098.
1. Good catch. I guess no one is calling setFocus() on Node or ContainerNode,
but adding isElementNode() here looks correct to me. The same bug existed for
the old tabStop implementation.
2. replaced toElement() for both occurrences.
https://codereview.chromium.org/1177673005/diff/40001/Source/core/dom/Contain...
Source/core/dom/ContainerNode.cpp:1111: // If :focus sets display: none, we lose
focus but still need to recalc our style.
On 2015/06/12 04:37:57, hayato wrote:
> Looks focusStateChanged() and the code around here are very similar. Can we
> remove duplication?
I'm afraid their conditions are subtly different and they can't be simplified
by unifying, just more complex.
kochi
The CQ bit was checked by kochi@chromium.org to run a CQ dry run
4 years, 10 months ago
(2015-06-12 07:34:27 UTC)
#13
Issue 1177673005: Implement ShadowRoot.delegatesFocus 4/4 (match CSS :focus for shadow host)
(Closed)
Created 4 years, 10 months ago by kochi
Modified 4 years, 10 months ago
Reviewers: hayato
Base URL: svn://svn.chromium.org/blink/trunk
Comments: 12