Commit 6a4243e6 authored by vollick@chromium.org's avatar vollick@chromium.org

Opt out of composited scrolling with border radius.

This currently causes correctness and memory issues due to the way the
compositor handles masking out the corners. Let's punt on this for now.

BUG=409984,365828

Review URL: https://codereview.chromium.org/544183002

git-svn-id: svn://svn.chromium.org/blink/trunk@181484 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a41d2c1e
......@@ -277,6 +277,9 @@ crbug.com/237270 http/tests/images/png-partial-load-no-alpha.html [ Pass Timeout
crbug.com/341435 http/tests/images/image-with-origin-header.html [ Pass Timeout ]
Bug(vollick) compositing/overflow/nested-border-radius-clipping.html [ NeedsRebaseline ]
Bug(vollick) virtual/gpu/compositedscrolling/overflow/nested-border-radius-clipping.html [ NeedsRebaseline ]
crbug.com/248938 virtual/threaded/animations/3d/transform-origin-vs-functions.html [ Pass Failure ]
crbug.com/248938 [ Linux Win ] virtual/threaded/animations/animation-border-overflow.html [ Pass Timeout ]
crbug.com/248938 virtual/threaded/animations/animation-direction-normal.html [ Pass ImageOnlyFailure Timeout ]
......
No border radius (should be using composited scrolling): Pass.
Has border radius (should not be using composited scrolling): Pass.
<!DOCTYPE HTML>
<style>
#scroller {
overflow: scroll;
height: 300px;
width: 300px;
background-color: red;
}
#scrolled {
height: 1000px;
width: 250px;
background-color: green;
}
#fixed {
position: fixed;
height: 100px;
width: 100px;
background-color: green;
top: 400px;
left: 100px;
}
</style>
<div id="scroller">
<div id="scrolled"></div>
<div id="fixed"></div>
</div>
<script>
function isUsingCompositedScrolling(layer) {
if (layer.bounds[1] == 1000)
return true;
if (layer.children) {
for (var i = 0; i < layer.children.length; i++) {
if (isUsingCompositedScrolling(layer.children[i]))
return true;
}
}
return false;
}
if (window.internals)
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
if (window.testRunner) {
window.testRunner.dumpAsText();
window.testRunner.waitUntilDone();
}
var result = "";
onload = function() {
if (window.internals) {
result += "No border radius (should be using composited scrolling): ";
if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
result += "Pass.\n";
else
result += "Fail.\n"
}
document.getElementById("scroller").style.borderRadius = '5px';
requestAnimationFrame(function() {
if (window.internals) {
result += "Has border radius (should not be using composited scrolling): ";
if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
result += "Pass.\n";
else
result += "Fail.\n"
}
if (window.testRunner) {
window.testRunner.setCustomTextOutput(result);
window.testRunner.notifyDone();
}
});
};
</script>
......@@ -1461,7 +1461,8 @@ static bool layerNeedsCompositedScrolling(const RenderLayer* layer)
return layer->scrollsOverflow()
&& layer->compositor()->preferCompositingToLCDTextEnabled()
&& !layer->hasDescendantWithClipPath()
&& !layer->hasAncestorWithClipPath();
&& !layer->hasAncestorWithClipPath()
&& !layer->renderer()->style()->hasBorderRadius();
}
void RenderLayerScrollableArea::updateNeedsCompositedScrolling()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment