Commit Graph

391 Commits

Author SHA1 Message Date
Daniel Silverstone 24894214bc Include dom/dom.h where it might be needed
svn path=/trunk/netsurf/; revision=13625
2012-03-24 20:55:22 +00:00
Michael Drake 654ad81d8b Delete some trailing whitespace.
svn path=/trunk/netsurf/; revision=13555
2012-03-23 16:30:50 +00:00
Vincent Sanders 1490b52a6b NetSurf options rework (a=vince r=daniels,jmb)
svn path=/trunk/netsurf/; revision=13548
2012-03-22 09:34:34 +00:00
John Mark Bell f2993e6ed0 content_get_url -> hlcache_handle_get_url, content__get_url -> content_get_url
svn path=/trunk/netsurf/; revision=13236
2011-12-04 14:55:23 +00:00
Michael Drake 60a9d3af3b Only make space for vertical box scrollbar if box has height set.
svn path=/trunk/netsurf/; revision=13179
2011-11-24 17:22:25 +00:00
John Mark Bell 4ba282c9c9 Fix bug #3433954: make containing_block available to layout_table so it can resolve percentage height specified on an absolutely-positioned table.
svn path=/trunk/netsurf/; revision=13130
2011-11-06 11:26:52 +00:00
John Mark Bell 3776e49f02 Fix bug #3433840: <img style="display: table" src="..."> will crash if the image fetch completes before initial layout.
A number of things wrong here:
1) The BOX_TABLE generated for the img shouldn't ever have been associated with the object (it should have been associated with the implied BOX_TABLE_CELL)
2) The layout engine's decision to treat BOX_TABLE/BOX_INLINE_CONTAINER with associated objects differently from non-replaced TABLE/INLINE_CONTAINERs seems wrong (looking though SVN history, it appears that this was introduced as part of the very first frames implementation, since replaced (twice!))
3) Now we fetch objects in parallel with building the box tree, we're open to this kind of race condition.

