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

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: reviews 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
« no previous file with comments | « Source/core/editing/EditingStrategy.h ('k') | Source/core/editing/StyledMarkupSerializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingStrategy.cpp
diff --git a/Source/core/editing/EditingStrategy.cpp b/Source/core/editing/EditingStrategy.cpp
index 6f97a2e6fd8944650ce8bd737a6f85ad665b34fd..c3e9590b88d5f18a9d4782f5b814fedbc803ef97 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())
+ 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);
« no previous file with comments | « Source/core/editing/EditingStrategy.h ('k') | Source/core/editing/StyledMarkupSerializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698