From 4581375209bbba2687bf6a1f42af4cc7e677652c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 20 Aug 2012 16:46:33 +0100 Subject: Use proper function for box tree dump. --- riscos/gui.c | 13 ++----------- riscos/gui.h | 2 +- riscos/window.c | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/riscos/gui.c b/riscos/gui.c index e11679b82..2926f63aa 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -65,9 +65,7 @@ #include "desktop/sslcert.h" #include "desktop/tree.h" #include "desktop/tree_url_node.h" -#include "render/box.h" #include "render/font.h" -#include "render/html.h" #include "riscos/content-handlers/artworks.h" #include "riscos/bitmap.h" #include "riscos/buffer.h" @@ -2224,7 +2222,7 @@ void ro_gui_view_source_bounce(wimp_message *message) * Send the debug dump of a content to a text editor. */ -void ro_gui_dump_content(hlcache_handle *c) +void ro_gui_dump_browser_window(struct browser_window *bw) { os_error *error; @@ -2236,14 +2234,7 @@ void ro_gui_dump_content(hlcache_handle *c) return; } - /* output debug information to file */ - switch (content_get_type(c)) { - case CONTENT_HTML: - box_dump(stream, html_get_box_tree(c), 0); - break; - default: - break; - } + browser_window_debug_dump(bw, stream); fclose(stream); diff --git a/riscos/gui.h b/riscos/gui.h index cd70a39a0..aa9873cfc 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -116,7 +116,7 @@ extern struct gui_window *ro_gui_current_redraw_gui; void ro_gui_open_window_request(wimp_open *open); void ro_gui_screen_size(int *width, int *height); void ro_gui_view_source(struct hlcache_handle *c); -void ro_gui_dump_content(struct hlcache_handle *c); +void ro_gui_dump_browser_window(struct browser_window *bw); void ro_gui_drag_box_start(wimp_pointer *pointer); bool ro_gui_prequit(void); const char *ro_gui_default_language(void); diff --git a/riscos/window.c b/riscos/window.c index deae43c25..085e02a0e 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1993,7 +1993,7 @@ bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key, case IS_WIMP_KEY + wimp_KEY_F9: /* Dump content for debugging. */ - ro_gui_dump_content(h); + ro_gui_dump_browser_window(g->bw); return true; case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F9: -- cgit v1.2.3