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

Unified Diff: third_party/WebKit/Source/core/editing/Position.cpp

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Internals.* Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/Position.cpp
diff --git a/third_party/WebKit/Source/core/editing/Position.cpp b/third_party/WebKit/Source/core/editing/Position.cpp
index 11f4d405afc432170a644f3e5ae4ec9c3052ae5e..2f13c06b17eb26cf2dfe730e56480977ea8e21a9 100644
--- a/third_party/WebKit/Source/core/editing/Position.cpp
+++ b/third_party/WebKit/Source/core/editing/Position.cpp
@@ -393,7 +393,7 @@ PositionInComposedTree toPositionInComposedTree(const Position& pos)
Node* anchor = pos.anchorNode();
if (anchor->offsetInCharacters())
return PositionInComposedTree(anchor, pos.computeOffsetInContainerNode());
- ASSERT(!isActiveInsertionPoint(*anchor));
+ ASSERT(!anchor->isSlotOrActiveInsertionPoint());
int offset = pos.computeOffsetInContainerNode();
Node* child = NodeTraversal::childAt(*anchor, offset);
if (!child) {
@@ -402,7 +402,7 @@ PositionInComposedTree toPositionInComposedTree(const Position& pos)
return PositionInComposedTree(anchor, PositionAnchorType::AfterChildren);
}
child->updateDistribution();
- if (isActiveInsertionPoint(*child)) {
+ if (child->isSlotOrActiveInsertionPoint()) {
if (anchor->isShadowRoot())
return PositionInComposedTree(anchor->shadowHost(), offset);
return PositionInComposedTree(anchor, offset);

Powered by Google App Engine
This is Rietveld 408576698