Bug 1761756 - Check the intersection again after conditioning the rect. r=miko

Differential Revision: https://phabricator.services.mozilla.com/D142310
This commit is contained in:
Tooru Fujisawa 2022-04-05 22:41:53 +00:00
parent 733087eb30
commit 4eb6200458
4 changed files with 42 additions and 0 deletions

View File

@ -3098,6 +3098,10 @@ void nsCSSBorderRenderer::DrawBorders() {
}
mOuterRect = ToRect(outerRect);
if (MOZ_UNLIKELY(!mDirtyRect.Intersects(mOuterRect))) {
return;
}
gfxRect innerRect = ThebesRect(mInnerRect);
gfxUtils::ConditionRect(innerRect);
mInnerRect = ToRect(innerRect);

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<style>
big {
border-block-end-style: dotted;
}
</style>
</head>
<body>
<big id="big" dir="rtl"></big>
<script>
const big = document.getElementById("big");
big.innerText = "\nA";
</script>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<style>
big {
background-color: red;
background-clip: text !important;
border-block-end-style: dotted;
}
</style>
</head>
<body>
<big id="big" dir="rtl"></big>
<script>
const big = document.getElementById("big");
big.innerText = "\nA";
</script>
</body>
</html>

View File

@ -15,3 +15,5 @@ fuzzy(0-80,0-1500) fails == border-dashed-non-integer.html masked.html
fuzzy(0-80,0-1500) fails fails-if(useDrawSnapshot) == border-dashed-radius-zoom.html masked-zoom.html
fuzzy(0-80,0-1500) fails-if(!useDrawSnapshot) == border-dotted-radius-zero.html masked-small.html
== 1752624.html 1752624-ref.html
# 1761756.html uses the fallback rendering and the result is slightly different
fuzzy(0-200,0-200) == 1761756.html 1761756-ref.html