Bug 21484 - GDI text does not respect non-rectangular clipping
Summary: GDI text does not respect non-rectangular clipping
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: mitz
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-10-08 13:40 PDT by mitz
Modified: 2011-11-03 09:45 PDT (History)
1 user (show)

See Also:


Attachments
Test case (855 bytes, image/svg+xml)
2008-10-08 13:41 PDT, mitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2008-10-08 13:40:44 PDT
The GDI text code path, when it does not take the drawIntoBitmap path, does not respect clipping paths on the GraphicsContext (and underlying CGContext) other than clipping rectangles. The reason is twofold:

1) In the CG/Win port, clipping a GraphicsContext to a path is not reflected on the DC side of the GraphicsContext
2) Even if it were, some code bypasses GraphicsContext and applies clipping to the CGContext directly, such as SVGResourceClipperCg.cpp (I know this is being worked on).

I think clipping to a bitmap mask suffers from the same issue.

To reproduce:
1) Open the attached test case in Safari on Windows
2) Quit Safari and set it up to use GDI (see <http://webkit.org/blog/168/gdi-text-on-windows/>)
3) Open the test case again, this time in GDI mode. Note how the text is not clipped to the circles.
Comment 1 mitz 2008-10-08 13:41:24 PDT
Created attachment 24197 [details]
Test case
Comment 2 mitz 2008-10-08 13:41:50 PDT
<rdar://problem/6278984>
Comment 3 mitz 2009-01-08 19:50:36 PST
<http://trac.webkit.org/projects/webkit/changeset/39736> includes WebKit changes to support fixing this bug.
Comment 4 mitz 2011-11-03 09:45:20 PDT
This was fixed in <http://trac.webkit.org/changeset/39736> if I remember correctly.