Home | History | Annotate | Download | only in page

Lines Matching defs:newSelection

321 static void setSelectionIfNeeded(FrameSelection& selection, const VisibleSelection& newSelection)
323 if (selection.selection() != newSelection)
324 selection.setSelection(newSelection);
341 VisibleSelection newSelection(selection);
342 newSelection.setBase(positionBeforeNode(rootUserSelectAll).upstream(CanCrossEditingBoundary));
343 newSelection.setExtent(positionAfterNode(rootUserSelectAll).downstream(CanCrossEditingBoundary));
345 return newSelection;
371 VisibleSelection newSelection;
376 newSelection = VisibleSelection(pos);
377 newSelection.expandUsingGranularity(WordGranularity);
380 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSelection.isRange())
381 newSelection.appendTrailingWhitespace();
383 updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection), WordGranularity);
390 VisibleSelection newSelection;
401 newSelection = VisibleSelection(start, end);
405 if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSelection.isRange())
406 newSelection.appendTrailingWhitespace();
408 updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection), WordGranularity);
436 VisibleSelection newSelection;
440 newSelection = VisibleSelection::selectionFromContentsOfNode(URLElement);
442 updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection), WordGranularity);
477 VisibleSelection newSelection;
480 newSelection = VisibleSelection(pos);
481 newSelection.expandUsingGranularity(ParagraphGranularity);
484 return updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection), ParagraphGranularity);
520 VisibleSelection newSelection = m_frame->selection().selection();
523 if (extendSelection && newSelection.isCaretOrRange()) {
526 if (comparePositions(selectionInUserSelectAll.start(), newSelection.start()) < 0)
528 else if (comparePositions(newSelection.end(), selectionInUserSelectAll.end()) < 0)
536 Position start = newSelection.start();
537 Position end = newSelection.end();
541 newSelection = VisibleSelection(end, pos);
543 newSelection = VisibleSelection(start, pos);
546 newSelection.setExtent(pos);
550 newSelection.expandUsingGranularity(m_frame->selection().granularity());
553 newSelection = expandSelectionToRespectUserSelectAll(innerNode, VisibleSelection(visiblePos));
557 updateSelectionForMouseDownDispatchingSelectStart(innerNode, newSelection, granularity);
713 VisibleSelection newSelection = m_frame->selection().selection();
717 if (Node* selectionBaseNode = newSelection.base().deprecatedNode())
729 newSelection = VisibleSelection(targetPosition);
735 newSelection.setBase(positionBeforeNode(rootUserSelectAllForMousePressNode).upstream(CanCrossEditingBoundary));
736 newSelection.setExtent(positionAfterNode(rootUserSelectAllForMousePressNode).downstream(CanCrossEditingBoundary));
740 newSelection.setBase(positionAfterNode(rootUserSelectAllForMousePressNode).downstream(CanCrossEditingBoundary));
744 newSelection.setExtent(positionBeforeNode(rootUserSelectAllForTarget).upstream(CanCrossEditingBoundary));
746 newSelection.setExtent(positionAfterNode(rootUserSelectAllForTarget).downstream(CanCrossEditingBoundary));
748 newSelection.setExtent(targetPosition);
751 newSelection.setExtent(targetPosition);
755 newSelection.expandUsingGranularity(m_frame->selection().granularity());
757 m_frame->selection().setNonDirectionalSelectionIfNeeded(newSelection, m_frame->selection().granularity(),
786 VisibleSelection newSelection;
791 newSelection = VisibleSelection(pos);
794 setSelectionIfNeeded(m_frame->selection(), newSelection);
3822 VisibleSelection newSelection(visiblePos);
3823 m_frame->selection().setSelection(newSelection);