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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 return isRichlyEditablePosition(start()); 745 return isRichlyEditablePosition(start());
746 } 746 }
747 747
748 Element* VisibleSelection::rootEditableElement() const 748 Element* VisibleSelection::rootEditableElement() const
749 { 749 {
750 return editableRootForPosition(start()); 750 return editableRootForPosition(start());
751 } 751 }
752 752
753 Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const 753 Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const
754 { 754 {
755 return start().deprecatedNode() ? start().deprecatedNode()->nonBoundaryShado wTreeRootNode() : 0; 755 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.
756 } 756 }
757 757
758 VisibleSelection::ChangeObserver::ChangeObserver() 758 VisibleSelection::ChangeObserver::ChangeObserver()
759 { 759 {
760 } 760 }
761 761
762 VisibleSelection::ChangeObserver::~ChangeObserver() 762 VisibleSelection::ChangeObserver::~ChangeObserver()
763 { 763 {
764 } 764 }
765 765
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 sel.showTreeForThis(); 876 sel.showTreeForThis();
877 } 877 }
878 878
879 void showTree(const blink::VisibleSelection* sel) 879 void showTree(const blink::VisibleSelection* sel)
880 { 880 {
881 if (sel) 881 if (sel)
882 sel->showTreeForThis(); 882 sel->showTreeForThis();
883 } 883 }
884 884
885 #endif 885 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698