<?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>43911</bug_id>
          
          <creation_ts>2010-08-12 06:06:36 -0700</creation_ts>
          <short_desc>foreignObject inside &lt;defs&gt; doesn&apos;t apply mask</short_desc>
          <delta_ts>2025-05-26 11:58:07 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Silvia Pfeiffer">silviapfeiffer1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>agafvv</cc>
    
    <cc>lck60980</cc>
    
    <cc>shirzadmahdi902</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>263761</commentid>
    <comment_count>0</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2010-08-12 06:06:36 -0700</bug_when>
    <thetext>Google Chrome: 6.0.472.25 dev
Safari/Webkit: Version 5.0.1 (6533.17.8, r63640)

I have a foreignObject in a &lt;defs&gt; and cannot apply a mask to it, because the foreignObject keeps getting rendered fully.

Here is the example:

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; height=&quot;270px&quot; width=&quot;480px&quot;&gt;
  &lt;mask id=&quot;c1&quot; maskUnits=&quot;userSpaceOnUse&quot; maskContentUnits=&quot;userSpaceOnUse&quot;&gt;
    &lt;circle id=&quot;circle&quot; cx=&quot;240&quot; cy=&quot;135&quot; r=&quot;135&quot; fill=&quot;white&quot;/&gt;
  &lt;/mask&gt;
  &lt;defs&gt;
    &lt;g id=&quot;videoGroup&quot;&gt;
      &lt;foreignObject width=&quot;100%&quot; height=&quot;100%&quot;&gt;
        &lt;body xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
          &lt;video id=&quot;vid&quot; class=&quot;target&quot; height=&quot;270px&quot; width=&quot;480px&quot; controls=&quot;controls&quot; autoplay=&quot;autoplay&quot;&gt;
              &lt;source src=&quot;http://annodex.net/~silvia/itext/chocolate_rain/chocolate_rain.mp4&quot;  type=&quot;video/mp4&quot;/&gt;
              &lt;source src=&quot;http://annodex.net/~silvia/itext/chocolate_rain/chocolate_rain.ogv&quot;  type=&quot;video/ogg&quot;/&gt;
          &lt;/video&gt;        
        &lt;/body&gt;
      &lt;/foreignObject&gt;
    &lt;/g&gt;
  &lt;/defs&gt;
  &lt;use xlink:href=&quot;#videoGroup&quot; mask=&quot;url(#c1)&quot;/&gt;
&lt;/svg&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>