Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |