Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 26237004: Remove unused editing related member functions from WebViewClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-10-09T17:59:14 Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/FrameSelection.h ('k') | Source/core/editing/SetSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index e517fdf3c5d325b2a82342c5afa83bed23c55968..34e26f2b927add9bda075df166589fca7434b2eb 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -218,7 +218,7 @@ void FrameSelection::setNonDirectionalSelectionIfNeeded(const VisibleSelection&
}
newSelection.setIsDirectional(isDirectional); // Adjusting base and extent will make newSelection always directional
- if (m_selection == newSelection || !shouldChangeSelection(newSelection))
+ if (m_selection == newSelection)
return;
setSelection(newSelection, granularity);
@@ -957,10 +957,6 @@ bool FrameSelection::modify(EAlteration alter, SelectionDirection direction, Tex
trialFrameSelection.setSelection(m_selection);
trialFrameSelection.modify(alter, direction, granularity, NotUserTriggered);
- bool change = shouldChangeSelection(trialFrameSelection.selection());
- if (!change)
- return false;
-
if (trialFrameSelection.selection().isRange() && m_selection.isCaret() && !dispatchSelectStart())
return false;
}
@@ -1074,10 +1070,6 @@ bool FrameSelection::modify(EAlteration alter, unsigned verticalDistance, Vertic
FrameSelection trialFrameSelection;
trialFrameSelection.setSelection(m_selection);
trialFrameSelection.modify(alter, verticalDistance, direction, NotUserTriggered);
-
- bool change = shouldChangeSelection(trialFrameSelection.selection());
- if (!change)
- return false;
}
willBeModified(alter, direction == DirectionUp ? DirectionBackward : DirectionForward);
@@ -1462,10 +1454,8 @@ void FrameSelection::selectFrameElementInParentIfFullySelected()
// Focus on the parent frame, and then select from before this element to after.
VisibleSelection newSelection(beforeOwnerElement, afterOwnerElement);
- if (parent->selection().shouldChangeSelection(newSelection)) {
- page->focusController().setFocusedFrame(parent);
- parent->selection().setSelection(newSelection);
- }
+ page->focusController().setFocusedFrame(parent);
+ parent->selection().setSelection(newSelection);
}
void FrameSelection::selectAll()
@@ -1504,10 +1494,7 @@ void FrameSelection::selectAll()
return;
VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root.get()));
-
- if (shouldChangeSelection(newSelection))
- setSelection(newSelection);
-
+ setSelection(newSelection);
selectFrameElementInParentIfFullySelected();
notifyRendererOfSelectionChange(UserTriggered);
}
@@ -1815,11 +1802,6 @@ String FrameSelection::selectedTextForClipboard() const
return selectedText();
}
-bool FrameSelection::shouldDeleteSelection(const VisibleSelection& selection) const
-{
- return m_frame->editor().client().shouldDeleteRange(selection.toNormalizedRange().get());
-}
-
FloatRect FrameSelection::bounds(bool clipToVisibleContent) const
{
RenderView* root = m_frame->contentRenderer();
@@ -1934,11 +1916,6 @@ void FrameSelection::setSelectionFromNone()
setSelection(VisibleSelection(firstPositionInOrBeforeNode(node), DOWNSTREAM));
}
-bool FrameSelection::shouldChangeSelection(const VisibleSelection& newSelection) const
-{
- return m_frame->editor().shouldChangeSelection(selection(), newSelection, newSelection.affinity(), false);
-}
-
bool FrameSelection::dispatchSelectStart()
{
Node* selectStartTarget = m_selection.extent().containerNode();
« no previous file with comments | « Source/core/editing/FrameSelection.h ('k') | Source/core/editing/SetSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698