New issue
Advanced search Search tips

Issue 660265 link

Starred by 7 users

Issue metadata

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

Blocked on:
issue 657748

Blocking:
issue 704415
issue 776656
issue 801225



Sign in to add a comment

Make <slot> participate in a flat tree

Project Member Reported by hayato@chromium.org, Oct 28 2016

Issue description

Drop the support for <slot>'s distribution in non-shadow trees.

As of now, Blink supports <slot> in non-shadow trees to honer the spec, however, there are still issues and limitations:

- In the current implementation, a <slot> in non-shadow trees does not participate in usual distribution calculation flow.
 That means HTMLSlotElement::m_distributedNodes is calculated each time when it is requested. This divergence has increased code complexity and has made Blink *unstable*. The situation is getting worse.

- It still causes a crash. I have been spending non-trivial costs to fix incoming crashes (reported by fuzzer), such as:
  - https://bugs.chromium.org/p/chromium/issues/detail?id=649576
  - https://bugs.chromium.org/p/chromium/issues/detail?id=642303
  - https://bugs.chromium.org/p/chromium/issues/detail?id=659761

Given that there is no real use cases for <slot> in non-shadow trees, it would be better to drop the support <slot> in non-shadow trees for a while.

There are following user visible changes by dropping the support:

- slot.assignedNodes({ flatten: true}) always return empty in non-shadow trees.
- <slot> in non-shadow trees would have a layout box.

However, I think this would be no impact on users because no one are using <slot> in non-shadow trees in real world. I think cluster-fuzzer is the only *use case*.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 31 2016

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

commit 6aa048c86241d01d2084127c980d620f39edb8b1
Author: hayato <hayato@chromium.org>
Date: Mon Oct 31 11:32:19 2016

Make slots in non-shadow trees participate in a flat tree

It has required non-trivial efforts to exclude slots in non-shadow trees from a
flat tree so far.  Although this behavior is consistent with that in shadow
trees, this increased code complexity because distributed nodes of a slot in
non-shadow tree are not calculated in a part of normal distribution
calculation flow.

Since it is hard to maintain two different life cycles of distributions, we have
been receiving not-a-few crash reports from cluster fuzz.

The benefit of keeping the current behavior is small; there is no useful use
case for a slot in a non-shadow tree in real world.

To make the code simple and stable, it would be better to make a slot in a
non-shadow tree participate in a flat tree, as normal elements.

Note that this new behavior itself is spec compliant, however, it would create
a layout box by default because Blink does not support "display: contents" yet.
Once Blink supports "display: contents" in the future, a slot does not crate a
layout box by default, even though it participates in a flat tree.

A slot in shadow trees does not participate in a flat tree. This does not
change.

This CL should have no real impacts on users because there is no use cases for
slots in non-shadow trees in real world.  It is likely that cluster fuzz is
the only use case.

To be precise, non-shadow trees should be read as "non-v1-shadow" trees.

BUG=659761, 660265 

