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:
roc+%cs.cmu.edu 2004-04-24 17:02:34 +00:00
Родитель d2c6e71b7d
Коммит 6d1679954c
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -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;
}