WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
30399
<mask> and <pattern> don't handle texts
https://bugs.webkit.org/show_bug.cgi?id=30399
Summary
<mask> and <pattern> don't handle texts
Dirk Schulze
Reported
2009-10-15 11:10:16 PDT
Created
attachment 41236
[details]
Mask with text Texts in maks are ignored. I thougt that Eric already opened a bug about masking and texts but I couldn't find it. I added a short example. If mask works correctly, you should see a green squarre with the red text "Mask" on it.
Attachments
Mask with text
(302 bytes, image/svg+xml)
2009-10-15 11:10 PDT
,
Dirk Schulze
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2009-11-14 00:38:08 PST
***
Bug 15655
has been marked as a duplicate of this bug. ***
Dirk Schulze
Comment 2
2010-01-13 12:41:05 PST
The problem is in renderSubtreeToImage() (SVGRenderSupport.cpp). We set the paintInfo.rect to en empty IntRect. RenderObject::PaintInfo info(image->context(), IntRect(), PaintPhaseForeground, 0, 0, 0); This causes problems in RenderSVGText::paint(). RenderSVGText::paint() calls RenderBlock::paint(pi, 0, 0); and RenderBlock::paint intersects visibleOverflowRect() with paintInfo.rect and returns if this intersection is empty. But even disabling the return for testing didn't solve the problem. I had to add the paintInfo.rect of the SVGResource and the renderer with the relation to this resource to renderSubtreeToImage() manually to get texts working. Sounds a bit complicated atm :-P
Nikolas Zimmermann
Comment 3
2010-01-13 13:18:41 PST
(In reply to
comment #2
)
> The problem is in renderSubtreeToImage() (SVGRenderSupport.cpp). We set the > paintInfo.rect to en empty IntRect. > > RenderObject::PaintInfo info(image->context(), IntRect(), > PaintPhaseForeground, 0, 0, 0); > > This causes problems in RenderSVGText::paint(). RenderSVGText::paint() calls > > RenderBlock::paint(pi, 0, 0); > > and RenderBlock::paint intersects visibleOverflowRect() with paintInfo.rect and > returns if this intersection is empty. But even disabling the return for > testing didn't solve the problem. I had to add the paintInfo.rect of the > SVGResource and the renderer with the relation to this resource to > renderSubtreeToImage() manually to get texts working. Sounds a bit complicated > atm :-P
Yeah, it's a bit involved. We need to fix SVG text renderers first, otherwhise there will be no clean solution available.
Dirk Schulze
Comment 4
2010-07-01 09:18:11 PDT
Works in trunk. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug