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

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

Issue 1195743002: Have StyledMarkupSerializer work on the Composed tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/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);

Powered by Google App Engine
This is Rietveld 408576698