Title: [93531] trunk/Source/WebCore
Revision
93531
Author
commit-qu...@webkit.org
Date
2011-08-22 13:05:51 -0700 (Mon, 22 Aug 2011)

Log Message

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

Patch by Wyatt Carss <wca...@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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93530 => 93531)


--- trunk/Source/WebCore/ChangeLog	2011-08-22 19:35:50 UTC (rev 93530)
+++ trunk/Source/WebCore/ChangeLog	2011-08-22 20:05:51 UTC (rev 93531)
@@ -1,3 +1,16 @@
+2011-08-22  Wyatt Carss  <wca...@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  <t...@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:

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (93530 => 93531)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2011-08-22 19:35:50 UTC (rev 93530)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2011-08-22 20:05:51 UTC (rev 93531)
@@ -163,15 +163,14 @@
         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);

Modified: trunk/Source/WebCore/editing/FrameSelection.h (93530 => 93531)


--- trunk/Source/WebCore/editing/FrameSelection.h	2011-08-22 19:35:50 UTC (rev 93530)
+++ trunk/Source/WebCore/editing/FrameSelection.h	2011-08-22 20:05:51 UTC (rev 93531)
@@ -223,7 +223,7 @@
 
     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);
 

Modified: trunk/Source/WebCore/page/EventHandler.cpp (93530 => 93531)


--- trunk/Source/WebCore/page/EventHandler.cpp	2011-08-22 19:35:50 UTC (rev 93530)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2011-08-22 20:05:51 UTC (rev 93531)
@@ -287,7 +287,7 @@
         m_selectionInitiationState = PlacedCaret;
     }
 
-    m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity);
+    m_frame->selection()->setNonDirectionalSelectionIfNeeded(newSelection, granularity);
 
     return true;
 }
@@ -690,7 +690,7 @@
     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)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to