summaryrefslogtreecommitdiff
path: root/render/html_redraw.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-04-27 13:50:49 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-04-27 13:50:49 +0000
commit1304964f92249a1f8e685db89aa694f77307d6ae (patch)
tree706003fb75d65aa2fe2e6f6e2a08f6c0091ca1e0 /render/html_redraw.c
parentd0e7a5ecacc8692b533c8102bfa6b2267f309ab9 (diff)
downloadnetsurf-1304964f92249a1f8e685db89aa694f77307d6ae.tar.gz
netsurf-1304964f92249a1f8e685db89aa694f77307d6ae.tar.bz2
Reduce number of page reflows and viewport
redraws as images are fetched: + Flag known-sized boxes generated by images. + Treat them as replaced all through layout. + Only reflow the document for fetched images if we don't already have the box at the right size. svn path=/trunk/netsurf/; revision=12243
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r--render/html_redraw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c
index 9ae43bce1..c5d20b26f 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -427,7 +427,8 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
if (bg_box && bg_box->type != BOX_BR &&
bg_box->type != BOX_TEXT &&
bg_box->type != BOX_INLINE_END &&
- (bg_box->type != BOX_INLINE || bg_box->object)) {
+ (bg_box->type != BOX_INLINE || bg_box->object ||
+ box->flags & REPLACE_DIM)) {
/* find intersection of clip box and border edge */
struct rect p;
p.x0 = x - border_left < r.x0 ? r.x0 : x - border_left;
@@ -471,7 +472,8 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
/* borders for block level content and replaced inlines */
if (box->style && box->type != BOX_TEXT &&
box->type != BOX_INLINE_END &&
- (box->type != BOX_INLINE || box->object) &&
+ (box->type != BOX_INLINE || box->object ||
+ box->flags & REPLACE_DIM) &&
(border_top || border_right ||
border_bottom || border_left)) {
if (!html_redraw_borders(box, x_parent, y_parent,