aboutsummaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-09-24 13:27:36 +0200
committerSebastian Geerken <devnull@localhost>2014-09-24 13:27:36 +0200
commitc35905bbe90dc552673de4048cdc603024698187 (patch)
treee8dfaec27fba228ea72f83ab0e594ef5fab2f585 /dw/oofawarewidget.cc
parentb472fe79479ab5edc7a3d3397313a3c5e38c0440 (diff)
Relatively positioned elements may be a floats container.
Diffstat (limited to 'dw/oofawarewidget.cc')
-rw-r--r--dw/oofawarewidget.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc
index f8e3c497..62a1e8d6 100644
--- a/dw/oofawarewidget.cc
+++ b/dw/oofawarewidget.cc
@@ -91,9 +91,12 @@ bool OOFAwareWidget::isOOFContainer (Widget *widget, int oofmIndex)
->isPossibleContainerParent (OOFM_FLOATS)) ||
// Inline blocks are containing blocks, too.
widget->getStyle()->display == core::style::DISPLAY_INLINE_BLOCK ||
- // Finally, "out of flow" in a narrower sense: floats; absolutely
- // and fixedly positioned elements.
- testWidgetOutOfFlow (widget)));
+ // Finally, "out of flow" in a narrower sense: floats;
+ // absolutely and fixedly positioned elements; furthermore,
+ // relatively positioned elements must already be
+ // considered here, since they may constitute a stacking
+ // context.
+ testWidgetOutOfFlow (widget) || testWidgetPositioned (widget)));
case OOFM_ABSOLUTE:
// Only the toplevel widget (as for all) as well as absolutely,
@@ -110,10 +113,7 @@ bool OOFAwareWidget::isOOFContainer (Widget *widget, int oofmIndex)
// children, like tables? TODO: Check CSS spec.)
return widget->instanceOf (OOFAwareWidget::CLASS_ID) &&
- (widget->getParent() == NULL ||
- testWidgetAbsolutelyPositioned (widget) ||
- testWidgetRelativelyPositioned (widget) ||
- testWidgetFixedlyPositioned (widget));
+ (widget->getParent() == NULL || testWidgetPositioned (widget));
case OOFM_FIXED:
// The single container for fixedly positioned elements is the