Convert callers of old GetStyleData API that have snuck back in. b=197205 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-12-04 06:31:02 +00:00
parent 7c46347d82
commit 00dad6c498
6 changed files with 40 additions and 42 deletions

View File

@ -415,9 +415,8 @@ CanvasFrame::Paint(nsPresContext* aPresContext,
///////////////////// /////////////////////
// draw focus // draw focus
// XXX This is only temporary // XXX This is only temporary
const nsStyleVisibility* vis = (const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
// Only paint the focus if we're visible // Only paint the focus if we're visible
if (vis->IsVisible()) { if (GetStyleVisibility()->IsVisible()) {
nsIFrame * parentFrame = GetParent(); nsIFrame * parentFrame = GetParent();
nsIView* parentView = parentFrame->GetView(); nsIView* parentView = parentFrame->GetView();

View File

@ -415,9 +415,8 @@ CanvasFrame::Paint(nsPresContext* aPresContext,
///////////////////// /////////////////////
// draw focus // draw focus
// XXX This is only temporary // XXX This is only temporary
const nsStyleVisibility* vis = (const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
// Only paint the focus if we're visible // Only paint the focus if we're visible
if (vis->IsVisible()) { if (GetStyleVisibility()->IsVisible()) {
nsIFrame * parentFrame = GetParent(); nsIFrame * parentFrame = GetParent();
nsIView* parentView = parentFrame->GetView(); nsIView* parentView = parentFrame->GetView();

View File

@ -478,7 +478,7 @@ nsSVGGlyphFrame::GetStrokeOpacity(float *aStrokeOpacity)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeWidth(float *aStrokeWidth) nsSVGGlyphFrame::GetStrokeWidth(float *aStrokeWidth)
{ {
*aStrokeWidth = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeWidth; *aStrokeWidth = GetStyleSVG()->mStrokeWidth;
return NS_OK; return NS_OK;
} }
@ -507,7 +507,7 @@ nsSVGGlyphFrame::GetStrokeDashArray(float **arr, PRUint32 *count)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeDashoffset(float *aStrokeDashoffset) nsSVGGlyphFrame::GetStrokeDashoffset(float *aStrokeDashoffset)
{ {
*aStrokeDashoffset = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeDashoffset; *aStrokeDashoffset = GetStyleSVG()->mStrokeDashoffset;
return NS_OK; return NS_OK;
} }
@ -515,7 +515,7 @@ nsSVGGlyphFrame::GetStrokeDashoffset(float *aStrokeDashoffset)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap) nsSVGGlyphFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap)
{ {
*aStrokeLinecap = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeLinecap; *aStrokeLinecap = GetStyleSVG()->mStrokeLinecap;
return NS_OK; return NS_OK;
} }
@ -523,7 +523,7 @@ nsSVGGlyphFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin) nsSVGGlyphFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin)
{ {
*aStrokeLinejoin = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeLinejoin; *aStrokeLinejoin = GetStyleSVG()->mStrokeLinejoin;
return NS_OK; return NS_OK;
} }
@ -531,7 +531,7 @@ nsSVGGlyphFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeMiterlimit(float *aStrokeMiterlimit) nsSVGGlyphFrame::GetStrokeMiterlimit(float *aStrokeMiterlimit)
{ {
*aStrokeMiterlimit = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeMiterlimit; *aStrokeMiterlimit = GetStyleSVG()->mStrokeMiterlimit;
return NS_OK; return NS_OK;
} }
@ -548,7 +548,7 @@ nsSVGGlyphFrame::GetFillOpacity(float *aFillOpacity)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetFillRule(PRUint16 *aFillRule) nsSVGGlyphFrame::GetFillRule(PRUint16 *aFillRule)
{ {
*aFillRule = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFillRule; *aFillRule = GetStyleSVG()->mFillRule;
return NS_OK; return NS_OK;
} }
@ -556,7 +556,7 @@ nsSVGGlyphFrame::GetFillRule(PRUint16 *aFillRule)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokePaintType(PRUint16 *aStrokePaintType) nsSVGGlyphFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
{ {
*aStrokePaintType = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mType; *aStrokePaintType = GetStyleSVG()->mStroke.mType;
return NS_OK; return NS_OK;
} }
@ -564,7 +564,7 @@ nsSVGGlyphFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokePaint(nscolor *aStrokePaint) nsSVGGlyphFrame::GetStrokePaint(nscolor *aStrokePaint)
{ {
*aStrokePaint = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mPaint.mColor; *aStrokePaint = GetStyleSVG()->mStroke.mPaint.mColor;
return NS_OK; return NS_OK;
} }
@ -573,7 +573,7 @@ NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokeGradient(nsISVGGradient **aGrad) nsSVGGlyphFrame::GetStrokeGradient(nsISVGGradient **aGrad)
{ {
nsIURI *aServer; nsIURI *aServer;
aServer = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mPaint.mPaintServer; aServer = GetStyleSVG()->mStroke.mPaint.mPaintServer;
if (aServer == nsnull) if (aServer == nsnull)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
// Now have the URI. Get the gradient // Now have the URI. Get the gradient
@ -584,7 +584,7 @@ nsSVGGlyphFrame::GetStrokeGradient(nsISVGGradient **aGrad)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetFillPaintType(PRUint16 *aFillPaintType) nsSVGGlyphFrame::GetFillPaintType(PRUint16 *aFillPaintType)
{ {
*aFillPaintType = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mType; *aFillPaintType = GetStyleSVG()->mFill.mType;
return NS_OK; return NS_OK;
} }
@ -592,7 +592,7 @@ nsSVGGlyphFrame::GetFillPaintType(PRUint16 *aFillPaintType)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetFillPaint(nscolor *aFillPaint) nsSVGGlyphFrame::GetFillPaint(nscolor *aFillPaint)
{ {
*aFillPaint = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mPaint.mColor; *aFillPaint = GetStyleSVG()->mFill.mPaint.mColor;
return NS_OK; return NS_OK;
} }
@ -601,7 +601,7 @@ NS_IMETHODIMP
nsSVGGlyphFrame::GetFillGradient(nsISVGGradient **aGrad) nsSVGGlyphFrame::GetFillGradient(nsISVGGradient **aGrad)
{ {
nsIURI *aServer; nsIURI *aServer;
aServer = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mPaint.mPaintServer; aServer = GetStyleSVG()->mFill.mPaint.mPaintServer;
if (aServer == nsnull) if (aServer == nsnull)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
// Now have the URI. Get the gradient // Now have the URI. Get the gradient
@ -616,7 +616,7 @@ nsSVGGlyphFrame::GetFillGradient(nsISVGGradient **aGrad)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetFont(nsFont *aFont) nsSVGGlyphFrame::GetFont(nsFont *aFont)
{ {
*aFont = ((const nsStyleFont*)mStyleContext->GetStyleData(eStyleStruct_Font))->mFont; *aFont = GetStyleFont()->mFont;
// XXX eventually we will have to treat decorations separately from // XXX eventually we will have to treat decorations separately from
// fonts, because they can have a different color than the current // fonts, because they can have a different color than the current
@ -627,7 +627,7 @@ nsSVGGlyphFrame::GetFont(nsFont *aFont)
NS_ASSERTION(parentContext, "no style context on parent"); NS_ASSERTION(parentContext, "no style context on parent");
PRUint8 styleDecorations = PRUint8 styleDecorations =
((const nsStyleTextReset*)parentContext->GetStyleData(eStyleStruct_TextReset))->mTextDecoration; parentContext->GetStyleTextReset()->mTextDecoration;
if (styleDecorations & NS_STYLE_TEXT_DECORATION_UNDERLINE) if (styleDecorations & NS_STYLE_TEXT_DECORATION_UNDERLINE)
aFont->decorations |= NS_FONT_DECORATION_UNDERLINE; aFont->decorations |= NS_FONT_DECORATION_UNDERLINE;
if (styleDecorations & NS_STYLE_TEXT_DECORATION_OVERLINE) if (styleDecorations & NS_STYLE_TEXT_DECORATION_OVERLINE)
@ -650,7 +650,7 @@ nsSVGGlyphFrame::GetCharacterData(nsAString & aCharacterData)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGGlyphFrame::GetTextRendering(PRUint16 *aTextRendering) nsSVGGlyphFrame::GetTextRendering(PRUint16 *aTextRendering)
{ {
*aTextRendering = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mTextRendering; *aTextRendering = GetStyleSVG()->mTextRendering;
return NS_OK; return NS_OK;
} }

View File

@ -197,7 +197,7 @@ nsSVGGradientFrame::GetStopColorType(PRInt32 aIndex, PRUint16 *aStopColorType) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
*aStopColorType = ((const nsStyleSVG*) stopFrame->GetStyleContext()->GetStyleData(eStyleStruct_SVG))->mStopColor.mType; *aStopColorType = stopFrame->GetStyleSVG()->mStopColor.mType;
return NS_OK; return NS_OK;
} }
@ -227,7 +227,7 @@ nsSVGGradientFrame::GetStopColor(PRInt32 aIndex, nscolor *aStopColor) {
*aStopColor = 0; *aStopColor = 0;
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
*aStopColor = ((const nsStyleSVG*) stopFrame->GetStyleContext()->GetStyleData(eStyleStruct_SVG))->mStopColor.mPaint.mColor; *aStopColor = stopFrame->GetStyleSVG()->mStopColor.mPaint.mColor;
return NS_OK; return NS_OK;
} }
@ -256,7 +256,7 @@ nsSVGGradientFrame::GetStopOpacity(PRInt32 aIndex, float *aStopOpacity) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
*aStopOpacity = ((const nsStyleSVG*) stopFrame->GetStyleContext()->GetStyleData(eStyleStruct_SVG))->mStopOpacity; *aStopOpacity = stopFrame->GetStyleSVG()->mStopOpacity;
return NS_OK; return NS_OK;
} }

View File

@ -325,7 +325,7 @@ nsSVGPathGeometryFrame::GetStrokeOpacity(float *aStrokeOpacity)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeWidth(float *aStrokeWidth) nsSVGPathGeometryFrame::GetStrokeWidth(float *aStrokeWidth)
{ {
*aStrokeWidth = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeWidth; *aStrokeWidth = GetStyleSVG()->mStrokeWidth;
return NS_OK; return NS_OK;
} }
@ -354,7 +354,7 @@ nsSVGPathGeometryFrame::GetStrokeDashArray(float **arr, PRUint32 *count)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeDashoffset(float *aStrokeDashoffset) nsSVGPathGeometryFrame::GetStrokeDashoffset(float *aStrokeDashoffset)
{ {
*aStrokeDashoffset = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeDashoffset; *aStrokeDashoffset = GetStyleSVG()->mStrokeDashoffset;
return NS_OK; return NS_OK;
} }
@ -362,7 +362,7 @@ nsSVGPathGeometryFrame::GetStrokeDashoffset(float *aStrokeDashoffset)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap) nsSVGPathGeometryFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap)
{ {
*aStrokeLinecap = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeLinecap; *aStrokeLinecap = GetStyleSVG()->mStrokeLinecap;
return NS_OK; return NS_OK;
} }
@ -370,7 +370,7 @@ nsSVGPathGeometryFrame::GetStrokeLinecap(PRUint16 *aStrokeLinecap)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin) nsSVGPathGeometryFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin)
{ {
*aStrokeLinejoin = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeLinejoin; *aStrokeLinejoin = GetStyleSVG()->mStrokeLinejoin;
return NS_OK; return NS_OK;
} }
@ -378,7 +378,7 @@ nsSVGPathGeometryFrame::GetStrokeLinejoin(PRUint16 *aStrokeLinejoin)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeMiterlimit(float *aStrokeMiterlimit) nsSVGPathGeometryFrame::GetStrokeMiterlimit(float *aStrokeMiterlimit)
{ {
*aStrokeMiterlimit = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStrokeMiterlimit; *aStrokeMiterlimit = GetStyleSVG()->mStrokeMiterlimit;
return NS_OK; return NS_OK;
} }
@ -395,7 +395,7 @@ nsSVGPathGeometryFrame::GetFillOpacity(float *aFillOpacity)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetFillRule(PRUint16 *aFillRule) nsSVGPathGeometryFrame::GetFillRule(PRUint16 *aFillRule)
{ {
*aFillRule = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFillRule; *aFillRule = GetStyleSVG()->mFillRule;
return NS_OK; return NS_OK;
} }
@ -403,7 +403,7 @@ nsSVGPathGeometryFrame::GetFillRule(PRUint16 *aFillRule)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokePaintType(PRUint16 *aStrokePaintType) nsSVGPathGeometryFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
{ {
*aStrokePaintType = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mType; *aStrokePaintType = GetStyleSVG()->mStroke.mType;
return NS_OK; return NS_OK;
} }
@ -411,7 +411,7 @@ nsSVGPathGeometryFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokePaint(nscolor *aStrokePaint) nsSVGPathGeometryFrame::GetStrokePaint(nscolor *aStrokePaint)
{ {
*aStrokePaint = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mPaint.mColor; *aStrokePaint = GetStyleSVG()->mStroke.mPaint.mColor;
return NS_OK; return NS_OK;
} }
@ -420,7 +420,7 @@ NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokeGradient(nsISVGGradient **aGrad) nsSVGPathGeometryFrame::GetStrokeGradient(nsISVGGradient **aGrad)
{ {
nsIURI *aServer; nsIURI *aServer;
aServer = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mPaint.mPaintServer; aServer = GetStyleSVG()->mStroke.mPaint.mPaintServer;
if (aServer == nsnull) if (aServer == nsnull)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
// Now have the URI. Get the gradient // Now have the URI. Get the gradient
@ -431,7 +431,7 @@ nsSVGPathGeometryFrame::GetStrokeGradient(nsISVGGradient **aGrad)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetFillPaintType(PRUint16 *aFillPaintType) nsSVGPathGeometryFrame::GetFillPaintType(PRUint16 *aFillPaintType)
{ {
*aFillPaintType = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mType; *aFillPaintType = GetStyleSVG()->mFill.mType;
return NS_OK; return NS_OK;
} }
@ -439,7 +439,7 @@ nsSVGPathGeometryFrame::GetFillPaintType(PRUint16 *aFillPaintType)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetFillPaint(nscolor *aFillPaint) nsSVGPathGeometryFrame::GetFillPaint(nscolor *aFillPaint)
{ {
*aFillPaint = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mPaint.mColor; *aFillPaint = GetStyleSVG()->mFill.mPaint.mColor;
return NS_OK; return NS_OK;
} }
@ -448,7 +448,7 @@ NS_IMETHODIMP
nsSVGPathGeometryFrame::GetFillGradient(nsISVGGradient **aGrad) nsSVGPathGeometryFrame::GetFillGradient(nsISVGGradient **aGrad)
{ {
nsIURI *aServer; nsIURI *aServer;
aServer = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mPaint.mPaintServer; aServer = GetStyleSVG()->mFill.mPaint.mPaintServer;
if (aServer == nsnull) if (aServer == nsnull)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
// Now have the URI. Get the gradient // Now have the URI. Get the gradient
@ -463,14 +463,14 @@ nsSVGPathGeometryFrame::GetHittestMask(PRUint16 *aHittestMask)
{ {
*aHittestMask=0; *aHittestMask=0;
switch(((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mPointerEvents) { switch(GetStyleSVG()->mPointerEvents) {
case NS_STYLE_POINTER_EVENTS_NONE: case NS_STYLE_POINTER_EVENTS_NONE:
break; break;
case NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED: case NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED:
if (GetStyleVisibility()->IsVisible()) { if (GetStyleVisibility()->IsVisible()) {
if (((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mType != eStyleSVGPaintType_None) if (GetStyleSVG()->mFill.mType != eStyleSVGPaintType_None)
*aHittestMask |= HITTEST_MASK_FILL; *aHittestMask |= HITTEST_MASK_FILL;
if (((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mType != eStyleSVGPaintType_None) if (GetStyleSVG()->mStroke.mType != eStyleSVGPaintType_None)
*aHittestMask |= HITTEST_MASK_STROKE; *aHittestMask |= HITTEST_MASK_STROKE;
} }
break; break;
@ -491,9 +491,9 @@ nsSVGPathGeometryFrame::GetHittestMask(PRUint16 *aHittestMask)
} }
break; break;
case NS_STYLE_POINTER_EVENTS_PAINTED: case NS_STYLE_POINTER_EVENTS_PAINTED:
if (((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mFill.mType != eStyleSVGPaintType_None) if (GetStyleSVG()->mFill.mType != eStyleSVGPaintType_None)
*aHittestMask |= HITTEST_MASK_FILL; *aHittestMask |= HITTEST_MASK_FILL;
if (((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mStroke.mType != eStyleSVGPaintType_None) if (GetStyleSVG()->mStroke.mType != eStyleSVGPaintType_None)
*aHittestMask |= HITTEST_MASK_STROKE; *aHittestMask |= HITTEST_MASK_STROKE;
break; break;
case NS_STYLE_POINTER_EVENTS_FILL: case NS_STYLE_POINTER_EVENTS_FILL:
@ -518,7 +518,7 @@ nsSVGPathGeometryFrame::GetHittestMask(PRUint16 *aHittestMask)
NS_IMETHODIMP NS_IMETHODIMP
nsSVGPathGeometryFrame::GetShapeRendering(PRUint16 *aShapeRendering) nsSVGPathGeometryFrame::GetShapeRendering(PRUint16 *aShapeRendering)
{ {
*aShapeRendering = ((const nsStyleSVG*) mStyleContext->GetStyleData(eStyleStruct_SVG))->mShapeRendering; *aShapeRendering = GetStyleSVG()->mShapeRendering;
return NS_OK; return NS_OK;
} }

View File

@ -1021,7 +1021,7 @@ nsSVGTextFrame::UpdateGlyphPositioning()
// determine x offset based on text_anchor: // determine x offset based on text_anchor:
PRUint8 anchor = ((const nsStyleSVG*)mStyleContext->GetStyleData(eStyleStruct_SVG))->mTextAnchor; PRUint8 anchor = GetStyleSVG()->mTextAnchor;
float chunkLength = 0.0f; float chunkLength = 0.0f;
if (anchor != NS_STYLE_TEXT_ANCHOR_START) { if (anchor != NS_STYLE_TEXT_ANCHOR_START) {
@ -1048,7 +1048,7 @@ nsSVGTextFrame::UpdateGlyphPositioning()
// XXX should actually inspect 'alignment-baseline' for each fragment // XXX should actually inspect 'alignment-baseline' for each fragment
PRUint8 baseline; PRUint8 baseline;
switch(((const nsStyleSVGReset*)mStyleContext->GetStyleData(eStyleStruct_SVGReset))->mDominantBaseline) { switch(GetStyleSVGReset()->mDominantBaseline) {
case NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE: case NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE:
baseline = nsISVGRendererGlyphMetrics::BASELINE_TEXT_BEFORE_EDGE; baseline = nsISVGRendererGlyphMetrics::BASELINE_TEXT_BEFORE_EDGE;
break; break;