Bug 399258. nsCSSRendering::PaintBorder should not try to optimize away the case where the dirty rectangle is inside the element's padding-rect, because border-radius can make the border appear inside the padding-rect. nsDisplayBorder::OptimizeVisibility does this optimization correctly already so just remove it from PaintBorder. r+sr=vlad, a=damon

This commit is contained in:
roc+@cs.cmu.edu 2008-04-14 18:41:12 -07:00
parent 0cc180b641
commit 005cb0775b
4 changed files with 16 additions and 9 deletions

View File

@ -2765,15 +2765,6 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
innerRect.height = outerRect.height;
}
// If the dirty rect is completely inside the border area (e.g., only the
// content is being painted), then we can skip out now
// XXX this isn't exactly true for rounded borders, where the inner curves may
// encroach into the content area. A safer calculation would be to
// shorten innerRect by the radius one each side before performing this test.
if (innerRect.Contains(aDirtyRect)) {
return;
}
// we can assume that we're already clipped to aDirtyRect -- I think? (!?)
// Get our conversion values

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<div style="position:absolute; top:0; left:0; width:10px; height:10px; background:black;"></div>
</body>
</html>

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<body>
<div style="position:absolute; border: 20px solid black;
left: -50px; top: -50px; width: 3000px; height: 3000px;
-moz-border-radius: 160px; clip:rect(50px 60px 60px 50px);">
</div>
</body>
</html>

View File

@ -629,6 +629,7 @@ skip-if(MOZ_WIDGET_TOOLKIT!="windows") == 391045.html 391045-ref.html # windows-
== 398797-1d.html 398797-1-ref.html
== 399209-1.html 399209-1-ref.html
== 399209-2.html 399209-2-ref.html
== 399258-1.html 399258-1-ref.html
== 399384-1.html 399384-1-ref.html
== 400081-1.html about:blank
== 400171-1a.html 400171-1-ref.html