DescriptionMake VisiblePosition constructor to canonicalize a position in composed tree
This patch makes |VisiblePosition| constructor takes a position in composed tree
to calculate *canonical* position on a composed tree rather than a DOM tree by
calling composed tree version of functions, which templatized with a type of
position, either a DOM tree position or a composed tree position, for selection
for web component.
This patch also contains following changes to implement above:
- moves implementation of |toPositionInDOMTree(const Position&)| to
"Position.h" to share code between "StyledMarkupSerializer.cpp" and
"VisiblePosition.cpp".
- Make |Position::getInlineBoxAndOffset()| to handle a position at direct child
of shadow root.
- Update test expectations for use-events-crash.svg, since it contains svg
|use| element using composed tree.
This patch is result of collaboration work with hajimehoshi@chromium.org
for selection of web components. After this patch, we are going to
implement another strategies for the composed tree. We've already
prepared that at http://crrev.com/1106433002.
BUG=275851
TEST=editing/shadow/select-contenteditable-shadowhost.html
TEST=svg/custom/use-events-crash.svg
TEST=webkit_unit_tests --gtest_filter=VisiblePositionTest. ShadowDistributedNodes
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197897
Patch Set 1 #Patch Set 2 : 2015-06-25T13:30:25 Rebase #
Total comments: 1
Patch Set 3 : 2015-06-25T14:53:17 getInlineBoxAndOffset #Patch Set 4 : 2015-06-25T15:07:30 Move toPositionInDOMTree() to Position.h #Patch Set 5 : 2015-06-25T17:29:10 Update use-events-crash.svg expectations #
Messages
Total messages: 29 (8 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||