diff options
author | James Bursa <james@netsurf-browser.org> | 2006-11-04 19:17:11 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2006-11-04 19:17:11 +0000 |
commit | b6c8e435cd206b0acac3368098254decfbdb5f74 (patch) | |
tree | 182317b7107238be4bcd77db7eb25e07b645589b /render/box_construct.c | |
parent | a1f291383f719852dd11efa3877599c7dae5f95b (diff) | |
download | netsurf-b6c8e435cd206b0acac3368098254decfbdb5f74.tar.gz netsurf-b6c8e435cd206b0acac3368098254decfbdb5f74.tar.bz2 |
Implement absolute positioned inlines.
svn path=/trunk/netsurf/; revision=3026
Diffstat (limited to 'render/box_construct.c')
-rw-r--r-- | render/box_construct.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; |