Title: [191370] trunk/Source/WebKit/mac
Revision
191370
Author
[email protected]
Date
2015-10-20 19:21:02 -0700 (Tue, 20 Oct 2015)

Log Message

Fix build for clang-700.0.59.5 by replacing deprecated calls to convertScreenToBase: with convertRectFromScreen:.
https://bugs.webkit.org/show_bug.cgi?id=150379

Patch by Gordon Sheridan <[email protected]> on 2015-10-20
Reviewed by Simon Fraser.

* WebView/WebHTMLView.mm:
(-[WebHTMLView characterIndexForPoint:]):
Convert point to rect, and call convertRectFromScreen:.

(-[WebHTMLView firstRectForCharacterRange:]):
Replace convertBaseToScreen: with convertRectToScreen:.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (191369 => 191370)


--- trunk/Source/WebKit/mac/ChangeLog	2015-10-21 02:12:32 UTC (rev 191369)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-10-21 02:21:02 UTC (rev 191370)
@@ -1,3 +1,17 @@
+2015-10-20  Gordon Sheridan  <[email protected]>
+
+        Fix build for clang-700.0.59.5 by replacing deprecated calls to convertScreenToBase: with convertRectFromScreen:.
+        https://bugs.webkit.org/show_bug.cgi?id=150379
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView characterIndexForPoint:]):
+        Convert point to rect, and call convertRectFromScreen:.
+
+        (-[WebHTMLView firstRectForCharacterRange:]):
+        Replace convertBaseToScreen: with convertRectToScreen:.
+
 2015-10-20  Tim Horton  <[email protected]>
 
         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (191369 => 191370)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-10-21 02:12:32 UTC (rev 191369)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-10-21 02:21:02 UTC (rev 191370)
@@ -6108,8 +6108,10 @@
     NSWindow *window = [self window];
     WebFrame *frame = [self _frame];
 
-    if (window)
-        thePoint = [window convertScreenToBase:thePoint];
+    if (window) {
+        NSRect screenRect = { thePoint, NSZeroSize };
+        thePoint = [window convertRectFromScreen:screenRect].origin;
+    }     
     thePoint = [self convertPoint:thePoint fromView:nil];
 
     DOMRange *range = [frame _characterRangeAtPoint:thePoint];
@@ -6149,7 +6151,7 @@
 
     NSWindow *window = [self window];
     if (window)
-        resultRect.origin = [window convertBaseToScreen:resultRect.origin];
+        resultRect = [window convertRectToScreen:resultRect];
     
     LOG(TextInput, "firstRectForCharacterRange:(%u, %u) -> (%f, %f, %f, %f)", theRange.location, theRange.length, resultRect.origin.x, resultRect.origin.y, resultRect.size.width, resultRect.size.height);
     return resultRect;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to