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

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

Created:
4 years, 1 month ago by yosin_UTC9
Modified:
4 years, 1 month ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/794ce12c31a9d697aaca28e24078c5d9f6edfe59 Cr-Commit-Position: refs/heads/master@{#433851}

Patch Set 1 : 2016-11-22T17:39:31 #

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: 19 (14 generated)
yosin_UTC9
PTAL
4 years, 1 month ago (2016-11-22 09:41:01 UTC) #10
tkent
lgtm
4 years, 1 month ago (2016-11-22 09:49:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2519323002/20001
4 years, 1 month ago (2016-11-22 14:02:09 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 1 month ago (2016-11-22 14:06:52 UTC) #17
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 14:10:40 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/794ce12c31a9d697aaca28e24078c5d9f6edfe59
Cr-Commit-Position: refs/heads/master@{#433851}

Powered by Google App Engine
This is Rietveld 408576698