Review-Url: https://codereview.chromium.org/2460813002
Cr-Commit-Position: refs/heads/master@{#428686}

[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/LayoutTests/shadow-dom/crashes/slots-nested-in-document-tree-crash.html
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/css/resolver/ElementResolveContext.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/Node.h
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/NodeComputedStyle.h
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/shadow/DistributedNodes.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversalTest.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/editing/Position.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
[modify] https://crrev.com/6aa048c86241d01d2084127c980d620f39edb8b1/third_party/WebKit/Source/core/html/HTMLSlotElement.h

Summary: Make <slot> participate in a flat tree (was: Drop the support for <slot>'s distribution in non-shadow trees.)
Status: Fixed (was: Assigned)
Status: Started (was: Fixed)
Blockedon: 657748
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 2 2016

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

commit d582fd6159457a8a9ff4f2064ce45d8bc4626c72
Author: hayato <hayato@chromium.org>
Date: Wed Nov 02 03:18:21 2016

Add a UA style, "display: contents", for <slot>

The spec is: https://html.spec.whatwg.org/#flow-content-3

This rule is guarded by the same runtime flag for "display: contents".
Unless the flag is enabled, the rule can not be effective because the parser does
not consider it a valid rule.

This change only affects slots in non-shadow trees since Blink excludes slots in
shadow trees from a flat tree.

Since "display: contents" is not well supported yet, the children of a slot in
non-shadow trees would not be displayed.

BUG= 657748 , 660265 

Review-Url: https://codereview.chromium.org/2466243002
Cr-Commit-Position: refs/heads/master@{#429198}

[add] https://crrev.com/d582fd6159457a8a9ff4f2064ce45d8bc4626c72/third_party/WebKit/LayoutTests/shadow-dom/slots-fallback-in-document-tree-expected.html
[add] https://crrev.com/d582fd6159457a8a9ff4f2064ce45d8bc4626c72/third_party/WebKit/LayoutTests/shadow-dom/slots-fallback-in-document-tree.html
[modify] https://crrev.com/d582fd6159457a8a9ff4f2064ce45d8bc4626c72/third_party/WebKit/LayoutTests/shadow-dom/slots.html
[modify] https://crrev.com/d582fd6159457a8a9ff4f2064ce45d8bc4626c72/third_party/WebKit/Source/core/css/html.css

Comment 7 by trusktr@gmail.com, Nov 29 2016

@hayato, in Chrome 56 `slot.assignedNodes({flatten:true})` on a slot that is not in a shadow three (whether it is in a non-shadow tree or not in any tree at all) still returns an array with Nodes if the slot has children.

For example,

  let s = document.createElement('slot')
  s.innerHTML = '<div></div>'
  s.assignedNodes({flatten: true}) // -> [div]

Is that expected behavior? Or should it return an empty array?

Comment 8 by hayato@chromium.org, Nov 30 2016

- That is an expected behavior.
- That does not sound related to this issue thread.

Comment 9 by hayato@chromium.org, Apr 18 2017

Blocking: 704415
Blocking: 776656
Blocking: 801225
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 15 2018

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

commit dcb17830cb80d702a50eb80b4a18ea687ada1a25
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Jan 15 08:10:54 2018

Use CanParticipateInFlatTree when appropriate.

Instead of using IsActiveSlotOrActiveV0InsertionPoint. This will make it
simpler to differentiate between including and not including slot in the
flat tree with a runtime flag. CanParticipateInFlatTree already has a
check for incremental shadow DOM.

Bug:  660265 
Change-Id: Ib420cf24d7dc5e92713f9fb0af21a95d93cf494c
Reviewed-on: https://chromium-review.googlesource.com/863664
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529225}
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/css/resolver/ElementResolveContext.cpp
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/dom/DistributedNodes.cpp
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/dom/NodeComputedStyle.h
[modify] https://crrev.com/dcb17830cb80d702a50eb80b4a18ea687ada1a25/third_party/WebKit/Source/core/editing/Position.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 15 2018

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

commit aeb29389017aa2d0cffe9359db1897c1396aa528
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Jan 15 12:19:52 2018

Detach through assigned nodes, not distributed nodes for slot.

When slot is included in the flat tree, we can have an ancestor chain of
slot elements in the flat tree which means we will have to properly
detach the layout objects for all slots and not skip down to the
distributed nodes.

Bug:  660265 
Change-Id: I7a8c3f96c9dc2c2250bdca784f0e1672ad2fb450
Reviewed-on: https://chromium-review.googlesource.com/866508
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529252}
[modify] https://crrev.com/aeb29389017aa2d0cffe9359db1897c1396aa528/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 15 2018

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

commit d659b8182fc16950711020a0e1b797575500949e
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Jan 15 12:25:43 2018

Attach slot before distributed children.

With slots included in the flat tree it's important that the slot gets
attached before it's assigned elements to insert the attached children
into the correct parent LayoutObject.

Bug:  660265 
Change-Id: I917ef65d02fa14925e79d9527483455f64c397c9
Reviewed-on: https://chromium-review.googlesource.com/864323
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529254}
[modify] https://crrev.com/d659b8182fc16950711020a0e1b797575500949e/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/d659b8182fc16950711020a0e1b797575500949e/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 16 2018

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

commit a92875903e6b8be2b25d7bf38189e0ec6c117329
Author: Rune Lillesveen <futhark@chromium.org>
Date: Tue Jan 16 08:38:46 2018

Rebuild layout tree through assigned slots.

We skip slotted slots for layout tree rebuilding when slots are not part
of the flat tree. As slots can be rendered when they are part of the
flat tree we need to rebuild through assigned children of slots, not
distributed nodes. Also, when marking ancestors for layout tree
rebuilding, mark slots and slots to which they are assigned.

Added css-scoping suite to virtual suite for IncrementalShadowDOM in
order to test styling of slots in flat tree.

Bug:  660265 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id88cbfba32a021b2380f7e41d8784d3956575206
Reviewed-on: https://chromium-review.googlesource.com/866746
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529382}
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/css-scoping-shadow-nested-slot-display-override.html
[add] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/LayoutTests/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/README.txt
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/PseudoElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/dom/PseudoElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/HTMLSlotElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/forms/HTMLSelectElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/forms/HTMLSelectElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/svg/SVGStopElement.cpp
[modify] https://crrev.com/a92875903e6b8be2b25d7bf38189e0ec6c117329/third_party/WebKit/Source/core/svg/SVGStopElement.h

