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
|
// If the frame being reflowed is not appropriate (e.g. a block
|
||||||
// frame) then we should stop! This can only happen when a
|
// frame) then we should stop! This can only happen when a
|
||||||
// prev-in-flow has pushed some junk into this frame.
|
// prev-in-flow has pushed some junk into this frame.
|
||||||
nsIStyleContext* kidSC;
|
const nsStyleDisplay* kidDisplay;
|
||||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
|
||||||
kidSC->GetStyleData(eStyleStruct_Display);
|
|
||||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||||
if (mFirstChild != kidFrame) {
|
if (mFirstChild != kidFrame) {
|
||||||
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
||||||
SetLastContentOffset(prevKidFrame);
|
SetLastContentOffset(prevKidFrame);
|
||||||
result = PR_FALSE;
|
result = PR_FALSE;
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
|
|
||||||
nsReflowMetrics kidSize(pKidMaxElementSize);
|
nsReflowMetrics kidSize(pKidMaxElementSize);
|
||||||
nsReflowState kidReflowState(kidFrame, aState.reflowState, aState.availSize,
|
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
|
// If the frame being pulled up is not appropriate (e.g. a block
|
||||||
// frame) then we should stop!
|
// frame) then we should stop!
|
||||||
nsIStyleContext* kidSC;
|
const nsStyleDisplay* kidDisplay;
|
||||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
|
||||||
kidSC->GetStyleData(eStyleStruct_Display);
|
|
||||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||||
result = PR_FALSE;
|
result = PR_FALSE;
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
|
|
||||||
// If there is no room, stop pulling up
|
// If there is no room, stop pulling up
|
||||||
if (!CanFitChild(aPresContext, aState, kidFrame)) {
|
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
|
// If the frame being reflowed is not appropriate (e.g. a block
|
||||||
// frame) then we should stop! This can only happen when a
|
// frame) then we should stop! This can only happen when a
|
||||||
// prev-in-flow has pushed some junk into this frame.
|
// prev-in-flow has pushed some junk into this frame.
|
||||||
nsIStyleContext* kidSC;
|
const nsStyleDisplay* kidDisplay;
|
||||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
|
||||||
kidSC->GetStyleData(eStyleStruct_Display);
|
|
||||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||||
if (mFirstChild != kidFrame) {
|
if (mFirstChild != kidFrame) {
|
||||||
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
PushChildren(kidFrame, prevKidFrame, originalLastContentIsComplete);
|
||||||
SetLastContentOffset(prevKidFrame);
|
SetLastContentOffset(prevKidFrame);
|
||||||
result = PR_FALSE;
|
result = PR_FALSE;
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
|
|
||||||
nsReflowMetrics kidSize(pKidMaxElementSize);
|
nsReflowMetrics kidSize(pKidMaxElementSize);
|
||||||
nsReflowState kidReflowState(kidFrame, aState.reflowState, aState.availSize,
|
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
|
// If the frame being pulled up is not appropriate (e.g. a block
|
||||||
// frame) then we should stop!
|
// frame) then we should stop!
|
||||||
nsIStyleContext* kidSC;
|
const nsStyleDisplay* kidDisplay;
|
||||||
kidFrame->GetStyleContext(aPresContext, kidSC);
|
kidFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)kidDisplay);
|
||||||
const nsStyleDisplay* kidDisplay = (const nsStyleDisplay*)
|
|
||||||
kidSC->GetStyleData(eStyleStruct_Display);
|
|
||||||
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
if ((NS_STYLE_DISPLAY_BLOCK == kidDisplay->mDisplay) ||
|
||||||
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
(NS_STYLE_DISPLAY_LIST_ITEM == kidDisplay->mDisplay)) {
|
||||||
result = PR_FALSE;
|
result = PR_FALSE;
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
NS_RELEASE(kidSC);
|
|
||||||
|
|
||||||
// If there is no room, stop pulling up
|
// If there is no room, stop pulling up
|
||||||
if (!CanFitChild(aPresContext, aState, kidFrame)) {
|
if (!CanFitChild(aPresContext, aState, kidFrame)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user