mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1719375 - Consider documents used-as-an-image always active. r=tnikkel
These are ticked when painted, so it is fine and it's effectively what happened before bug 1717983 (because we didn't get into this condition: https://hg.mozilla.org/mozilla-central/rev/cb704553fc64#l3.73). Differential Revision: https://phabricator.services.mozilla.com/D119314
This commit is contained in:
parent
ab234269bd
commit
7ee0e2d6e4
12
image/test/mochitest/animated1.svg
Normal file
12
image/test/mochitest/animated1.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
style="animation: colorAnim 1s steps(2) infinite alternate"
|
||||
width="40" height="40">
|
||||
<style>
|
||||
@keyframes colorAnim {
|
||||
from { background-color: green }
|
||||
to { background-color: blue }
|
||||
}
|
||||
</style>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@ -2,6 +2,7 @@
|
||||
support-files =
|
||||
INT32_MIN.bmp
|
||||
animated1.gif
|
||||
animated1.svg
|
||||
animated2.gif
|
||||
animated-gif.gif
|
||||
animated-gif2.gif
|
||||
|
@ -150,7 +150,25 @@ const kTests = [
|
||||
element(doc) {
|
||||
return doc.documentElement;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
// bug 1719375: CSS animation in SVG image.
|
||||
{
|
||||
html: `
|
||||
<!doctype html>
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-image: url(animated1.svg);
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
||||
`,
|
||||
element(doc) {
|
||||
return doc.querySelector("div");
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
onload = async function() {
|
||||
|
@ -10788,6 +10788,14 @@ bool PresShell::ShouldBeActive() const {
|
||||
mIsActive));
|
||||
|
||||
Document* doc = mDocument;
|
||||
|
||||
if (doc->IsBeingUsedAsImage()) {
|
||||
// Documents used as an image can remain active. They do not tick their
|
||||
// refresh driver if not painted, and they can't run script or such so they
|
||||
// can't really observe much else.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Document* displayDoc = doc->GetDisplayDocument()) {
|
||||
// Ok, we're an external resource document -- we need to use our display
|
||||
// document's docshell to determine "IsActive" status, since we lack
|
||||
|
Loading…
Reference in New Issue
Block a user