Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(2)

Issue 1201403002: Make VisiblePosition constructor to canonicalize a position in composed tree (Closed)

Created:
4 years, 10 months ago by yosin_UTC9
Modified:
4 years, 10 months ago
Reviewers:
tkent
CC:
blink-reviews, hajimehoshi
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -9 lines) Patch
M LayoutTests/platform/mac/svg/custom/use-events-crash-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/win/svg/custom/use-events-crash-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Position.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Position.cpp View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/editing/StyledMarkupSerializer.cpp View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/editing/VisiblePosition.cpp View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M Source/core/editing/VisiblePositionTest.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (8 generated)
yosin_UTC9
PTAL
4 years, 10 months ago (2015-06-25 04:31:33 UTC) #2
tkent
https://codereview.chromium.org/1201403002/diff/20001/Source/core/editing/VisiblePosition.cpp File Source/core/editing/VisiblePosition.cpp (right): https://codereview.chromium.org/1201403002/diff/20001/Source/core/editing/VisiblePosition.cpp#newcode650 Source/core/editing/VisiblePosition.cpp:650: static Position toPositionInDOMTree(const Position& position) How about moving this ...
4 years, 10 months ago (2015-06-25 05:52:26 UTC) #3
yosin_UTC9
PTAL
4 years, 10 months ago (2015-06-25 06:39:57 UTC) #4
tkent
> - Make |Position::getInlineBoxAndOffset()| to handle a position at direct child > of shadow root. ...
4 years, 10 months ago (2015-06-25 06:45:01 UTC) #5
yosin_UTC9
On 2015/06/25 06:45:01, tkent wrote: > > - Make |Position::getInlineBoxAndOffset()| to handle a position at ...
4 years, 10 months ago (2015-06-25 06:50:01 UTC) #6
tkent
> Yes, editing/shadow/select-contenteditable-shadowhost.html failed without > Position.cpp change. > TEST=n/a; No behavior changes. Please update ...
4 years, 10 months ago (2015-06-25 06:55:05 UTC) #7
yosin_UTC9
On 2015/06/25 06:55:05, tkent wrote: > > Yes, editing/shadow/select-contenteditable-shadowhost.html failed without > > Position.cpp change. ...
4 years, 10 months ago (2015-06-25 06:57:26 UTC) #8
yosin_UTC9
linux_bot failures are: - inspector/profiler/heap-snapshot-containment-sorting.html - svg/custom/use-events-crash.svg This patch doesn't relate to them.
4 years, 10 months ago (2015-06-25 06:58:22 UTC) #9
yosin_UTC9
On 2015/06/25 06:58:22, Yosi_UTC9 wrote: > linux_bot failures are: > - inspector/profiler/heap-snapshot-containment-sorting.html > - svg/custom/use-events-crash.svg ...
4 years, 10 months ago (2015-06-25 07:00:38 UTC) #10
yosin_UTC9
On 2015/06/25 07:00:38, Yosi_UTC9 wrote: > On 2015/06/25 06:58:22, Yosi_UTC9 wrote: > > linux_bot failures ...
4 years, 10 months ago (2015-06-25 09:41:19 UTC) #11
tkent
lgtm
4 years, 10 months ago (2015-06-25 09:46:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1201403002/80001
4 years, 10 months ago (2015-06-25 09:47:13 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/68502)
4 years, 10 months ago (2015-06-25 12:10:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1201403002/80001
4 years, 10 months ago (2015-06-26 00:54:27 UTC) #18
yosin_UTC9
Following layout tests are failed on linux_blink_rel bot: - inspector/profiler/heap-snapshot-containment-sorting.html - inspector/profiler/heap-snapshot-containment-expansion-preserved-when-sorting.html - inspector/console/console-format.html Local ...
4 years, 10 months ago (2015-06-26 01:51:49 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/68638)
4 years, 10 months ago (2015-06-26 02:20:31 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1201403002/80001
4 years, 10 months ago (2015-06-26 04:07:04 UTC) #23
yosin_UTC9
Regressions: Unexpected timeouts (3) inspector/console/console-format.html [ Timeout ] inspector/profiler/heap-snapshot-containment-expansion-preserved-when-sorting.html [ Timeout ] inspector/profiler/heap-snapshot-containment-sorting.html [ Timeout ...
4 years, 10 months ago (2015-06-26 04:07:08 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/68664)
4 years, 10 months ago (2015-06-26 05:36:59 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1201403002/80001
4 years, 10 months ago (2015-06-26 06:05:37 UTC) #28
commit-bot: I haz the power
4 years, 10 months ago (2015-06-26 07:28:07 UTC) #29
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197897

Powered by Google App Engine
This is Rietveld 408576698