Summary: All text that ATSUI needs to draw at an X or Y coordinate (or both) greater or equal to 32768
gets drawn at 32768 (for that coordinate). The result is no text at the bottom of long pages (because
it's all moved upwards).
To reproduce: Open the test-case, ATSUICoordinateLimits.html, in Safari and press the End key to scroll
to the bottom.
Expected: no text inside the yellow rect, and Hebrew letters to appear between "here: " and ", not" in the
Actual: Hebrew letters that were supposed to be in the bottom line are drawn inside the yellow rect (but
in the correct horizontal position). If the page is scroll up and down to the bottom again by dragging
the scroll thumb, then those Hebrew letters are no longer visible anywhere.
Analysis: The problem is that ATSUDrawText only accepts coordinates smaller than 32768 in absolute
value. Greater values are truncated to 32768. A possible solution is to reach larger coordinates by
translating the graphics context's CTM prior to calling ATSUDrawText. I will attach an (inefficient, non-
elegant) patch that uses this technique to successfully solve the problem.
Created attachment 2265 [details]
Created attachment 2266 [details]
Demonstrates a fix strategy
Created attachment 2471 [details]
Essentially the same patch
Comment on attachment 2471 [details]
Looks fine to me, r=me.
There are spaces after the "(" and before the ")" characters that shouldn't be
there, so when landing this, that should be fixed.