mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Adjust hack dealing with the root scrollable frame to only map <body> to it in
quirks mode and to map <html> to it in both quirks and standards mode. This is more or less compatible with what IE6/Windows does. Bug 211030, r+sr=jst
This commit is contained in:
parent
648fe5ca55
commit
76858d0dcb
@ -1007,10 +1007,14 @@ nsGenericHTMLElement::GetScrollInfo(nsIScrollableView **aScrollableView,
|
||||
}
|
||||
}
|
||||
|
||||
if (mNodeInfo->Equals(nsHTMLAtoms::body)) {
|
||||
// The scroll info for the body element should map to the scroll
|
||||
// info for the nearest scrollable frame above the body element
|
||||
// (i.e. the root scrollable frame).
|
||||
if ((InNavQuirksMode(doc) && mNodeInfo->Equals(nsHTMLAtoms::body)) ||
|
||||
mNodeInfo->Equals(nsHTMLAtoms::html)) {
|
||||
// In quirks mode, the scroll info for the body element should map to the
|
||||
// scroll info for the nearest scrollable frame above the body element
|
||||
// (i.e. the root scrollable frame). This is what IE6 does in quirks
|
||||
// mode. In strict mode the root scrollable frame corresponds to the
|
||||
// html element in IE6, so we map the scroll info for the html element to
|
||||
// the root scrollable frame.
|
||||
|
||||
do {
|
||||
frame->GetParent(&frame);
|
||||
|
Loading…
Reference in New Issue
Block a user