зеркало из https://github.com/mozilla/pjs.git
bug 55250 (crash when align attribute is changed)
r=karanze a=waterson
This commit is contained in:
Родитель
4d8d54d12d
Коммит
7f078398f2
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче