Bug 5100 - -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
Summary: -[WebTextRenderer _ATSU_drawRun:...] does not check view flippedness
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 11:54 PDT by mitz
Modified: 2005-09-24 11:31 PDT (History)
0 users

See Also:


Attachments
testcase (525 bytes, text/html)
2005-09-22 11:54 PDT, mitz
no flags Details
flip coordinates when necessary (1.08 KB, patch)
2005-09-22 12:25 PDT, mitz
darin: review-
Details | Formatted Diff | Diff
flip coordinates when necessary (1.07 KB, patch)
2005-09-23 08:50 PDT, mitz
no flags Details | Formatted Diff | Diff
flip coordinates when necessary (1.00 KB, patch)
2005-09-23 08:55 PDT, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2005-09-22 11:54:02 PDT
-[WebTextRenderer _ATSU_drawRun:style:geometry] does not check and compensate when drawing into a 
flipped view, resulting in flipped text in some cases.

To reproduce: open the testcase in Safari and drag each one of the links.
Expected: the link text to appear correctly in the drag image of each link.
Actual: in the first link's drag image, the link text is flipped horizontally.
Comment 1 mitz 2005-09-22 11:54:39 PDT
Created attachment 4009 [details]
testcase
Comment 2 mitz 2005-09-22 12:25:40 PDT
Created attachment 4011 [details]
flip coordinates when necessary

Note that it needs to flip when the view is unflipped, since the ATSUStyle
itself always flips (see _initializeATSUStyle).
Comment 3 Darin Adler 2005-09-23 08:39:39 PDT
Comment on attachment 4011 [details]
flip coordinates when necessary

Formatting is wrong here. There should not be a space after the "(" in the if
statements. Otherwise, this looks great.
Comment 4 mitz 2005-09-23 08:50:02 PDT
Created attachment 4016 [details]
flip coordinates when necessary
Comment 5 mitz 2005-09-23 08:55:15 PDT
Created attachment 4017 [details]
flip coordinates when necessary
Comment 6 mitz 2005-09-23 08:58:38 PDT
Comment on attachment 4017 [details]
flip coordinates when necessary

Corrected style and use of params.layout instead of layout
Comment 7 Darin Adler 2005-09-23 09:09:09 PDT
Comment on attachment 4017 [details]
flip coordinates when necessary

r=me
Comment 8 Darin Adler 2005-09-23 18:06:39 PDT
Thinking further on this, I think it's not so great to have the renderer depend on there being a currently-
focused NSView. Instead, the flippedness should be applied by the caller, or there should be a boolean 
passed in.

I have no objection to landing this patch first, but it's not a good long-term solution. The renderer code 
should be independent of NSView.