зеркало из https://github.com/mozilla/pjs.git
Back out 307158 to fix 310736. GetActualScrollbarSizes is not meaningful on a frame in the middle of reflow.
This commit is contained in:
Родитель
259741ea73
Коммит
4e209bd808
|
@ -75,7 +75,6 @@
|
|||
#include "nsLayoutErrors.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsIAccessibilityService.h"
|
||||
#endif
|
||||
|
@ -611,23 +610,13 @@ CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState,
|
|||
// heck did it end up wrapping this block frame?
|
||||
NS_ASSERTION(aLastRS->frame->GetStyleDisplay()->IsBlockLevel(),
|
||||
"Wrapping frame should be block-level");
|
||||
// Scrollbars need to be specifically excluded, if present, because they are outside the
|
||||
// padding-edge. We need better APIs for getting the various boxes from a frame.
|
||||
nsIScrollableFrame* scrollFrame;
|
||||
CallQueryInterface(aLastRS->frame, &scrollFrame);
|
||||
nsMargin scrollbars(0,0,0,0);
|
||||
if (scrollFrame) {
|
||||
scrollbars = scrollFrame->GetActualScrollbarSizes();
|
||||
}
|
||||
// We found a reflow state for the outermost wrapping frame, so use
|
||||
// its computed metrics if available
|
||||
if (aLastRS->mComputedWidth != NS_UNCONSTRAINEDSIZE) {
|
||||
cbSize.width = PR_MAX(0,
|
||||
aLastRS->mComputedWidth + aLastRS->mComputedPadding.LeftRight() - scrollbars.LeftRight());
|
||||
cbSize.width = aLastRS->mComputedWidth + aLastRS->mComputedPadding.LeftRight();
|
||||
}
|
||||
if (aLastRS->mComputedHeight != NS_UNCONSTRAINEDSIZE) {
|
||||
cbSize.height = PR_MAX(0,
|
||||
aLastRS->mComputedHeight + aLastRS->mComputedPadding.TopBottom() - scrollbars.TopBottom());
|
||||
cbSize.height = aLastRS->mComputedHeight + aLastRS->mComputedPadding.TopBottom();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче