Title: [191513] branches/safari-601-branch/Source
- Revision
- 191513
- Author
- matthew_han...@apple.com
- Date
- 2015-10-23 15:32:33 -0700 (Fri, 23 Oct 2015)
Log Message
Merge r191484.
Modified Paths
Diff
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (191512 => 191513)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-23 21:34:27 UTC (rev 191512)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-23 22:32:33 UTC (rev 191513)
@@ -1,3 +1,22 @@
+2015-10-23 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r191484.
+
+ 2015-10-22 Gordon Sheridan <gordon_sheri...@apple.com>
+
+ Fix build for clang-700.0.59.5 by replacing deprecated calls to convert points between screen and window coordinates for Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=150379
+
+ Reviewed by Andy Estes.
+
+ Provide WAKWindow versions of the non-deprecated methods for converting an NSRect between
+ window and screen coordinates, which replace the deprecated methods that operated on an NSPoint.
+
+ * platform/ios/wak/WAKWindow.h:
+ * platform/ios/wak/WAKWindow.mm:
+ (-[WAKWindow convertRectToScreen:]): Added.
+ (-[WAKWindow convertRectFromScreen:]): Added.
+
2015-10-22 Matthew Hanson <matthew_han...@apple.com>
Merge r191357. rdar://problem/23103279
Modified: branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.h (191512 => 191513)
--- branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.h 2015-10-23 21:34:27 UTC (rev 191512)
+++ branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.h 2015-10-23 22:32:33 UTC (rev 191513)
@@ -107,6 +107,8 @@
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
- (NSPoint)convertScreenToBase:(NSPoint)aPoint;
+- (NSRect)convertRectToScreen:(NSRect)aRect;
+- (NSRect)convertRectFromScreen:(NSRect)aRect;
- (BOOL)isKeyWindow;
- (void)makeKeyWindow;
- (BOOL)isVisible;
Modified: branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.mm (191512 => 191513)
--- branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.mm 2015-10-23 21:34:27 UTC (rev 191512)
+++ branches/safari-601-branch/Source/WebCore/platform/ios/wak/WAKWindow.mm 2015-10-23 22:32:33 UTC (rev 191513)
@@ -160,6 +160,24 @@
return [_hostLayer convertPoint:aPoint fromLayer:rootLayer];
}
+- (NSRect)convertRectToScreen:(NSRect)windowRect
+{
+ CALayer* rootLayer = _hostLayer;
+ while (rootLayer.superlayer)
+ rootLayer = rootLayer.superlayer;
+
+ return [_hostLayer convertRect:windowRect toLayer:rootLayer];
+}
+
+- (NSRect)convertRectFromScreen:(NSRect)screenRect
+{
+ CALayer* rootLayer = _hostLayer;
+ while (rootLayer.superlayer)
+ rootLayer = rootLayer.superlayer;
+
+ return [_hostLayer convertRect:screenRect fromLayer:rootLayer];
+}
+
- (BOOL)isKeyWindow
{
return YES || self == _WAKKeyWindow;
Modified: branches/safari-601-branch/Source/WebKit/mac/ChangeLog (191512 => 191513)
--- branches/safari-601-branch/Source/WebKit/mac/ChangeLog 2015-10-23 21:34:27 UTC (rev 191512)
+++ branches/safari-601-branch/Source/WebKit/mac/ChangeLog 2015-10-23 22:32:33 UTC (rev 191513)
@@ -1,3 +1,21 @@
+2015-10-23 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r191484.
+
+ 2015-10-22 Gordon Sheridan <gordon_sheri...@apple.com>
+
+ Fix build for clang-700.0.59.5 by replacing deprecated calls to convert points between screen and window coordinates for Mac.
+ https://bugs.webkit.org/show_bug.cgi?id=150379
+
+ Reviewed by Andy Estes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView characterIndexForPoint:]):
+ Convert point to rect, and replace call to deprecated convertScreenToBase: with convertRectFromScreen:.
+
+ (-[WebHTMLView firstRectForCharacterRange:]):
+ Replace call to deprecated convertBaseToScreen: with convertRectToScreen:.
+
2015-10-13 Matthew Hanson <matthew_han...@apple.com>
Merge r188443. rdar://problem/22801969
Modified: branches/safari-601-branch/Source/WebKit/mac/WebView/WebHTMLView.mm (191512 => 191513)
--- branches/safari-601-branch/Source/WebKit/mac/WebView/WebHTMLView.mm 2015-10-23 21:34:27 UTC (rev 191512)
+++ branches/safari-601-branch/Source/WebKit/mac/WebView/WebHTMLView.mm 2015-10-23 22:32:33 UTC (rev 191513)
@@ -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.origin = [window convertRectToScreen:resultRect].origin;
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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes