зеркало из https://github.com/mozilla/pjs.git
Fix buy 114943; prevent attribute changes of screenX, screenY, and sizemode on windows, dialogs and wizards from causing reflows. r=hyatt, sr=waterson
This commit is contained in:
Родитель
0d07f28739
Коммит
de11b41bd4
|
@ -306,3 +306,5 @@ XUL_ATOM(sortActive, "sortActive")
|
|||
XUL_ATOM(selectedIndex, "selectedIndex")
|
||||
XUL_ATOM(_star, "*")
|
||||
XUL_ATOM(defaultz, "default")
|
||||
XUL_ATOM(screenX, "screenX")
|
||||
XUL_ATOM(screenY, "screenY")
|
||||
|
|
|
@ -2573,6 +2573,24 @@ nsXULElement::SetAttr(nsINodeInfo* aNodeInfo,
|
|||
|
||||
nsresult rv;
|
||||
|
||||
nsXULAttribute* attr = FindLocalAttribute(aNodeInfo);
|
||||
if (attr) {
|
||||
nsAutoString oldValue;
|
||||
attr->GetValue(oldValue);
|
||||
if (oldValue.Equals(aValue))
|
||||
{
|
||||
nsAutoString attributeName;
|
||||
aNodeInfo->GetName(attributeName);
|
||||
|
||||
nsCAutoString blurb("SetAttr called redundantly on ");
|
||||
blurb.AppendWithConversion(attributeName);
|
||||
blurb.Append(" with value ");
|
||||
blurb.AppendWithConversion(aValue);
|
||||
NS_WARNING(blurb.get());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> attrName;
|
||||
PRInt32 attrns;
|
||||
|
||||
|
@ -2635,7 +2653,6 @@ nsXULElement::SetAttr(nsINodeInfo* aNodeInfo,
|
|||
// XXX need to check if they're changing an event handler: if so, then we need
|
||||
// to unhook the old one.
|
||||
|
||||
nsXULAttribute* attr = FindLocalAttribute(aNodeInfo);
|
||||
|
||||
PRBool modification;
|
||||
nsAutoString oldValue;
|
||||
|
@ -3883,9 +3900,11 @@ nsXULElement::GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModTy
|
|||
NodeInfo()->Equals(nsXULAtoms::page) ||
|
||||
NodeInfo()->Equals(nsXULAtoms::dialog) ||
|
||||
NodeInfo()->Equals(nsXULAtoms::wizard)) {
|
||||
// Ignore 'width' and 'height' on a <window>
|
||||
if (nsXULAtoms::width == aAttribute || nsXULAtoms::height == aAttribute)
|
||||
aHint = NS_STYLE_HINT_NONE;
|
||||
// Ignore 'width', 'height', 'screenX', 'screenY' and 'sizemode' on a <window>
|
||||
if (nsXULAtoms::width == aAttribute || nsXULAtoms::height == aAttribute ||
|
||||
nsXULAtoms::screenX == aAttribute || nsXULAtoms::screenY == aAttribute ||
|
||||
nsXULAtoms::sizemode == aAttribute)
|
||||
aHint = NS_STYLE_HINT_NONE;
|
||||
} else {
|
||||
// if left or top changes we reflow. This will happen in xul containers that
|
||||
// manage positioned children such as a bulletinboard.
|
||||
|
|
Загрузка…
Ссылка в новой задаче