Bug 43911 - foreignObject inside <defs> doesn't apply mask
Summary: foreignObject inside <defs> doesn't apply mask
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 06:06 PDT by Silvia Pfeiffer
Modified: 2020-08-22 12:51 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silvia Pfeiffer 2010-08-12 06:06:36 PDT
Google Chrome: 6.0.472.25 dev
Safari/Webkit: Version 5.0.1 (6533.17.8, r63640)

I have a foreignObject in a <defs> and cannot apply a mask to it, because the foreignObject keeps getting rendered fully.

Here is the example:

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