Changed FindFrameWithContent() to ignore frames associated with

generated content
This commit is contained in:
troy%netscape.com 1999-04-06 04:29:31 +00:00
parent 0195b45486
commit 8c0d3b76c9
2 changed files with 14 additions and 2 deletions

View File

@ -1863,7 +1863,13 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent)
NS_RELEASE(styleContext);
NS_IF_RELEASE(pseudoTag);
if (!isPlaceholder) {
// Also ignore frames associated with generated content
nsFrameState frameState;
PRBool isGeneratedContent;
aFrame->GetFrameState(&frameState);
isGeneratedContent = (frameState & NS_FRAME_GENERATED_CONTENT) == NS_FRAME_GENERATED_CONTENT;
if (!isPlaceholder && !isGeneratedContent) {
NS_IF_RELEASE(frameContent);
return aFrame;
}

View File

@ -1863,7 +1863,13 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent)
NS_RELEASE(styleContext);
NS_IF_RELEASE(pseudoTag);
if (!isPlaceholder) {
// Also ignore frames associated with generated content
nsFrameState frameState;
PRBool isGeneratedContent;
aFrame->GetFrameState(&frameState);
isGeneratedContent = (frameState & NS_FRAME_GENERATED_CONTENT) == NS_FRAME_GENERATED_CONTENT;
if (!isPlaceholder && !isGeneratedContent) {
NS_IF_RELEASE(frameContent);
return aFrame;
}