Commit Graph

436 Commits

Author SHA1 Message Date
Michael Drake
ad273a41e8 Simplify place_float_below loop condition. 2016-01-21 09:44:05 +00:00
Michael Drake
a774e9473d Make use of cached place float below value earlier. 2016-01-20 22:37:22 +00:00
Michael Drake
0bbc03c577 Cache place below level, to avoid pointless calls to find_sides. 2016-01-20 20:09:40 +00:00
Michael Drake
c13080d96c Optimise white hot find_sides to take advantage of sorted float_children.
Now we have an early exit when we get to the floats above the area we're
interested in.
2016-01-20 20:02:56 +00:00
Michael Drake
948a93041d Sort float_children of containers by their bottom edge. 2016-01-20 20:02:56 +00:00
Michael Drake
38e6fd1b74 Split adding float to a container out into separate function. 2016-01-20 20:02:55 +00:00
Michael Drake
018adc2f5e Remove redundant condition in white hot path. 2016-01-20 18:27:15 +00:00
Michael Drake
e5a2538b6d Make it clearer why we're asserting. 2015-11-11 22:22:19 +00:00
Michael Drake
ed5fd91843 Fix overflow-{x|y} handling. 2015-11-01 14:06:06 +00:00
Michael Drake
7a6f0c765a Fix descendant bounding box calcs to work with overflow-{x|y}. 2015-10-31 19:11:24 +00:00
Michael Drake
257666499d Reorder percentage calculation.
Fixed point representation couldn't store 0.65 exactly, so avoid doing
the divide by 100 first.

I will look at moving this into libcss's fixed point header and doing
it in a way that avoids arithmetic overflow, but for now this fixes
el reg layout.
2015-08-24 22:47:58 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Michael Drake
69776768d2 Remove duplicate branch in relative position handling. 2015-04-23 09:46:04 +01:00
Vincent Sanders
79e501075a make the form select menu API smaller.
By hiding all but the form selection menu option structure from code
outside of render this reduces the API to the absolute minimum to
support this feature.
2014-11-13 21:52:08 +00:00
Vincent Sanders
e8277f2954 doxgen warning fixes in riscos frontend. 2014-11-12 22:36:11 +00:00
Vincent Sanders
1097cc40b4 remove unecessary browser.h include from core headers 2014-10-17 12:21:52 +01:00
Vincent Sanders
17be8cf216 Put the font operations table alongside all the other core API
The netsurf core is driven from numerous operation tables most of
which are now set through a common netsurf_register() interface. The
font and plotting interfaces are currently separate and unlike all the
other operation tables are modified for differing contexts.

This change moves the font operations alongside all the other
operations table and remove unnecessary interaction with the renderers
font internals. Further this also removes the need for css internals
to be visible in frontends.
2014-10-13 11:56:31 +01:00
Michael Drake
2cf3525b00 Fix text selection.
Values returned by nscss_len2px are actually libcss fixed-points,
so convert the result to pixels. Also reduce the amount by which
the top of descendant bboxes are extended to 3/4 of the text
height, which is the maximum possible amount that the text can
protrude above the box when line-height is reduced.
2014-08-20 11:08:35 +01:00
Michael Drake
2ea5ca5805 Remove unwanted debug. 2014-08-04 14:59:13 +01:00
Michael Drake
a807d762f9 mailto urls don't have passwords or ports, so we don't need to look for ':'. 2014-08-04 14:49:35 +01:00
Michael Drake
779deb8559 Fix overflow handling issue. 2014-07-13 18:21:50 +01:00
Michael Drake
0d3faeb4bd Allow suppression of style dump in box tree dumps. 2014-07-13 18:07:12 +01:00
Michael Drake
5085bfbf99 Handle overflow-x and overflow-y properties.
Fixes display of BBC Sport.
  Requires LibCSS with support for overflow-x and overflow-y.
2014-06-01 18:36:22 +01:00
Michael Drake
8b253a2151 Improve min/max-height handling on replaced elements. 2014-01-04 14:02:22 +00:00
Vincent Sanders
c26dd43669 ensure no division by zero in scaled object dimensioning (coverity 1109864 ) 2013-11-03 21:52:01 +00:00
Michael Drake
0bbaf1d24d Layout doesn't need to handle the old insane textarea box splitting now. Fixes Coverity:1109882. 2013-10-23 12:48:16 +01:00
Michael Drake
8d3a89b62d Don't attempt to vertical-align objects for now, as our current bodged vertical-align implementation can do more harm than good. 2013-07-12 11:34:47 +01:00
Michael Drake
431f9fde5f Apply vertical alignment to objects on line. 2013-06-08 10:42:33 +01:00
Vincent Sanders
ee6e6eec05 move options include 2013-05-28 14:16:10 +01:00
Michael Drake
bcf07a9665 Hacky fix for clipping of top of text. 2013-04-17 12:18:08 +01:00
Michael Drake
c1628435f2 Fix min line width calc when an inline isn't to be wrapped in a block that allows wrap. 2013-03-06 18:39:38 +00:00
Michael Drake
131db5c8da Fix min width to take account of white-space property. 2013-02-22 19:00:16 +00:00
Michael Drake
bb601eae78 Don't reduce width of textarea box for CSS overflow scrollbar; it won't get one. 2013-02-11 18:43:50 +00:00
Michael Drake
315f5a8ca1 Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Conflicts:
	gtk/font_pango.c

Conflict resolved.
2013-02-10 21:52:36 +00:00
Michael Drake
7bc725fe1f Update HTML layout not to demand that nsfont_split only splits on a space.
This allows the HTML layout code to wrap unicode text correctly.
For example on our Japanese Welcome page, the characters will be wrapped
if the platform's nsfont_split implementation implements the Unicode line
breaking algorithm.
2013-02-10 16:50:15 +00:00
Michael Drake
f98c0d848c Make nowrap code path a bit plainer. 2013-02-10 12:19:13 +00:00
Michael Drake
2a4b9b2217 Comment current html wrap/text-splitting behaviour. 2013-02-10 11:50:04 +00:00
Michael Drake
7fa8f30f44 Don't add box scrollbar padding to gadgets. 2013-02-09 13:01:56 +00:00
Michael Drake
762e1aad73 First pass at getting html forms to use textarea widget.
(Input element types text & password, and textarea element.)
Can edit and submit forms, but there are loads of issues.
2013-02-06 22:39:45 +00:00
Michael Drake
8bf3346ce2 Fix min_max line width calc to include box spaces. 2013-01-02 12:46:17 +00:00
Michael Drake
2dcfcd6724 Fix placement of first inline on line below a float, when float has been shifted up by >= its own height with a negative margin. 2012-11-04 19:55:24 +00:00
Vincent Sanders
c1671f37b1 reduce talloc usage to box tree layout only 2012-10-03 19:26:17 +01:00
Michael Drake
391defb1c4 Don't convert spaces to non-breaking spaces inside white-space:pre. Instead, handle not wrapping in layout. 2012-10-03 17:14:11 +01:00
Michael Drake
b68a138c2c More white-space:nowrap. 2012-10-03 16:40:09 +01:00
Michael Drake
ac43c2eaea Support white-space:nowrap. 2012-10-03 15:41:32 +01:00
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