diff options
Diffstat (limited to 'Source/WebCore/dom/Node.cpp')
-rw-r--r-- | Source/WebCore/dom/Node.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp index 0967ef5..ec5c423 100644 --- a/Source/WebCore/dom/Node.cpp +++ b/Source/WebCore/dom/Node.cpp @@ -770,7 +770,7 @@ bool Node::isContentEditable() const bool Node::rendererIsEditable(EditableLevel editableLevel) const { - if (document()->inDesignMode() || (document()->frame() && document()->frame()->page() && document()->frame()->page()->isEditable())) + if (document()->frame() && document()->frame()->page() && document()->frame()->page()->isEditable() && !shadowTreeRootNode()) return true; // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but @@ -1614,7 +1614,7 @@ SVGUseElement* Node::svgShadowHost() const } #endif -Node* Node::shadowAncestorNode() +Node* Node::shadowAncestorNode() const { #if ENABLE(SVG) // SVG elements living in a shadow tree only occur when <use> created them. @@ -1622,18 +1622,18 @@ Node* Node::shadowAncestorNode() // but the actual shadow tree element - as main difference to the HTML forms // shadow tree concept. (This function _could_ be made virtual - opinions?) if (isSVGElement()) - return this; + return const_cast<Node*>(this); #endif Node* root = shadowTreeRootNode(); if (root) return root->shadowHost(); - return this; + return const_cast<Node*>(this); } -Node* Node::shadowTreeRootNode() +Node* Node::shadowTreeRootNode() const { - Node* root = this; + Node* root = const_cast<Node*>(this); while (root) { if (root->isShadowRoot() || root->isSVGShadowRoot()) return root; |