Project Member

Comment 17 by bugdroid1@chromium.org, Jan 18 2018

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

commit bbc8864c458f9d74b1cec0e1a09e5847f7bfa609
Author: Rune Lillesveen <futhark@chromium.org>
Date: Thu Jan 18 12:45:00 2018

Don't reassign slotted nodes during DetachLayoutTree.

Distribution and slot assignment will not, and should not, be made
up-to-date during DetachLayoutTree. Just use the currently assigned
nodes like we do for distributed nodes.

This issue was introduced by https://crrev.com/aeb29389

Discovered trying to run all tests for slot-in-flat-tree which triggered
DCHECK failures for many tests.

Bug:  660265 
Change-Id: Ice0c43f8073aecfe4056b0746589288567dd6813
Reviewed-on: https://chromium-review.googlesource.com/873530
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530126}
[modify] https://crrev.com/bbc8864c458f9d74b1cec0e1a09e5847f7bfa609/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 18 2018

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

commit d7b6a795b473814ac796d98025d30d391a942c9e
Author: Rune Lillesveen <futhark@chromium.org>
Date: Thu Jan 18 13:42:36 2018

IsActiveSlotOrActiveV0InsertionPoint -> !CanParticipateInFlatTree.

Entering a flat tree slot for RebuildLayoutTree which did not actually
needed a rebuild confused the WhitespaceAttacher to not recognize the
slot as a display:contents element.

TEST=fast/text/whitespace/reattach-before-pseudo-slot-fallback-whitespace.html

Bug:  660265 
Change-Id: Iefb710c5705072d89ac0b27d0b4a0fc24162feef
Reviewed-on: https://chromium-review.googlesource.com/873532
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530132}
[modify] https://crrev.com/d7b6a795b473814ac796d98025d30d391a942c9e/third_party/WebKit/Source/core/dom/Element.h

Project Member

Comment 19 by bugdroid1@chromium.org, Jan 18 2018

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

commit f523b74c71214f3815ed6c00a6c494d7a5aa1a35
Author: Rune Lillesveen <futhark@chromium.org>
Date: Thu Jan 18 16:59:08 2018

Skip slot in flat tree looking for details for summary.

HTML slot elements should be part of the flat tree. Make sure we skip the
slot to which the summary is assigned looking for its details parent.

Without this change, four layout tests in accessibility fails when slots
are made part of the flat tree.

TEST=accessibility/

Bug:  660265 
Change-Id: I346c683ddbbc6fc36fbc2cae3353e6092d0da4be
Reviewed-on: https://chromium-review.googlesource.com/873373
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530171}
[modify] https://crrev.com/f523b74c71214f3815ed6c00a6c494d7a5aa1a35/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Project Member

Comment 20 by bugdroid1@chromium.org, Jan 19 2018

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

commit c0c6c25fe6077d60dccd0461fd45e01455feb240
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Jan 19 07:21:29 2018

Pass parent details to FlatTreeTraversalNg::Parent().

We missed passing the ParentTraversalDetails argument from the old to
the Ng flat tree traversal class.

TEST=fast/dom/shadow/user-modify-inheritance.html

Bug:  776656 ,  660265 
Change-Id: Idfcdc97f5043483cc61720c88d970111f96064fc
Reviewed-on: https://chromium-review.googlesource.com/873770
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530446}
[modify] https://crrev.com/c0c6c25fe6077d60dccd0461fd45e01455feb240/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/c0c6c25fe6077d60dccd0461fd45e01455feb240/third_party/WebKit/Source/core/dom/FlatTreeTraversal.h
[modify] https://crrev.com/c0c6c25fe6077d60dccd0461fd45e01455feb240/third_party/WebKit/Source/core/dom/FlatTreeTraversalTest.cpp

Project Member

Comment 21 by bugdroid1@chromium.org, Jan 19 2018

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

commit df2aa84fb39dc57f7ad29e51a34636eb4ae820db
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Jan 19 10:43:29 2018

Use correct expected result for slot inheritance test.

Use a test expectation for the standard test env rather than in the
virtual test for IncrementalShadowDOM.

