Commit Graph

161 Commits

Author SHA1 Message Date
Vincent Sanders 31c9ffb4b5 make boxes keep reference to the DOM node that causes them 2012-11-30 12:29:54 +00:00
Vincent Sanders fb13fcf166 Improve html renderer error reporting 2012-11-26 18:59:13 +00:00
Michael Drake afdf72d7b5 Confine box_at_point to the document it's given. Callers are now responsible for calling whatever functionality for object boxes. Remove last bw dereference from render directory. Remove a couple of unused functions. 2012-08-21 15:27:52 +01:00
Michael Drake c3f9e3d3ce Don't need to include browser.h. 2012-08-14 14:53:48 +01:00
Vincent Sanders 25cdea3351 doxygen serious warning cleanup 2012-07-24 16:19:49 +01:00
Michael Drake 71325ca6d0 Bring comment into line with use of libdom instead of libxml.
svn path=/trunk/netsurf/; revision=13718
2012-03-26 10:47:54 +00:00
Michael Drake d5a2701b38 Don't need libxml.h in render/box.h now.
svn path=/trunk/netsurf/; revision=13717
2012-03-26 10:45:44 +00:00
Daniel Silverstone 6162b49875 Forward decl of struct dom_node to shush things
svn path=/trunk/netsurf/; revision=13666
2012-03-25 10:21:37 +00:00
John Mark Bell 2b215a8df1 Initialise/finalise box constructor string constants
svn path=/trunk/netsurf/; revision=13653
2012-03-25 08:37:48 +00:00
John Mark Bell 682eba9a56 Port box construction to libdom
svn path=/trunk/netsurf/; revision=13608
2012-03-24 18:47:51 +00:00
Michael Drake ab45ecd228 Use lwc_string for box->id.
svn path=/trunk/netsurf/; revision=13093
2011-10-29 11:37:05 +00:00
John Mark Bell 8e0015798c Remove unused API
svn path=/trunk/netsurf/; revision=12941
2011-10-03 22:02:33 +00:00
Michael Drake 898b01e721 More conversion to nsurl. (box->href, object params, imagemaps, (i)frames)
svn path=/trunk/netsurf/; revision=12933
2011-10-03 20:28:29 +00:00
John Mark Bell 74395ac888 Restartable box tree constructor. Yield between elements.
svn path=/trunk/netsurf/; revision=12912
2011-09-29 19:15:54 +00:00
Michael Drake 6e3e168d08 Avoid instance of using bw->current_content outside desktop/.
svn path=/trunk/netsurf/; revision=12690
2011-08-31 17:53:40 +00:00
Michael Drake b57c2e0bee Move rectangle type to utils/types.h
svn path=/trunk/netsurf/; revision=12525
2011-06-28 15:18:48 +00:00
Michael Drake c9fe1b604e HTML contents manage box scrollbars, rather than browser_windows.
svn path=/trunk/netsurf/; revision=12519
2011-06-27 22:21:15 +00:00
Michael Drake 53f4da3420 First pass at core iframes. Currently lacking scrollbars.
svn path=/trunk/netsurf/; revision=12474
2011-06-14 20:00:18 +00:00
Michael Drake ac447fc293 s/scroll/scrollbar/ and improve scrollbar widget comments.
svn path=/trunk/netsurf/; revision=12363
2011-05-09 22:49:17 +00:00
John Mark Bell e71691bae8 Merge branches/jmb/content-factory to trunk
svn path=/trunk/netsurf/; revision=12283
2011-05-06 20:40:09 +00:00
Michael Drake 1304964f92 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
2011-04-27 13:50:49 +00:00
Michael Drake 769011911c Optimise first pass of layout. Reduces number of nsfont_width calls by up to the page's word count.
svn path=/trunk/netsurf/; revision=12239
2011-04-26 15:03:44 +00:00
Michael Drake 8d2bb4bd3a Change how blocks are positioned vertically (esp. margin handling).
svn path=/trunk/netsurf/; revision=12235
2011-04-22 21:57:18 +00:00
Michael Drake a0d7e79c8c Allow box margins to collapse through zero-height boxes.
svn path=/trunk/netsurf/; revision=11981
2011-03-12 18:44:43 +00:00
Daniel Silverstone 68e12d28f9 Remove pointless nasty skanky broken box tree duplication from hell
svn path=/trunk/netsurf/; revision=11970
2011-03-12 16:18:18 +00:00
Michael Drake 9be22ab590 Make sure the last clone box for a wrapped text is properly measuered.
svn path=/trunk/netsurf/; revision=11920
2011-03-05 22:18:06 +00:00
Michael Drake 9e1916ad61 Fix comment.
svn path=/trunk/netsurf/; revision=11891
2011-03-02 19:36:13 +00:00
Michael Drake 3e7ea29e4b Move clone to box flags.
svn path=/trunk/netsurf/; revision=11890
2011-03-02 19:30:08 +00:00
Michael Drake be366b0e6b Move strip_leading_newline to box flags.
svn path=/trunk/netsurf/; revision=11889
2011-03-02 19:16:03 +00:00
Michael Drake 3707be6292 Move printed to box flags.
svn path=/trunk/netsurf/; revision=11888
2011-03-02 18:41:17 +00:00
Michael Drake 77f67bccb6 Move style_owned to box flags.
svn path=/trunk/netsurf/; revision=11887
2011-03-02 18:27:41 +00:00
Michael Drake f744c9dfa0 Make box flags and move new line indicator to it.
svn path=/trunk/netsurf/; revision=11886
2011-03-02 17:50:51 +00:00
Michael Drake e3f00b8546 Cache space widths.
svn path=/trunk/netsurf/; revision=11877
2011-03-01 20:00:41 +00:00
John Mark Bell d9280e8d72 Fix bug #2076786: do not apply fallback content to failed objects
svn path=/trunk/netsurf/; revision=11797
2011-02-25 19:14:38 +00:00
Michael Drake 27b6096dcd Move stuct rect out of box.h and tree.c.
svn path=/trunk/netsurf/; revision=11647
2011-02-11 19:35:16 +00:00
John Mark Bell 5d27aa256f Port to latest libcss
svn path=/trunk/netsurf/; revision=11526
2011-01-29 19:22:12 +00:00
Daniel Silverstone cd72933201 Ensure we free more of the css stuff for the box model.
svn path=/trunk/netsurf/; revision=11399
2011-01-19 21:15:23 +00:00
Michael Drake 08ed4c207f Update to new libcss API for simultanious selection for base element and its pseudo elements.
svn path=/trunk/netsurf/; revision=11215
2011-01-05 19:36:05 +00:00
Michael Drake b010a25771 + Refactor input handling from browser window code into content
handlers.
+ Disentangle all box tree manipulation from browser window
  code and put it where it belongs.
