Skip to content
Permalink
Browse files
Clipping along compositing borders in svg-edit
https://bugs.webkit.org/show_bug.cgi?id=151791

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderSVGRoot::layout() failed to clear overflow before recomputing
visual overflow, which could cause it to get stuck with stale overflow.
This would cause underpainting if its size went from small to large.

Test: svg/overflow/visual-overflow-change.html

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

LayoutTests:

Ref test that triggers recomputation of overflow.

* svg/overflow/visual-overflow-change-expected.html: Added.
* svg/overflow/visual-overflow-change.html: Added.


Canonical link: https://commits.webkit.org/170063@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
smfr committed Dec 7, 2015
1 parent 27f40c0 commit 7d8ed4d9d7ed024640082d7d3a0e20303fc4a151
@@ -1,3 +1,15 @@
2015-12-06 Simon Fraser <simon.fraser@apple.com>

Clipping along compositing borders in svg-edit
https://bugs.webkit.org/show_bug.cgi?id=151791

Reviewed by Zalan Bujtas.

Ref test that triggers recomputation of overflow.

* svg/overflow/visual-overflow-change-expected.html: Added.
* svg/overflow/visual-overflow-change.html: Added.

2015-12-06 Andy VanWagoner <thetalecrafter@gmail.com>

[INTL] Implement String.prototype.toLocaleLowerCase in ECMA-402
@@ -0,0 +1,53 @@
<!DOCTYPE HTML>
<head>
<style>
body {
overflow: hidden;
margin: 0;
}

.svgcanvas {
position: relative;
width: 3800px;
height: 600px;
display: inline-block;
overflow: hidden;
}

.indicator {
position: absolute;
top: 0;
left: 0;
width: 3800px; /* Trigger composited tiling */
height: 600px;
display: inline-block;
background-color: red;
}

.composited {
-webkit-transform: translateZ(0);
}

#svgroot {
position: absolute;
top: 0;
left: 0;
background-color: gray;
}

svg {
border: 4px solid black;
box-sizing: border-box;
}
</style>
</head>
<!-- You should see no red -->
<div class="indicator"></div>
<div class="composited svgcanvas">
<svg id="svgroot" width="1920" height="1400" overflow="visible">
<svg id="canvasBackground" x="540" y="480" width="640" height="480" overflow="none">
<rect width="100%" height="100%" fill="green"/>
</svg>
</svg>
</div>
</div>
@@ -0,0 +1,75 @@
<!DOCTYPE HTML>
<head>
<style>
body {
overflow: hidden;
margin: 0;
}

.svgcanvas {
position: relative;
width: 3800px;
height: 600px;
display: inline-block;
overflow: hidden;
}

.indicator {
position: absolute;
top: 0;
left: 0;
width: 3800px; /* Trigger composited tiling */
height: 600px;
display: inline-block;
background-color: red;
}

.composited {
-webkit-transform: translateZ(0);
}

#svgroot {
position: absolute;
top: 0;
left: 0;
background-color: gray;
}

svg {
border: 4px solid black;
box-sizing: border-box;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();

function doTest()
{
window.setTimeout(function() {
var svg = document.getElementById('svgroot');
svg.setAttribute('x', 640);
svg.setAttribute('y', 480);
svg.setAttribute('width', 1920);
svg.setAttribute('height', 1400);
var background = document.getElementById('canvasBackground');
background.setAttribute('x', 540);
background.setAttribute('y', 480);

if (window.testRunner)
testRunner.notifyDone();
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<!-- You should see no red -->
<div class="indicator"></div>
<div class="composited svgcanvas">
<svg id="svgroot" width="640" height="480" overflow="visible">
<svg id="canvasBackground" width="640" height="480" overflow="none">
<rect width="100%" height="100%" fill="green"/>
</svg>
</svg>
</div>
</div>
@@ -1,3 +1,19 @@
2015-12-06 Simon Fraser <simon.fraser@apple.com>

Clipping along compositing borders in svg-edit
https://bugs.webkit.org/show_bug.cgi?id=151791

Reviewed by Zalan Bujtas.

RenderSVGRoot::layout() failed to clear overflow before recomputing
visual overflow, which could cause it to get stuck with stale overflow.
This would cause underpainting if its size went from small to large.

Test: svg/overflow/visual-overflow-change.html

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

2015-12-06 Simon Fraser <simon.fraser@apple.com>

REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
@@ -196,6 +196,7 @@ void RenderSVGRoot::layout()
m_needsBoundariesOrTransformUpdate = false;
}

clearOverflow();
if (!shouldApplyViewportClip()) {
FloatRect contentRepaintRect = repaintRectInLocalCoordinates();
contentRepaintRect = m_localToBorderBoxTransform.mapRect(contentRepaintRect);

0 comments on commit 7d8ed4d

Please sign in to comment.