зеркало из https://github.com/mozilla/pjs.git
Fix offsetWidth,clientWidth and scrollWidth for empty block elements. Bug
186516, r+sr=roc
This commit is contained in:
Родитель
14f1ad4c7f
Коммит
4b5ec82470
|
@ -621,6 +621,11 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent)
|
|||
next->GetNextInFlow(&next);
|
||||
} while (next);
|
||||
|
||||
if (rcFrame.IsEmpty()) {
|
||||
// It could happen that all the rects are empty (eg zero-width or
|
||||
// zero-height). In that case, use the first rect for the frame.
|
||||
rcFrame = frame->GetRect();
|
||||
}
|
||||
|
||||
nsIContent *docElement = mDocument->GetRootContent();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче