mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
HTML: Don't allow objects to redraw until we have a layout.
This commit is contained in:
parent
c238325b12
commit
5e45c4498c
@ -1592,6 +1592,7 @@ static void html_reformat(struct content *c, int width, int height)
|
|||||||
selection_reinit(&htmlc->sel, htmlc->layout);
|
selection_reinit(&htmlc->sel, htmlc->layout);
|
||||||
|
|
||||||
htmlc->reflowing = false;
|
htmlc->reflowing = false;
|
||||||
|
htmlc->had_initial_layout = true;
|
||||||
|
|
||||||
/* calculate next reflow time at three times what it took to reflow */
|
/* calculate next reflow time at three times what it took to reflow */
|
||||||
nsu_getmonotonic_ms(&ms_after);
|
nsu_getmonotonic_ms(&ms_after);
|
||||||
|
@ -127,6 +127,9 @@ typedef struct html_content {
|
|||||||
/** Whether a layout (reflow) is in progress */
|
/** Whether a layout (reflow) is in progress */
|
||||||
bool reflowing;
|
bool reflowing;
|
||||||
|
|
||||||
|
/** Whether an initial layout has been done */
|
||||||
|
bool had_initial_layout;
|
||||||
|
|
||||||
/** Whether scripts are enabled for this content */
|
/** Whether scripts are enabled for this content */
|
||||||
bool enable_scripting;
|
bool enable_scripting;
|
||||||
|
|
||||||
|
@ -178,6 +178,10 @@ html_object_callback(hlcache_handle *object,
|
|||||||
box->flags & REPLACE_DIM) {
|
box->flags & REPLACE_DIM) {
|
||||||
union content_msg_data data;
|
union content_msg_data data;
|
||||||
|
|
||||||
|
if (c->had_initial_layout == false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!box_visible(box))
|
if (!box_visible(box))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -212,6 +216,10 @@ html_object_callback(hlcache_handle *object,
|
|||||||
if (c->base.status != CONTENT_STATUS_LOADING) {
|
if (c->base.status != CONTENT_STATUS_LOADING) {
|
||||||
union content_msg_data data = event->data;
|
union content_msg_data data = event->data;
|
||||||
|
|
||||||
|
if (c->had_initial_layout == false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!box_visible(box))
|
if (!box_visible(box))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user