Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and improvements for the Zoom accessibility feature #1242

Closed
wants to merge 5 commits into from

Conversation

dusek
Copy link
Contributor

@dusek dusek commented Jul 12, 2014

Please see commit messages for details.

I release these patches into the public domain.

dusek added 5 commits July 12, 2014 21:09
bol_as_eol was meant for non-empty ranges, but the only place where
empty ranges were attempted with bol_as_eol was for Zoom tracking,
and it seems like I did not re-test Zoom after making the bol_as_eol
commit.

Fixes textmate/bugs#4
When setSelectionString is called during editing of text (like inserting
or deleting a character), it catches layout in a semi-consistent state
where horizontal position of individual characters cannot be determined.
Therefore during such events, we cannot pass the correct screen position
to the call to UAZoomChangeFocus.

So let's do the UAZoomChangeFocus call after this iteration of run loop.
This ensures everything in layout that had to update has updated when
calling UAZoomChangeFocus, thus enabling us to provide correct horizontal
screen position.
This makes Zoom support avoid doing all 2 conversions between UTF-8 to UTF-16,
and replaces call to rect_for_range with call to rect_at_index, which is
more efficient.

Note that this is a typical micro-optimization not resulting from any
actual performance measurement, but just from a desire to have a lean
code not doing redundant work.
Use `performSelector:withObject:afterDelay:` instead of dispatch_async
for `UAZoomChangeFocus` (Zoom focus change notifications).
Remove extra newline after a method
@dusek
Copy link
Contributor Author

dusek commented Jul 15, 2014

I added 2 new commits, one for the performSelector:withObject:afterDelay:, second for the newline.
The are marked as fixup! for immediate git rebase --interactive --autosquash master..

@sorbits
Copy link
Member

sorbits commented Jul 19, 2014

Thanks, merged as 754f1a1...7e01bab.

I added a (dummy) argument to updateZoom: so that the prototype matches what is expected when using performSelector:withObject:afterDelay:.

@sorbits sorbits closed this Jul 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants