WebKit Bugzilla
Attachment 342961 Details for
Bug 186697
: AX: [macOS] When zoom is enabled, focus doesn't follow text cursor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 2.77 KB, created by
Nan Wang
on 2018-06-18 12:20:29 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nan Wang
Created:
2018-06-18 12:20:29 PDT
Size:
2.77 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 232894) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2018-06-15 Nan Wang <n_wang@apple.com> >+ >+ AX: [macOS] When zoom is enabled, focus doesn't follow text cursor >+ https://bugs.webkit.org/show_bug.cgi?id=186697 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Now that web process doesn't have access to NSScreen. The conversion of the >+ rects is wrong. Fixed this by using the right function that's available in >+ WebCore to get the rects. >+ >+ * editing/mac/FrameSelectionMac.mm: >+ (WebCore::accessibilityConvertScreenRect): >+ > 2018-06-15 Antti Koivisto <antti@apple.com> > > Semantic colors should not be transformed by color-filter >Index: Source/WebCore/editing/mac/FrameSelectionMac.mm >=================================================================== >--- Source/WebCore/editing/mac/FrameSelectionMac.mm (revision 232774) >+++ Source/WebCore/editing/mac/FrameSelectionMac.mm (working copy) >@@ -32,21 +32,6 @@ > > 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(); >@@ -73,10 +58,12 @@ void FrameSelection::notifyAccessibility > > selectionRect = frameView->contentsToScreen(selectionRect); > 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 = accessibilityConvertScreenRect(cgCaretRect); >- cgViewRect = accessibilityConvertScreenRect(cgViewRect); >+ NSRect nsCaretRect = NSMakeRect(selectionRect.x(), selectionRect.y(), selectionRect.width(), selectionRect.height()); >+ NSRect nsViewRect = NSMakeRect(viewRect.x(), viewRect.y(), viewRect.width(), viewRect.height()); >+ nsCaretRect = toUserSpaceForPrimaryScreen(nsCaretRect); >+ nsViewRect = toUserSpaceForPrimaryScreen(nsViewRect); >+ CGRect cgCaretRect = NSRectToCGRect(nsCaretRect); >+ CGRect cgViewRect = NSRectToCGRect(nsViewRect); > > UAZoomChangeFocus(&cgViewRect, &cgCaretRect, kUAZoomFocusTypeInsertionPoint); > #endif // !PLATFORM(IOS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186697
:
342849
| 342961