зеркало из 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)
|
if (!aFirstPass)
|
||||||
mInner.mScrolledFrame->AddStateBits(NS_FRAME_IS_DIRTY);
|
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
|
// Pass PR_FALSE for aInit so we can pass in the correct padding
|
||||||
nsHTMLReflowState kidReflowState(presContext, aState.mReflowState,
|
nsHTMLReflowState kidReflowState(presContext, aState.mReflowState,
|
||||||
mInner.mScrolledFrame,
|
mInner.mScrolledFrame,
|
||||||
|
|
|
@ -1923,11 +1923,12 @@ nsHTMLReflowState::CalcLineHeight(nsPresContext* aPresContext,
|
||||||
return lineHeight;
|
return lineHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/* static */
|
||||||
DestroyMarginFunc(void* aFrame,
|
void
|
||||||
nsIAtom* aPropertyName,
|
nsCSSOffsetState::DestroyMarginFunc(void* aFrame,
|
||||||
void* aPropertyValue,
|
nsIAtom* aPropertyName,
|
||||||
void* aDtorData)
|
void* aPropertyValue,
|
||||||
|
void* aDtorData)
|
||||||
{
|
{
|
||||||
delete NS_STATIC_CAST(nsMargin*, aPropertyValue);
|
delete NS_STATIC_CAST(nsMargin*, aPropertyValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,6 +172,12 @@ public:
|
||||||
const nsMargin *aBorder = nsnull,
|
const nsMargin *aBorder = nsnull,
|
||||||
const nsMargin *aPadding = nsnull);
|
const nsMargin *aPadding = nsnull);
|
||||||
|
|
||||||
|
// Destructor for usedPaddingProperty
|
||||||
|
static void DestroyMarginFunc(void* aFrame,
|
||||||
|
nsIAtom* aPropertyName,
|
||||||
|
void* aPropertyValue,
|
||||||
|
void* aDtorData);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Computes margin values from the specified margin style information, and
|
// Computes margin values from the specified margin style information, and
|
||||||
// fills in the mComputedMargin member
|
// fills in the mComputedMargin member
|
||||||
|
|
Загрузка…
Ссылка в новой задаче