зеркало из https://github.com/mozilla/pjs.git
Set the used padding on the scrolled frame, since we're munging its padding.
Bug 370794, r+sr=dbaron
This commit is contained in:
Родитель
22fa771d50
Коммит
9ed992748a
|
@ -440,6 +440,13 @@ nsHTMLScrollFrame::ReflowScrolledFrame(const ScrollReflowState& aState,
|
|||
if (!aFirstPass)
|
||||
mInner.mScrolledFrame->AddStateBits(NS_FRAME_IS_DIRTY);
|
||||
|
||||
// We're forcing the padding on our scrolled frame, so let it know what that
|
||||
// padding is.
|
||||
mInner.mScrolledFrame->
|
||||
SetProperty(nsGkAtoms::usedPaddingProperty,
|
||||
new nsMargin(aState.mReflowState.mComputedPadding),
|
||||
nsCSSOffsetState::DestroyMarginFunc);
|
||||
|
||||
// Pass PR_FALSE for aInit so we can pass in the correct padding
|
||||
nsHTMLReflowState kidReflowState(presContext, aState.mReflowState,
|
||||
mInner.mScrolledFrame,
|
||||
|
|
|
@ -1923,11 +1923,12 @@ nsHTMLReflowState::CalcLineHeight(nsPresContext* aPresContext,
|
|||
return lineHeight;
|
||||
}
|
||||
|
||||
static void
|
||||
DestroyMarginFunc(void* aFrame,
|
||||
nsIAtom* aPropertyName,
|
||||
void* aPropertyValue,
|
||||
void* aDtorData)
|
||||
/* static */
|
||||
void
|
||||
nsCSSOffsetState::DestroyMarginFunc(void* aFrame,
|
||||
nsIAtom* aPropertyName,
|
||||
void* aPropertyValue,
|
||||
void* aDtorData)
|
||||
{
|
||||
delete NS_STATIC_CAST(nsMargin*, aPropertyValue);
|
||||
}
|
||||
|
|
|
@ -172,6 +172,12 @@ public:
|
|||
const nsMargin *aBorder = nsnull,
|
||||
const nsMargin *aPadding = nsnull);
|
||||
|
||||
// Destructor for usedPaddingProperty
|
||||
static void DestroyMarginFunc(void* aFrame,
|
||||
nsIAtom* aPropertyName,
|
||||
void* aPropertyValue,
|
||||
void* aDtorData);
|
||||
|
||||
private:
|
||||
// Computes margin values from the specified margin style information, and
|
||||
// fills in the mComputedMargin member
|
||||
|
|
Загрузка…
Ссылка в новой задаче