Skip to content
Permalink
Browse files
FrameSelection::setNonDirectionalSelectionIfNeeded should not have a …
…FrameSelection passed to it

https://bugs.webkit.org/show_bug.cgi?id=66636

Patch by Wyatt Carss <wcarss@chromium.org> on 2011-08-22
Reviewed by Darin Adler.

setNonDirectionalSelection was moved into FrameSelection in r93134 for
bug 60529, and still took a FrameSelection as an argument, which has been removed.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):

Canonical link: https://commits.webkit.org/82511@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Wyatt Carss authored and webkit-commit-queue committed Aug 22, 2011
1 parent bcdf255 commit 49ad1d82472aa2c9071f96aca36f12f121059bb1
Showing 4 changed files with 19 additions and 7 deletions.
@@ -1,3 +1,16 @@
2011-08-22 Wyatt Carss <wcarss@chromium.org>

FrameSelection::setNonDirectionalSelectionIfNeeded should not have a FrameSelection passed to it
https://bugs.webkit.org/show_bug.cgi?id=66636

Reviewed by Darin Adler.

setNonDirectionalSelection was moved into FrameSelection in r93134 for
bug 60529, and still took a FrameSelection as an argument, which has been removed.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):

2011-08-22 Tony Chang <tony@chromium.org>

Add CSS parsing of -webkit-flex-order
@@ -261,7 +274,7 @@
Add HTMLSourceElement to DOMWindow.idl for consistency. Constructors for
all elements should be available on DOMWindow.

* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
* bindings/generic/RuntimeEnabledFeatures.h:
* page/DOMWindow.idl:
@@ -163,15 +163,14 @@ void DragCaretController::setCaretPosition(const VisiblePosition& position)
updateCaretRect(document, m_position);
}

void FrameSelection::setNonDirectionalSelectionIfNeeded(FrameSelection* selection, const VisibleSelection& passedNewSelection, TextGranularity granularity)
void FrameSelection::setNonDirectionalSelectionIfNeeded(const VisibleSelection& passedNewSelection, TextGranularity granularity)
{
ASSERT(selection);
VisibleSelection newSelection = passedNewSelection;

if (shouldAlwaysUseDirectionalSelection(m_frame))
newSelection.setIsDirectional(true);

if (selection->selection() == newSelection || !selection->shouldChangeSelection(newSelection))
if (m_selection == newSelection || !shouldChangeSelection(newSelection))
return;

setSelection(newSelection, granularity);
@@ -223,7 +223,7 @@ class FrameSelection : private CaretBase {

bool shouldChangeSelection(const VisibleSelection&) const;
bool shouldDeleteSelection(const VisibleSelection&) const;
void setNonDirectionalSelectionIfNeeded(FrameSelection*, const VisibleSelection&, TextGranularity);
void setNonDirectionalSelectionIfNeeded(const VisibleSelection&, TextGranularity);
void setFocusedNodeIfNeeded();
void notifyRendererOfSelectionChange(EUserTriggered);

@@ -287,7 +287,7 @@ bool EventHandler::updateSelectionForMouseDownDispatchingSelectStart(Node* targe
m_selectionInitiationState = PlacedCaret;
}

m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity);
m_frame->selection()->setNonDirectionalSelectionIfNeeded(newSelection, granularity);

return true;
}
@@ -690,7 +690,7 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
if (m_frame->selection()->granularity() != CharacterGranularity)
newSelection.expandUsingGranularity(m_frame->selection()->granularity());

m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, m_frame->selection()->granularity());
m_frame->selection()->setNonDirectionalSelectionIfNeeded(newSelection, m_frame->selection()->granularity());
}
#endif // ENABLE(DRAG_SUPPORT)

0 comments on commit 49ad1d8

Please sign in to comment.