DescriptionIntroduce StyledMarkupTraverser to StyledMarkupSerializer
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.
As a preparation, this CL introduces StyledMarkupTraverser which
implements traverseNodesForSerialization so that we can call
traverseNodesForSerialization in traverseNodesForSerialization
with a different editing strategy. I am going to fix
traverseNodesForSerialization later to do so.
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=n/a; no behavior change
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197322
Patch Set 1 #Patch Set 2 : #
Total comments: 22
Patch Set 3 : yosin's review #Patch Set 4 : rebase #Patch Set 5 : Renamed StyledMarkupTraverser #
Total comments: 4
Patch Set 6 : yosin's review #
Total comments: 2
Messages
Total messages: 17 (2 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||