diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 392e3ee557a..ede2af8aef2 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -3630,17 +3630,20 @@ RDFElementImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCon aContext->GetMutableStyleData(eStyleStruct_Position); switch (unit) { case eHTMLUnit_Percent: - position->mWidth.SetPercentValue(floatVal); + position->mWidth.mUnit = eStyleUnit_Percent; + position->mWidth.mValue.mFloat = floatVal; break; case eHTMLUnit_Pixel: float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); - position->mWidth.SetCoordValue(NSIntPixelsToTwips(intVal, p2t)); + position->mWidth.mUnit = eStyleUnit_Coord; + position->mWidth.mValue.mInt = NSIntPixelsToTwips(intVal, p2t); break; case eHTMLUnit_Proportional: - position->mWidth.SetIntValue(intVal, eStyleUnit_Proportional); + position->mWidth.mUnit = eStyleUnit_Proportional; + position->mWidth.mValue.mInt = intVal; break; default: break; diff --git a/rdf/content/src/nsRDFElement.cpp b/rdf/content/src/nsRDFElement.cpp index 392e3ee557a..ede2af8aef2 100644 --- a/rdf/content/src/nsRDFElement.cpp +++ b/rdf/content/src/nsRDFElement.cpp @@ -3630,17 +3630,20 @@ RDFElementImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCon aContext->GetMutableStyleData(eStyleStruct_Position); switch (unit) { case eHTMLUnit_Percent: - position->mWidth.SetPercentValue(floatVal); + position->mWidth.mUnit = eStyleUnit_Percent; + position->mWidth.mValue.mFloat = floatVal; break; case eHTMLUnit_Pixel: float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); - position->mWidth.SetCoordValue(NSIntPixelsToTwips(intVal, p2t)); + position->mWidth.mUnit = eStyleUnit_Coord; + position->mWidth.mValue.mInt = NSIntPixelsToTwips(intVal, p2t); break; case eHTMLUnit_Proportional: - position->mWidth.SetIntValue(intVal, eStyleUnit_Proportional); + position->mWidth.mUnit = eStyleUnit_Proportional; + position->mWidth.mValue.mInt = intVal; break; default: break; diff --git a/rdf/content/src/nsXULElement.cpp b/rdf/content/src/nsXULElement.cpp index 392e3ee557a..ede2af8aef2 100644 --- a/rdf/content/src/nsXULElement.cpp +++ b/rdf/content/src/nsXULElement.cpp @@ -3630,17 +3630,20 @@ RDFElementImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresCon aContext->GetMutableStyleData(eStyleStruct_Position); switch (unit) { case eHTMLUnit_Percent: - position->mWidth.SetPercentValue(floatVal); + position->mWidth.mUnit = eStyleUnit_Percent; + position->mWidth.mValue.mFloat = floatVal; break; case eHTMLUnit_Pixel: float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); - position->mWidth.SetCoordValue(NSIntPixelsToTwips(intVal, p2t)); + position->mWidth.mUnit = eStyleUnit_Coord; + position->mWidth.mValue.mInt = NSIntPixelsToTwips(intVal, p2t); break; case eHTMLUnit_Proportional: - position->mWidth.SetIntValue(intVal, eStyleUnit_Proportional); + position->mWidth.mUnit = eStyleUnit_Proportional; + position->mWidth.mValue.mInt = intVal; break; default: break;