+ Move other content specific and other irrelevant code from
  browser window handling to appropriate places.
+ Put mouse state enum in new mouse header, since it's not just
  used by browser window code, and it is used by treeview
  windows on the treeview branch.

svn path=/trunk/netsurf/; revision=10561
2010-06-04 09:35:08 +00:00
John Mark Bell 000e6ad3de It turns out that realloc(ptr, 0) --> free(ptr) is not actually required by the C standard (whereas realloc(NULL, size) --> malloc(size) is).
Therefore, explicitly model the behaviour expected by our libraries (that realloc of 0 size is equivalent to free).

svn path=/trunk/netsurf/; revision=10524
2010-04-30 07:00:58 +00:00
Daniel Silverstone 30e0cfe7a9 First step to fixing memory leaks -- Box model no longer leaks computed styles
svn path=/trunk/netsurf/; revision=10500
2010-04-27 21:38:41 +00:00
Daniel Silverstone 270ef59a98 Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
Michael Drake c26611b32b Merge from Paul Blokus' selectscroll branch. Fixes text input scrollbar behaviour.
svn path=/trunk/netsurf/; revision=9306
2009-08-14 23:10:53 +00:00
Michael Drake 13afa0ff4c Merge Paul Blokus' selectscroll branch. Adds core select menu widget for forms and core scrollbar widget.
svn path=/trunk/netsurf/; revision=9289
2009-08-14 10:37:33 +00:00
John Mark Bell 0665611cc2 Port to modified libcss API.
svn path=/trunk/netsurf/; revision=8997
2009-08-02 19:19:43 +00:00
John Mark Bell ddeadd1c02 Merge LibCSS port to trunk.
svn path=/trunk/netsurf/; revision=8752
2009-07-23 23:05:34 +00:00
Michael Drake 044a953400 Make box_at_point() only return boxes if the point is physically contained within them, and not if the point is mearly in the descendant area. (Fixes sites like BBC F1 page where whole page became an iPlayer link.)
svn path=/trunk/netsurf/; revision=7335
2009-04-27 10:20:44 +00:00
Michael Drake f1c7c7f072 Remove unused line_height stuff for now.
svn path=/trunk/netsurf/; revision=6354
2009-02-02 13:54:48 +00:00
Michael Drake 414f42faac Make inline boxes store the height of their line box and include in box tree dump.
svn path=/trunk/netsurf/; revision=6319
2009-01-31 13:26:28 +00:00
Adrian Lees 03a1aac36a Selection- and link-related functions now on menu; other menu changes as per t's plan
svn path=/trunk/netsurf/; revision=6296
2009-01-30 05:06:30 +00:00