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

Unified Diff: Source/core/editing/VisibleSelection.cpp

Issue 848843002: VisibleSelection::nonBoundaryShadowTreeRootNode should return null when its anchor is a shadow root (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months 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: Source/core/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index 86c8475baae03cfff83551a44e30657711ac5448..e004d74c8d4d4cae8e5bdf3a468bb1e6fd789fa2 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -752,7 +752,7 @@ Element* VisibleSelection::rootEditableElement() const
Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const
{
- return start().deprecatedNode() ? start().deprecatedNode()->nonBoundaryShadowTreeRootNode() : 0;
+ return start().deprecatedNode() && !start().deprecatedNode()->isShadowRoot() ? start().deprecatedNode()->nonBoundaryShadowTreeRootNode() : 0;
yosin_UTC9 2015/01/14 01:33:44 I think |start()| should not point to shadow root.
keishi 2015/01/14 05:04:51 I have confirmed that this is what's happening. 1.
}
VisibleSelection::ChangeObserver::ChangeObserver()

Powered by Google App Engine
This is Rietveld 408576698