<!DOCTYPE html>
<html>
<body>
  <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=112623.
       Empty-viewBox elements should not be rendered. -->

  <svg width="600px" height="100px" xmlns="http://www.w3.org/2000/svg">
    <defs>
      <pattern id="pattern" viewBox="10 10 0 0" width="100" height="100">
        <rect width="100" height="100" fill="red"/>
      </pattern>

      <marker id="marker" viewBox="0 0 0 0" markerWidth="100" markerHeight="100">
        <rect width="100" height="100" fill="red"/>
      </marker>
    </defs>

    <rect width="100" height="100" fill="green"/>
    <svg width="100px" height="100px" viewBox="0 0 0 0">
	<rect width="100" height="100" fill="red"/>
    </svg>

    <rect x="120" width="100" height="100" fill="green"/>
    <rect x="120" width="100" height="100" fill="url(#pattern)"/>

    <rect x="240" width="100" height="100" fill="green"/>
    <line x1="240" x2="340" marker-start="url(#marker)"/>
  </svg>

  <div style="width: 100px; height: 100px; background-color: green;">
    <svg width="100px" height="100px" viewBox="0 0 0 0" xmlns="http://www.w3.org/2000/svg">
      <rect width="100%" height="100%" fill="red"/>
    </svg>
  </div>
</body>
</html>
