зеркало из https://github.com/mozilla/pjs.git
Bug 562688 part 12. Eliminate eELEMENT usage in the rest of layout except layout/style. r=dbaron
This commit is contained in:
Родитель
604dc99bd4
Коммит
9b6c3b34d0
|
@ -368,13 +368,13 @@ nsButtonFrameRenderer::ReResolveStyles(nsPresContext* aPresContext)
|
|||
|
||||
// style for the inner such as a dotted line (Windows)
|
||||
mInnerFocusStyle =
|
||||
styleSet->ProbePseudoElementStyle(mFrame->GetContent(),
|
||||
styleSet->ProbePseudoElementStyle(mFrame->GetContent()->AsElement(),
|
||||
nsCSSPseudoElements::ePseudo_mozFocusInner,
|
||||
context);
|
||||
|
||||
// style for outer focus like a ridged border (MAC).
|
||||
mOuterFocusStyle =
|
||||
styleSet->ProbePseudoElementStyle(mFrame->GetContent(),
|
||||
styleSet->ProbePseudoElementStyle(mFrame->GetContent()->AsElement(),
|
||||
nsCSSPseudoElements::ePseudo_mozFocusOuter,
|
||||
context);
|
||||
}
|
||||
|
|
|
@ -338,8 +338,7 @@ void nsListControlFrame::PaintFocus(nsIRenderingContext& aRC, nsPoint aPt)
|
|||
// Failing all else, try the first thing we have, but only if
|
||||
// it's an element. Text frames need not apply.
|
||||
childframe = containerFrame->GetFirstChild(nsnull);
|
||||
if (childframe &&
|
||||
!childframe->GetContent()->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (childframe && !childframe->GetContent()->IsElement()) {
|
||||
childframe = nsnull;
|
||||
}
|
||||
result = NS_OK;
|
||||
|
|
|
@ -169,7 +169,8 @@ nsMathMLFrame::ResolveMathMLCharStyle(nsPresContext* aPresContext,
|
|||
nsCSSPseudoElements::ePseudo_mozMathAnonymous; // savings
|
||||
nsRefPtr<nsStyleContext> newStyleContext;
|
||||
newStyleContext = aPresContext->StyleSet()->
|
||||
ResolvePseudoElementStyle(aContent, pseudoType, aParentStyleContext);
|
||||
ResolvePseudoElementStyle(aContent->AsElement(), pseudoType,
|
||||
aParentStyleContext);
|
||||
|
||||
if (newStyleContext)
|
||||
aMathMLChar->SetStyleContext(newStyleContext);
|
||||
|
|
|
@ -144,7 +144,7 @@ nsMathMLmactionFrame::Init(nsIContent* aContent,
|
|||
// then, re-resolve our style
|
||||
nsStyleContext* parentStyleContext = GetStyleContext()->GetParent();
|
||||
newStyleContext = PresContext()->StyleSet()->
|
||||
ResolveStyleFor(aContent, parentStyleContext);
|
||||
ResolveStyleFor(aContent->AsElement(), parentStyleContext);
|
||||
|
||||
if (!newStyleContext)
|
||||
mRestyle.Truncate();
|
||||
|
|
|
@ -407,7 +407,7 @@ nsSVGEffects::EffectProperties::GetMaskFrame(PRBool *aOK)
|
|||
void
|
||||
nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
||||
{
|
||||
NS_ASSERTION(aFrame->GetContent()->IsNodeOfType(nsINode::eELEMENT),
|
||||
NS_ASSERTION(aFrame->GetContent()->IsElement(),
|
||||
"aFrame's content should be an element");
|
||||
|
||||
FrameProperties props = aFrame->Properties();
|
||||
|
@ -438,7 +438,7 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
|||
|
||||
nsIFrame *kid = aFrame->GetFirstChild(nsnull);
|
||||
while (kid) {
|
||||
if (kid->GetContent()->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (kid->GetContent()->IsElement()) {
|
||||
UpdateEffects(kid);
|
||||
}
|
||||
kid = kid->GetNextSibling();
|
||||
|
|
|
@ -543,7 +543,7 @@ nsSVGUtils::GetCTM(nsSVGElement *aElement, PRBool aScreenCTM)
|
|||
// didn't find a nearestViewportElement
|
||||
return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular
|
||||
}
|
||||
if (!ancestor || !ancestor->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
if (!ancestor || !ancestor->IsElement()) {
|
||||
return matrix;
|
||||
}
|
||||
if (ancestor->GetNameSpaceID() == kNameSpaceID_SVG) {
|
||||
|
|
|
@ -717,7 +717,7 @@ nsListBoxBodyFrame::ComputeIntrinsicWidth(nsBoxLayoutState& aBoxLayoutState)
|
|||
nsRefPtr<nsStyleContext> styleContext;
|
||||
nsPresContext *presContext = aBoxLayoutState.PresContext();
|
||||
styleContext = presContext->StyleSet()->
|
||||
ResolveStyleFor(firstRowContent, nsnull);
|
||||
ResolveStyleFor(firstRowContent->AsElement(), nsnull);
|
||||
|
||||
nscoord width = 0;
|
||||
nsMargin margin(0,0,0,0);
|
||||
|
|
|
@ -338,7 +338,7 @@ nsSplitterFrame::Init(nsIContent* aContent,
|
|||
NS_LITERAL_STRING("vertical"), PR_FALSE);
|
||||
nsStyleContext* parentStyleContext = GetStyleContext()->GetParent();
|
||||
nsRefPtr<nsStyleContext> newContext = PresContext()->StyleSet()->
|
||||
ResolveStyleFor(aContent, parentStyleContext);
|
||||
ResolveStyleFor(aContent->AsElement(), parentStyleContext);
|
||||
SetStyleContextWithoutNotification(newContext);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ static void FindBodyElement(nsIContent* aParent, nsIContent** aResult)
|
|||
// There are nesting tree elements. Only the innermost should
|
||||
// find the treechilren.
|
||||
break;
|
||||
} else if (content->IsNodeOfType(nsINode::eELEMENT) &&
|
||||
} else if (content->IsElement() &&
|
||||
!ni->Equals(nsGkAtoms::_template, kNameSpaceID_XUL)) {
|
||||
FindBodyElement(content, aResult);
|
||||
if (*aResult)
|
||||
|
|
|
@ -101,7 +101,7 @@ nsTreeStyleCache::GetStyleContext(nsICSSPseudoComparator* aComparator,
|
|||
if (!result) {
|
||||
// We missed the cache. Resolve this pseudo-style.
|
||||
result = aPresContext->StyleSet()->
|
||||
ResolveXULTreePseudoStyle(aContent, aPseudoElement,
|
||||
ResolveXULTreePseudoStyle(aContent->AsElement(), aPseudoElement,
|
||||
aContext, aComparator).get();
|
||||
|
||||
// Put the style context in our table, transferring the owning reference to the table.
|
||||
|
|
Загрузка…
Ссылка в новой задаче