DescriptionHave StyledMarkupSerializer work on the Composed tree
We are now going to have StyledMarkupSerializer work on the Composed
tree. We found just templatizing StyledMarkupSerializer was not enough.
As for traversing a node tree, even though you start to traverse a tree
in a composed-tree strategy, you would need to 'switch' the strategy to
a dom-tree strategy when you find a closed-shadow host. For example, a
<select> element is now a closed shadow host, but traversing <select>
element as a composed tree doesn't make sense (a <div> or something
would be in your clipboard). This means we need to call the DOM version
of traverseNodesForSerialization in the Composed tree version of that.
This CL fixes the logic during traversing on a closed-shadow node to
switch the node-tree traversing strategy. This CL also adds tests for
this.
This patch is result of collaboration work with yosin@chromium.org
for selection of web components. We've already prepared the new
node-traversal usages at crrev.com/1188063002.
BUG=275851
TEST=webkit_unit_tests --gtest_filter=StyledMarkupSerializerTest.*
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197455
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 6
Patch Set 4 : reviews #
Messages
Total messages: 9 (2 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||