summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/TreeScope.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
commita89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch)
treeb7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebCore/dom/TreeScope.cpp
parent8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff)
downloadqtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebCore/dom/TreeScope.cpp')
-rw-r--r--Source/WebCore/dom/TreeScope.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/WebCore/dom/TreeScope.cpp b/Source/WebCore/dom/TreeScope.cpp
index 07409f066..2f6f8bd9e 100644
--- a/Source/WebCore/dom/TreeScope.cpp
+++ b/Source/WebCore/dom/TreeScope.cpp
@@ -27,6 +27,7 @@
#include "TreeScope.h"
#include "ContainerNode.h"
+#include "ContextEnabledFeatures.h"
#include "DOMSelection.h"
#include "DOMWindow.h"
#include "Document.h"
@@ -38,7 +39,7 @@
#include "HTMLMapElement.h"
#include "HTMLNames.h"
#include "Page.h"
-#include "RuntimeEnabledFeatures.h"
+#include "ShadowRoot.h"
#include "TreeScopeAdopter.h"
#include <wtf/text/AtomicString.h>
#include <wtf/text/CString.h>
@@ -148,7 +149,7 @@ DOMSelection* TreeScope::getSelection() const
// as a container. It is now enabled only if runtime Shadow DOM feature is enabled.
// See https://bugs.webkit.org/show_bug.cgi?id=82697
#if ENABLE(SHADOW_DOM)
- if (RuntimeEnabledFeatures::shadowDOMEnabled()) {
+ if (ContextEnabledFeatures::shadowDOMEnabled(rootNode()->document()->domWindow())) {
m_selection = DOMSelection::create(this);
return m_selection.get();
}
@@ -221,7 +222,7 @@ Node* TreeScope::focusedNode()
TreeScope* treeScope = node->treeScope();
while (treeScope != this && treeScope != document) {
- node = treeScope->rootNode()->shadowHost();
+ node = toShadowRoot(treeScope->rootNode())->host();
treeScope = node->treeScope();
}
if (this != treeScope)