Fix for bug #14814. Changed GetFloaterContainingBlock() to also check for floated
or absolutely positioned inline elements git-svn-id: svn://10.0.0.236/trunk@48981 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5076,7 +5076,8 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
{
|
||||
NS_PRECONDITION(mInitialContainingBlock, "no initial containing block");
|
||||
|
||||
// Starting with aFrame, look for a frame that is a real block frame
|
||||
// Starting with aFrame, look for a frame that is a real block frame,
|
||||
// or a floated inline or absolutely positioned inline frame
|
||||
nsIFrame* containingBlock = aFrame;
|
||||
while (nsnull != containingBlock) {
|
||||
const nsStyleDisplay* display;
|
||||
@@ -5086,6 +5087,16 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay)) {
|
||||
break;
|
||||
}
|
||||
else if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
const nsStylePosition* position;
|
||||
containingBlock->GetStyleData(eStyleStruct_Position,
|
||||
(const nsStyleStruct*&)position);
|
||||
|
||||
if ((NS_STYLE_FLOAT_NONE != display->mDisplay) ||
|
||||
(position->IsAbsolutelyPositioned())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Continue walking up the hierarchy
|
||||
containingBlock->GetParent(&containingBlock);
|
||||
|
||||
@@ -5076,7 +5076,8 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
{
|
||||
NS_PRECONDITION(mInitialContainingBlock, "no initial containing block");
|
||||
|
||||
// Starting with aFrame, look for a frame that is a real block frame
|
||||
// Starting with aFrame, look for a frame that is a real block frame,
|
||||
// or a floated inline or absolutely positioned inline frame
|
||||
nsIFrame* containingBlock = aFrame;
|
||||
while (nsnull != containingBlock) {
|
||||
const nsStyleDisplay* display;
|
||||
@@ -5086,6 +5087,16 @@ nsCSSFrameConstructor::GetFloaterContainingBlock(nsIPresContext* aPresContext,
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay)) {
|
||||
break;
|
||||
}
|
||||
else if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
const nsStylePosition* position;
|
||||
containingBlock->GetStyleData(eStyleStruct_Position,
|
||||
(const nsStyleStruct*&)position);
|
||||
|
||||
if ((NS_STYLE_FLOAT_NONE != display->mDisplay) ||
|
||||
(position->IsAbsolutelyPositioned())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Continue walking up the hierarchy
|
||||
containingBlock->GetParent(&containingBlock);
|
||||
|
||||
Reference in New Issue
Block a user