Index: Source/core/page/DOMSelection.cpp |
diff --git a/Source/core/page/DOMSelection.cpp b/Source/core/page/DOMSelection.cpp |
index 2bc803c05bb1612a3fe270c66354e2c65505ef97..b9a85af24cfe6f56e28b1b74f090f1bb6e1b0261 100644 |
--- a/Source/core/page/DOMSelection.cpp |
+++ b/Source/core/page/DOMSelection.cpp |
@@ -60,7 +60,7 @@ static Node* selectionShadowAncestor(Frame* frame) |
} |
DOMSelection::DOMSelection(const TreeScope* treeScope) |
- : DOMWindowProperty(treeScope->rootNode()->document()->frame()) |
+ : DOMWindowProperty(treeScope->rootNode()->document().frame()) |
, m_treeScope(treeScope) |
{ |
ScriptWrappable::init(this); |
@@ -381,7 +381,7 @@ PassRefPtr<Range> DOMSelection::getRangeAt(int index, ExceptionState& es) |
if (Node* shadowAncestor = selectionShadowAncestor(m_frame)) { |
ContainerNode* container = shadowAncestor->parentNodeGuaranteedHostFree(); |
int offset = shadowAncestor->nodeIndex(); |
- return Range::create(shadowAncestor->document(), container, offset, container, offset); |
+ return Range::create(&shadowAncestor->document(), container, offset, container, offset); |
} |
const VisibleSelection& selection = m_frame->selection()->selection(); |
@@ -463,7 +463,7 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const |
FrameSelection* selection = m_frame->selection(); |
- if (!n || m_frame->document() != n->document() || selection->isNone()) |
+ if (!n || m_frame->document() != &n->document() || selection->isNone()) |
return false; |
unsigned nodeIndex = n->nodeIndex(); |
@@ -545,7 +545,7 @@ bool DOMSelection::isValidForPosition(Node* node) const |
ASSERT(m_frame); |
if (!node) |
return true; |
- return node->document() == m_frame->document(); |
+ return &node->document() == m_frame->document(); |
} |
} // namespace WebCore |