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

Unified Diff: Source/core/layout/PendingSelection.cpp

Issue 1202153004: Enable selection for 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/layout/PendingSelection.cpp
diff --git a/Source/core/layout/PendingSelection.cpp b/Source/core/layout/PendingSelection.cpp
index 84f945064dc3ed8d69cefe5ae1ed5ef292621d13..d8dc8908045216be84afd15adf51d650ca621b5d 100644
--- a/Source/core/layout/PendingSelection.cpp
+++ b/Source/core/layout/PendingSelection.cpp
@@ -69,6 +69,8 @@ bool PendingSelection::isInDocumentAlgorithm(const Document& document) const
bool PendingSelection::isInDocument(const Document& document) const
{
+ if (RuntimeEnabledFeatures::selectionForWebComponentsEnabled())
+ return isInDocumentAlgorithm<VisibleSelection::InComposedTree>(document);
return isInDocumentAlgorithm<VisibleSelection::InDOMTree>(document);
}
@@ -102,6 +104,8 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
VisibleSelection PendingSelection::calcVisibleSelection() const
{
+ if (RuntimeEnabledFeatures::selectionForWebComponentsEnabled())
+ return calcVisibleSelectionAlgorithm<VisibleSelection::InComposedTree>();
return calcVisibleSelectionAlgorithm<VisibleSelection::InDOMTree>();
}

Powered by Google App Engine
This is Rietveld 408576698