Bug:  660265 ,  776656 
Change-Id: Iaea0601924d22753b57e3ac9c2569f75e24cd9d0
Reviewed-on: https://chromium-review.googlesource.com/873973
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530479}
[modify] https://crrev.com/df2aa84fb39dc57f7ad29e51a34636eb4ae820db/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/df2aa84fb39dc57f7ad29e51a34636eb4ae820db/third_party/WebKit/LayoutTests/shadow-dom/css-style-inherit.html

Project Member

Comment 22 by bugdroid1@chromium.org, Jan 29 2018

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

commit 716357ace42ce5b9fd5936bf2b37a0750f8dbff9
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Jan 29 06:39:23 2018

Make ::slotted() never match <slot> elements.

According to the css-scoping spec, ::slotted() matches flattened
slotables. Slot elements which are assigned to other slots are not part
of the flattened slotables. The test currently fails because slots are
not included in the flat tree.

Bug:  660265 
Change-Id: Ifbcb03d3212db59d762d173a221382ed79ccbd0e
Reviewed-on: https://chromium-review.googlesource.com/887950
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532335}
[modify] https://crrev.com/716357ace42ce5b9fd5936bf2b37a0750f8dbff9/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/716357ace42ce5b9fd5936bf2b37a0750f8dbff9/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-slot.html
[modify] https://crrev.com/716357ace42ce5b9fd5936bf2b37a0750f8dbff9/third_party/WebKit/Source/core/css/SelectorChecker.cpp

Project Member

Comment 23 by bugdroid1@chromium.org, Jan 30 2018

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

commit 4934d69bb25e23c1f555a03781ff690664ad3bfa
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Jan 30 06:48:50 2018

Update text expectation for slots-in-flat-tree

Use a test expectation for the standard test env rather than in the
virtual test for IncrementalShadowDOM.

Bug:  660265 ,  776656 
Change-Id: I6b2d3b1dcf0ebcb94c5e592d6255d0dc8ee95469
Reviewed-on: https://chromium-review.googlesource.com/892680
Commit-Queue: Hayato Ito <hayato@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532796}
[modify] https://crrev.com/4934d69bb25e23c1f555a03781ff690664ad3bfa/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/4934d69bb25e23c1f555a03781ff690664ad3bfa/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-details-summary-expected.txt

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 8 2018

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

commit 2faa2b6b25dc948985640efbb5f4b6b5c38efbcb
Author: Rune Lillesveen <futhark@chromium.org>
Date: Thu Feb 08 09:44:43 2018

Introduce slot-in-flat-tree behind experimental flag.

Use two separate flags to be able to ship slot-in-flat-tree before
incremental shadow dom. With this new flag enabled we utilize
FlatTreeTraversalNg for flat tree traversal which includes slots.
Previously landed CLs have prepared style recalc and layout tree
building traversal to handle slot elements as any other element.

There is one code change here to handle slots in optgroup UA shadow
where we require ComputedStyle to be stored for optgroup and option
even when they are display:none.

The rest of the changes are test expectation changes and runtime flag
changes.

Bug:  660265 ,  697283 

Change-Id: I3149896927a2e677790b9fb452b20832db8a7840
Reviewed-on: https://chromium-review.googlesource.com/871150
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535342}
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/LayoutTests/editing/assert_selection.html
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-input-value-expected.txt
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/dom/FlatTreeTraversal.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/dom/FlatTreeTraversal.h
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/dom/FlatTreeTraversalTest.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng_test.cc
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/editing/PositionIteratorTest.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/editing/testing/SelectionSampleTest.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
[modify] https://crrev.com/2faa2b6b25dc948985640efbb5f4b6b5c38efbcb/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Project Member

Comment 25 by bugdroid1@chromium.org, Mar 4 2018

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

commit 822be90274eab3c047fea8cf2d7dd35cd5d0db49
Author: Rune Lillesveen <futhark@chromium.org>
Date: Sun Mar 04 23:58:14 2018

Enable slot-in-flat-tree flag in stable.

Intent-to-ship thread:

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/6UNwnk97lrE

Bug:  660265 
Change-Id: I459d8aacb1defdc5aa1aee9e1958fd0831f9d60a
Reviewed-on: https://chromium-review.googlesource.com/946468
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540772}
[modify] https://crrev.com/822be90274eab3c047fea8cf2d7dd35cd5d0db49/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Cc: futhark@chromium.org
Status: Fixed (was: Started)
Landed after M66 branch. Will be shipped in M67 if all goes well.

Sign in to add a comment