From b6c8e435cd206b0acac3368098254decfbdb5f74 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 4 Nov 2006 19:17:11 +0000 Subject: Implement absolute positioned inlines. svn path=/trunk/netsurf/; revision=3026 --- render/box_construct.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'render/box_construct.c') diff --git a/render/box_construct.c b/render/box_construct.c index e2f5cc883..69b681760 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -971,6 +971,19 @@ void box_solve_display(struct css_style *style, bool root) else /* 5. */ return; + /* Special case for absolute positioning: make absolute inlines into + * inline block so that the boxes are constructed in an inline container + * as if they were not absolutely positioned. Layout expects and + * handles this. */ + if ((style->position == CSS_POSITION_ABSOLUTE || + style->position == CSS_POSITION_FIXED) && + (style->display == CSS_DISPLAY_INLINE || + style->display == CSS_DISPLAY_INLINE_BLOCK || + style->display == CSS_DISPLAY_INLINE_TABLE)) { + style->display = CSS_DISPLAY_INLINE_BLOCK; + return; + } + /* map specified value to computed value using table given in 9.7 */ if (style->display == CSS_DISPLAY_INLINE_TABLE) style->display = CSS_DISPLAY_TABLE; -- cgit v1.2.3