Bug 346833. Objects in :before and :after no longer exposed. r=ginn.chen, sr=roc

This commit is contained in:
aaronleventhal%moonset.net 2006-08-17 13:19:49 +00:00
Родитель ed6210be3f
Коммит 38a6785d4f
1 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -272,15 +272,26 @@ NS_IMETHODIMP nsAccessibleTreeWalker::GetFirstChild()
void nsAccessibleTreeWalker::UpdateFrame(PRBool aTryFirstChild)
{
if (mState.frame) {
mState.frame = aTryFirstChild? mState.frame->GetFirstChild(nsnull) :
mState.frame->GetNextSibling();
if (mState.frame && mState.siblingIndex < 0 &&
mState.frame->GetContent()->IsNativeAnonymous()) {
if (!mState.frame) {
return;
}
if (aTryFirstChild) {
nsIFrame *parentFrame = mState.frame;
mState.frame = mState.frame->GetFirstChild(nsnull);
if (mState.frame && mState.siblingIndex < 0 &&
(parentFrame->GetType() == nsAccessibilityAtoms::blockFrame ||
parentFrame->GetType() == nsAccessibilityAtoms::inlineFrame ||
parentFrame->GetType() == nsAccessibilityAtoms::inlineBlockFrame)) {
// Container frames can contain generated content frames from
// :before and :after style rules, so we walk their frame trees
// instead of content trees
mState.domNode = do_QueryInterface(mState.frame->GetContent());
mState.siblingIndex = eSiblingsWalkFrames;
}
}
else {
mState.frame = mState.frame->GetNextSibling();
}
}
/**