Home | History | Annotate | Download | only in page

Lines Matching refs:selection

46     Node* node = frame->selection()->selection().base().anchorNode();
73 return m_frame->selection()->selection();
76 static Position anchorPosition(const VisibleSelection& selection)
78 Position anchor = selection.isBaseFirst() ? selection.start() : selection.end();
82 static Position focusPosition(const VisibleSelection& selection)
84 Position focus = selection.isBaseFirst() ? selection.end() : selection.start();
88 static Position basePosition(const VisibleSelection& selection)
90 return selection.base().parentAnchoredEquivalent();
93 static Position extentPosition(const VisibleSelection& selection)
95 return selection.extent().parentAnchoredEquivalent();
174 return !m_frame->selection()->isRange();
182 SelectionController* selection = m_frame->selection();
187 if (selection->isNone())
189 if (selection->isCaret())
198 return m_frame->selection()->isNone() ? 0 : 1;
215 m_frame->selection()->moveTo(VisiblePosition(Position(node, offset), DOWNSTREAM));
223 const VisibleSelection& selection = m_frame->selection()->selection();
225 if (selection.isNone()) {
230 m_frame->selection()->moveTo(VisiblePosition(selection.end(), DOWNSTREAM));
238 const VisibleSelection& selection = m_frame->selection()->selection();
240 if (selection.isNone()) {
245 m_frame->selection()->moveTo(VisiblePosition(selection.start(), DOWNSTREAM));
252 m_frame->selection()->clear();
272 m_frame->selection()->moveTo(visibleBase, visibleExtent);
288 m_frame->selection()->moveTo(VisiblePosition(Position(node, offset), DOWNSTREAM));
340 m_frame->selection()->modify(alter, direction, granularity, false);
362 m_frame->selection()->setExtent(VisiblePosition(Position(node, offset), DOWNSTREAM));
375 // If you're hitting this, you've added broken multi-range selection support
384 const VisibleSelection& selection = m_frame->selection()->selection();
385 return selection.firstRange();
392 m_frame->selection()->clear();
402 SelectionController* selection = m_frame->selection();
404 if (selection->isNone()) {
405 selection->setSelection(VisibleSelection(r));
409 RefPtr<Range> range = selection->selection().toNormalizedRange();
412 // We don't support discontiguous selection. We don't do anything if r and range don't intersect.
416 selection->setSelection(VisibleSelection(r->startPosition(), range->endPosition(), DOWNSTREAM));
419 selection->setSelection(VisibleSelection(r));
422 // We don't support discontiguous selection. We don't do anything if r and range don't intersect.
426 selection->setSelection(VisibleSelection(range.get()));
429 selection->setSelection(VisibleSelection(range->startPosition(), r->endPosition(), DOWNSTREAM));
439 SelectionController* selection = m_frame->selection();
441 if (selection->isNone())
445 selection->modify(SelectionController::AlterationExtend, DirectionBackward, CharacterGranularity);
447 RefPtr<Range> selectedRange = selection->selection().toNormalizedRange();
464 SelectionController* selection = m_frame->selection();
466 if (!n || m_frame->document() != n->document() || selection->isNone())
471 RefPtr<Range> selectedRange = selection->selection().toNormalizedRange();
506 return plainText(m_frame->selection()->selection().toNormalizedRange().get());