Chromium Code Reviews| Index: Source/core/editing/EditingStrategy.cpp |
| diff --git a/Source/core/editing/EditingStrategy.cpp b/Source/core/editing/EditingStrategy.cpp |
| index 6f97a2e6fd8944650ce8bd737a6f85ad665b34fd..ecddb978632569a5da4f0ba12b2ca989b0d6bc00 100644 |
| --- a/Source/core/editing/EditingStrategy.cpp |
| +++ b/Source/core/editing/EditingStrategy.cpp |
| @@ -5,6 +5,7 @@ |
| #include "config.h" |
| #include "core/editing/EditingStrategy.h" |
| +#include "core/dom/shadow/ElementShadow.h" |
| #include "core/editing/htmlediting.h" |
| namespace blink { |
| @@ -145,6 +146,16 @@ short EditingAlgorithm<Traversal>::comparePositions(Node* containerA, int offset |
| return 0; |
| } |
| +bool EditingInComposedTreeStrategy::isSelectionBoundaryShadowHost(const Node* node) |
| +{ |
| + if (!node->isElementNode()) |
|
tkent
2015/06/19 06:07:49
You assume |node| is non-null. So, the argument t
hajimehoshi
2015/06/19 06:26:51
Done.
|
| + return false; |
| + ElementShadow* shadow = toElement(node)->shadow(); |
| + if (!shadow) |
| + return false; |
| + return shadow->youngestShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot; |
| +} |
| + |
| ContainerNode* EditingInComposedTreeStrategy::parentOrShadowHostNode(const Node& node) |
| { |
| return parent(node); |