Bug 697215. CanScrollWithBitBlit needs to return true for scrollframes inside replaced elements (i.e., iframes) that are honoring border-radius. r=mats

This commit is contained in:
Robert O'Callahan 2011-12-20 14:31:20 +13:00
parent a9ec399632
commit 4cc46e0f9f
4 changed files with 37 additions and 1 deletions

View File

@ -1641,7 +1641,8 @@ CanScrollWithBlitting(nsIFrame* aFrame)
return false;
}
nsIScrollableFrame* sf = do_QueryFrame(f);
if (sf && nsLayoutUtils::HasNonZeroCorner(f->GetStyleBorder()->mBorderRadius))
if ((sf || f->IsFrameOfType(nsIFrame::eReplaced)) &&
nsLayoutUtils::HasNonZeroCorner(f->GetStyleBorder()->mBorderRadius))
return false;
if (nsLayoutUtils::IsPopup(f))
break;

View File

@ -0,0 +1,13 @@
<!DOCTYPE HTML>
<html>
<body onload="doTest()">
<iframe src="data:text/html,<body style='font-size:100px'><p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty"
id="f" style="width:500px; height:500px; border-radius:100px;"></iframe>
<script>
var f = document.getElementById("f");
function doTest() {
f.contentWindow.scrollTo(0, 80);
}
</script>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<body>
<iframe src="data:text/html,<body style='font-size:100px'><p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty<p>Hello<p>Kitty"
id="f" style="width:500px; height:500px; border-radius:100px;"></iframe>
<script>
var f = document.getElementById("f");
var count = 0;
function doTest() {
++count;
f.contentWindow.scrollTo(0, count*20);
if (count == 4) {
document.documentElement.removeAttribute("class");
} else {
setTimeout(doTest, 20);
}
}
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</body>
</html>

View File

@ -3,6 +3,7 @@ HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref
HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref
HTTP == fixed-text-1.html fixed-text-1.html?ref
HTTP == fixed-text-2.html fixed-text-2.html?ref
== iframe-border-radius.html iframe-border-radius-ref.html
HTTP == opacity-mixed-scrolling-1.html opacity-mixed-scrolling-1.html?ref
random-if(cocoaWidget) HTTP == opacity-mixed-scrolling-2.html opacity-mixed-scrolling-2.html?ref # see bug 625357
HTTP == simple-1.html simple-1.html?ref