Lines Matching defs:node
122 Node* baseNode = s.base().node();
166 static bool removingNodeRemovesPosition(Node* node, const Position& position)
168 if (!position.node())
171 if (position.node() == node)
174 if (!node->isElementNode())
177 Element* element = static_cast<Element*>(node);
178 return element->contains(position.node()) || element->contains(position.node()->shadowAncestorNode());
181 void SelectionController::nodeWillBeRemoved(Node *node)
186 // There can't be a selection inside a fragment, so if a fragment's node is being removed,
188 if (node && highestAncestor(node)->nodeType() == Node::DOCUMENT_FRAGMENT_NODE)
191 bool baseRemoved = removingNodeRemovesPosition(node, m_selection.base());
192 bool extentRemoved = removingNodeRemovesPosition(node, m_selection.extent());
193 bool startRemoved = removingNodeRemovesPosition(node, m_selection.start());
194 bool endRemoved = removingNodeRemovesPosition(node, m_selection.end());
206 // selection, since doing so could move the start and end into the node
213 } else if (comparePositions(m_selection.start(), Position(node, 0)) == -1 && comparePositions(m_selection.end(), Position(node, 0)) == 1) {
214 // If we did nothing here, when this node's renderer was destroyed, the rect that it
222 RefPtr<Document> document = m_selection.start().node()->document();
258 Node* n = m_selection.extent().node();
259 Node* enclosingBlockNode = enclosingBlock(n);
771 Frame *frame = pos.node()->document()->frame();
777 // VisiblePosition creation can fail here if a node containing the selection becomes visibility:hidden
820 if (isNone() || !m_selection.start().node()->inDocument() || !m_selection.end().node()->inDocument()) {
825 m_selection.start().node()->document()->updateStyleIfNeeded();
832 ASSERT(pos.deepEquivalent().node()->renderer());
870 Node* node = m_selection.start().node();
871 if (!node)
874 RenderObject* renderer = node->renderer();
879 bool paintedByBlock = renderer->isBlockFlow() && caretRendersInsideNode(node);
964 Document* d = m_selection.start().node()->document();
1019 if (r->node()->isElementNode()) {
1020 Element *element = static_cast<Element *>(r->node());
1035 if (r->node() == m_selection.start().node())
1037 else if (r->node() == m_selection.end().node())
1104 Node* innerNode = result.innerNode();
1150 Node* ownerElementParent = ownerElement->parentNode();
1180 Node* root = 0;
1203 Node* startContainer = range->startContainer(ec);
1207 Node* endContainer = range->endContainer(ec);
1240 Node* startNode = start().node();
1254 bool SelectionController::caretRendersInsideNode(Node* node) const
1256 if (!node)
1258 return !isTableElement(node) && !editingIgnoresContent(node);
1282 if (Node* node = m_frame->document()->focusedNode()) {
1283 node->setNeedsStyleRecalc();
1284 if (RenderObject* renderer = node->renderer())
1342 // We need to update style in case the node containing the selection is made display:none.
1372 RenderObject* startRenderer = startPos.node()->renderer();
1373 RenderObject* endRenderer = endPos.node()->renderer();