mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 846144 - Don't optimize backgrounds to an ImageLayer if they have border-radius clipping. r=roc
This commit is contained in:
parent
d09f84d087
commit
1de129a04c
@ -1792,6 +1792,14 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager,
|
||||
nsRect borderArea = nsRect(ToReferenceFrame(), mFrame->GetSize());
|
||||
const nsStyleBackground::Layer &layer = mBackgroundStyle->mLayers[mLayer];
|
||||
|
||||
if (layer.mClip != NS_STYLE_BG_CLIP_BORDER) {
|
||||
return false;
|
||||
}
|
||||
nscoord radii[8];
|
||||
if (mFrame->GetBorderRadii(radii)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsBackgroundLayerState state =
|
||||
nsCSSRendering::PrepareBackgroundLayer(presContext,
|
||||
mFrame,
|
||||
|
24
layout/reftests/bugs/846144-1-ref.html
Normal file
24
layout/reftests/bugs/846144-1-ref.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Border radius issue demo</title>
|
||||
<style type="text/css">
|
||||
.testClass {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: 20px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAADdJREFUWEftzTERACAMADH8VAH+hRUXz5K77Dl39gtxRpwRZ8QZcUacEWfEGXFGnBFnxBlxZPYBKVqrOft7R9EAAAAASUVORK5CYII=);
|
||||
border-radius: 50px;
|
||||
/* Adding compatibility attributes for cross-browser comparison
|
||||
Issue repros fine with just transform set. */
|
||||
-moz-transform: translate(0,0);
|
||||
-ms-transform: translate(0,0);
|
||||
-webkit-transform: translate(0,0)
|
||||
transform: translate(0,0);
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="testClass"></div>
|
||||
</body></html>
|
24
layout/reftests/bugs/846144-1.html
Normal file
24
layout/reftests/bugs/846144-1.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Border radius issue demo</title>
|
||||
<style type="text/css">
|
||||
.testClass {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: 20px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAADdJREFUWEftzTERACAMADH8VAH+hRUXz5K77Dl39gtxRpwRZ8QZcUacEWfEGXFGnBFnxBlxZPYBKVqrOft7R9EAAAAASUVORK5CYII=);
|
||||
border-radius: 50px;
|
||||
background-size: contain;
|
||||
/* Adding compatibility attributes for cross-browser comparison
|
||||
Issue repros fine with just transform set. */
|
||||
-moz-transform: translate(0,0);
|
||||
-ms-transform: translate(0,0);
|
||||
-webkit-transform: translate(0,0)
|
||||
transform: translate(0,0);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="testClass"></div>
|
||||
</body></html>
|
@ -1747,3 +1747,4 @@ skip-if(B2G) == 818276-1.html 818276-1-ref.html
|
||||
== 827577-1b.html 827577-1-ref.html
|
||||
== 827799-1.html about:blank
|
||||
== 836844-1.html 836844-1-ref.html
|
||||
== 846144-1.html 846144-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user