bug 55250 (crash when align attribute is changed)

r=karanze
a=waterson
This commit is contained in:
buster%netscape.com 2000-10-12 20:43:18 +00:00
Родитель 4d8d54d12d
Коммит 7f078398f2
10 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -2989,7 +2989,7 @@ nsGenericHTMLElement::GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint)
{
if ((nsHTMLAtoms::align == aAttribute)) {
aHint = NS_STYLE_HINT_REFLOW;
aHint = NS_STYLE_HINT_FRAMECHANGE;
return PR_TRUE;
}
return PR_FALSE;

Просмотреть файл

@ -327,7 +327,7 @@ nsHTMLIFrameElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
aHint = NS_STYLE_HINT_REFLOW;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_REFLOW;
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (aAttribute == nsHTMLAtoms::frameborder) {
aHint = NS_STYLE_HINT_REFLOW;

Просмотреть файл

@ -541,12 +541,10 @@ nsHTMLImageElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::usemap) ||
(aAttribute == nsHTMLAtoms::ismap)) {
(aAttribute == nsHTMLAtoms::ismap) ||
(aAttribute == nsHTMLAtoms::align)) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_REFLOW;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetImageMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetImageBorderAttributeImpact(aAttribute, aHint)) {

Просмотреть файл

@ -1225,10 +1225,10 @@ NS_IMETHODIMP
nsHTMLInputElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::align) || (aAttribute == nsHTMLAtoms::value)) {
if (aAttribute == nsHTMLAtoms::value) {
aHint = NS_STYLE_HINT_REFLOW;
}
else if ((aAttribute == nsHTMLAtoms::type)) {
else if ((aAttribute == nsHTMLAtoms::align) || (aAttribute == nsHTMLAtoms::type)) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {

Просмотреть файл

@ -1296,8 +1296,7 @@ NS_IMETHODIMP
nsHTMLTableElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::align) ||
(aAttribute == nsHTMLAtoms::layout) ||
if ((aAttribute == nsHTMLAtoms::layout) ||
(aAttribute == nsHTMLAtoms::cellpadding) ||
(aAttribute == nsHTMLAtoms::cellspacing) ||
(aAttribute == nsHTMLAtoms::cols) ||
@ -1313,6 +1312,9 @@ nsHTMLTableElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
else if (aAttribute == nsHTMLAtoms::bordercolor) {
aHint = NS_STYLE_HINT_VISUAL;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetBackgroundAttributesImpact(aAttribute, aHint)) {
aHint = NS_STYLE_HINT_CONTENT;

Просмотреть файл

@ -2989,7 +2989,7 @@ nsGenericHTMLElement::GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint)
{
if ((nsHTMLAtoms::align == aAttribute)) {
aHint = NS_STYLE_HINT_REFLOW;
aHint = NS_STYLE_HINT_FRAMECHANGE;
return PR_TRUE;
}
return PR_FALSE;

Просмотреть файл

@ -327,7 +327,7 @@ nsHTMLIFrameElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
aHint = NS_STYLE_HINT_REFLOW;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_REFLOW;
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (aAttribute == nsHTMLAtoms::frameborder) {
aHint = NS_STYLE_HINT_REFLOW;

Просмотреть файл

@ -541,12 +541,10 @@ nsHTMLImageElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::usemap) ||
(aAttribute == nsHTMLAtoms::ismap)) {
(aAttribute == nsHTMLAtoms::ismap) ||
(aAttribute == nsHTMLAtoms::align)) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_REFLOW;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetImageMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetImageBorderAttributeImpact(aAttribute, aHint)) {

Просмотреть файл

@ -1225,10 +1225,10 @@ NS_IMETHODIMP
nsHTMLInputElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::align) || (aAttribute == nsHTMLAtoms::value)) {
if (aAttribute == nsHTMLAtoms::value) {
aHint = NS_STYLE_HINT_REFLOW;
}
else if ((aAttribute == nsHTMLAtoms::type)) {
else if ((aAttribute == nsHTMLAtoms::align) || (aAttribute == nsHTMLAtoms::type)) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {

Просмотреть файл

@ -1296,8 +1296,7 @@ NS_IMETHODIMP
nsHTMLTableElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32& aHint) const
{
if ((aAttribute == nsHTMLAtoms::align) ||
(aAttribute == nsHTMLAtoms::layout) ||
if ((aAttribute == nsHTMLAtoms::layout) ||
(aAttribute == nsHTMLAtoms::cellpadding) ||
(aAttribute == nsHTMLAtoms::cellspacing) ||
(aAttribute == nsHTMLAtoms::cols) ||
@ -1313,6 +1312,9 @@ nsHTMLTableElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
else if (aAttribute == nsHTMLAtoms::bordercolor) {
aHint = NS_STYLE_HINT_VISUAL;
}
else if (aAttribute == nsHTMLAtoms::align) {
aHint = NS_STYLE_HINT_FRAMECHANGE;
}
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {
if (! nsGenericHTMLElement::GetBackgroundAttributesImpact(aAttribute, aHint)) {
aHint = NS_STYLE_HINT_CONTENT;