mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827591 - Be more careful changing declarations on page rules. r=dbaron
This commit is contained in:
parent
7cc38ffb42
commit
0dd6b2e3a8
19
layout/style/crashtests/827591-1.html
Normal file
19
layout/style/crashtests/827591-1.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
|
||||
@page {}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.styleSheets[0].cssRules[0].style.paddingLeft = "initial";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
@ -84,3 +84,4 @@ load 806310-1.html
|
||||
load 812824.html
|
||||
load 822842.html
|
||||
load 822766-1.html
|
||||
load 827591-1.html
|
||||
|
@ -2595,7 +2595,11 @@ void
|
||||
nsCSSPageRule::ChangeDeclaration(css::Declaration* aDeclaration)
|
||||
{
|
||||
mImportantRule = nullptr;
|
||||
// Be careful to not assign to an nsAutoPtr if we would be assigning
|
||||
// the thing it already holds.
|
||||
if (aDeclaration != mDeclaration) {
|
||||
mDeclaration = aDeclaration;
|
||||
}
|
||||
|
||||
nsCSSStyleSheet* sheet = GetStyleSheet();
|
||||
if (sheet) {
|
||||
|
Loading…
Reference in New Issue
Block a user