Commit Graph

365 Commits

Author SHA1 Message Date
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
Michael Drake 60c74c2e3c More comments for object dimension calculation.
svn path=/trunk/netsurf/; revision=11678
2011-02-14 16:42:23 +00:00
Michael Drake fc7efc6e4a Don't use float maths for AUTO image sizing with one given dimension.
svn path=/trunk/netsurf/; revision=11677
2011-02-14 14:48:56 +00:00
Michael Drake 5b4228f5aa Handle object sizing in one place.
svn path=/trunk/netsurf/; revision=11676
2011-02-14 14:39:42 +00:00
Michael Drake 3d69933e45 Avoid potential divide by 0.
svn path=/trunk/netsurf/; revision=11675
2011-02-14 12:56:52 +00:00
John Mark Bell 5d27aa256f Port to latest libcss
svn path=/trunk/netsurf/; revision=11526
2011-01-29 19:22:12 +00:00
Michael Drake 44e8897a48 Make layout of block formatting contexts take account of the bottom margin of the last contained block.
svn path=/trunk/netsurf/; revision=11498
2011-01-26 15:14:38 +00:00
Michael Drake 40a034b08f Don't clear floats if there aren't floats to clear.
svn path=/trunk/netsurf/; revision=11270
2011-01-09 19:09:30 +00:00
Michael Drake fe291f87d9 Ensure top margin is affects static position in particular case.
svn path=/trunk/netsurf/; revision=11262
2011-01-09 00:09:57 +00:00
Michael Drake b85fcf590f Table top/bottom margin is 0px when computed value is 'auto'.
svn path=/trunk/netsurf/; revision=11257
2011-01-08 17:34:45 +00:00
Michael Drake b9773d34bb Root element can't be absolute positioned. Fixes #3062055.
svn path=/trunk/netsurf/; revision=10743
2010-09-08 17:22:35 +00:00
Michael Drake 0de9f41db7 Fix object descendants and make space for scrollbars if required.
svn path=/trunk/netsurf/; revision=10730
2010-08-30 22:30:43 +00:00
Michael Drake ece31d1358 Don't special case height to content height when object's content is HTML.
svn path=/trunk/netsurf/; revision=10729
2010-08-30 22:09:49 +00:00
Michael Drake 2a286962f7 Fix build when layout logging is enabled.
svn path=/trunk/netsurf/; revision=10649
2010-07-16 17:56:33 +00:00
Michael Drake 17aacbec02 Record left and right float boxes with negative widths. Fixes overlapping text on new BBC News site.
svn path=/trunk/netsurf/; revision=10648
2010-07-16 17:48:20 +00:00
Michael Drake 71644097be Remove dead assignements and add assert to check table cells aren't set to span no columns at layout time (Note: colspan=0 is treated as colspan=1 by box normalisation. It should probably be handled in table_calculate_columns_types() properly. Either way, there shouldn't be colspans of 0 by the time we get to layout.)
svn path=/trunk/netsurf/; revision=10601
2010-07-06 20:23:07 +00:00
Michael Drake 485ac0dad7 Improve handling of percentage margins and paddings on floats. Fixes pond.org.uk. This is still not ideal and there are cases where we don't match other browsers.
svn path=/trunk/netsurf/; revision=10497
2010-04-27 17:45:07 +00:00
Michael Drake 4d67ca25a7 Fix vertical placement of absolute positioned inlines using staic position. Simplify placement of inlines on a line.
svn path=/trunk/netsurf/; revision=10495
2010-04-27 12:02:12 +00:00
Michael Drake 542610c779 Fix float wrap issue. (Amiga.org nav bar.)
svn path=/trunk/netsurf/; revision=10490
2010-04-26 22:13:22 +00:00
Vincent Sanders 03bb3e8636 remove _GNU_SOURCE define from everywhere.
strndup is not standard so provide an implementation.

svn path=/trunk/netsurf/; revision=10474
2010-04-24 15:22:17 +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 b1e8c5fb09 Revert float ordering optimisation (r9846) due to effect on stacking order.
svn path=/trunk/netsurf/; revision=9853
2010-01-20 22:38:22 +00:00
Michael Drake 185465df3d Order containing block's list of floats in descending order of the y-position of their base. Make find_sides() stop searching, after floats are above the range we're interested in. (351s --> 73s on ix for haveproblems/really-slow-float-table2.html)
svn path=/trunk/netsurf/; revision=9846
2010-01-17 09:57:25 +00:00
Michael Drake ab74f4c990 When placing floats below, keep track of y-position, for future floats in current line.
svn path=/trunk/netsurf/; revision=9836
2010-01-16 17:41:50 +00:00
John Mark Bell 355799ce0b Merge branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9729
2009-12-17 23:55:02 +00:00
John Mark Bell 51d545772c Squash warning
svn path=/trunk/netsurf/; revision=9686
2009-11-22 13:46:23 +00:00
John Mark Bell d010712a9c Avoid potential NULL pointer dereferences
svn path=/trunk/netsurf/; revision=9680
2009-11-22 13:28:30 +00:00