Title: [183082] trunk/Source/WebCore
Revision
183082
Author
[email protected]
Date
2015-04-21 16:23:55 -0700 (Tue, 21 Apr 2015)

Log Message

Unreviewed, rolling out r183077.
https://bugs.webkit.org/show_bug.cgi?id=144021

broke a bunch of tests, bfulgham is going to try again
(Requested by thorton on #webkit).

Reverted changeset:

"Context menu doesn't account for selection semantics"
https://bugs.webkit.org/show_bug.cgi?id=143958
http://trac.webkit.org/changeset/183077

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183081 => 183082)


--- trunk/Source/WebCore/ChangeLog	2015-04-21 23:20:32 UTC (rev 183081)
+++ trunk/Source/WebCore/ChangeLog	2015-04-21 23:23:55 UTC (rev 183082)
@@ -1,3 +1,17 @@
+2015-04-21  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r183077.
+        https://bugs.webkit.org/show_bug.cgi?id=144021
+
+        broke a bunch of tests, bfulgham is going to try again
+        (Requested by thorton on #webkit).
+
+        Reverted changeset:
+
+        "Context menu doesn't account for selection semantics"
+        https://bugs.webkit.org/show_bug.cgi?id=143958
+        http://trac.webkit.org/changeset/183077
+
 2015-04-21  Chris Dumez  <[email protected]>
 
         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging

Modified: trunk/Source/WebCore/page/EventHandler.cpp (183081 => 183082)


--- trunk/Source/WebCore/page/EventHandler.cpp	2015-04-21 23:20:32 UTC (rev 183081)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2015-04-21 23:23:55 UTC (rev 183082)
@@ -569,31 +569,21 @@
     return true;
 }
 
-#if !PLATFORM(MAC)
-VisibleSelection EventHandler::selectClosestWordFromHitTestResultBasedOnLookup(const HitTestResult&)
-{
-    return VisibleSelection();
-}
-#endif
-
 void EventHandler::selectClosestWordFromHitTestResult(const HitTestResult& result, AppendTrailingWhitespace appendTrailingWhitespace)
 {
     Node* targetNode = result.targetNode();
     VisibleSelection newSelection;
 
     if (targetNode && targetNode->renderer()) {
-        newSelection = selectClosestWordFromHitTestResultBasedOnLookup(result);
-        if (newSelection.isNone()) {
-            VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint(), nullptr));
-            if (pos.isNotNull()) {
-                newSelection = VisibleSelection(pos);
-                newSelection.expandUsingGranularity(WordGranularity);
-            }
-
-            if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSelection.isRange())
-                newSelection.appendTrailingWhitespace();
+        VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint(), nullptr));
+        if (pos.isNotNull()) {
+            newSelection = VisibleSelection(pos);
+            newSelection.expandUsingGranularity(WordGranularity);
         }
 
+        if (appendTrailingWhitespace == ShouldAppendTrailingWhitespace && newSelection.isRange())
+            newSelection.appendTrailingWhitespace();
+
         updateSelectionForMouseDownDispatchingSelectStart(targetNode, expandSelectionToRespectSelectOnMouseDown(*targetNode, newSelection), WordGranularity);
     }
 }

Modified: trunk/Source/WebCore/page/EventHandler.h (183081 => 183082)


--- trunk/Source/WebCore/page/EventHandler.h	2015-04-21 23:20:32 UTC (rev 183081)
+++ trunk/Source/WebCore/page/EventHandler.h	2015-04-21 23:23:55 UTC (rev 183082)
@@ -325,7 +325,6 @@
     bool eventActivatedView(const PlatformMouseEvent&) const;
     bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleSelection&, TextGranularity);
     void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailingWhitespace);
-    VisibleSelection selectClosestWordFromHitTestResultBasedOnLookup(const HitTestResult&);
     void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
     void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults&);
 

Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (183081 => 183082)


--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm	2015-04-21 23:20:32 UTC (rev 183081)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm	2015-04-21 23:23:55 UTC (rev 183082)
@@ -31,7 +31,6 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "DataTransfer.h"
-#include "DictionaryLookup.h"
 #include "DragController.h"
 #include "EventNames.h"
 #include "FocusController.h"
@@ -46,7 +45,6 @@
 #include "Page.h"
 #include "Pasteboard.h"
 #include "PlatformEventFactoryMac.h"
-#include "Range.h"
 #include "RenderLayer.h"
 #include "RenderListBox.h"
 #include "RenderWidget.h"
@@ -1009,13 +1007,4 @@
 #endif
 }
 
-VisibleSelection EventHandler::selectClosestWordFromHitTestResultBasedOnLookup(const HitTestResult& result)
-{
-    NSDictionary *options = nil;
-    if (RefPtr<Range> range = rangeForDictionaryLookupAtHitTestResult(result, &options))
-        return VisibleSelection(range.get());
-
-    return VisibleSelection();
 }
-
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to