From 2928eeca28c4c9b809f624fc173f1b2869cd2bf1 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 24 Jan 2007 23:49:34 +0000 Subject: Overview of frames. svn path=/trunk/netsurf/; revision=3149 --- Docs/06-frames | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Docs/06-frames (limited to 'Docs/06-frames') diff --git a/Docs/06-frames b/Docs/06-frames new file mode 100644 index 000000000..bf0a870c4 --- /dev/null +++ b/Docs/06-frames @@ -0,0 +1,52 @@ +Frames +====== + +Frames cut across many parts of the browser. + +Representation in content +------------------------- +During box-tree construction (box_construct.c), frameset, frame, and iframe +elements are converted into structures in the 'struct content' for the HTML +document. + +Framesets and frames form a tree of 'struct content_html_frames' at +content->data.html.frameset. For example, the source + + + + + + + + + + + + +results in the tree + + 0x6099f2f4 (2 1) w0px h0px (margin w0 h0) (scrolling no) + (0 0): 0x608b730c (1 2) w100% h50% (margin w0 h0) (scrolling no) + (0 0): 0x608dae74 (0 0) w40px h100% (margin w0 h0) 'A' (scrolling auto) border 0 + (0 1): 0x608daeb0 (0 0) w200px h100% (margin w0 h0) 'B' (scrolling auto) border 0 + (1 0): 0x608b7348 (1 2) w100% h50% (margin w0 h0) (scrolling no) + (0 0): 0x608d9b4c (0 0) w3* h100% (margin w0 h0) 'C' (scrolling auto) border 0 + (0 1): 0x608d9b88 (0 0) w1* h100% (margin w0 h0) 'D' (scrolling auto) border 0 + +(output from html_dump_frameset()). + +Creation of browser windows +--------------------------- +When a document containing frames is displayed in a browser window, child +windows are created for frames and iframes. This occurs when a browser window +receives a CONTENT_MSG_READY in browser_window_callback(), which calls +browser_window_create_frameset(). + +browser_window_create_frameset() constructs a tree of 'struct browser_window' +corresponding to the tree of 'struct content_html_frames'. For each new +browser_window, it calls gui_create_browser_window() to create and open the +actual platform-specific window (represented by a 'struct gui_window'). + +When this is completed it calls browser_window_recalculate_frameset() which +calculates the positions of each frame in pixels and calls +gui_window_position_frame() to position each one. -- cgit v1.2.3