Title: [232938] trunk/Source/WebCore
- Revision
- 232938
- Author
- [email protected]
- Date
- 2018-06-18 12:01:57 -0700 (Mon, 18 Jun 2018)
Log Message
Unreviewed, rolling out r232935.
https://bugs.webkit.org/show_bug.cgi?id=186783
This patch broke macOS 32-bit build (Requested by n_wang on
#webkit).
Reverted changeset:
"AX: [macOS] When zoom is enabled, focus doesn't follow text
cursor"
https://bugs.webkit.org/show_bug.cgi?id=186697
https://trac.webkit.org/changeset/232935
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232937 => 232938)
--- trunk/Source/WebCore/ChangeLog 2018-06-18 18:54:49 UTC (rev 232937)
+++ trunk/Source/WebCore/ChangeLog 2018-06-18 19:01:57 UTC (rev 232938)
@@ -1,3 +1,18 @@
+2018-06-18 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r232935.
+ https://bugs.webkit.org/show_bug.cgi?id=186783
+
+ This patch broke macOS 32-bit build (Requested by n_wang on
+ #webkit).
+
+ Reverted changeset:
+
+ "AX: [macOS] When zoom is enabled, focus doesn't follow text
+ cursor"
+ https://bugs.webkit.org/show_bug.cgi?id=186697
+ https://trac.webkit.org/changeset/232935
+
2018-06-18 Nan Wang <[email protected]>
AX: [macOS] When zoom is enabled, focus doesn't follow text cursor
Modified: trunk/Source/WebCore/editing/mac/FrameSelectionMac.mm (232937 => 232938)
--- trunk/Source/WebCore/editing/mac/FrameSelectionMac.mm 2018-06-18 18:54:49 UTC (rev 232937)
+++ trunk/Source/WebCore/editing/mac/FrameSelectionMac.mm 2018-06-18 19:01:57 UTC (rev 232938)
@@ -32,6 +32,21 @@
namespace WebCore {
+#if !PLATFORM(IOS)
+static CGRect accessibilityConvertScreenRect(CGRect bounds)
+{
+ NSArray *screens = [NSScreen screens];
+ if ([screens count]) {
+ CGFloat screenHeight = NSHeight([(NSScreen *)[screens objectAtIndex:0] frame]);
+ bounds.origin.y = (screenHeight - (bounds.origin.y + bounds.size.height));
+ } else
+ bounds = CGRectZero;
+
+ return bounds;
+}
+#endif // !PLATFORM(IOS)
+
+
void FrameSelection::notifyAccessibilityForSelectionChange(const AXTextStateChangeIntent& intent)
{
Document* document = m_frame->document();
@@ -60,8 +75,8 @@
viewRect = frameView->contentsToScreen(viewRect);
CGRect cgCaretRect = CGRectMake(selectionRect.x(), selectionRect.y(), selectionRect.width(), selectionRect.height());
CGRect cgViewRect = CGRectMake(viewRect.x(), viewRect.y(), viewRect.width(), viewRect.height());
- cgCaretRect = toUserSpaceForPrimaryScreen(cgCaretRect);
- cgViewRect = toUserSpaceForPrimaryScreen(cgViewRect);
+ cgCaretRect = accessibilityConvertScreenRect(cgCaretRect);
+ cgViewRect = accessibilityConvertScreenRect(cgViewRect);
UAZoomChangeFocus(&cgViewRect, &cgCaretRect, kUAZoomFocusTypeInsertionPoint);
#endif // !PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes