mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 525295. Rename nsStyleContext::GetPseudoType to GetPseudo. r=dbaron
This commit is contained in:
parent
82f8ad1c8f
commit
5215a681c7
@ -542,7 +542,7 @@ GetIBContainingBlockFor(nsIFrame* aFrame)
|
||||
// style context -- they're not the frames we're looking for! In
|
||||
// particular, they may be hiding a real parent that _is_ special.
|
||||
if (!IsFrameSpecial(parentFrame) &&
|
||||
!parentFrame->GetStyleContext()->GetPseudoType())
|
||||
!parentFrame->GetStyleContext()->GetPseudo())
|
||||
break;
|
||||
|
||||
aFrame = parentFrame;
|
||||
@ -1925,7 +1925,7 @@ IsTableRelated(nsIAtom* aParentType)
|
||||
static PRBool
|
||||
IsTablePseudo(nsIFrame* aFrame)
|
||||
{
|
||||
nsIAtom* pseudoType = aFrame->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* pseudoType = aFrame->GetStyleContext()->GetPseudo();
|
||||
return pseudoType &&
|
||||
(pseudoType == nsCSSAnonBoxes::table ||
|
||||
pseudoType == nsCSSAnonBoxes::inlineTable ||
|
||||
@ -1934,12 +1934,12 @@ IsTablePseudo(nsIFrame* aFrame)
|
||||
pseudoType == nsCSSAnonBoxes::tableRow ||
|
||||
pseudoType == nsCSSAnonBoxes::tableCell ||
|
||||
(pseudoType == nsCSSAnonBoxes::cellContent &&
|
||||
aFrame->GetParent()->GetStyleContext()->GetPseudoType() ==
|
||||
aFrame->GetParent()->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::tableCell) ||
|
||||
(pseudoType == nsCSSAnonBoxes::tableOuter &&
|
||||
(aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudoType() ==
|
||||
(aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::table ||
|
||||
aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudoType() ==
|
||||
aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::inlineTable)));
|
||||
}
|
||||
|
||||
@ -3493,7 +3493,7 @@ FindAncestorWithGeneratedContentPseudo(nsIFrame* aFrame)
|
||||
for (nsIFrame* f = aFrame->GetParent(); f; f = f->GetParent()) {
|
||||
NS_ASSERTION(f->IsGeneratedContentFrame(),
|
||||
"should not have exited generated content");
|
||||
nsIAtom* pseudo = f->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* pseudo = f->GetStyleContext()->GetPseudo();
|
||||
if (pseudo == nsCSSPseudoElements::before ||
|
||||
pseudo == nsCSSPseudoElements::after)
|
||||
return f;
|
||||
@ -3659,14 +3659,14 @@ nsCSSFrameConstructor::FindHTMLData(nsIContent* aContent,
|
||||
}
|
||||
|
||||
NS_ASSERTION(!aParentFrame ||
|
||||
aParentFrame->GetStyleContext()->GetPseudoType() !=
|
||||
aParentFrame->GetStyleContext()->GetPseudo() !=
|
||||
nsCSSAnonBoxes::fieldsetContent ||
|
||||
aParentFrame->GetParent()->GetType() == nsGkAtoms::fieldSetFrame,
|
||||
"Unexpected parent for fieldset content anon box");
|
||||
if (aTag == nsGkAtoms::legend &&
|
||||
(!aParentFrame ||
|
||||
(aParentFrame->GetType() != nsGkAtoms::fieldSetFrame &&
|
||||
aParentFrame->GetStyleContext()->GetPseudoType() !=
|
||||
aParentFrame->GetStyleContext()->GetPseudo() !=
|
||||
nsCSSAnonBoxes::fieldsetContent) ||
|
||||
!aContent->GetParent() ||
|
||||
!aContent->GetParent()->IsHTML() ||
|
||||
@ -5178,7 +5178,7 @@ SetAsUndisplayedContent(nsFrameManager* aFrameManager, nsIContent* aContent,
|
||||
nsStyleContext* aStyleContext,
|
||||
PRBool aIsGeneratedContent)
|
||||
{
|
||||
if (aStyleContext->GetPseudoType()) {
|
||||
if (aStyleContext->GetPseudo()) {
|
||||
if (aIsGeneratedContent) {
|
||||
aContent->UnbindFromTree();
|
||||
}
|
||||
@ -5531,7 +5531,7 @@ nsCSSFrameConstructor::ConstructFramesFromItem(nsFrameConstructorState& aState,
|
||||
// setting it on a table pseudo-frame inserted under that instead. That's
|
||||
// OK, though; we just need to do the property set so that the content will
|
||||
// get cleaned up when the frame is destroyed.
|
||||
aParentFrame->SetProperty(styleContext->GetPseudoType(),
|
||||
aParentFrame->SetProperty(styleContext->GetPseudo(),
|
||||
item.mContent, DestroyContent);
|
||||
|
||||
// Now that we've passed ownership of item.mContent to the frame, unset
|
||||
@ -11192,7 +11192,7 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
||||
// too hard (and I suspect that we do in fact need to walk out of all of
|
||||
// them).
|
||||
while (IsFrameSpecial(aContainingBlock) || IsInlineOutside(aContainingBlock) ||
|
||||
aContainingBlock->GetStyleContext()->GetPseudoType()) {
|
||||
aContainingBlock->GetStyleContext()->GetPseudo()) {
|
||||
aContainingBlock = aContainingBlock->GetParent();
|
||||
NS_ASSERTION(aContainingBlock,
|
||||
"Must have non-inline, non-special, non-pseudo frame as root "
|
||||
|
@ -719,7 +719,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
|
||||
// the anonymous blocks.
|
||||
nsIFrame *frameForArea = aForFrame;
|
||||
do {
|
||||
nsIAtom *pseudoType = frameForArea->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom *pseudoType = frameForArea->GetStyleContext()->GetPseudo();
|
||||
if (pseudoType != nsCSSAnonBoxes::mozAnonymousBlock &&
|
||||
pseudoType != nsCSSAnonBoxes::mozAnonymousPositionedBlock)
|
||||
break;
|
||||
@ -1066,7 +1066,7 @@ FindElementBackground(nsIFrame* aForFrame, nsIFrame* aRootElementFrame,
|
||||
// It could be a non-HTML "body" element but that's OK, we'd fail the
|
||||
// bodyContent check below
|
||||
|
||||
if (aForFrame->GetStyleContext()->GetPseudoType())
|
||||
if (aForFrame->GetStyleContext()->GetPseudo())
|
||||
return PR_TRUE; // A pseudo-element frame.
|
||||
|
||||
// We should only look at the <html> background if we're in an HTML document
|
||||
|
@ -582,7 +582,7 @@ void
|
||||
nsFrameManager::SetUndisplayedContent(nsIContent* aContent,
|
||||
nsStyleContext* aStyleContext)
|
||||
{
|
||||
NS_PRECONDITION(!aStyleContext->GetPseudoType(),
|
||||
NS_PRECONDITION(!aStyleContext->GetPseudo(),
|
||||
"Should only have actual elements here");
|
||||
|
||||
#ifdef DEBUG_UNDISPLAYED_MAP
|
||||
@ -774,7 +774,7 @@ DumpContext(nsIFrame* aFrame, nsStyleContext* aContext)
|
||||
if (aContext) {
|
||||
fprintf(stdout, " style: %p ", static_cast<void*>(aContext));
|
||||
|
||||
nsIAtom* pseudoTag = aContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = aContext->GetPseudo();
|
||||
if (pseudoTag) {
|
||||
nsAutoString buffer;
|
||||
pseudoTag->ToString(buffer);
|
||||
@ -948,7 +948,7 @@ TryStartingTransition(nsPresContext *aPresContext, nsIContent *aContent,
|
||||
rules.AppendObject(coverRule);
|
||||
*aNewStyleContext = aPresContext->StyleSet()->ResolveStyleForRules(
|
||||
(*aNewStyleContext)->GetParent(),
|
||||
(*aNewStyleContext)->GetPseudoType(),
|
||||
(*aNewStyleContext)->GetPseudo(),
|
||||
(*aNewStyleContext)->GetRuleNode(),
|
||||
rules);
|
||||
}
|
||||
@ -1010,8 +1010,8 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
|
||||
nsStyleContext *nextContinuationContext =
|
||||
nextContinuation->GetStyleContext();
|
||||
NS_ASSERTION(oldContext == nextContinuationContext ||
|
||||
oldContext->GetPseudoType() !=
|
||||
nextContinuationContext->GetPseudoType() ||
|
||||
oldContext->GetPseudo() !=
|
||||
nextContinuationContext->GetPseudo() ||
|
||||
oldContext->GetParent() !=
|
||||
nextContinuationContext->GetParent(),
|
||||
"continuations should have the same style context");
|
||||
@ -1024,7 +1024,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
|
||||
PRBool copyFromContinuation =
|
||||
prevContinuation &&
|
||||
(prevContinuationContext = prevContinuation->GetStyleContext())
|
||||
->GetPseudoType() == oldContext->GetPseudoType() &&
|
||||
->GetPseudo() == oldContext->GetPseudo() &&
|
||||
prevContinuationContext->GetParent() == newParentContext;
|
||||
if (copyFromContinuation) {
|
||||
// Just use the style context from the frame's previous
|
||||
@ -1232,7 +1232,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
// could oldContext be null?
|
||||
if (oldContext) {
|
||||
oldContext->AddRef();
|
||||
nsIAtom* const pseudoTag = oldContext->GetPseudoType();
|
||||
nsIAtom* const pseudoTag = oldContext->GetPseudo();
|
||||
nsIContent* localContent = aFrame->GetContent();
|
||||
// |content| is the node that we used for rule matching of
|
||||
// normal elements (not pseudo-elements) and for which we generate
|
||||
@ -1294,8 +1294,8 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
nsStyleContext *nextContinuationContext =
|
||||
nextContinuation->GetStyleContext();
|
||||
NS_ASSERTION(oldContext == nextContinuationContext ||
|
||||
oldContext->GetPseudoType() !=
|
||||
nextContinuationContext->GetPseudoType() ||
|
||||
oldContext->GetPseudo() !=
|
||||
nextContinuationContext->GetPseudo() ||
|
||||
oldContext->GetParent() !=
|
||||
nextContinuationContext->GetParent(),
|
||||
"continuations should have the same style context");
|
||||
@ -1310,7 +1310,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
PRBool copyFromContinuation =
|
||||
prevContinuation &&
|
||||
(prevContinuationContext = prevContinuation->GetStyleContext())
|
||||
->GetPseudoType() == oldContext->GetPseudoType() &&
|
||||
->GetPseudo() == oldContext->GetPseudo() &&
|
||||
prevContinuationContext->GetParent() == parentContext;
|
||||
if (copyFromContinuation) {
|
||||
// Just use the style context from the frame's previous
|
||||
@ -1405,7 +1405,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
oldExtraContext = aFrame->GetAdditionalStyleContext(++contextIndex);
|
||||
if (oldExtraContext) {
|
||||
nsRefPtr<nsStyleContext> newExtraContext;
|
||||
nsIAtom* const extraPseudoTag = oldExtraContext->GetPseudoType();
|
||||
nsIAtom* const extraPseudoTag = oldExtraContext->GetPseudo();
|
||||
NS_ASSERTION(extraPseudoTag &&
|
||||
extraPseudoTag != nsCSSAnonBoxes::mozNonElement,
|
||||
"extra style context is not pseudo element");
|
||||
@ -1451,7 +1451,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
undisplayed->mContent ==
|
||||
mPresShell->GetDocument()->GetRootContent(),
|
||||
"undisplayed node child of null must be root");
|
||||
NS_ASSERTION(!undisplayed->mStyle->GetPseudoType(),
|
||||
NS_ASSERTION(!undisplayed->mStyle->GetPseudo(),
|
||||
"Shouldn't have random pseudo style contexts in the "
|
||||
"undisplayed map");
|
||||
nsRefPtr<nsStyleContext> undisplayedContext =
|
||||
|
@ -105,7 +105,7 @@ nsGenConList::DestroyNodesFor(nsIFrame* aFrame)
|
||||
*/
|
||||
inline PRInt32 PseudoCompareType(nsIFrame* aFrame, nsIContent** aContent)
|
||||
{
|
||||
nsIAtom *pseudo = aFrame->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom *pseudo = aFrame->GetStyleContext()->GetPseudo();
|
||||
if (pseudo == nsCSSPseudoElements::before) {
|
||||
*aContent = aFrame->GetContent()->GetParent();
|
||||
return -1;
|
||||
|
@ -101,9 +101,9 @@ protected:
|
||||
// 'counter-increment'.
|
||||
|
||||
NS_ASSERTION(mContentIndex < 0 ||
|
||||
mPseudoFrame->GetStyleContext()->GetPseudoType() ==
|
||||
mPseudoFrame->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSPseudoElements::before ||
|
||||
mPseudoFrame->GetStyleContext()->GetPseudoType() ==
|
||||
mPseudoFrame->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSPseudoElements::after,
|
||||
"not :before/:after generated content and not counter change");
|
||||
NS_ASSERTION(mContentIndex < 0 ||
|
||||
|
@ -1405,7 +1405,7 @@ static void
|
||||
AddBoxesForFrame(nsIFrame* aFrame,
|
||||
nsLayoutUtils::BoxCallback* aCallback)
|
||||
{
|
||||
nsIAtom* pseudoType = aFrame->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* pseudoType = aFrame->GetStyleContext()->GetPseudo();
|
||||
|
||||
if (pseudoType == nsCSSAnonBoxes::tableOuter) {
|
||||
AddBoxesForFrame(aFrame->GetFirstChild(nsnull), aCallback);
|
||||
|
@ -392,7 +392,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const
|
||||
}
|
||||
fprintf(out, " sc=%p(i=%d,b=%d)",
|
||||
static_cast<void*>(mStyleContext), numInlineLines, numBlockLines);
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudo();
|
||||
if (pseudoTag) {
|
||||
nsAutoString atomString;
|
||||
pseudoTag->ToString(atomString);
|
||||
@ -582,7 +582,7 @@ nsBlockFrame::IsContainingBlock() const
|
||||
// of an element's containing block.
|
||||
// Since the parent of such a block is either a normal block or
|
||||
// another such pseudo, this shouldn't cause anything bad to happen.
|
||||
nsIAtom *pseudoType = GetStyleContext()->GetPseudoType();
|
||||
nsIAtom *pseudoType = GetStyleContext()->GetPseudo();
|
||||
return pseudoType != nsCSSAnonBoxes::mozAnonymousBlock &&
|
||||
pseudoType != nsCSSAnonBoxes::mozAnonymousPositionedBlock;
|
||||
}
|
||||
@ -1419,7 +1419,7 @@ nsBlockFrame::ComputeCombinedArea(const nsHTMLReflowState& aReflowState,
|
||||
// for the scrollframe's padding, which is logically below the
|
||||
// bottom margins of the children.
|
||||
nscoord bottomEdgeOfContents = aBottomEdgeOfChildren;
|
||||
if (GetStyleContext()->GetPseudoType() == nsCSSAnonBoxes::scrolledContent) {
|
||||
if (GetStyleContext()->GetPseudo() == nsCSSAnonBoxes::scrolledContent) {
|
||||
// We're a scrolled frame; the scrollframe's padding should be added
|
||||
// to the bottom edge of the children
|
||||
bottomEdgeOfContents += aReflowState.mComputedPadding.bottom;
|
||||
@ -6314,11 +6314,11 @@ nsBlockFrame::SetInitialChildList(nsIAtom* aListName,
|
||||
// block in {ib} splits do NOT get first-letter frames. Note that
|
||||
// NS_BLOCK_HAS_FIRST_LETTER_STYLE gets set on all continuations of the
|
||||
// block.
|
||||
nsIAtom *pseudo = GetStyleContext()->GetPseudoType();
|
||||
nsIAtom *pseudo = GetStyleContext()->GetPseudo();
|
||||
PRBool haveFirstLetterStyle =
|
||||
(!pseudo ||
|
||||
(pseudo == nsCSSAnonBoxes::cellContent &&
|
||||
mParent->GetStyleContext()->GetPseudoType() == nsnull) ||
|
||||
mParent->GetStyleContext()->GetPseudo() == nsnull) ||
|
||||
pseudo == nsCSSAnonBoxes::fieldsetContent ||
|
||||
pseudo == nsCSSAnonBoxes::scrolledContent ||
|
||||
pseudo == nsCSSAnonBoxes::columnContent) &&
|
||||
|
@ -617,7 +617,7 @@ nsContainerFrame::FrameNeedsView(nsIFrame* aFrame)
|
||||
{
|
||||
// XXX Check needed because frame construction can't properly figure out when
|
||||
// a frame is the child of a scrollframe
|
||||
if (aFrame->GetStyleContext()->GetPseudoType() ==
|
||||
if (aFrame->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::scrolledContent) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
@ -1597,7 +1597,7 @@ nsContainerFrame::List(FILE* out, PRInt32 aIndent) const
|
||||
overflowArea.width, overflowArea.height);
|
||||
}
|
||||
fprintf(out, " [sc=%p]", static_cast<void*>(mStyleContext));
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudo();
|
||||
if (pseudoTag) {
|
||||
nsAutoString atomString;
|
||||
pseudoTag->ToString(atomString);
|
||||
|
@ -227,7 +227,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
PRBool pushedFrame;
|
||||
|
||||
ll->SetInFirstLetter(
|
||||
mStyleContext->GetPseudoType() == nsCSSPseudoElements::firstLetter);
|
||||
mStyleContext->GetPseudo() == nsCSSPseudoElements::firstLetter);
|
||||
ll->BeginSpan(this, &aReflowState, bp.left, availSize.width);
|
||||
ll->ReflowFrame(kid, aReflowStatus, &aMetrics, pushedFrame);
|
||||
ll->EndSpan(this);
|
||||
|
@ -5677,7 +5677,7 @@ GetIBSpecialSiblingForAnonymousBlock(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL,
|
||||
"GetIBSpecialSibling should not be called on a non-special frame");
|
||||
|
||||
nsIAtom* type = aFrame->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* type = aFrame->GetStyleContext()->GetPseudo();
|
||||
if (type != nsCSSAnonBoxes::mozAnonymousBlock &&
|
||||
type != nsCSSAnonBoxes::mozAnonymousPositionedBlock) {
|
||||
// it's not the anonymous block
|
||||
@ -5728,13 +5728,13 @@ GetCorrectedParent(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||
if (!parent) {
|
||||
*aSpecialParent = nsnull;
|
||||
} else {
|
||||
nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudo();
|
||||
// Outer tables are always anon boxes; if we're in here for an outer
|
||||
// table, that actually means its the _inner_ table that wants to
|
||||
// know its parent. So get the pseudo of the inner in that case.
|
||||
if (pseudo == nsCSSAnonBoxes::tableOuter) {
|
||||
pseudo =
|
||||
aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudoType();
|
||||
aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudo();
|
||||
}
|
||||
*aSpecialParent = nsFrame::CorrectStyleParentFrame(parent, pseudo);
|
||||
}
|
||||
@ -5784,7 +5784,7 @@ nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
|
||||
}
|
||||
}
|
||||
|
||||
nsIAtom* parentPseudo = parent->GetStyleContext()->GetPseudoType();
|
||||
nsIAtom* parentPseudo = parent->GetStyleContext()->GetPseudo();
|
||||
if (!parentPseudo ||
|
||||
(!nsCSSAnonBoxes::IsAnonBox(parentPseudo) &&
|
||||
// nsPlaceholderFrame pases in nsGkAtoms::placeholderFrame for
|
||||
@ -5798,7 +5798,7 @@ nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
|
||||
parent = parent->GetParent();
|
||||
} while (parent);
|
||||
|
||||
if (aProspectiveParent->GetStyleContext()->GetPseudoType() ==
|
||||
if (aProspectiveParent->GetStyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::viewportScroll) {
|
||||
// aProspectiveParent is the scrollframe for a viewport
|
||||
// and the kids are the anonymous scrollbars
|
||||
@ -5821,7 +5821,7 @@ nsFrame::DoGetParentStyleContextFrame(nsPresContext* aPresContext,
|
||||
*aIsChild = PR_FALSE;
|
||||
*aProviderFrame = nsnull;
|
||||
if (mContent && !mContent->GetParent() &&
|
||||
!GetStyleContext()->GetPseudoType()) {
|
||||
!GetStyleContext()->GetPseudo()) {
|
||||
// we're a frame for the root. We have no style context parent.
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
|
||||
NS_ASSERTION(aFrame, "Must find containing block somewhere");
|
||||
} while (!(aFrame->IsContainingBlock() ||
|
||||
(aFrame->IsFrameOfType(nsIFrame::eBlockFrame) &&
|
||||
IsAnonBlockPseudo(aFrame->GetStyleContext()->GetPseudoType()))));
|
||||
IsAnonBlockPseudo(aFrame->GetStyleContext()->GetPseudo()))));
|
||||
|
||||
NS_ASSERTION(aFrame != frame, "How did that happen?");
|
||||
|
||||
|
@ -1935,7 +1935,7 @@ IsInAutoWidthTableCellForQuirk(nsIFrame *aFrame)
|
||||
return PR_FALSE;
|
||||
// Check if the parent of the closest nsBlockFrame has auto width.
|
||||
nsBlockFrame *ancestor = nsLayoutUtils::FindNearestBlockAncestor(aFrame);
|
||||
if (ancestor->GetStyleContext()->GetPseudoType() == nsCSSAnonBoxes::cellContent) {
|
||||
if (ancestor->GetStyleContext()->GetPseudo() == nsCSSAnonBoxes::cellContent) {
|
||||
// Assume direct parent is a table cell frame.
|
||||
nsFrame *grandAncestor = static_cast<nsFrame*>(ancestor->GetParent());
|
||||
return grandAncestor &&
|
||||
|
@ -3923,7 +3923,7 @@ GetGeneratedContentOwner(nsIFrame* aFrame, PRBool* aIsBefore)
|
||||
{
|
||||
*aIsBefore = PR_FALSE;
|
||||
while (aFrame && (aFrame->GetStateBits() & NS_FRAME_GENERATED_CONTENT)) {
|
||||
if (aFrame->GetStyleContext()->GetPseudoType() == nsCSSPseudoElements::before) {
|
||||
if (aFrame->GetStyleContext()->GetPseudo() == nsCSSPseudoElements::before) {
|
||||
*aIsBefore = PR_TRUE;
|
||||
}
|
||||
aFrame = aFrame->GetParent();
|
||||
@ -6867,7 +6867,7 @@ nsTextFrame::List(FILE* out, PRInt32 aIndent) const
|
||||
overflowArea.width, overflowArea.height);
|
||||
}
|
||||
fprintf(out, " sc=%p", static_cast<void*>(mStyleContext));
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudo();
|
||||
if (pseudoTag) {
|
||||
nsAutoString atomString;
|
||||
pseudoTag->ToString(atomString);
|
||||
|
@ -760,7 +760,7 @@ nsMathMLmtdFrame::GetRowSpan()
|
||||
PRInt32 rowspan = 1;
|
||||
|
||||
// Don't look at the content's rowspan if we're not an mtd or a pseudo cell.
|
||||
if ((mContent->Tag() == nsGkAtoms::mtd_) && !GetStyleContext()->GetPseudoType()) {
|
||||
if ((mContent->Tag() == nsGkAtoms::mtd_) && !GetStyleContext()->GetPseudo()) {
|
||||
nsAutoString value;
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rowspan, value);
|
||||
if (!value.IsEmpty()) {
|
||||
@ -780,7 +780,7 @@ nsMathMLmtdFrame::GetColSpan()
|
||||
PRInt32 colspan = 1;
|
||||
|
||||
// Don't look at the content's colspan if we're not an mtd or a pseudo cell.
|
||||
if ((mContent->Tag() == nsGkAtoms::mtd_) && !GetStyleContext()->GetPseudoType()) {
|
||||
if ((mContent->Tag() == nsGkAtoms::mtd_) && !GetStyleContext()->GetPseudo()) {
|
||||
nsAutoString value;
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::columnspan_, value);
|
||||
if (!value.IsEmpty()) {
|
||||
|
@ -509,7 +509,7 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName,
|
||||
topWithPseudoElementData = topWithPseudoElementData->GetParent();
|
||||
}
|
||||
NS_ASSERTION(nsCSSPseudoElements::PseudoElementContainsElements(
|
||||
topWithPseudoElementData->GetPseudoType()),
|
||||
topWithPseudoElementData->GetPseudo()),
|
||||
"we should be in a pseudo-element that is expected to "
|
||||
"contain elements");
|
||||
}
|
||||
|
@ -1802,7 +1802,7 @@ GetPseudoRestriction(nsStyleContext *aContext)
|
||||
{
|
||||
// This needs to match nsStyleSet::WalkRestrictionRule.
|
||||
PRUint32 pseudoRestriction = 0;
|
||||
nsIAtom *pseudoType = aContext->GetPseudoType();
|
||||
nsIAtom *pseudoType = aContext->GetPseudo();
|
||||
if (pseudoType) {
|
||||
if (pseudoType == nsCSSPseudoElements::firstLetter) {
|
||||
pseudoRestriction = CSS_PROPERTY_APPLIES_TO_FIRST_LETTER;
|
||||
@ -1986,7 +1986,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
|
||||
/* Reset structs don't inherit from first-line. */
|
||||
/* See similar code in COMPUTE_START_RESET */
|
||||
while (parentContext &&
|
||||
parentContext->GetPseudoType() == nsCSSPseudoElements::firstLine) {
|
||||
parentContext->GetPseudo() == nsCSSPseudoElements::firstLine) {
|
||||
parentContext = parentContext->GetParent();
|
||||
}
|
||||
}
|
||||
@ -2365,7 +2365,7 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
|
||||
/* Reset structs don't inherit from first-line */ \
|
||||
/* See similar code in WalkRuleTree */ \
|
||||
while (parentContext && \
|
||||
parentContext->GetPseudoType() == nsCSSPseudoElements::firstLine) { \
|
||||
parentContext->GetPseudo() == nsCSSPseudoElements::firstLine) { \
|
||||
parentContext = parentContext->GetParent(); \
|
||||
} \
|
||||
\
|
||||
@ -4010,7 +4010,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
|
||||
// and 'position'. Since generated content can't be floated or
|
||||
// positioned, we can deal with it here.
|
||||
|
||||
if (nsCSSPseudoElements::firstLetter == aContext->GetPseudoType()) {
|
||||
if (nsCSSPseudoElements::firstLetter == aContext->GetPseudo()) {
|
||||
// a non-floating first-letter must be inline
|
||||
// XXX this fix can go away once bug 103189 is fixed correctly
|
||||
display->mDisplay = NS_STYLE_DISPLAY_INLINE;
|
||||
|
@ -728,7 +728,7 @@ nsStyleAnimation::ComputeValue(nsCSSProperty aProperty,
|
||||
nsStyleSet* styleSet = styleContext->PresContext()->StyleSet();
|
||||
nsRefPtr<nsStyleContext> tmpStyleContext =
|
||||
styleSet->ResolveStyleForRules(styleContext->GetParent(),
|
||||
styleContext->GetPseudoType(),
|
||||
styleContext->GetPseudo(),
|
||||
styleContext->GetRuleNode(), ruleArray);
|
||||
|
||||
// Extract computed value of our property from the temporary style rule
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
|
||||
nsStyleContext* GetParent() const { return mParent; }
|
||||
|
||||
nsIAtom* GetPseudoType() const { return mPseudoTag; }
|
||||
nsIAtom* GetPseudo() const { return mPseudoTag; }
|
||||
|
||||
NS_HIDDEN_(already_AddRefed<nsStyleContext>)
|
||||
FindChildWithRules(const nsIAtom* aPseudoTag, nsRuleNode* aRules);
|
||||
@ -120,7 +120,7 @@ public:
|
||||
// Does this style context represent the style for a pseudo-element or
|
||||
// inherit data from such a style context? Whether this returns true
|
||||
// is equivalent to whether it or any of its ancestors returns
|
||||
// non-null for GetPseudoType.
|
||||
// non-null for GetPseudo.
|
||||
PRBool HasPseudoElementData() const
|
||||
{ return !!(mBits & NS_STYLE_HAS_PSEUDO_ELEMENT_DATA); }
|
||||
|
||||
@ -195,8 +195,8 @@ protected:
|
||||
nsStyleContext* mPrevSibling;
|
||||
nsStyleContext* mNextSibling;
|
||||
|
||||
// If this style context is for a pseudo-element, the pseudo-element
|
||||
// atom. Otherwise, null.
|
||||
// If this style context is for a pseudo-element or anonymous box,
|
||||
// the relevant atom.
|
||||
nsCOMPtr<nsIAtom> mPseudoTag;
|
||||
|
||||
// The rule node is the node in the lexicographic tree of rule nodes
|
||||
|
@ -969,7 +969,7 @@ nsStyleSet::ReParentStyleContext(nsPresContext* aPresContext,
|
||||
return aStyleContext;
|
||||
}
|
||||
else { // really a new parent
|
||||
nsIAtom* pseudoTag = aStyleContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = aStyleContext->GetPseudo();
|
||||
nsRuleNode* ruleNode = aStyleContext->GetRuleNode();
|
||||
|
||||
already_AddRefed<nsStyleContext> result =
|
||||
|
@ -347,8 +347,8 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement,
|
||||
nsStyleContext *aOldStyleContext,
|
||||
nsStyleContext *aNewStyleContext)
|
||||
{
|
||||
NS_PRECONDITION(aOldStyleContext->GetPseudoType() ==
|
||||
aNewStyleContext->GetPseudoType(),
|
||||
NS_PRECONDITION(aOldStyleContext->GetPseudo() ==
|
||||
aNewStyleContext->GetPseudo(),
|
||||
"pseudo type mismatch");
|
||||
// If we were called from ReParentStyleContext, this assertion would
|
||||
// actually fire. If we need to be called from there, we can probably
|
||||
@ -372,7 +372,7 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement,
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsIAtom *pseudo = aNewStyleContext->GetPseudoType();
|
||||
nsIAtom *pseudo = aNewStyleContext->GetPseudo();
|
||||
if (pseudo && (pseudo != nsCSSPseudoElements::before &&
|
||||
pseudo != nsCSSPseudoElements::after)) {
|
||||
return nsnull;
|
||||
@ -398,7 +398,7 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement,
|
||||
// when they're both zero, we can ignore the transition.
|
||||
if (t.GetDelay() != 0.0f || t.GetDuration() != 0.0f) {
|
||||
et = GetElementTransitions(aElement,
|
||||
aNewStyleContext->GetPseudoType(),
|
||||
aNewStyleContext->GetPseudo(),
|
||||
PR_FALSE);
|
||||
|
||||
// We might have something to transition. See if any of the
|
||||
@ -613,7 +613,7 @@ nsTransitionManager::ConsiderStartingTransition(nsCSSProperty aProperty,
|
||||
|
||||
if (!aElementTransitions) {
|
||||
aElementTransitions =
|
||||
GetElementTransitions(aElement, aNewStyleContext->GetPseudoType(),
|
||||
GetElementTransitions(aElement, aNewStyleContext->GetPseudo(),
|
||||
PR_TRUE);
|
||||
if (!aElementTransitions) {
|
||||
NS_WARNING("allocating ElementTransitions failed");
|
||||
|
@ -692,7 +692,7 @@ PRInt32 nsTableCellFrame::GetRowSpan()
|
||||
nsGenericHTMLElement *hc = nsGenericHTMLElement::FromContent(mContent);
|
||||
|
||||
// Don't look at the content's rowspan if we're a pseudo cell
|
||||
if (hc && !GetStyleContext()->GetPseudoType()) {
|
||||
if (hc && !GetStyleContext()->GetPseudo()) {
|
||||
const nsAttrValue* attr = hc->GetParsedAttr(nsGkAtoms::rowspan);
|
||||
// Note that we don't need to check the tag name, because only table cells
|
||||
// and table headers parse the "rowspan" attribute into an integer.
|
||||
@ -709,7 +709,7 @@ PRInt32 nsTableCellFrame::GetColSpan()
|
||||
nsGenericHTMLElement *hc = nsGenericHTMLElement::FromContent(mContent);
|
||||
|
||||
// Don't look at the content's colspan if we're a pseudo cell
|
||||
if (hc && !GetStyleContext()->GetPseudoType()) {
|
||||
if (hc && !GetStyleContext()->GetPseudo()) {
|
||||
const nsAttrValue* attr = hc->GetParsedAttr(nsGkAtoms::colspan);
|
||||
// Note that we don't need to check the tag name, because only table cells
|
||||
// and table headers parse the "colspan" attribute into an integer.
|
||||
|
@ -167,7 +167,7 @@ nsTableFrame::GetParentStyleContextFrame(nsPresContext* aPresContext,
|
||||
// must return whatever our parent would normally have returned.
|
||||
|
||||
NS_PRECONDITION(mParent, "table constructed without outer table");
|
||||
if (!mContent->GetParent() && !GetStyleContext()->GetPseudoType()) {
|
||||
if (!mContent->GetParent() && !GetStyleContext()->GetPseudo()) {
|
||||
// We're the root. We have no style context parent.
|
||||
*aIsChild = PR_FALSE;
|
||||
*aProviderFrame = nsnull;
|
||||
|
@ -134,7 +134,7 @@ nsTableCaptionFrame::GetParentStyleContextFrame(nsPresContext* aPresContext,
|
||||
if (innerFrame) {
|
||||
*aProviderFrame =
|
||||
nsFrame::CorrectStyleParentFrame(innerFrame,
|
||||
GetStyleContext()->GetPseudoType());
|
||||
GetStyleContext()->GetPseudo());
|
||||
*aIsChild = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ public:
|
||||
PRBool IsScrolled() {
|
||||
// Note that if mOverflowY is CLIP, so is mOverflowX, and we need to clip the background
|
||||
// as if the rowgroup is scrollable.
|
||||
return GetStyleContext()->GetPseudoType() == nsCSSAnonBoxes::scrolledContent ||
|
||||
return GetStyleContext()->GetPseudo() == nsCSSAnonBoxes::scrolledContent ||
|
||||
GetStyleDisplay()->mOverflowY == NS_STYLE_OVERFLOW_CLIP;
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ nsPopupSetFrame::List(FILE* out, PRInt32 aIndent) const
|
||||
overflowArea.width, overflowArea.height);
|
||||
}
|
||||
fprintf(out, " [sc=%p]", static_cast<void*>(mStyleContext));
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudoType();
|
||||
nsIAtom* pseudoTag = mStyleContext->GetPseudo();
|
||||
if (pseudoTag) {
|
||||
nsAutoString atomString;
|
||||
pseudoTag->ToString(atomString);
|
||||
|
Loading…
Reference in New Issue
Block a user