diff --git a/layout/forms/nsDateTimeControlFrame.cpp b/layout/forms/nsDateTimeControlFrame.cpp index 11b2995d64f9..7a2e31b57389 100644 --- a/layout/forms/nsDateTimeControlFrame.cpp +++ b/layout/forms/nsDateTimeControlFrame.cpp @@ -404,7 +404,7 @@ nsDateTimeControlFrame::AttributeChanged(int32_t aNameSpaceID, aAttribute == nsGkAtoms::readonly || aAttribute == nsGkAtoms::tabindex) { MOZ_ASSERT(mContent->IsHTMLElement(nsGkAtoms::input), "bad cast"); - auto contentAsInputElem = static_cast(mContent); + auto contentAsInputElem = static_cast(GetContent()); // If script changed the 's type before setting these attributes // then we don't need to do anything since we are going to be reframed. if (contentAsInputElem->ControlType() == NS_FORM_INPUT_TIME || diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp index d007c016474c..58e2ba559fd7 100644 --- a/layout/forms/nsMeterFrame.cpp +++ b/layout/forms/nsMeterFrame.cpp @@ -145,7 +145,7 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame, nscoord yoffset = aReflowInput.ComputedPhysicalBorderPadding().top; // NOTE: Introduce a new function getPosition in the content part ? - HTMLMeterElement* meterElement = static_cast(mContent); + HTMLMeterElement* meterElement = static_cast(GetContent()); double max = meterElement->Max(); double min = meterElement->Min(); diff --git a/layout/forms/nsProgressFrame.cpp b/layout/forms/nsProgressFrame.cpp index fcc8cf46e094..40f564fe9ed6 100644 --- a/layout/forms/nsProgressFrame.cpp +++ b/layout/forms/nsProgressFrame.cpp @@ -151,7 +151,7 @@ nsProgressFrame::ReflowChildFrame(nsIFrame* aChild, nscoord xoffset = aReflowInput.ComputedPhysicalBorderPadding().left; nscoord yoffset = aReflowInput.ComputedPhysicalBorderPadding().top; - double position = static_cast(mContent)->Position(); + double position = static_cast(GetContent())->Position(); // Force the bar's size to match the current progress. // When indeterminate, the progress' size will be 100%. diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index c672517b7cca..93f7517db8e7 100644 --- a/layout/forms/nsRangeFrame.cpp +++ b/layout/forms/nsRangeFrame.cpp @@ -486,7 +486,7 @@ double nsRangeFrame::GetValueAsFractionOfRange() { MOZ_ASSERT(mContent->IsHTMLElement(nsGkAtoms::input), "bad cast"); - dom::HTMLInputElement* input = static_cast(mContent); + dom::HTMLInputElement* input = static_cast(GetContent()); MOZ_ASSERT(input->ControlType() == NS_FORM_INPUT_RANGE); @@ -515,7 +515,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent) "Unexpected event type - aEvent->mRefPoint may be meaningless"); MOZ_ASSERT(mContent->IsHTMLElement(nsGkAtoms::input), "bad cast"); - dom::HTMLInputElement* input = static_cast(mContent); + dom::HTMLInputElement* input = static_cast(GetContent()); MOZ_ASSERT(input->ControlType() == NS_FORM_INPUT_RANGE); @@ -541,7 +541,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent) if (point == nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)) { // We don't want to change the current value for this error state. - return static_cast(mContent)->GetValueAsDecimal(); + return static_cast(GetContent())->GetValueAsDecimal(); } nsRect rangeContentRect = GetContentRectRelativeToSelf(); @@ -750,7 +750,7 @@ nsRangeFrame::AttributeChanged(int32_t aNameSpaceID, // UpdateForValueChange() anyway. MOZ_ASSERT(mContent->IsHTMLElement(nsGkAtoms::input), "bad cast"); bool typeIsRange = - static_cast(mContent)->ControlType() == + static_cast(GetContent())->ControlType() == NS_FORM_INPUT_RANGE; // If script changed the 's type before setting these attributes // then we don't need to do anything since we are going to be reframed. @@ -837,7 +837,7 @@ bool nsRangeFrame::IsHorizontal() const { dom::HTMLInputElement* element = - static_cast(mContent); + static_cast(GetContent()); return element->AttrValueIs(kNameSpaceID_None, nsGkAtoms::orient, nsGkAtoms::horizontal, eCaseMatters) || (!element->AttrValueIs(kNameSpaceID_None, nsGkAtoms::orient, @@ -850,19 +850,19 @@ nsRangeFrame::IsHorizontal() const double nsRangeFrame::GetMin() const { - return static_cast(mContent)->GetMinimum().toDouble(); + return static_cast(GetContent())->GetMinimum().toDouble(); } double nsRangeFrame::GetMax() const { - return static_cast(mContent)->GetMaximum().toDouble(); + return static_cast(GetContent())->GetMaximum().toDouble(); } double nsRangeFrame::GetValue() const { - return static_cast(mContent)->GetValueAsDecimal().toDouble(); + return static_cast(GetContent())->GetValueAsDecimal().toDouble(); } #define STYLES_DISABLING_NATIVE_THEMING \ diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 109607f488ea..cb639bf76ffb 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -3323,7 +3323,7 @@ nsFrame::GetContentForEvent(WidgetEvent* aEvent, void nsFrame::FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent) { - nsIContent* target = aContent ? aContent : mContent; + nsIContent* target = aContent ? aContent : GetContent(); if (target) { RefPtr asyncDispatcher = diff --git a/layout/svg/SVGFEContainerFrame.cpp b/layout/svg/SVGFEContainerFrame.cpp index d6f31428d985..ae4a94edbfbc 100644 --- a/layout/svg/SVGFEContainerFrame.cpp +++ b/layout/svg/SVGFEContainerFrame.cpp @@ -85,7 +85,7 @@ SVGFEContainerFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { - nsSVGFE *element = static_cast(mContent); + nsSVGFE *element = static_cast(GetContent()); if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) { MOZ_ASSERT(GetParent()->IsSVGFilterFrame(), "Observers observe the filter, so that's what we must invalidate"); diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index a6d0c9d587c4..d5dd7b623e4d 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -121,7 +121,7 @@ SVGFEImageFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { - SVGFEImageElement* element = static_cast(mContent); + SVGFEImageElement* element = static_cast(GetContent()); if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) { MOZ_ASSERT(GetParent()->IsSVGFilterFrame(), "Observers observe the filter, so that's what we must invalidate"); diff --git a/layout/svg/SVGFELeafFrame.cpp b/layout/svg/SVGFELeafFrame.cpp index 71a1bb1a16e8..b72c0cc00981 100644 --- a/layout/svg/SVGFELeafFrame.cpp +++ b/layout/svg/SVGFELeafFrame.cpp @@ -83,7 +83,7 @@ SVGFELeafFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { - nsSVGFE *element = static_cast(mContent); + nsSVGFE *element = static_cast(GetContent()); if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) { MOZ_ASSERT(GetParent()->IsSVGFilterFrame(), "Observers observe the filter, so that's what we must invalidate"); diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index 41fa61b7b82b..8b6548765019 100644 --- a/layout/svg/SVGFEUnstyledLeafFrame.cpp +++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp @@ -62,7 +62,7 @@ SVGFEUnstyledLeafFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { - SVGFEUnstyledElement *element = static_cast(mContent); + SVGFEUnstyledElement *element = static_cast(GetContent()); if (element->AttributeAffectsRendering(aNameSpaceID, aAttribute)) { MOZ_ASSERT(GetParent()->GetParent()->IsSVGFilterFrame(), "Observers observe the filter, so that's what we must invalidate"); diff --git a/layout/svg/SVGGeometryFrame.cpp b/layout/svg/SVGGeometryFrame.cpp index 7a3439d21341..c3b625620e13 100644 --- a/layout/svg/SVGGeometryFrame.cpp +++ b/layout/svg/SVGGeometryFrame.cpp @@ -177,7 +177,7 @@ SVGGeometryFrame::AttributeChanged(int32_t aNameSpaceID, if (aNameSpaceID == kNameSpaceID_None && (static_cast - (mContent)->AttributeDefinesGeometry(aAttribute))) { + (GetContent())->AttributeDefinesGeometry(aAttribute))) { nsLayoutUtils::PostRestyleEvent( mContent->AsElement(), nsRestyleHint(0), nsChangeHint_InvalidateRenderingObservers); @@ -202,10 +202,10 @@ SVGGeometryFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } SVGGeometryElement* element = - static_cast(mContent); + static_cast(GetContent()); auto oldStyleSVG = aOldStyleContext->PeekStyleSVG(); - if (oldStyleSVG && !SVGContentUtils::ShapeTypeHasNoCorners(mContent)) { + if (oldStyleSVG && !SVGContentUtils::ShapeTypeHasNoCorners(GetContent())) { if (StyleSVG()->mStrokeLinecap != oldStyleSVG->mStrokeLinecap && element->IsSVGElement(nsGkAtoms::path)) { // If the stroke-linecap changes to or from "butt" then our element @@ -243,7 +243,7 @@ SVGGeometryFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform, HasChildrenOnlyTransform(aFromParentTransform); } - nsSVGElement *content = static_cast(mContent); + nsSVGElement *content = static_cast(GetContent()); nsSVGAnimatedTransformList* transformList = content->GetAnimatedTransformList(); if ((transformList && transformList->HasTransform()) || @@ -263,7 +263,7 @@ void SVGGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { - if (!static_cast(mContent)->HasValidDimensions() || + if (!static_cast(GetContent())->HasValidDimensions() || (!IsVisibleForPainting(aBuilder) && aBuilder->IsForPainting())) { return; } @@ -342,7 +342,7 @@ SVGGeometryFrame::GetFrameForPoint(const gfxPoint& aPoint) bool isHit = false; SVGGeometryElement* content = - static_cast(mContent); + static_cast(GetContent()); // Using ScreenReferenceDrawTarget() opens us to Moz2D backend specific hit- // testing bugs. Maybe we should use a BackendType::CAIRO DT for hit-testing @@ -460,9 +460,9 @@ SVGGeometryFrame::NotifySVGChanged(uint32_t aFlags) // of stroke-dashoffset since, although that can have a percentage value // that is resolved against our coordinate context, it does not affect our // mRect. - if (static_cast(mContent)->GeometryDependsOnCoordCtx() || + if (static_cast(GetContent())->GeometryDependsOnCoordCtx() || StyleSVG()->mStrokeWidth.HasPercent()) { - static_cast(mContent)->ClearAnyCachedPath(); + static_cast(GetContent())->ClearAnyCachedPath(); nsSVGUtils::ScheduleReflowSVG(this); } } @@ -493,7 +493,7 @@ SVGGeometryFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace, } SVGGeometryElement* element = - static_cast(mContent); + static_cast(GetContent()); bool getFill = (aFlags & nsSVGUtils::eBBoxIncludeFillGeometry) || ((aFlags & nsSVGUtils::eBBoxIncludeFill) && @@ -646,14 +646,14 @@ SVGGeometryFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace, // Account for markers: if ((aFlags & nsSVGUtils::eBBoxIncludeMarkers) != 0 && - static_cast(mContent)->IsMarkable()) { + static_cast(GetContent())->IsMarkable()) { float strokeWidth = nsSVGUtils::GetStrokeWidth(this); MarkerProperties properties = GetMarkerProperties(this); if (properties.MarkersExist()) { nsTArray marks; - static_cast(mContent)->GetMarkPoints(&marks); + static_cast(GetContent())->GetMarkPoints(&marks); uint32_t num = marks.Length(); // These are in the same order as the nsSVGMark::Type constants. @@ -691,7 +691,7 @@ SVGGeometryFrame::GetCanvasTM() NS_ASSERTION(GetParent(), "null parent"); nsSVGContainerFrame *parent = static_cast(GetParent()); - SVGGraphicsElement *content = static_cast(mContent); + SVGGraphicsElement *content = static_cast(GetContent()); return content->PrependLocalTransformsTo(parent->GetCanvasTM()); } @@ -762,7 +762,7 @@ SVGGeometryFrame::Render(gfxContext* aContext, StyleSVG()->mClipRule : StyleSVG()->mFillRule); SVGGeometryElement* element = - static_cast(mContent); + static_cast(GetContent()); AntialiasMode aaMode = (StyleSVG()->mShapeRendering == NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED || @@ -798,7 +798,7 @@ SVGGeometryFrame::Render(gfxContext* aContext, } } - SVGContextPaint* contextPaint = SVGContextPaint::GetContextPaint(mContent); + SVGContextPaint* contextPaint = SVGContextPaint::GetContextPaint(GetContent()); if (aRenderComponents & eRenderFill) { GeneralPattern fillPattern; @@ -846,7 +846,7 @@ SVGGeometryFrame::Render(gfxContext* aContext, if (strokePattern.GetPattern()) { SVGContentUtils::AutoStrokeOptions strokeOptions; SVGContentUtils::GetStrokeOptions(&strokeOptions, - static_cast(mContent), + static_cast(GetContent()), StyleContext(), contextPaint); // GetStrokeOptions may set the line width to zero as an optimization if (strokeOptions.mLineWidth <= 0) { @@ -871,8 +871,8 @@ SVGGeometryFrame::PaintMarkers(gfxContext& aContext, const gfxMatrix& aTransform, imgDrawingParams& aImgParams) { - SVGContextPaint* contextPaint = SVGContextPaint::GetContextPaint(mContent); - if (static_cast(mContent)->IsMarkable()) { + SVGContextPaint* contextPaint = SVGContextPaint::GetContextPaint(GetContent()); + if (static_cast(GetContent())->IsMarkable()) { MarkerProperties properties = GetMarkerProperties(this); if (properties.MarkersExist()) { @@ -880,7 +880,7 @@ SVGGeometryFrame::PaintMarkers(gfxContext& aContext, nsTArray marks; static_cast - (mContent)->GetMarkPoints(&marks); + (GetContent())->GetMarkPoints(&marks); uint32_t num = marks.Length(); if (num) { diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index abb6a4392184..affa4dfc98bb 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -3651,7 +3651,7 @@ SVGTextFrame::PaintSVG(gfxContext& aContext, TextRenderedRun run = it.Current(); SVGContextPaint* outerContextPaint = - SVGContextPaint::GetContextPaint(mContent); + SVGContextPaint::GetContextPaint(GetContent()); while (run.mFrame) { nsTextFrame* frame = run.mFrame; @@ -3925,7 +3925,7 @@ SVGTextFrame::GetCanvasTM() "should not call GetCanvasTM() when we are non-display"); nsSVGContainerFrame *parent = static_cast(GetParent()); - dom::SVGTextContentElement *content = static_cast(mContent); + dom::SVGTextContentElement *content = static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM()); @@ -5059,7 +5059,7 @@ SVGTextFrame::DoGlyphPositioning() // If the textLength="" attribute was specified, then we need ResolvePositions // to record that a new run starts with each glyph. - SVGTextContentElement* element = static_cast(mContent); + SVGTextContentElement* element = static_cast(GetContent()); nsSVGLength2* textLengthAttr = element->GetAnimatedLength(nsGkAtoms::textLength); bool adjustingTextLength = textLengthAttr->IsExplicitlySet(); @@ -5213,7 +5213,7 @@ SVGTextFrame::ShouldRenderAsPath(nsTextFrame* aFrame, // Text has a stroke. if (style->HasStroke() && - SVGContentUtils::CoordToFloat(static_cast(mContent), + SVGContentUtils::CoordToFloat(static_cast(GetContent()), style->mStrokeWidth) > 0) { return true; } diff --git a/layout/svg/nsSVGAFrame.cpp b/layout/svg/nsSVGAFrame.cpp index c3342471e4a0..bcc0e8ce3509 100644 --- a/layout/svg/nsSVGAFrame.cpp +++ b/layout/svg/nsSVGAFrame.cpp @@ -103,7 +103,7 @@ nsSVGAFrame::AttributeChanged(int32_t aNameSpaceID, (aNameSpaceID == kNameSpaceID_None || aNameSpaceID == kNameSpaceID_XLink)) { - dom::SVGAElement* content = static_cast(mContent); + dom::SVGAElement* content = static_cast(GetContent()); // SMIL may change whether an element is a link, in which case we will // need to update the link state. @@ -140,7 +140,7 @@ nsSVGAFrame::GetCanvasTM() NS_ASSERTION(GetParent(), "null parent"); nsSVGContainerFrame *parent = static_cast(GetParent()); - dom::SVGAElement *content = static_cast(mContent); + dom::SVGAElement *content = static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM()); diff --git a/layout/svg/nsSVGClipPathFrame.cpp b/layout/svg/nsSVGClipPathFrame.cpp index 8c1482425179..0411f3ccbc50 100644 --- a/layout/svg/nsSVGClipPathFrame.cpp +++ b/layout/svg/nsSVGClipPathFrame.cpp @@ -458,7 +458,7 @@ nsSVGClipPathFrame::GetCanvasTM() gfxMatrix nsSVGClipPathFrame::GetClipPathTransform(nsIFrame* aClippedFrame) { - SVGClipPathElement *content = static_cast(mContent); + SVGClipPathElement *content = static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(gfxMatrix()); diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index ec319063b5c0..a154ab6fb135 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -147,7 +147,7 @@ nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, { // mContent could be a XUL element so check for an SVG element before casting if (mContent->IsSVGElement() && - !static_cast(mContent)->HasValidDimensions()) { + !static_cast(GetContent())->HasValidDimensions()) { return; } DisplayOutline(aBuilder, aLists); @@ -232,7 +232,7 @@ nsSVGDisplayContainerFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform, // mContent could be a XUL element so check for an SVG element before casting if (mContent->IsSVGElement()) { - nsSVGElement *content = static_cast(mContent); + nsSVGElement *content = static_cast(GetContent()); nsSVGAnimatedTransformList* transformList = content->GetAnimatedTransformList(); if ((transformList && transformList->HasTransform()) || diff --git a/layout/svg/nsSVGFilterFrame.cpp b/layout/svg/nsSVGFilterFrame.cpp index 524f8d207ddb..292efde71c93 100644 --- a/layout/svg/nsSVGFilterFrame.cpp +++ b/layout/svg/nsSVGFilterFrame.cpp @@ -33,7 +33,7 @@ uint16_t nsSVGFilterFrame::GetEnumValue(uint32_t aIndex, nsIContent *aDefault) { nsSVGEnum& thisEnum = - static_cast(mContent)->mEnumAttributes[aIndex]; + static_cast(GetContent())->mEnumAttributes[aIndex]; if (thisEnum.IsExplicitlySet()) return thisEnum.GetAnimValue(); @@ -60,7 +60,7 @@ const nsSVGLength2 * nsSVGFilterFrame::GetLengthValue(uint32_t aIndex, nsIContent *aDefault) { const nsSVGLength2 *thisLength = - &static_cast(mContent)->mLengthAttributes[aIndex]; + &static_cast(GetContent())->mLengthAttributes[aIndex]; if (thisLength->IsExplicitlySet()) return thisLength; @@ -90,7 +90,7 @@ nsSVGFilterFrame::GetFilterContent(nsIContent *aDefault) RefPtr primitive; CallQueryInterface(child, (nsSVGFE**)getter_AddRefs(primitive)); if (primitive) { - return static_cast(mContent); + return static_cast(GetContent()); } } @@ -121,7 +121,7 @@ nsSVGFilterFrame::GetReferencedFilter() if (!property) { // Fetch our Filter element's href or xlink:href attribute - SVGFilterElement *filter = static_cast(mContent); + SVGFilterElement *filter = static_cast(GetContent()); nsAutoString href; if (filter->mStringAttributes[SVGFilterElement::HREF].IsExplicitlySet()) { filter->mStringAttributes[SVGFilterElement::HREF] diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index 4116457a8274..f5633d51b408 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -158,7 +158,7 @@ void nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { - if (!static_cast(mContent)->HasValidDimensions()) { + if (!static_cast(GetContent())->HasValidDimensions()) { return; } DisplayOutline(aBuilder, aLists); @@ -179,7 +179,7 @@ nsSVGForeignObjectFrame::IsSVGTransformed(Matrix *aOwnTransform, HasChildrenOnlyTransform(aFromParentTransform); } - nsSVGElement *content = static_cast(mContent); + nsSVGElement *content = static_cast(GetContent()); nsSVGAnimatedTransformList* transformList = content->GetAnimatedTransformList(); if ((transformList && transformList->HasTransform()) || @@ -251,7 +251,7 @@ nsSVGForeignObjectFrame::PaintSVG(gfxContext& aContext, if (StyleDisplay()->IsScrollableOverflow()) { float x, y, width, height; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); gfxRect clipRect = @@ -301,7 +301,7 @@ nsSVGForeignObjectFrame::GetFrameForPoint(const gfxPoint& aPoint) return nullptr; float x, y, width, height; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); if (!gfxRect(x, y, width, height).Contains(aPoint) || @@ -335,7 +335,7 @@ nsSVGForeignObjectFrame::ReflowSVG() // correct dimensions: float x, y, w, h; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &w, &h, nullptr); // If mRect's width or height are negative, reflow blows up! We must clamp! @@ -392,7 +392,7 @@ nsSVGForeignObjectFrame::NotifySVGChanged(uint32_t aFlags) if (aFlags & COORD_CONTEXT_CHANGED) { SVGForeignObjectElement *fO = - static_cast(mContent); + static_cast(GetContent()); // Coordinate context changes affect mCanvasTM if we have a // percentage 'x' or 'y' if (fO->mLengthAttributes[SVGForeignObjectElement::ATTR_X].IsPercentage() || @@ -455,7 +455,7 @@ nsSVGForeignObjectFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace, uint32_t aFlags) { SVGForeignObjectElement *content = - static_cast(mContent); + static_cast(GetContent()); float x, y, w, h; content->GetAnimatedLengthValues(&x, &y, &w, &h, nullptr); @@ -480,7 +480,7 @@ nsSVGForeignObjectFrame::GetCanvasTM() nsSVGContainerFrame *parent = static_cast(GetParent()); SVGForeignObjectElement *content = - static_cast(mContent); + static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM()); diff --git a/layout/svg/nsSVGGFrame.cpp b/layout/svg/nsSVGGFrame.cpp index 9be113a57066..91da2c98135c 100644 --- a/layout/svg/nsSVGGFrame.cpp +++ b/layout/svg/nsSVGGFrame.cpp @@ -65,7 +65,7 @@ nsSVGGFrame::GetCanvasTM() NS_ASSERTION(GetParent(), "null parent"); nsSVGContainerFrame *parent = static_cast(GetParent()); - SVGGraphicsElement *content = static_cast(mContent); + SVGGraphicsElement *content = static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM()); diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp index b1a9b1b771cd..a0d88f4d3fe6 100644 --- a/layout/svg/nsSVGGradientFrame.cpp +++ b/layout/svg/nsSVGGradientFrame.cpp @@ -67,7 +67,7 @@ uint16_t nsSVGGradientFrame::GetEnumValue(uint32_t aIndex, nsIContent *aDefault) { const nsSVGEnum& thisEnum = - static_cast(mContent)->mEnumAttributes[aIndex]; + static_cast(GetContent())->mEnumAttributes[aIndex]; if (thisEnum.IsExplicitlySet()) return thisEnum.GetAnimValue(); @@ -107,7 +107,7 @@ const nsSVGAnimatedTransformList* nsSVGGradientFrame::GetGradientTransformList(nsIContent* aDefault) { nsSVGAnimatedTransformList *thisTransformList = - static_cast(mContent)->GetAnimatedTransformList(); + static_cast(GetContent())->GetAnimatedTransformList(); if (thisTransformList && thisTransformList->IsExplicitlySet()) return thisTransformList; @@ -152,7 +152,7 @@ nsSVGGradientFrame::GetGradientTransform(nsIFrame *aSource, } const nsSVGAnimatedTransformList* animTransformList = - GetGradientTransformList(mContent); + GetGradientTransformList(GetContent()); if (!animTransformList) return bboxMatrix; @@ -340,7 +340,7 @@ nsSVGGradientFrame::GetReferencedGradient() if (!property) { // Fetch our gradient element's href or xlink:href attribute dom::SVGGradientElement* grad = - static_cast(mContent); + static_cast(GetContent()); nsAutoString href; if (grad->mStringAttributes[dom::SVGGradientElement::HREF] .IsExplicitlySet()) { @@ -454,7 +454,7 @@ nsSVGLinearGradientFrame::GetLengthValue(uint32_t aIndex) { dom::SVGLinearGradientElement* lengthElement = GetLinearGradientWithLength(aIndex, - static_cast(mContent)); + static_cast(GetContent())); // We passed in mContent as a fallback, so, assuming mContent is non-null, the // return value should also be non-null. MOZ_ASSERT(lengthElement, @@ -482,7 +482,7 @@ nsSVGLinearGradientFrame::GetLinearGradientWithLength(uint32_t aIndex, dom::SVGLinearGradientElement* aDefault) { dom::SVGLinearGradientElement* thisElement = - static_cast(mContent); + static_cast(GetContent()); const nsSVGLength2 &length = thisElement->mLengthAttributes[aIndex]; if (length.IsExplicitlySet()) { @@ -557,7 +557,7 @@ nsSVGRadialGradientFrame::GetLengthValue(uint32_t aIndex) { dom::SVGRadialGradientElement* lengthElement = GetRadialGradientWithLength(aIndex, - static_cast(mContent)); + static_cast(GetContent())); // We passed in mContent as a fallback, so, assuming mContent is non-null, // the return value should also be non-null. MOZ_ASSERT(lengthElement, @@ -602,7 +602,7 @@ nsSVGRadialGradientFrame::GetRadialGradientWithLength(uint32_t aIndex, dom::SVGRadialGradientElement* aDefault) { dom::SVGRadialGradientElement* thisElement = - static_cast(mContent); + static_cast(GetContent()); const nsSVGLength2 &length = thisElement->mLengthAttributes[aIndex]; if (length.IsExplicitlySet()) { diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index 074415854667..12b82ce1fd7c 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -49,7 +49,7 @@ nsSVGImageFrame::~nsSVGImageFrame() { // set the frame to null so we don't send messages to a dead object. if (mListener) { - nsCOMPtr imageLoader = do_QueryInterface(mContent); + nsCOMPtr imageLoader = do_QueryInterface(GetContent()); if (imageLoader) { imageLoader->RemoveNativeObserver(mListener); } @@ -81,7 +81,7 @@ nsSVGImageFrame::Init(nsIContent* aContent, } mListener = new nsSVGImageListener(this); - nsCOMPtr imageLoader = do_QueryInterface(mContent); + nsCOMPtr imageLoader = do_QueryInterface(GetContent()); if (!imageLoader) { MOZ_CRASH("Why is this not an image loading content?"); } @@ -151,7 +151,7 @@ nsSVGImageFrame::AttributeChanged(int32_t aNameSpaceID, aAttribute == nsGkAtoms::href && (aNameSpaceID == kNameSpaceID_XLink || aNameSpaceID == kNameSpaceID_None)) { - SVGImageElement* element = static_cast(mContent); + SVGImageElement* element = static_cast(GetContent()); bool hrefIsSet = element->mStringAttributes[SVGImageElement::HREF].IsExplicitlySet() || @@ -171,7 +171,7 @@ void nsSVGImageFrame::OnVisibilityChange(Visibility aNewVisibility, const Maybe& aNonvisibleAction) { - nsCOMPtr imageLoader = do_QueryInterface(mContent); + nsCOMPtr imageLoader = do_QueryInterface(GetContent()); if (!imageLoader) { SVGGeometryFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction); return; @@ -187,7 +187,7 @@ nsSVGImageFrame::GetRasterImageTransform(int32_t aNativeWidth, int32_t aNativeHeight) { float x, y, width, height; - SVGImageElement *element = static_cast(mContent); + SVGImageElement *element = static_cast(GetContent()); element->GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); Matrix viewBoxTM = @@ -202,7 +202,7 @@ gfx::Matrix nsSVGImageFrame::GetVectorImageTransform() { float x, y, width, height; - SVGImageElement *element = static_cast(mContent); + SVGImageElement *element = static_cast(GetContent()); element->GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); // No viewBoxTM needed here -- our height/width overrides any concept of @@ -258,14 +258,14 @@ nsSVGImageFrame::PaintSVG(gfxContext& aContext, } float x, y, width, height; - SVGImageElement *imgElem = static_cast(mContent); + SVGImageElement *imgElem = static_cast(GetContent()); imgElem->GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); NS_ASSERTION(width > 0 && height > 0, "Should only be painting things with valid width/height"); if (!mImageContainer) { nsCOMPtr currentRequest; - nsCOMPtr imageLoader = do_QueryInterface(mContent); + nsCOMPtr imageLoader = do_QueryInterface(GetContent()); if (imageLoader) imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, getter_AddRefs(currentRequest)); @@ -374,7 +374,7 @@ nsSVGImageFrame::GetFrameForPoint(const gfxPoint& aPoint) } Rect rect; - SVGImageElement *element = static_cast(mContent); + SVGImageElement *element = static_cast(GetContent()); element->GetAnimatedLengthValues(&rect.x, &rect.y, &rect.width, &rect.height, nullptr); @@ -432,7 +432,7 @@ nsSVGImageFrame::ReflowSVG() } float x, y, width, height; - SVGImageElement *element = static_cast(mContent); + SVGImageElement *element = static_cast(GetContent()); element->GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); Rect extent(x, y, width, height); diff --git a/layout/svg/nsSVGMarkerFrame.cpp b/layout/svg/nsSVGMarkerFrame.cpp index dbeb02ea5b2d..9fdefbea7976 100644 --- a/layout/svg/nsSVGMarkerFrame.cpp +++ b/layout/svg/nsSVGMarkerFrame.cpp @@ -74,7 +74,7 @@ nsSVGMarkerFrame::GetCanvasTM() return gfxMatrix(); } - SVGMarkerElement *content = static_cast(mContent); + SVGMarkerElement *content = static_cast(GetContent()); mInUse2 = true; gfxMatrix markedTM = mMarkedFrame->GetCanvasTM(); @@ -110,7 +110,7 @@ nsSVGMarkerFrame::PaintMark(gfxContext& aContext, AutoMarkerReferencer markerRef(this, aMarkedFrame); - SVGMarkerElement *marker = static_cast(mContent); + SVGMarkerElement *marker = static_cast(GetContent()); if (!marker->HasValidDimensions()) { return; } @@ -165,7 +165,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix& aToBBoxUserspace, AutoMarkerReferencer markerRef(this, aMarkedFrame); - SVGMarkerElement *content = static_cast(mContent); + SVGMarkerElement *content = static_cast(GetContent()); if (!content->HasValidDimensions()) { return bbox; } @@ -196,7 +196,7 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix& aToBBoxUserspace, void nsSVGMarkerFrame::SetParentCoordCtxProvider(SVGSVGElement *aContext) { - SVGMarkerElement *marker = static_cast(mContent); + SVGMarkerElement *marker = static_cast(GetContent()); marker->SetParentCoordCtxProvider(aContext); } diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp index 42b3171982a7..aa3a2c6cc135 100644 --- a/layout/svg/nsSVGMaskFrame.cpp +++ b/layout/svg/nsSVGMaskFrame.cpp @@ -160,7 +160,7 @@ nsSVGMaskFrame::GetMaskForMaskedFrame(MaskParams& aParams) gfxRect nsSVGMaskFrame::GetMaskArea(nsIFrame* aMaskedFrame) { - SVGMaskElement *maskElem = static_cast(mContent); + SVGMaskElement *maskElem = static_cast(GetContent()); uint16_t units = maskElem->mEnumAttributes[SVGMaskElement::MASKUNITS].GetAnimValue(); @@ -221,7 +221,7 @@ nsSVGMaskFrame::GetCanvasTM() gfxMatrix nsSVGMaskFrame::GetMaskTransform(nsIFrame* aMaskedFrame) { - SVGMaskElement *content = static_cast(mContent); + SVGMaskElement *content = static_cast(GetContent()); nsSVGEnum* maskContentUnits = &content->mEnumAttributes[SVGMaskElement::MASKCONTENTUNITS]; diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index 6c01c95eba2a..6382d2c1f918 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -168,7 +168,7 @@ nsSVGOuterSVGFrame::GetPrefISize(gfxContext *aRenderingContext) nscoord result; DISPLAY_PREF_WIDTH(this, result); - SVGSVGElement *svg = static_cast(mContent); + SVGSVGElement *svg = static_cast(GetContent()); WritingMode wm = GetWritingMode(); const nsSVGLength2& isize = wm.IsVertical() ? svg->mLengthAttributes[SVGSVGElement::ATTR_HEIGHT] @@ -212,7 +212,7 @@ nsSVGOuterSVGFrame::GetIntrinsicSize() IntrinsicSize intrinsicSize; - SVGSVGElement *content = static_cast(mContent); + SVGSVGElement *content = static_cast(GetContent()); const nsSVGLength2& width = content->mLengthAttributes[SVGSVGElement::ATTR_WIDTH]; const nsSVGLength2& height = @@ -240,7 +240,7 @@ nsSVGOuterSVGFrame::GetIntrinsicRatio() // are both specified and set to non-percentage values, or we have a viewBox // rect: http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing - SVGSVGElement *content = static_cast(mContent); + SVGSVGElement *content = static_cast(GetContent()); const nsSVGLength2& width = content->mLengthAttributes[SVGSVGElement::ATTR_WIDTH]; const nsSVGLength2& height = @@ -324,7 +324,7 @@ nsSVGOuterSVGFrame::ComputeSize(gfxContext *aRenderingContext, // intrinsic size. Also note that explicit percentage values are mapped // into style, so the following isn't for them.) - SVGSVGElement* content = static_cast(mContent); + SVGSVGElement* content = static_cast(GetContent()); const nsSVGLength2& width = content->mLengthAttributes[SVGSVGElement::ATTR_WIDTH]; @@ -383,7 +383,7 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext, NS_ASSERTION(!GetPrevInFlow(), "SVG can't currently be broken across pages."); - SVGSVGElement *svgElem = static_cast(mContent); + SVGSVGElement *svgElem = static_cast(GetContent()); nsSVGOuterSVGAnonChildFrame *anonKid = static_cast(PrincipalChildList().FirstChild()); @@ -703,7 +703,7 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID, TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED : TRANSFORM_CHANGED); if (aAttribute != nsGkAtoms::transform) { - static_cast(mContent)->ChildrenOnlyTransformChanged(); + static_cast(GetContent())->ChildrenOnlyTransformChanged(); } } else if (aAttribute == nsGkAtoms::width || @@ -743,7 +743,7 @@ nsSVGOuterSVGFrame::IsSVGTransformed(Matrix* aOwnTransform, bool foundTransform = false; - SVGSVGElement *content = static_cast(mContent); + SVGSVGElement *content = static_cast(GetContent()); nsSVGAnimatedTransformList* transformList = content->GetAnimatedTransformList(); if ((transformList && transformList->HasTransform()) || @@ -816,7 +816,7 @@ nsSVGOuterSVGFrame::NotifyViewportOrTransformChanged(uint32_t aFlags) return; } - SVGSVGElement *content = static_cast(mContent); + SVGSVGElement *content = static_cast(GetContent()); if (aFlags & COORD_CONTEXT_CHANGED) { if (content->HasViewBoxRect()) { @@ -900,7 +900,7 @@ gfxMatrix nsSVGOuterSVGFrame::GetCanvasTM() { if (!mCanvasTM) { - SVGSVGElement *content = static_cast(mContent); + SVGSVGElement *content = static_cast(GetContent()); float devPxPerCSSPx = 1.0f / PresContext()->AppUnitsToFloatCSSPixels( @@ -967,7 +967,7 @@ nsSVGOuterSVGFrame::IsRootOfImage() bool nsSVGOuterSVGFrame::VerticalScrollbarNotNeeded() const { - const nsSVGLength2& height = static_cast(mContent)-> + const nsSVGLength2& height = static_cast(GetContent())-> mLengthAttributes[SVGSVGElement::ATTR_HEIGHT]; return height.IsPercentage() && height.GetBaseValInSpecifiedUnits() <= 100; } @@ -1012,7 +1012,7 @@ nsSVGOuterSVGAnonChildFrame::IsSVGTransformed(Matrix* aOwnTransform, // anonymous child frame. Since we are the child frame, we apply the // children-only transforms as if they are our own transform. - SVGSVGElement* content = static_cast(mContent); + SVGSVGElement* content = static_cast(GetContent()); if (!content->HasChildrenOnlyTransform()) { return false; diff --git a/layout/svg/nsSVGPatternFrame.cpp b/layout/svg/nsSVGPatternFrame.cpp index 488ac2f5c783..805f21d9a38c 100644 --- a/layout/svg/nsSVGPatternFrame.cpp +++ b/layout/svg/nsSVGPatternFrame.cpp @@ -440,7 +440,7 @@ uint16_t nsSVGPatternFrame::GetEnumValue(uint32_t aIndex, nsIContent *aDefault) { nsSVGEnum& thisEnum = - static_cast(mContent)->mEnumAttributes[aIndex]; + static_cast(GetContent())->mEnumAttributes[aIndex]; if (thisEnum.IsExplicitlySet()) return thisEnum.GetAnimValue(); @@ -466,7 +466,7 @@ nsSVGAnimatedTransformList* nsSVGPatternFrame::GetPatternTransformList(nsIContent* aDefault) { nsSVGAnimatedTransformList *thisTransformList = - static_cast(mContent)->GetAnimatedTransformList(); + static_cast(GetContent())->GetAnimatedTransformList(); if (thisTransformList && thisTransformList->IsExplicitlySet()) return thisTransformList; @@ -490,7 +490,7 @@ gfxMatrix nsSVGPatternFrame::GetPatternTransform() { nsSVGAnimatedTransformList* animTransformList = - GetPatternTransformList(mContent); + GetPatternTransformList(GetContent()); if (!animTransformList) return gfxMatrix(); @@ -501,7 +501,7 @@ const nsSVGViewBox & nsSVGPatternFrame::GetViewBox(nsIContent* aDefault) { const nsSVGViewBox &thisViewBox = - static_cast(mContent)->mViewBox; + static_cast(GetContent())->mViewBox; if (thisViewBox.IsExplicitlySet()) return thisViewBox; @@ -525,7 +525,7 @@ const SVGAnimatedPreserveAspectRatio & nsSVGPatternFrame::GetPreserveAspectRatio(nsIContent *aDefault) { const SVGAnimatedPreserveAspectRatio &thisPar = - static_cast(mContent)->mPreserveAspectRatio; + static_cast(GetContent())->mPreserveAspectRatio; if (thisPar.IsExplicitlySet()) return thisPar; @@ -549,7 +549,7 @@ const nsSVGLength2 * nsSVGPatternFrame::GetLengthValue(uint32_t aIndex, nsIContent *aDefault) { const nsSVGLength2 *thisLength = - &static_cast(mContent)->mLengthAttributes[aIndex]; + &static_cast(GetContent())->mLengthAttributes[aIndex]; if (thisLength->IsExplicitlySet()) return thisLength; @@ -581,7 +581,7 @@ nsSVGPatternFrame::GetReferencedPattern() if (!property) { // Fetch our pattern element's href or xlink:href attribute - SVGPatternElement *pattern = static_cast(mContent); + SVGPatternElement *pattern = static_cast(GetContent()); nsAutoString href; if (pattern->mStringAttributes[SVGPatternElement::HREF].IsExplicitlySet()) { pattern->mStringAttributes[SVGPatternElement::HREF] diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index e320cfcbce97..2375f057ad20 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -130,7 +130,7 @@ nsSVGSwitchFrame::GetFrameForPoint(const gfxPoint& aPoint) // Transform the point from our SVG user space to our child's. gfxPoint point = aPoint; gfxMatrix m = - static_cast(mContent)-> + static_cast(GetContent())-> PrependLocalTransformsTo(gfxMatrix(), eChildToUserSpace); m = static_cast(kid->GetContent())-> PrependLocalTransformsTo(m, eUserSpaceToParent); @@ -227,7 +227,7 @@ nsIFrame * nsSVGSwitchFrame::GetActiveChildFrame() { nsIContent *activeChild = - static_cast(mContent)->GetActiveChild(); + static_cast(GetContent())->GetActiveChild(); if (activeChild) { for (nsIFrame* kid = mFrames.FirstChild(); kid; diff --git a/layout/svg/nsSVGUseFrame.cpp b/layout/svg/nsSVGUseFrame.cpp index 75f4fd5418c1..3172d4a371f0 100644 --- a/layout/svg/nsSVGUseFrame.cpp +++ b/layout/svg/nsSVGUseFrame.cpp @@ -100,7 +100,7 @@ nsSVGUseFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { - SVGUseElement *useElement = static_cast(mContent); + SVGUseElement *useElement = static_cast(GetContent()); if (aNameSpaceID == kNameSpaceID_None) { if (aAttribute == nsGkAtoms::x || aAttribute == nsGkAtoms::y) { @@ -150,7 +150,7 @@ nsSVGUseFrame::AttributeChanged(int32_t aNameSpaceID, void nsSVGUseFrame::DestroyFrom(nsIFrame* aDestructRoot) { - RefPtr use = static_cast(mContent); + RefPtr use = static_cast(GetContent()); nsSVGGFrame::DestroyFrom(aDestructRoot); use->DestroyAnonymousContent(); } @@ -166,7 +166,7 @@ nsSVGUseFrame::ReflowSVG() // handled by the nsSVGOuterSVGFrame for the anonymous that will be // created for that purpose. float x, y; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, nullptr); mRect.MoveTo(nsLayoutUtils::RoundGfxRectToAppRect( gfxRect(x, y, 0.0, 0.0), @@ -188,7 +188,7 @@ nsSVGUseFrame::NotifySVGChanged(uint32_t aFlags) !(aFlags & TRANSFORM_CHANGED)) { // Coordinate context changes affect mCanvasTM if we have a // percentage 'x' or 'y' - SVGUseElement *use = static_cast(mContent); + SVGUseElement *use = static_cast(GetContent()); if (use->mLengthAttributes[SVGUseElement::ATTR_X].IsPercentage() || use->mLengthAttributes[SVGUseElement::ATTR_Y].IsPercentage()) { aFlags |= TRANSFORM_CHANGED; @@ -215,7 +215,7 @@ nsSVGUseFrame::NotifySVGChanged(uint32_t aFlags) nsresult nsSVGUseFrame::CreateAnonymousContent(nsTArray& aElements) { - SVGUseElement *use = static_cast(mContent); + SVGUseElement *use = static_cast(GetContent()); nsIContent* clone = use->CreateAnonymousContent(); nsLayoutUtils::PostRestyleEvent( @@ -231,7 +231,7 @@ void nsSVGUseFrame::AppendAnonymousContentTo(nsTArray& aElements, uint32_t aFilter) { - SVGUseElement *use = static_cast(mContent); + SVGUseElement *use = static_cast(GetContent()); nsIContent* clone = use->GetAnonymousContent(); if (clone) { aElements.AppendElement(clone); diff --git a/layout/svg/nsSVGViewportFrame.cpp b/layout/svg/nsSVGViewportFrame.cpp index a61f2ad831fb..9b1a6cf26d1b 100644 --- a/layout/svg/nsSVGViewportFrame.cpp +++ b/layout/svg/nsSVGViewportFrame.cpp @@ -38,7 +38,7 @@ nsSVGViewportFrame::PaintSVG(gfxContext& aContext, if (StyleDisplay()->IsScrollableOverflow()) { float x, y, width, height; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); if (width <= 0 || height <= 0) { @@ -61,7 +61,7 @@ nsSVGViewportFrame::ReflowSVG() // mRect must be set before FinishAndStoreOverflow is called in order // for our overflow areas to be clipped correctly. float x, y, width, height; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &width, &height, nullptr); mRect = nsLayoutUtils::RoundGfxRectToAppRect( gfxRect(x, y, width, height), @@ -84,7 +84,7 @@ nsSVGViewportFrame::NotifySVGChanged(uint32_t aFlags) if (aFlags & COORD_CONTEXT_CHANGED) { - SVGViewportElement *svg = static_cast(mContent); + SVGViewportElement *svg = static_cast(GetContent()); bool xOrYIsPercentage = svg->mLengthAttributes[SVGViewportElement::ATTR_X].IsPercentage() || @@ -151,7 +151,7 @@ nsSVGViewportFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace, // Ideally getClientRects/getBoundingClientRect should be consistent with // getBBox. float x, y, w, h; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&x, &y, &w, &h, nullptr); if (w < 0.0f) w = 0.0f; if (h < 0.0f) h = 0.0f; @@ -180,7 +180,7 @@ nsSVGViewportFrame::AttributeChanged(int32_t aNameSpaceID, if (aNameSpaceID == kNameSpaceID_None && !(GetStateBits() & NS_FRAME_IS_NONDISPLAY)) { - SVGViewportElement* content = static_cast(mContent); + SVGViewportElement* content = static_cast(GetContent()); if (aAttribute == nsGkAtoms::width || aAttribute == nsGkAtoms::height) { @@ -249,7 +249,7 @@ nsSVGViewportFrame::GetFrameForPoint(const gfxPoint& aPoint) if (StyleDisplay()->IsScrollableOverflow()) { Rect clip; - static_cast(mContent)-> + static_cast(GetContent())-> GetAnimatedLengthValues(&clip.x, &clip.y, &clip.width, &clip.height, nullptr); if (!clip.Contains(ToPoint(aPoint))) { @@ -284,7 +284,7 @@ nsSVGViewportFrame::GetCanvasTM() NS_ASSERTION(GetParent(), "null parent"); nsSVGContainerFrame *parent = static_cast(GetParent()); - SVGViewportElement *content = static_cast(mContent); + SVGViewportElement *content = static_cast(GetContent()); gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM()); @@ -296,7 +296,7 @@ nsSVGViewportFrame::GetCanvasTM() bool nsSVGViewportFrame::HasChildrenOnlyTransform(gfx::Matrix *aTransform) const { - SVGViewportElement *content = static_cast(mContent); + SVGViewportElement *content = static_cast(GetContent()); if (content->HasViewBoxOrSyntheticViewBox()) { // XXX Maybe return false if the transform is the identity transform? diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index db1edab35b5c..142db235f03f 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -704,7 +704,7 @@ nsMenuFrame::GetAnchor() } // Always return the menu's content if the anchor wasn't set or wasn't found. - return anchor && anchor->GetPrimaryFrame() ? anchor : mContent; + return anchor && anchor->GetPrimaryFrame() ? anchor : GetContent(); } void