Bug 234851. Minor performance optimization to make sure we only try overflow propagation for HTML BODY elements, not BODY elements from any XML namespace. r+sr=bzbarsky

This commit is contained in:
[email protected] committed 2004-04-24 17:02:34 +00:00
1 parent 3f469554ec
commit 1688105140
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -6084,7 +6084,8 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre
// it might have dynamically changed from scrollable to not scrollable,
// and that might need to be propagated.
PRBool propagatedScrollToViewport = PR_FALSE;
if (aContent->GetNodeInfo()->Equals(nsHTMLAtoms::body)) {
if (aContent->GetNodeInfo()->Equals(nsHTMLAtoms::body) &&
aContent->IsContentOfType(nsIContent::eHTML)) {
propagatedScrollToViewport =
PropagateScrollToViewport(aPresContext) == aContent;
}
@@ -6084,7 +6084,8 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre
// it might have dynamically changed from scrollable to not scrollable,
// and that might need to be propagated.
PRBool propagatedScrollToViewport = PR_FALSE;
if (aContent->GetNodeInfo()->Equals(nsHTMLAtoms::body)) {
if (aContent->GetNodeInfo()->Equals(nsHTMLAtoms::body) &&
aContent->IsContentOfType(nsIContent::eHTML)) {
propagatedScrollToViewport =
PropagateScrollToViewport(aPresContext) == aContent;
}