mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Changed some GetStyleContext/GetStyleData pairs to use nsIFrame::GetStyleData
instead
This commit is contained in:
parent
8bfcb70b73
commit
7bbe992c0b
@ -336,21 +336,17 @@ nsInlineFrame::ReflowMappedChildrenFrom(nsIPresContext* aPresContext,
|
||||
// If the frame being reflowed is not appropriate (e.g. a block
|
||||
// frame) then we should stop! This can only happen when a
|
||||
// prev-in-flow has pushed some junk into this frame.
|
||||
nsIStyleContext* kidSC;
|
||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
||||
kidSC->GetStyleData(eStyleStruct_Display);
|
||||
const nsStyleDisplay* kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||
if (mFirstChild != kidFrame) {
|
||||
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
||||
SetLastContentOffset(prevKidFrame);
|
||||
result = PR_FALSE;
|
||||
NS_RELEASE(kidSC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
NS_RELEASE(kidSC);
|
||||
|
||||
nsReflowMetrics kidSize(pKidMaxElementSize);
|
||||
nsReflowState kidReflowState(kidFrame, aState.reflowState, aState.availSize,
|
||||
@ -521,17 +517,13 @@ PRBool nsInlineFrame::PullUpChildren(nsIPresContext* aPresContext,
|
||||
|
||||
// If the frame being pulled up is not appropriate (e.g. a block
|
||||
// frame) then we should stop!
|
||||
nsIStyleContext* kidSC;
|
||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
||||
kidSC->GetStyleData(eStyleStruct_Display);
|
||||
const nsStyleDisplay* kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||
result = PR_FALSE;
|
||||
NS_RELEASE(kidSC);
|
||||
break;
|
||||
}
|
||||
NS_RELEASE(kidSC);
|
||||
|
||||
// If there is no room, stop pulling up
|
||||
if (!CanFitChild(aPresContext, aState, kidFrame)) {
|
||||
|
@ -336,21 +336,17 @@ nsInlineFrame::ReflowMappedChildrenFrom(nsIPresContext* aPresContext,
|
||||
// If the frame being reflowed is not appropriate (e.g. a block
|
||||
// frame) then we should stop! This can only happen when a
|
||||
// prev-in-flow has pushed some junk into this frame.
|
||||
nsIStyleContext* kidSC;
|
||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
||||
kidSC->GetStyleData(eStyleStruct_Display);
|
||||
const nsStyleDisplay* kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||
if (mFirstChild != kidFrame) {
|
||||
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
||||
SetLastContentOffset(prevKidFrame);
|
||||
result = PR_FALSE;
|
||||
NS_RELEASE(kidSC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
NS_RELEASE(kidSC);
|
||||
|
||||
nsReflowMetrics kidSize(pKidMaxElementSize);
|
||||
nsReflowState kidReflowState(kidFrame, aState.reflowState, aState.availSize,
|
||||
@ -521,17 +517,13 @@ PRBool nsInlineFrame::PullUpChildren(nsIPresContext* aPresContext,
|
||||
|
||||
// If the frame being pulled up is not appropriate (e.g. a block
|
||||
// frame) then we should stop!
|
||||
nsIStyleContext* kidSC;
|
||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
||||
kidSC->GetStyleData(eStyleStruct_Display);
|
||||
const nsStyleDisplay* kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||
result = PR_FALSE;
|
||||
NS_RELEASE(kidSC);
|
||||
break;
|
||||
}
|
||||
NS_RELEASE(kidSC);
|
||||
|
||||
// If there is no room, stop pulling up
|
||||
if (!CanFitChild(aPresContext, aState, kidFrame)) {
|
||||
|
Loading…
Reference in New Issue
Block a user