Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Issue 2531483003: Make Range::createAdjustedToTreeScope() to handle the shadow root at end of document tree correctly. (Closed)

Created:
4 years ago by yosin_UTC9
Modified:
4 years ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2883
Project:
chromium
Visibility:
Public.

Description

Make Range::createAdjustedToTreeScope() to handle the shadow root at end of document tree correctly. This patch makes |Range::createAdjustedToTreeScope()| to handle the shadow root at end of document tree correctly. Before this patch |createAdjustedToTreeScope()| to return the |Range| object in shadow tree rather than document tree, since it attempts to check tree scope of null-Node which is computed from collapsed |Range| object of the position after shadow root. This patch uses tree scope of anchor node of specified position instead of first node in range, which is |nullptr| if there is no node after specified position, e.g. |BeforeChildren| of the last node without child nodes, |AfterAnchor| or |AfterChildren| of the last node. The tree scope of position can be determined by anchor node rather than first node in the range because tree scope of child nodes of anchor node is same as anchor node, tree scope of before and after anchor node is also same as anchor node since parent of anchor node and anchor node are in same tree scope. BUG=666246 TEST=run_webkit_unit_tests --gtest_filter=RangeTest.createAdjustedToTreeScopeWithPositionInShadowTree Review-Url: https://codereview.chromium.org/2519323002 Cr-Commit-Position: refs/heads/master@{#433851} (cherry picked from commit 794ce12c31a9d697aaca28e24078c5d9f6edfe59) Committed: https://chromium.googlesource.com/chromium/src/+/e4df1d54a0ca2d2274b61db80144f6230c56c0b7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -17 lines) Patch
M third_party/WebKit/Source/core/dom/Range.cpp View 1 chunk +11 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/dom/RangeTest.cpp View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
yosin_UTC9
4 years ago (2016-11-25 01:45:36 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e4df1d54a0ca2d2274b61db80144f6230c56c0b7.

Powered by Google App Engine
This is Rietveld 408576698