mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Fix for bug #10176: changed ConstructFrameByDisplayType() to be smarter
when handling relatively positioned elements
This commit is contained in:
parent
6916443bd0
commit
8ee82be61f
@ -3425,9 +3425,13 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresContext* aPre
|
||||
}
|
||||
}
|
||||
// See if it's relatively positioned
|
||||
else if (NS_STYLE_POSITION_RELATIVE == position->mPosition) {
|
||||
else if ((NS_STYLE_POSITION_RELATIVE == position->mPosition) &&
|
||||
((NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_INLINE == aDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay))) {
|
||||
// Is it block-level or inline-level?
|
||||
if (NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) {
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) &&
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay)) {
|
||||
// Create a wrapper frame. No space manager, though
|
||||
NS_NewRelativeItemWrapperFrame(&newFrame);
|
||||
} else {
|
||||
|
@ -3425,9 +3425,13 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresContext* aPre
|
||||
}
|
||||
}
|
||||
// See if it's relatively positioned
|
||||
else if (NS_STYLE_POSITION_RELATIVE == position->mPosition) {
|
||||
else if ((NS_STYLE_POSITION_RELATIVE == position->mPosition) &&
|
||||
((NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_INLINE == aDisplay->mDisplay) ||
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay))) {
|
||||
// Is it block-level or inline-level?
|
||||
if (NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) {
|
||||
if ((NS_STYLE_DISPLAY_BLOCK == aDisplay->mDisplay) &&
|
||||
(NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay)) {
|
||||
// Create a wrapper frame. No space manager, though
|
||||
NS_NewRelativeItemWrapperFrame(&newFrame);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user