NS_IMETHODIMP nsMathMLmoFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { // check if this is an attribute that can affect the embellished hierarchy // in a significant way and re-layout the entire hierarchy. if (nsGkAtoms::accent_ == aAttribute || nsGkAtoms::movablelimits_ == aAttribute) { // set the target as the parent of our outermost embellished container // (we ensure that we are the core, not just a sibling of the core) nsIFrame* target = this; nsEmbellishData embellishData; do { target = target->GetParent(); GetEmbellishDataFrom(target, embellishData); } while (embellishData.coreFrame == this); // we have automatic data to update in the children of the target frame return ReLayoutChildren(target); } return nsMathMLTokenFrame:: AttributeChanged(aNameSpaceID, aAttribute, aModType); }
NS_IMETHODIMP nsMathMLmstyleFrame::AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { // Other attributes can affect too many things, ask our parent to re-layout // its children so that we can pick up changes in our attributes & transmit // them in our subtree. However, our siblings will be re-laid too. We used // to have a more speedier but more verbose alternative that didn't re-layout // our siblings. See bug 114909 - attachment 67668. return ReLayoutChildren(mParent); }
NS_IMETHODIMP nsMathMLmoverFrame::AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { if (nsGkAtoms::accent_ == aAttribute) { // When we have automatic data to update within ourselves, we ask our // parent to re-layout its children return ReLayoutChildren(mParent); } return nsMathMLContainerFrame:: AttributeChanged(aNameSpaceID, aAttribute, aModType); }
nsresult nsMathMLmunderoverFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { if (nsGkAtoms::accent_ == aAttribute || nsGkAtoms::accentunder_ == aAttribute) { // When we have automatic data to update within ourselves, we ask our // parent to re-layout its children return ReLayoutChildren(GetParent()); } return nsMathMLContainerFrame:: AttributeChanged(aNameSpaceID, aAttribute, aModType); }
NS_IMETHODIMP nsMathMLmstyleFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { if (aAttribute == nsMathMLAtoms::mathcolor_ || aAttribute == nsMathMLAtoms::color_ || aAttribute == nsMathMLAtoms::mathsize_ || aAttribute == nsMathMLAtoms::fontsize_ || aAttribute == nsMathMLAtoms::fontfamily_ || aAttribute == nsMathMLAtoms::mathbackground_ || aAttribute == nsMathMLAtoms::background_) { MapAttributesIntoCSS(GetPresContext(), this); return ReflowDirtyChild(GetPresContext()->PresShell(), nsnull); } // Other attributes can affect too many things, ask our parent to re-layout // its children so that we can pick up changes in our attributes & transmit // them in our subtree. However, our siblings will be re-laid too. We used // to have a more speedier but more verbose alternative that didn't re-layout // our siblings. See bug 114909 - attachment 67668. return ReLayoutChildren(mParent); }