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.
Created attachment 24197 [details] Test case
<rdar://problem/6278984>
<http://trac.webkit.org/projects/webkit/changeset/39736> includes WebKit changes to support fixing this bug.
This was fixed in <http://trac.webkit.org/changeset/39736> if I remember correctly.