Index: sky/engine/core/editing/htmlediting.cpp |
diff --git a/sky/engine/core/editing/htmlediting.cpp b/sky/engine/core/editing/htmlediting.cpp |
index 7eca4ecad0c37210de07a18648d9a77686f12210..369121b493b67211a8808d953aca44fbdbdb012e 100644 |
--- a/sky/engine/core/editing/htmlediting.cpp |
+++ b/sky/engine/core/editing/htmlediting.cpp |
@@ -837,7 +837,7 @@ int indexForVisiblePosition(const VisiblePosition& visiblePosition, RefPtr<Conta |
if (shadowRoot) |
scope = shadowRoot; |
else |
- scope = document.documentElement(); |
+ scope = &document; |
RefPtr<Range> range = Range::create(document, firstPositionInNode(scope.get()), p.parentAnchoredEquivalent()); |