mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 586400. Cellpadding changes need to reresolve descendants. r=dbaron
This commit is contained in:
parent
4e33893936
commit
78e6d2601e
15
layout/reftests/bugs/586400-1-ref.html
Normal file
15
layout/reftests/bugs/586400-1-ref.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
div.spacer {width:20px; height: 20px;}
|
||||||
|
table {background-color: lime;}
|
||||||
|
td {background-color: green;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table cellpadding="30px"><tr>
|
||||||
|
<td> <div class="spacer"></div> </td></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
22
layout/reftests/bugs/586400-1.html
Normal file
22
layout/reftests/bugs/586400-1.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
div.spacer {width:20px; height: 20px;}
|
||||||
|
table {background-color: lime;}
|
||||||
|
td {background-color: green;}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function testIt() {
|
||||||
|
document.body.offsetWidth;
|
||||||
|
var table = document.getElementsByTagName("TABLE")[0];
|
||||||
|
table.setAttribute("cellpadding", "30px");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="testIt();">
|
||||||
|
<table><tr>
|
||||||
|
<td> <div class="spacer"></div> </td></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1494,3 +1494,4 @@ random-if(d2d) == 555388-1.html 555388-1-ref.html
|
|||||||
== 582037-2b.html 582037-2-ref.html
|
== 582037-2b.html 582037-2-ref.html
|
||||||
== 584400-dash-length.svg 584400-dash-length-ref.svg
|
== 584400-dash-length.svg 584400-dash-length-ref.svg
|
||||||
== 585598-2.xhtml 585598-2-ref.xhtml
|
== 585598-2.xhtml 585598-2-ref.xhtml
|
||||||
|
== 586400-1.html 586400-1-ref.html
|
||||||
|
@ -316,6 +316,13 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData)
|
|||||||
|
|
||||||
// Handle the content style rules.
|
// Handle the content style rules.
|
||||||
if (element->IsAttributeMapped(aData->mAttribute)) {
|
if (element->IsAttributeMapped(aData->mAttribute)) {
|
||||||
|
// cellpadding on tables is special and requires reresolving all
|
||||||
|
// the cells in the table
|
||||||
|
if (aData->mAttribute == nsGkAtoms::cellpadding &&
|
||||||
|
element->IsHTML() &&
|
||||||
|
aData->mContentTag == nsGkAtoms::table) {
|
||||||
|
return eRestyle_Subtree;
|
||||||
|
}
|
||||||
return eRestyle_Self;
|
return eRestyle_Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user