diff options
-rw-r--r-- | !NetSurf/!Run,feb | 2 | ||||
-rw-r--r-- | makefile | 36 | ||||
-rw-r--r-- | render/layout.c | 49 | ||||
-rw-r--r-- | riscos.mk | 2 |
4 files changed, 49 insertions, 40 deletions
diff --git a/!NetSurf/!Run,feb b/!NetSurf/!Run,feb index 7828c21fc..afb70fea8 100644 --- a/!NetSurf/!Run,feb +++ b/!NetSurf/!Run,feb @@ -99,7 +99,7 @@ CDir <Wimp$ScrapDir>.WWW.NetSurf | NB: trailing dot is required FontInstall NetSurf:Resources.Fonts. -WimpSlot -min 2240k -max 2240k +WimpSlot -min 3600k -max 3600k Run <NetSurf$Dir>.!RunImage -v %*0 2><Wimp$ScrapDir>.WWW.NetSurf.Log | Uninstall NetSurf-specific fonts @@ -72,14 +72,27 @@ OBJECTS_GTK += font_pango.o gtk_bitmap.o gtk_gui.o \ gtk_history.o gtk_window.o gtk_filetype.o \ gtk_download.o # gtk/ -# This makes me want to vomit, but is necessary to avoid a load of -# "make: /home/riscos/cross/bin/gcc: Command not found." if there's no GCCSDK -# installed on the build machine. The new build system can't happen soon enough -OBJDIR_RISCOS = $(shell $(CC) -dumpmachine 2>/dev/null || echo arm-riscos-aof) +# Default target - platform specific files may specify special-case rules for +# various files. +default: riscos + + +# Inclusion of platform specific files has to occur after the OBJDIR stuff as +# that is referred to in the files + +OS = riscos +ifeq ($(OS),riscos) +include riscos.mk +else +include posix.mk +endif + + +OBJDIR_RISCOS = arm-riscos-aof SOURCES_RISCOS=$(OBJECTS_RISCOS:.o=.c) OBJS_RISCOS=$(OBJECTS_RISCOS:%.o=$(OBJDIR_RISCOS)/%.o) -OBJDIR_RISCOS_SMALL = $(OBJDIR_RISCOS)-small +OBJDIR_RISCOS_SMALL = $(shell $(CC) -dumpmachine)-small SOURCES_RISCOS_SMALL=$(OBJECTS_RISCOS_SMALL:.o=.c) OBJS_RISCOS_SMALL=$(OBJECTS_RISCOS_SMALL:%.o=$(OBJDIR_RISCOS_SMALL)/%.o) @@ -93,19 +106,6 @@ OBJDIR_GTK = objects-gtk SOURCES_GTK=$(OBJECTS_GTK:.o=.c) OBJS_GTK=$(OBJECTS_GTK:%.o=$(OBJDIR_GTK)/%.o) -# Default target - platform specific files may specify special-case rules for -# various files. -default: riscos - -# Inclusion of platform specific files has to occur after the OBJDIR stuff as -# that is referred to in the files - -OS = $(word 2,$(subst -, ,$(shell $(SYSTEM_CC) -dumpmachine))) -ifeq ($(OS),riscos) -include riscos.mk -else -include posix.mk -endif VPATH = content:content/fetchers:css:desktop:image:render:riscos:riscos/configure:riscos/gui:utils:debug:gtk diff --git a/render/layout.c b/render/layout.c index 5e53afee8..a539e62f7 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1033,6 +1033,7 @@ bool layout_line(struct box *first, int *width, int *y, int x0 = 0; int x1 = *width; int x, h, x_previous; + int fy; struct box *left; struct box *right; struct box *b; @@ -1365,25 +1366,13 @@ bool layout_line(struct box *first, int *width, int *y, d->padding[TOP] + d->height + d->padding[BOTTOM] + d->border[BOTTOM] + d->margin[BOTTOM]; - if (d->style && d->style->clear != CSS_CLEAR_NONE) { - /* to be cleared below existing floats */ - if (b->type == BOX_FLOAT_LEFT) { - b->x = cx; - x0 += b->width; - left = b; - } else { - b->x = cx + *width - b->width; - x1 -= b->width; - right = b; - } - b->y = layout_clear(cont->float_children, - d->style->clear); - if (b->y < cy) - b->y = cy; - } else if (b->width <= (x1 - x0) - x || - (left == 0 && right == 0 && x == 0)) { - /* fits next to this line, or this line is empty - * with no floats */ + + if (d->style && d->style->clear == CSS_CLEAR_NONE && + (b->width <= (x1 - x0) - x || + (left == 0 && right == 0 && x == 0))) { + /* not cleared + * fits next to this line, or this line is + * empty with no floats */ if (b->type == BOX_FLOAT_LEFT) { b->x = cx + x0; x0 += b->width; @@ -1395,9 +1384,29 @@ bool layout_line(struct box *first, int *width, int *y, } b->y = cy; } else { - /* doesn't fit: place below */ + /* cleared or doesn't fit */ + /* place below into next available space */ place_float_below(b, *width, cx, cy + height, cont); + if (d->style && d->style->clear != + CSS_CLEAR_NONE) { + /* to be cleared below existing + * floats */ + if (b->type == BOX_FLOAT_LEFT) { + b->x = cx; + x0 += b->width; + left = b; + } else { + b->x = cx + *width - b->width; + x1 -= b->width; + right = b; + } + fy = layout_clear(cont->float_children, + d->style->clear); + if (b->y < fy) + b->y = fy; + + } } if (cont->float_children == b) { LOG(("float %p already placed", b)); @@ -9,7 +9,7 @@ PLATFORM_AFLAGS_RISCOS = -mthrowback -IOSLib: LDFLAGS_RISCOS = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \ NSLibs:lib/libssl NSLibs:lib/libcrypto NSLibs:lib/libcares \ NSLibs:lib/libmng NSLibs:lib/libjpeg NSLibs:lib/librufl NSLibs:lib/libpencil \ - OSLib:o.OSLib32 + OSLib:o.OSLib32 NSLibs:lib/libsvgtiny LDFLAGS_SMALL = NSLibs:lib/libxml2 NSLibs:lib/libz NSLibs:lib/libcurl \ NSLibs:lib/libares NSLibs:lib/libmng \ NSLibs:lib/libjpeg OSLib:o.oslib32 |