Prevent background propagation code from trying to operate on pseudo-elements. b=302040 r+sr=roc a=bsmedberg

This commit is contained in:
dbaron%dbaron.org 2005-08-02 20:11:09 +00:00
Родитель 8cbfb87c0c
Коммит 65e63c3002
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -2660,6 +2660,12 @@ FindElementBackground(nsPresContext* aPresContext,
*aBackground = aForFrame->GetStyleBackground();
// Return true unless the frame is for a BODY element whose background
// was propagated to the viewport.
if (aForFrame->GetStyleContext()->GetPseudoType())
return PR_TRUE; // A pseudo-element frame.
nsIContent* content = aForFrame->GetContent();
if (!content || !content->IsContentOfType(nsIContent::eHTML))
return PR_TRUE; // not frame for an HTML element