svn path=/trunk/netsurf/; revision=13128
2011-11-05 21:03:52 +00:00
Michael Drake 9854ad6313 Add layout_get_object_dimensions param documentation missing from last commit.
svn path=/trunk/netsurf/; revision=12871
2011-09-23 17:42:25 +00:00
Michael Drake 9e91992478 Handle min/max-width on replaced elements.
svn path=/trunk/netsurf/; revision=12870
2011-09-23 17:34:04 +00:00
Michael Drake dcfd80956f Use fixed insted of floating point to get percentage of available_width, for width calc.
svn path=/trunk/netsurf/; revision=12869
2011-09-23 16:50:20 +00:00
Michael Drake e4a91f380c Move css_fixed and css_unit variables to where they're used.
svn path=/trunk/netsurf/; revision=12868
2011-09-23 16:40:58 +00:00
Michael Drake 9028673259 Simplify layout_get_object_dimensions.
svn path=/trunk/netsurf/; revision=12867
2011-09-23 16:35:37 +00:00
Michael Drake b0ea2a46e9 Use layout_find_dimensions to get inline object width/height.
svn path=/trunk/netsurf/; revision=12866
2011-09-23 15:48:40 +00:00
John Mark Bell f27d5a3e15 Remove gui_multitask
svn path=/trunk/netsurf/; revision=12828
2011-09-21 00:25:09 +00:00
Michael Drake 92d355ed30 Replaced elements' children are not laid out, so don't look at their descendants. Fixes #3380281.
svn path=/trunk/netsurf/; revision=12642
2011-08-23 10:42:03 +00:00
Michael Drake 4d19457c59 Prevent iframes with display:inline and percentage width from getting a width of AUTO during minmax layout phase.
svn path=/trunk/netsurf/; revision=12528
2011-06-28 19:42:31 +00:00
Michael Drake 5a4c8916ef If iframes are reformatted due to containing document reflow, don't need to redraw them since they will be redrawn when the containing document is redrawn. Make iframe handling more robust.
svn path=/trunk/netsurf/; revision=12497
2011-06-24 09:30:33 +00:00
Michael Drake 188712d142 Reformat floated iframe browser windows only after the iframe box has been linked into the box tree from the block formatting context block.
svn path=/trunk/netsurf/; revision=12476
2011-06-14 21:09:38 +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 5e823ede7c Use height type enum.
svn path=/trunk/netsurf/; revision=12413
2011-05-16 10:29:34 +00:00
Michael Drake 5bd37ecf2c Elements replaced with HTML don't affect parent descendants.
svn path=/trunk/netsurf/; revision=12365
2011-05-10 11:11:54 +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
John Mark Bell ff60007458 Fix build with NDEBUG defined
svn path=/trunk/netsurf/; revision=12154
2011-04-03 22:23:14 +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
Vincent Sanders 74f108ee4d Saturated maths in css fixed point
svn path=/trunk/netsurf/; revision=11975
2011-03-12 17:46:11 +00:00
Michael Drake e406481623 Update left/right margins comment.
svn path=/trunk/netsurf/; revision=11967
2011-03-12 12:27:17 +00:00
Michael Drake 28dc80a3a5 Esimated width is fine for last box.
svn path=/trunk/netsurf/; revision=11922
2011-03-05 23:03:44 +00:00
Michael Drake 8c8ef2268d Ensure box has appropriate space before cloning.
svn path=/trunk/netsurf/; revision=11921
2011-03-05 22:55:52 +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 3e7ea29e4b Move clone to box flags.
svn path=/trunk/netsurf/; revision=11890
2011-03-02 19:30:08 +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 db69e8045b When wrapping text, don't duplicate strings. Special case for text inside textareas, since they require it.
svn path=/trunk/netsurf/; revision=11881
2011-03-01 22:14:02 +00:00
Michael Drake 3b366c53f9 More useful assert and remove box_dump call.
svn path=/trunk/netsurf/; revision=11880
2011-03-01 21:48:38 +00:00
Michael Drake e3f00b8546 Cache space widths.
svn path=/trunk/netsurf/; revision=11877
2011-03-01 20:00:41 +00:00
Michael Drake f1343377ff Split splitting out into layout_text_box_split().
svn path=/trunk/netsurf/; revision=11869
2011-03-01 13:42:27 +00:00
Michael Drake e35aecb9aa Optimise wrapped text layout.
svn path=/trunk/netsurf/; revision=11852
2011-02-28 13:18:27 +00:00
Michael Drake 9125bd1fa4 Apply margin before clear.
svn path=/trunk/netsurf/; revision=11786
2011-02-24 15:45:10 +00:00
Michael Drake b68dc734e1 Handle text-indent in layout_minmax_line(). (Fixes #3187505; scattering of social networking icons on BBC News.)
svn path=/trunk/netsurf/; revision=11785
2011-02-24 13:46:12 +00:00
Michael Drake 2ef37af60c When box has no style, handle descendant calc as for overflow: visible.
svn path=/trunk/netsurf/; revision=11770
2011-02-23 13:11:19 +00:00
Michael Drake 7eaa663d74 Child bbox is relative to current box.
svn path=/trunk/netsurf/; revision=11756
2011-02-22 15:34:36 +00:00
Michael Drake 7f1108df32 Child's descendant bbox only affects current box's bbox if the child has overflow:visible.
svn path=/trunk/netsurf/; revision=11755
2011-02-22 15:12:18 +00:00
Michael Drake 474cbe917e Add function to get a box's border edge bbox, and use it to find initial descendant bbox.
svn path=/trunk/netsurf/; revision=11754
2011-02-22 14:57:04 +00:00
Michael Drake 9a8341cb39 Simplify descendant bbox calculations.
svn path=/trunk/netsurf/; revision=11753
2011-02-22 11:38:19 +00:00
Michael Drake bbdb7cd440 Fix fixed point percentage macro not to overflow. Thanks to jmb and vince.
svn path=/trunk/netsurf/; revision=11702
2011-02-16 20:41:55 +00:00
Michael Drake 06e6ec4eb1 If percentage is negative, resort to floating point.
svn path=/trunk/netsurf/; revision=11700
2011-02-16 17:14:47 +00:00
Michael Drake f793d17acd Handle percentages from libcss without doing floating point maths.
svn path=/trunk/netsurf/; revision=11687
2011-02-15 14:31:18 +00:00