<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171046] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171046">171046</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-12 23:35:21 -0700 (Sat, 12 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Elements with rendering disabled due to dimensions should not contribute to parent bounding box
https://bugs.webkit.org/show_bug.cgi?id=134184
Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2014-07-12
Reviewed by Dirk Schulze.
Source/WebCore:
SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
Examples of elements with rendering disabled:
- basic shape with width <= 0 or height <= 0
- path with no path data (d attribute missing or empty)
- polyline or polygon element with no point data (points attribute missing or empty)
To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
This is used to determine if an element is included when creating the union of child bounding boxes
in a container element.
Tests: svg/custom/GetBBox-path-nodata.html
svg/custom/GetBBox-polygon-nodata.html
svg/custom/GetBBox-polyline-nodata.html
svg/custom/getBBox-container-hiddenchild.html
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::isRenderingDisabled):
New method added. Always returns false so that derived classes that do not
implement this method retain the existing behaviour.
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
For each element potentially being included in the unioned bounding box of
a container, check isRenderingDisabled and skip that element if true.
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::isRenderingDisabled):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::isRenderingDisabled):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::isRenderingDisabled):
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
LayoutTests:
Test, for each element type, that when rendering is disabled, that element does not contribute
to the bounding box for an ancestor element.
Added test to ensure zero width/height polyline and polygon do contribute to ancestor bounding box.
Updated expected results for 1 existing test (shapes-rect-02-t) as this test included zero
width and zero height rects and these were previously included in the repaint rect.
* platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt:
* svg/custom/GetBBox-path-nodata-expected.txt: Added.
* svg/custom/GetBBox-path-nodata.html: Added.
* svg/custom/GetBBox-polygon-nodata-expected.txt: Added.
* svg/custom/GetBBox-polygon-nodata.html: Added.
* svg/custom/GetBBox-polyline-nodata-expected.txt: Added.
* svg/custom/GetBBox-polyline-nodata.html: Added.
* svg/custom/getBBox-container-hiddenchild-expected.txt: Added.
* svg/custom/getBBox-container-hiddenchild.html: Added.
* svg/custom/getBBox-perpendicular-polygon-expected.txt: Added.
* svg/custom/getBBox-perpendicular-polygon.svg: Added.
* svg/custom/getBBox-perpendicular-polyline-expected.txt: Added.
* svg/custom/getBBox-perpendicular-polyline.svg: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacsvgW3CSVG11shapesrect02texpectedtxt">trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGEllipsecpp">trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGEllipseh">trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGPathcpp">trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGPathh">trunk/Source/WebCore/rendering/svg/RenderSVGPath.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRectcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRecth">trunk/Source/WebCore/rendering/svg/RenderSVGRect.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGShapeh">trunk/Source/WebCore/rendering/svg/RenderSVGShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpathnodataexpectedtxt">trunk/LayoutTests/svg/custom/GetBBox-path-nodata-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpathnodatahtml">trunk/LayoutTests/svg/custom/GetBBox-path-nodata.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpolygonnodataexpectedtxt">trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpolygonnodatahtml">trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpolylinenodataexpectedtxt">trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomGetBBoxpolylinenodatahtml">trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxcontainerhiddenchildexpectedtxt">trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxcontainerhiddenchildhtml">trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxperpendicularpolygonexpectedtxt">trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxperpendicularpolygonsvg">trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon.svg</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxperpendicularpolylineexpectedtxt">trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetBBoxperpendicularpolylinesvg">trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline.svg</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/LayoutTests/ChangeLog        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-07-12 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
+
+ Elements with rendering disabled due to dimensions should not contribute to parent bounding box
+ https://bugs.webkit.org/show_bug.cgi?id=134184
+
+ Reviewed by Dirk Schulze.
+
+ Test, for each element type, that when rendering is disabled, that element does not contribute
+ to the bounding box for an ancestor element.
+
+ Added test to ensure zero width/height polyline and polygon do contribute to ancestor bounding box.
+
+ Updated expected results for 1 existing test (shapes-rect-02-t) as this test included zero
+ width and zero height rects and these were previously included in the repaint rect.
+
+ * platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt:
+ * svg/custom/GetBBox-path-nodata-expected.txt: Added.
+ * svg/custom/GetBBox-path-nodata.html: Added.
+ * svg/custom/GetBBox-polygon-nodata-expected.txt: Added.
+ * svg/custom/GetBBox-polygon-nodata.html: Added.
+ * svg/custom/GetBBox-polyline-nodata-expected.txt: Added.
+ * svg/custom/GetBBox-polyline-nodata.html: Added.
+ * svg/custom/getBBox-container-hiddenchild-expected.txt: Added.
+ * svg/custom/getBBox-container-hiddenchild.html: Added.
+ * svg/custom/getBBox-perpendicular-polygon-expected.txt: Added.
+ * svg/custom/getBBox-perpendicular-polygon.svg: Added.
+ * svg/custom/getBBox-perpendicular-polyline-expected.txt: Added.
+ * svg/custom/getBBox-perpendicular-polyline.svg: Added.
+
</ins><span class="cx"> 2014-07-11 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> [MSE] http/tests/media/media-source/mediasource-duration.html is failing.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacsvgW3CSVG11shapesrect02texpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> RenderView at (0,0) size 480x360
</span><span class="cx"> layer at (0,0) size 480x360
</span><span class="cx"> RenderSVGRoot {svg} at (0,0) size 480x360
</span><del>- RenderSVGContainer {g} at (0,0) size 401x277
</del><ins>+ RenderSVGContainer {g} at (0,0) size 181x277
</ins><span class="cx"> RenderSVGRect {rect} at (0,45) size 51x82 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=46.00] [width=50.00] [height=80.00]
</span><span class="cx"> RenderSVGRect {rect} at (129,0) size 52x81 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=130.00] [y=0.00] [width=50.00] [height=80.00]
</span><span class="cx"> RenderSVGRect {rect} at (249,45) size 2x82 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [x=250.00] [y=46.00] [width=0.00] [height=80.00]
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpathnodataexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-path-nodata-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-path-nodata-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-path-nodata-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Bug 134184: getBBox on path with no d attribute should return (0,0,0,0) and should not contribute to parent bbox
+
+For this test to pass, you should see 'Passed' twice below.
+
+Passed; Passed;
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpathnodatahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-path-nodata.html (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-path-nodata.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-path-nodata.html        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <script>
+ function check_rect_bbox(bbox, expected_bbox, test_name)
+ {
+ var result = true;
+ var result_str = "";
+
+ if (bbox.x == expected_bbox.x && bbox.y == expected_bbox.y && bbox.width == expected_bbox.width && bbox.height == expected_bbox.height) {
+ result_str = "Passed";
+         } else {
+ result_str += test_name + ": Failed";
+ result_str += "("+bbox.x+","+bbox.y+":"+bbox.width + "," + bbox.height+")";
+ result = false;
+ }
+
+ var p_result = document.querySelector("#result");
+ p_result.appendChild(document.createTextNode(result_str + "; "));
+ return result;
+ }
+
+ function run()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var p_bbox = document.querySelector("#p1").getBBox();
+ var g_bbox = document.querySelector("g").getBBox();
+
+ var result = true;
+
+ result &= check_rect_bbox(p_bbox, {"x":0, "y":0, "width":0, "height":0}, "getBBox on path with no d attribute")
+ result &= check_rect_bbox(g_bbox, document.querySelector("#r1").getBBox(),"path doesn't contribute to parent bbox")
+
+ if (!result) {
+ var visible_rect = document.querySelector("#r1");
+ visible_rect.setAttribute("fill", "red");
+ }
+ }
+ </script>
+
+<body onload="run()">
+<p>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=134184">134184</a>: getBBox on path with no d attribute should return (0,0,0,0) and should not contribute to parent bbox</p>
+<p>For this test to pass, you should see 'Passed' twice below.</a>
+<p id="result"></p>
+<svg xmlns="http://www.w3.org/2000/svg">
+<g>
+ <path id="p1" fill="none" stroke="red" />
+ <rect id="r1" x="50" y="50" width="50" height="50" fill="green" />
+</g>
+</svg>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpolygonnodataexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Bug 134184: getBBox on polygon with no points attribute should return (0,0,0,0) and should not contribute to parent bbox
+
+For this test to pass, you should see 'Passed' twice below.
+
+Passed; Passed;
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpolygonnodatahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata.html (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-polygon-nodata.html        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <script>
+ function check_rect_bbox(bbox, expected_bbox, test_name)
+ {
+ var result = true;
+ var result_str = "";
+
+ if (bbox.x == expected_bbox.x && bbox.y == expected_bbox.y && bbox.width == expected_bbox.width && bbox.height == expected_bbox.height) {
+ result_str = "Passed";
+         } else {
+ result_str += test_name + ": Failed";
+ result_str += "("+bbox.x+","+bbox.y+":"+bbox.width + "," + bbox.height+")";
+ result = false;
+ }
+
+ var p_result = document.querySelector("#result");
+ p_result.appendChild(document.createTextNode(result_str + "; "));
+ return result;
+ }
+
+ function run()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var p_bbox = document.querySelector("#p1").getBBox();
+ var g_bbox = document.querySelector("g").getBBox();
+
+ var result = true;
+
+ result &= check_rect_bbox(p_bbox, {"x":0, "y":0, "width":0, "height":0}, "getBBox on polygon with no points attribute")
+ result &= check_rect_bbox(g_bbox, document.querySelector("#r1").getBBox(),"polygon doesn't contribute to parent bbox")
+
+ if (!result) {
+ var visible_rect = document.querySelector("#r1");
+ visible_rect.setAttribute("fill", "red");
+ }
+ }
+ </script>
+
+<body onload="run()">
+<p>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=134184">134184</a>: getBBox on polygon with no points attribute should return (0,0,0,0) and should not contribute to parent bbox</p>
+<p>For this test to pass, you should see 'Passed' twice below.</a>
+<p id="result"></p>
+<svg xmlns="http://www.w3.org/2000/svg">
+<g>
+ <polygon id="p1" fill="none" stroke="red" />
+ <rect id="r1" x="50" y="50" width="50" height="50" fill="green" />
+</g>
+</svg>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpolylinenodataexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Bug 134184: getBBox on polyline with no points attribute should return (0,0,0,0) and should not contribute to parent bbox
+
+For this test to pass, you should see 'Passed' twice below.
+
+Passed; Passed;
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomGetBBoxpolylinenodatahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata.html (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/GetBBox-polyline-nodata.html        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <script>
+ function check_rect_bbox(bbox, expected_bbox, test_name)
+ {
+ var result = true;
+ var result_str = "";
+
+ if (bbox.x == expected_bbox.x && bbox.y == expected_bbox.y && bbox.width == expected_bbox.width && bbox.height == expected_bbox.height) {
+ result_str = "Passed";
+         } else {
+ result_str += test_name + ": Failed";
+ result_str += "("+bbox.x+","+bbox.y+":"+bbox.width + "," + bbox.height+")";
+ result = false;
+ }
+
+ var p_result = document.querySelector("#result");
+ p_result.appendChild(document.createTextNode(result_str + "; "));
+ return result;
+ }
+
+ function run()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var p_bbox = document.querySelector("#p1").getBBox();
+ var g_bbox = document.querySelector("g").getBBox();
+
+ var result = true;
+
+ result &= check_rect_bbox(p_bbox, {"x":0, "y":0, "width":0, "height":0}, "getBBox on polyline with no points attribute")
+ result &= check_rect_bbox(g_bbox, document.querySelector("#r1").getBBox(),"polyline doesn't contribute to parent bbox")
+
+ if (!result) {
+ var visible_rect = document.querySelector("#r1");
+ visible_rect.setAttribute("fill", "red");
+ }
+ }
+ </script>
+
+<body onload="run()">
+<p>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=134184">134184</a>: getBBox on polyline with no points attribute should return (0,0,0,0) and should not contribute to parent bbox</p>
+<p>For this test to pass, you should see 'Passed' twice below.</a>
+<p id="result"></p>
+<svg xmlns="http://www.w3.org/2000/svg">
+<g>
+ <path id="p1" fill="none" stroke="red" />
+ <rect id="r1" x="50" y="50" width="50" height="50" fill="green" />
+</g>
+</svg>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxcontainerhiddenchildexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+CONSOLE MESSAGE: line 56: Error: Invalid negative value for <rect> attribute width="-1"
+Bug 134184: Bounding box of hidden child is unioned with other elements of group
+
+For this test to pass, you should see 'Passed' below.
+
+Passed;
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxcontainerhiddenchildhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild.html (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild.html         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-container-hiddenchild.html        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <script>
+ function check_rect_bbox(bbox, test_name)
+ {
+ var result_str = "";
+ var visible_rect = document.querySelector("#r1");
+ var expected_bbox = visible_rect.getBBox();
+
+ if (bbox.x == expected_bbox.x && bbox.y == expected_bbox.y && bbox.width == expected_bbox.width && bbox.height == expected_bbox.height) {
+ result_str = "Passed";
+         } else {
+ result_str += test_name + ": Failed";
+ result_str += "("+bbox.x+","+bbox.y+":"+bbox.width + "," + bbox.height+")";
+ visible_rect.setAttribute("fill", "red");
+
+ var bbox_rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+ bbox_rect.setAttribute("x", bbox.x);
+ bbox_rect.setAttribute("y", bbox.y);
+ bbox_rect.setAttribute("width", bbox.width);
+ bbox_rect.setAttribute("height", bbox.height);
+ bbox_rect.setAttribute("fill", "none");
+ bbox_rect.setAttribute("stroke", "red");
+ bbox_rect.setAttribute("stroke-dasharray", "5 5");
+ document.querySelector("svg").appendChild(bbox_rect);
+ }
+
+ var p_result = document.querySelector("#result");
+ p_result.appendChild(document.createTextNode(result_str + "; "));
+ }
+
+ function run()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var g_bbox = document.querySelector("#g1").getBBox();
+ check_rect_bbox(g_bbox, "Group with hidden child");
+ }
+ </script>
+
+<body onload="run()">
+<p>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=134184">134184</a>: Bounding box of hidden child is unioned with other elements of group</p>
+<p>For this test to pass, you should see 'Passed' below.</a>
+<p id="result"></p>
+<svg xmlns="http://www.w3.org/2000/svg">
+<g id="g1">
+ <rect id="r1" x="50" y="50" width="50" height="50" fill="green" />
+ <rect id="r2" x="20" y="20" width="20" height="0" fill="red" />
+ <rect id="r3" x="120" y="20" width="20" height="20" fill="blue" style="display:none" />
+ <ellipse id="c1" cx="20" cy="120" rx="0" ry="20" fill="black" />
+ <!-- test the fall-back case as well as the normal case -->
+ <ellipse id="c2" cx="120" cy="20" rx="0" ry="20" stroke="black" vector-effect="non-scaling-stroke" />
+ <rect id="r4" x="20" y="120" width="20" height="0" fill="none" stroke="black" vector-effect="non-scaling-stroke" />
+ <g>
+ <rect id="r4" x="120" y="120" width="-1" height="100" fill="cyan" />
+ </g>
+</g>
+</svg>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxperpendicularpolygonexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+100 100 PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxperpendicularpolygonsvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon.svg (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon.svg         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-perpendicular-polygon.svg        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!-- Test the bounding box calculated for two perpendicular lines of length 100px created with the polygon element -->
+<!-- If the bounding box is 100x100, we consider this test passing. -->
+<svg xmlns="http://www.w3.org/2000/svg" onload="init()">
+ <script type="text/javascript">
+ <![CDATA[
+ function init()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ var txt = document.getElementById("text");
+ size = document.getElementById("shape").getBBox();
+ var passState = "FAIL";
+ if(size.width == 100 && size.height == 100)
+ passState = "PASS";
+ var textNode = document.createTextNode(size.width + " " + size.height + " " + passState);
+ txt.appendChild(textNode);
+ }
+ ]]>
+ </script>
+ <g id="shape">
+ <polygon stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" points="5,5 5,105" fill-rule="nonzero" />
+ <polygon stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" points="5,5 105,5" fill-rule="nonzero" />
+ </g>
+ <text id="text" x="50" y="50" />
+</svg>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxperpendicularpolylineexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline-expected.txt (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline-expected.txt        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+100 100 PASS
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetBBoxperpendicularpolylinesvg"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline.svg (0 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline.svg         (rev 0)
+++ trunk/LayoutTests/svg/custom/getBBox-perpendicular-polyline.svg        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!-- Test the bounding box calculated for two perpendicular lines of length 100px created with the polyline element -->
+<!-- If the bounding box is 100x100, we consider this test passing. -->
+<svg xmlns="http://www.w3.org/2000/svg" onload="init()">
+ <script type="text/javascript">
+ <![CDATA[
+ function init()
+ {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ var txt = document.getElementById("text");
+ size = document.getElementById("shape").getBBox();
+ var passState = "FAIL";
+ if(size.width == 100 && size.height == 100)
+ passState = "PASS";
+ var textNode = document.createTextNode(size.width + " " + size.height + " " + passState);
+ txt.appendChild(textNode);
+ }
+ ]]>
+ </script>
+ <g id="shape">
+ <polyline stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" points="5,5 5,105" fill-rule="nonzero" />
+ <polyline stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" points="5,5 105,5" fill-rule="nonzero" />
+ </g>
+ <text id="text" x="50" y="50" />
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/ChangeLog        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2014-07-12 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
+
+ Elements with rendering disabled due to dimensions should not contribute to parent bounding box
+ https://bugs.webkit.org/show_bug.cgi?id=134184
+
+ Reviewed by Dirk Schulze.
+
+ SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
+ Examples of elements with rendering disabled:
+ - basic shape with width <= 0 or height <= 0
+ - path with no path data (d attribute missing or empty)
+ - polyline or polygon element with no point data (points attribute missing or empty)
+
+ To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
+ This is used to determine if an element is included when creating the union of child bounding boxes
+ in a container element.
+
+ Tests: svg/custom/GetBBox-path-nodata.html
+ svg/custom/GetBBox-polygon-nodata.html
+ svg/custom/GetBBox-polyline-nodata.html
+ svg/custom/getBBox-container-hiddenchild.html
+
+ * rendering/svg/RenderSVGEllipse.cpp:
+ (WebCore::RenderSVGEllipse::isRenderingDisabled):
+ New method added. Checks bounding box to determine if rendering is disabled.
+ * rendering/svg/RenderSVGEllipse.h:
+ * rendering/svg/RenderSVGPath.cpp:
+ (WebCore::RenderSVGPath::isRenderingDisabled):
+ New method added. Checks bounding box to determine if rendering is disabled.
+ * rendering/svg/RenderSVGPath.h:
+ * rendering/svg/RenderSVGRect.cpp:
+ (WebCore::RenderSVGRect::isRenderingDisabled):
+ New method added. Checks bounding box to determine if rendering is disabled.
+ * rendering/svg/RenderSVGRect.h:
+ * rendering/svg/RenderSVGShape.h:
+ (WebCore::RenderSVGShape::isRenderingDisabled):
+ New method added. Always returns false so that derived classes that do not
+ implement this method retain the existing behaviour.
+ * rendering/svg/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
+ For each element potentially being included in the unioned bounding box of
+ a container, check isRenderingDisabled and skip that element if true.
+
+ * rendering/svg/RenderSVGEllipse.cpp:
+ (WebCore::RenderSVGEllipse::isRenderingDisabled):
+ * rendering/svg/RenderSVGEllipse.h:
+ * rendering/svg/RenderSVGPath.cpp:
+ (WebCore::RenderSVGPath::isRenderingDisabled):
+ * rendering/svg/RenderSVGPath.h:
+ * rendering/svg/RenderSVGRect.cpp:
+ (WebCore::RenderSVGRect::isRenderingDisabled):
+ * rendering/svg/RenderSVGRect.h:
+ * rendering/svg/RenderSVGShape.h:
+ * rendering/svg/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
+
</ins><span class="cx"> 2014-07-12 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGEllipsecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.cpp (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.cpp        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.cpp        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -153,4 +153,10 @@
</span><span class="cx"> return xrX * xrX + yrY * yrY <= 1.0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool RenderSVGEllipse::isRenderingDisabled() const
+{
+ // A radius of zero disables rendering of the element, and results in an empty bounding box.
+ return m_fillBoundingBox.isEmpty();
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGEllipseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.h (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.h        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGEllipse.h        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> virtual void updateShapeFromElement();
</span><span class="cx"> virtual bool isEmpty() const { return m_usePathFallback ? RenderSVGShape::isEmpty() : m_fillBoundingBox.isEmpty(); };
</span><ins>+ virtual bool isRenderingDisabled() const override;
</ins><span class="cx"> virtual void fillShape(GraphicsContext*) const;
</span><span class="cx"> virtual void strokeShape(GraphicsContext*) const;
</span><span class="cx"> virtual bool shapeDependentStrokeContains(const FloatPoint&);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -159,4 +159,11 @@
</span><span class="cx"> subpathData.pathIsDone();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool RenderSVGPath::isRenderingDisabled() const
+{
+ // For a polygon, polyline or path, rendering is disabled if there is no path data.
+ // No path data is possible in the case of a missing or empty 'd' or 'points' attribute.
+ return path().isEmpty();
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGPathh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGPath.h (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGPath.h        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGPath.h        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> FloatRect zeroLengthSubpathRect(const FloatPoint&, float) const;
</span><span class="cx"> void updateZeroLengthSubpaths();
</span><span class="cx">
</span><ins>+ virtual bool isRenderingDisabled() const override;
+
</ins><span class="cx"> Vector<FloatPoint> m_zeroLengthLinecapLocations;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -151,4 +151,10 @@
</span><span class="cx"> return m_fillBoundingBox.contains(point.x(), point.y());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool RenderSVGRect::isRenderingDisabled() const
+{
+ // A width or height of zero disables rendering for the element, and results in an empty bounding box.
+ return m_fillBoundingBox.isEmpty();
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRect.h (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRect.h        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRect.h        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">
</span><span class="cx"> virtual void updateShapeFromElement();
</span><span class="cx"> virtual bool isEmpty() const { return m_usePathFallback ? RenderSVGShape::isEmpty() : m_fillBoundingBox.isEmpty(); };
</span><ins>+ virtual bool isRenderingDisabled() const override;
</ins><span class="cx"> virtual void fillShape(GraphicsContext*) const;
</span><span class="cx"> virtual void strokeShape(GraphicsContext*) const;
</span><span class="cx"> virtual bool shapeDependentStrokeContains(const FloatPoint&);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.h (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> virtual void setNeedsTransformUpdate() override final { m_needsTransformUpdate = true; }
</span><span class="cx"> virtual void fillShape(GraphicsContext*) const;
</span><span class="cx"> virtual void strokeShape(GraphicsContext*) const;
</span><ins>+ virtual bool isRenderingDisabled() const = 0;
</ins><span class="cx">
</span><span class="cx"> bool hasPath() const { return m_path.get(); }
</span><span class="cx"> Path& path() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (171045 => 171046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-07-13 05:51:20 UTC (rev 171045)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-07-13 06:35:21 UTC (rev 171046)
</span><span class="lines">@@ -157,6 +157,10 @@
</span><span class="cx"> if (current->isSVGHiddenContainer())
</span><span class="cx"> continue;
</span><span class="cx">
</span><ins>+ // Don't include elements in the union that do not render.
+ if (current->isSVGShape() && toRenderSVGShape(current)->isRenderingDisabled())
+ continue;
+
</ins><span class="cx"> const AffineTransform& transform = current->localToParentTransform();
</span><span class="cx"> if (transform.isIdentity()) {
</span><span class="cx"> updateObjectBoundingBox(objectBoundingBox, objectBoundingBoxValid, current, current->objectBoundingBox());
</span></span></pre>
</div>
</div>
</body>
</html>