<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>30399</bug_id>
          
          <creation_ts>2009-10-15 11:10:16 -0700</creation_ts>
          <short_desc>&lt;mask&gt; and &lt;pattern&gt; don&apos;t handle texts</short_desc>
          <delta_ts>2010-07-01 09:18:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>525.x (Safari 3.1)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Schulze">krit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>154850</commentid>
    <comment_count>0</comment_count>
      <attachid>41236</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2009-10-15 11:10:16 -0700</bug_when>
    <thetext>Created attachment 41236
Mask with text

Texts in maks are ignored. I thougt that Eric already opened a bug about masking and texts but I couldn&apos;t find it.

I added a short example. If mask works correctly, you should see a green squarre with the red text &quot;Mask&quot; on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>163653</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2009-11-14 00:38:08 -0800</bug_when>
    <thetext>*** Bug 15655 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180351</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-01-13 12:41:05 -0800</bug_when>
    <thetext>The problem is in renderSubtreeToImage() (SVGRenderSupport.cpp). We set the paintInfo.rect to en empty IntRect.

    RenderObject::PaintInfo info(image-&gt;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&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180375</commentid>
    <comment_count>3</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-01-13 13:18:41 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; The problem is in renderSubtreeToImage() (SVGRenderSupport.cpp). We set the
&gt; paintInfo.rect to en empty IntRect.
&gt; 
&gt;     RenderObject::PaintInfo info(image-&gt;context(), IntRect(),
&gt; PaintPhaseForeground, 0, 0, 0);
&gt; 
&gt; This causes problems in RenderSVGText::paint(). RenderSVGText::paint() calls
&gt; 
&gt;     RenderBlock::paint(pi, 0, 0);
&gt; 
&gt; and RenderBlock::paint intersects visibleOverflowRect() with paintInfo.rect and
&gt; returns if this intersection is empty. But even disabling the return for
&gt; testing didn&apos;t solve the problem. I had to add the paintInfo.rect of the
&gt; SVGResource and the renderer with the relation to this resource to
&gt; renderSubtreeToImage() manually to get texts working. Sounds a bit complicated
&gt; atm :-P

Yeah, it&apos;s a bit involved. We need to fix SVG text renderers first, otherwhise there will be no clean solution available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245380</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-07-01 09:18:11 -0700</bug_when>
    <thetext>Works in trunk. Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>41236</attachid>
            <date>2009-10-15 11:10:16 -0700</date>
            <delta_ts>2009-10-15 11:10:16 -0700</delta_ts>
            <desc>Mask with text</desc>
            <filename>mask3.svg</filename>
            <type>image/svg+xml</type>
            <size>302</size>
            <attacher name="Dirk Schulze">krit</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZGVmcz4KPG1hc2sgaWQ9
Im0xIj4KPHRleHQgeD0iMTAiIHk9IjcwIiBzdHlsZT0iZm9udC1zaXplOjMwcHg7ZmlsbDp3aGl0
ZTsiPjx0c3Bhbj5NYXNrPC90c3Bhbj48L3RleHQ+CjwvbWFzaz4KPC9kZWZzPgo8cmVjdCB4PSIw
IiB5PSIwIiB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgZmlsbD0iZ3JlZW4iLz4KPHJlY3QgeD0i
MTAiIHk9IjEwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0icmVkIiBtYXNrPSJ1cmwo
I20xKSIgLz4KPC9zdmc+Cgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>