mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Set the used padding on the scrolled frame, since we're munging its padding.
Bug 370794, r+sr=dbaron
This commit is contained in:
parent
167347dbb5
commit
023de09ffa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user