Fixing mathml bustage.

git-svn-id: svn://10.0.0.236/trunk@101290 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%netscape.com 2001-08-17 09:54:04 +00:00
parent cad980f881
commit 7b3ce3a03b
8 changed files with 27 additions and 27 deletions

View File

@ -70,7 +70,7 @@ nsMathMLContainerFrame::GetAttribute(nsIContent* aContent,
// see if we can get the attribute from the content
if (aContent) {
rv = aContent->GetAttribute(kNameSpaceID_None, aAttributeAtom, aValue);
rv = aContent->GetAttr(kNameSpaceID_None, aAttributeAtom, aValue);
}
if (NS_CONTENT_ATTR_NOT_THERE == rv) {
@ -839,8 +839,8 @@ nsMathMLContainerFrame::ReResolveScriptStyle(nsIPresContext* aPresContext,
}
// set the -moz-math-font-size attribute without notifying that we want a reflow
mContent->SetAttribute(kNameSpaceID_None, nsMathMLAtoms::fontsize,
fontsize, PR_FALSE);
mContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::fontsize,
fontsize, PR_FALSE);
// then, re-resolve the style contexts in our subtree
nsCOMPtr<nsIStyleContext> newStyleContext;
aPresContext->ResolveStyleContextFor(mContent, aParentContext,

View File

@ -111,7 +111,7 @@ nsMathMLmactionFrame::Init(nsIPresContext* aPresContext,
mSelectedFrame = nsnull;
mActionType = NS_MATHML_ACTION_TYPE_NONE;
if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::actiontype_, value)) {
if (value.Equals(NS_LITERAL_STRING("toggle")))
mActionType = NS_MATHML_ACTION_TYPE_TOGGLE;
@ -142,7 +142,7 @@ nsMathMLmactionFrame::Init(nsIPresContext* aPresContext,
// So... first, remove the attribute actiontype="restyle#id"
PRBool notify = PR_FALSE; // don't trigger a reflow yet!
aContent->UnsetAttribute(kNameSpaceID_None, nsMathMLAtoms::actiontype_, notify);
aContent->UnsetAttr(kNameSpaceID_None, nsMathMLAtoms::actiontype_, notify);
// then, re-resolve our style
nsCOMPtr<nsIStyleContext> parentStyleContext;
@ -182,7 +182,7 @@ nsMathMLmactionFrame::GetSelectedFrame()
nsAutoString value;
PRInt32 selection;
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::selection_, value)) {
PRInt32 errorCode;
selection = value.ToInteger(&errorCode);
@ -427,7 +427,7 @@ nsMathMLmactionFrame::MouseOver(nsIDOMEvent* aMouseEvent)
// see if we should display a status message
if (NS_MATHML_ACTION_TYPE_STATUSLINE == mActionType) {
nsAutoString value;
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::actiontype_, value)) {
// expected statusline prefix (11ch)...
if (11 < value.Length() && 0 == value.Find("statusline#")) {
@ -462,7 +462,7 @@ nsMathMLmactionFrame::MouseClick(nsIDOMEvent* aMouseEvent)
PR_snprintf(cbuf, sizeof(cbuf), "%d", selection);
value.AssignWithConversion(cbuf);
PRBool notify = PR_FALSE; // don't yet notify the document
mContent->SetAttribute(kNameSpaceID_None, nsMathMLAtoms::selection_, value, notify);
mContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::selection_, value, notify);
// Now trigger a content-changed reflow...
nsCOMPtr<nsIPresShell> presShell;
@ -474,7 +474,7 @@ nsMathMLmactionFrame::MouseClick(nsIDOMEvent* aMouseEvent)
if (0 < mRestyle.Length()) {
nsCOMPtr<nsIDOMElement> node( do_QueryInterface(mContent) );
if (node.get()) {
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::actiontype_, value))
node->RemoveAttribute(NS_LITERAL_STRING("actiontype"));
else

View File

@ -144,8 +144,8 @@ nsMathMLmiFrame::SetInitialChildList(nsIPresContext* aPresContext,
// set the -moz-math-font-style attribute without notifying that we want a reflow
fontstyle.Assign(NS_LITERAL_STRING("normal"));
mContent->SetAttribute(kNameSpaceID_None, nsMathMLAtoms::fontstyle,
fontstyle, PR_FALSE);
mContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::fontstyle,
fontstyle, PR_FALSE);
// then, re-resolve the style contexts in our subtree
nsCOMPtr<nsIStyleContext> parentStyleContext;
parentStyleContext = getter_AddRefs(mStyleContext->GetParent());

View File

@ -139,7 +139,7 @@ XXX The winner is the outermost in conflicting settings like these:
if (baseFrame && NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags)) {
nsCOMPtr<nsIContent> baseContent;
baseFrame->GetContent(getter_AddRefs(baseContent));
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::movablelimits_, value)) {
if (value.EqualsWithConversion("true")) {
mPresentationData.flags |= NS_MATHML_MOVABLELIMITS;
@ -168,7 +168,7 @@ XXX The winner is the outermost in conflicting settings like these:
mathMLFrame->GetEmbellishData(embellishData);
// if we have the accent attribute, tell the core to behave as
// requested (otherwise leave the core with its default behavior)
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::accent_, value))
{
if (value.EqualsWithConversion("true")) embellishData.flags |= NS_MATHML_EMBELLISH_ACCENT;

View File

@ -82,7 +82,7 @@ nsMathMLmstyleFrame::Init(nsIPresContext* aPresContext,
// see if the displaystyle attribute is there
nsAutoString value;
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::displaystyle_, value)) {
if (value.EqualsWithConversion("true")) {
mPresentationData.flags |= NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE;
@ -95,7 +95,7 @@ nsMathMLmstyleFrame::Init(nsIPresContext* aPresContext,
}
// see if the scriptlevel attribute is there
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::scriptlevel_, value)) {
PRInt32 errorCode, userValue;
userValue = value.ToInteger(&errorCode);

View File

@ -137,7 +137,7 @@ GetAlignValueAt(nsIPresContext* aPresContext,
nsAutoString values;
nsCOMPtr<nsIContent> content;
aTableOrRowFrame->GetContent(getter_AddRefs(content));
if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, aAttributeAtom, values)) {
if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None, aAttributeAtom, values)) {
valueList = new nsValueList(values);
if (valueList) {
frameManager->SetFrameProperty(aTableOrRowFrame, aAttributeAtom,
@ -186,7 +186,7 @@ MapAlignAttributesInto(nsIPresContext* aPresContext,
if (NS_SUCCEEDED(rv)) {
// see if the rowalign attribute is not already set
nsIAtom* atom = nsMathMLAtoms::rowalign_;
rv = aCellContent->GetAttribute(kNameSpaceID_None, atom, value);
rv = aCellContent->GetAttr(kNameSpaceID_None, atom, value);
if (NS_CONTENT_ATTR_NOT_THERE == rv) {
// see if the rowalign attribute is specified on the row
rowalign = GetAlignValueAt(aPresContext, rowFrame, atom, index);
@ -205,7 +205,7 @@ MapAlignAttributesInto(nsIPresContext* aPresContext,
if (NS_SUCCEEDED(rv)) {
// see if the columnalign attribute is not already set
nsIAtom* atom = nsMathMLAtoms::columnalign_;
rv = aCellContent->GetAttribute(kNameSpaceID_None, atom, value);
rv = aCellContent->GetAttr(kNameSpaceID_None, atom, value);
if (NS_CONTENT_ATTR_NOT_THERE == rv) {
// see if the columnalign attribute is specified on the row
columnalign = GetAlignValueAt(aPresContext, rowFrame, atom, index);
@ -219,13 +219,13 @@ MapAlignAttributesInto(nsIPresContext* aPresContext,
// set the attributes without notifying that we want a reflow
if (rowalign) {
value.Assign(rowalign);
aCellContent->SetAttribute(kNameSpaceID_None, nsMathMLAtoms::rowalign_,
value, PR_FALSE);
aCellContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::rowalign_,
value, PR_FALSE);
}
if (columnalign) {
value.Assign(columnalign);
aCellContent->SetAttribute(kNameSpaceID_None, nsMathMLAtoms::columnalign_,
value, PR_FALSE);
aCellContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::columnalign_,
value, PR_FALSE);
}
// then, re-resolve the style contexts in our subtree
if (rowalign || columnalign) {

View File

@ -138,7 +138,7 @@ XXX The winner is the outermost setting in conflicting settings like these:
if (baseFrame && NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags)) {
nsCOMPtr<nsIContent> baseContent;
baseFrame->GetContent(getter_AddRefs(baseContent));
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::movablelimits_, value)) {
if (value.EqualsWithConversion("true")) {
mPresentationData.flags |= NS_MATHML_MOVABLELIMITS;
@ -167,7 +167,7 @@ XXX The winner is the outermost setting in conflicting settings like these:
mathMLFrame->GetEmbellishData(embellishData);
// if we have the accentunder attribute, tell the core to behave as
// requested (otherwise leave the core with its default behavior)
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::accentunder_, value))
{
if (value.EqualsWithConversion("true")) embellishData.flags |= NS_MATHML_EMBELLISH_ACCENT;

View File

@ -138,7 +138,7 @@ nsMathMLmunderoverFrame::SetInitialChildList(nsIPresContext* aPresContext,
if (baseFrame && NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags)) {
nsCOMPtr<nsIContent> baseContent;
baseFrame->GetContent(getter_AddRefs(baseContent));
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == baseContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::movablelimits_, value)) {
if (value.EqualsWithConversion("true")) {
mPresentationData.flags |= NS_MATHML_MOVABLELIMITS;
@ -167,7 +167,7 @@ nsMathMLmunderoverFrame::SetInitialChildList(nsIPresContext* aPresContext,
mathMLFrame->GetEmbellishData(embellishData);
// if we have the accentunder attribute, tell the core to behave as
// requested (otherwise leave the core with its default behavior)
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::accentunder_, value))
{
if (value.EqualsWithConversion("true")) embellishData.flags |= NS_MATHML_EMBELLISH_ACCENT;
@ -195,7 +195,7 @@ nsMathMLmunderoverFrame::SetInitialChildList(nsIPresContext* aPresContext,
mathMLFrame->GetEmbellishData(embellishData);
// if we have the accent attribute, tell the core to behave as
// requested (otherwise leave the core with its default behavior)
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(kNameSpaceID_None,
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_None,
nsMathMLAtoms::accent_, value))
{
if (value.EqualsWithConversion("true")) embellishData.flags |= NS_MATHML_EMBELLISH_ACCENT;