-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UnifiedPDF] Add ability to start focusing next/previous text annotat…
…ions. https://bugs.webkit.org/show_bug.cgi?id=268349 rdar://problem/121890426 Reviewed by Simon Fraser. When a text annotation is currently active, the user should be able to focus the next/previous one using the appropriate keyboard shortcut. Effectivley, what we will need to do is iterate over the annotations in the appropriate direction until we find a text annotation that can be interacted with (this could be the same annotation if there are no others to be found). We start by checking the current page the active annotation is on. If there are any remaining annotations on the page, then we will iterate over them to see if the next one is on the page. If we could not find an appropriate text annotation on the page then we repeat the process by going to the next page in the appropriate direction. This process is repeated until we find an appropriate text annotation to return. There should always be at least one text annotation to return: the original one. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::findFirstTextAnnotationStartingAtIndex): (WebKit::UnifiedPDFPlugin::nextTextAnnotation const): (WebKit::UnifiedPDFPlugin::focusNextAnnotation): (WebKit::UnifiedPDFPlugin::focusPreviousAnnotation): Canonical link: https://commits.webkit.org/274337@main
- Loading branch information
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters