Commit Graph

1720 Commits

Author SHA1 Message Date
Michael Drake
3c3685eb96 Layout: Percentage max-width constrained boxes don't affect min on minmax pass. 2018-04-02 20:25:19 +01:00
Michael Drake
473a40bc11 Layout: Fix min max pass calc that looked wrong.
The `width` variable call be set to AUTO, which is INT_MIN,
so we can't add it to max without checking it's > 0, or we'll
blunder into the minmax assertions.
2018-04-02 20:23:30 +01:00
Michael Drake
af554fcedf Layout: Remove some commented out code. 2018-04-02 20:22:49 +01:00
Michael Drake
790d30b788 HTML handler: Normalise box type on replacment.
We currently only do TABLE --> BLOCK normalisation.
2018-01-21 12:32:10 +00:00
Michael Drake
c03405b3b3 Layout: Reduce code duplication in handling of box side properties. 2018-01-12 17:55:01 +00:00
Michael Drake
6be6fa1b21 CSS utils: Handle new units in length conversion routines.
This causes a ripple effect of all the callsites needing
information they didn't have.
2018-01-05 13:49:51 +00:00
Michael Drake
a67973f312 Layout: No need to expose layout_calculate_descendant_bboxes(). 2018-01-05 13:49:51 +00:00
Michael Drake
ae286be5a9 Layout: No need to expose layout_inline_container(). 2018-01-05 13:49:51 +00:00
Michael Drake
cf3eba081a Layout: No need to expose layout_minmax_table(). 2018-01-05 13:49:51 +00:00
Michael Drake
5776d3448c CSS computed style composition: Update for new CSS units.
Since the nscss_compute_font_size callback now needs to convert
new units to absolute values, and some of these units require info
from the root element's style, there are knock-on changes to ensure
that the required info is available where its needed.
2018-01-05 13:49:51 +00:00
Michael Drake
e418416c77 Squash remaining GCC7 -Wimplicit-fallthrough warnings. 2017-10-23 09:46:02 +01:00
Michael Drake
9925762de8 Squash some GCC7 -Wimplicit-fallthrough warnings. 2017-10-22 13:49:29 +01:00
Michael Drake
f7f18042bf CSS: Wrappers for computed style getters that return unsupported values.
We don't yet handle the Flexbox-related values for certain properties.
2017-10-20 17:46:37 +01:00
Vincent Sanders
d2d5ef276b annotate error case fall through in switch to supress warnings 2017-09-11 16:43:25 +01:00
Vincent Sanders
f89f7192ef fix size+t formatting in logging 2017-09-07 21:08:02 +01:00
Vincent Sanders
86c3f3e005 update layout logging to use a catagory 2017-09-07 18:26:53 +01:00
Vincent Sanders
5d6f189d8b Fixup everything the semantic patch missed 2017-09-07 18:12:09 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Michael Drake
8de5625193 HTML CSS handler: event->data.error is invalid for errorcode. 2017-08-28 12:12:08 +01:00
Michael Drake
c0205478c0 HTML object hlcache callback: Ensure final fetch completion triggers reformat.
Even if the final fetch finished with ERRORCODE.
2017-08-28 12:06:09 +01:00
Michael Drake
2ad990f3d5 HTML object hlcache callback: Errorcode without box is OK. 2017-08-28 12:04:23 +01:00
Michael Drake
771fe0d44c HTML script handling: Convert to using content_broadcast_errorcode(). 2017-08-28 11:01:30 +01:00
Michael Drake
830d7ec6b6 HTML content handler: Ensure script fetch hlcache callback handles errorcode. 2017-08-28 10:58:02 +01:00
Michael Drake
a30ae27e5c HTML content handler: Ensure object fetch hlcache callback handles errorcode. 2017-08-28 10:53:07 +01:00
Michael Drake
adc6ceb0bb CSS content handler: Ensure fetch hlcache callback handles errorcode. 2017-08-28 10:32:48 +01:00
Michael Drake
8180116d96 Plain text content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:27:20 +01:00
Michael Drake
d70beb28db Content API: Make content_broadcast take pointer to content_msg_data. 2017-08-26 15:50:03 +01:00
Michael Drake
f738056710 HTML handler: Avoid unnecessary dom_string_caseless_isequal call. 2017-06-10 17:35:11 +01:00
Michael Drake
f855774e1a Layout: Prevent negative widths on absolutle positioned boxes. 2017-06-02 18:24:23 +01:00
Vincent Sanders
08a86bfa0e clean up doccomments and formatting in texplain content handler
There is an intention to replace the render interface and it will be
helpful to reduce the size of the exposed API as much as
possible. This is the first step towards that goal.
2017-06-01 22:43:45 +01:00
Michael Drake
6f7b5e3f22 Layout: Fix auto margins to be affected by {min|max}-width constraints. 2017-04-28 15:44:34 +01:00
Michael Drake
6c726473ef Layout: Implement CSS3 box-sizing property.
Updates user agent CSS to set form element box-sizing properties,
and removes some legacy pre-CSS3 hacks for handling gadget dimensions.
2017-04-27 16:47:38 +01:00
Michael Drake
7bbf2a9ca0 HTML layout: Extend :after pseudo element handling to cover display:table.
This is used in a common clearfix variant.

    http://nicolasgallagher.com/micro-clearfix-hack/
2017-04-26 16:39:11 +01:00
Michael Drake
ebcc27c330 Box tree dump: If box has element, include element name in dump. 2017-04-26 15:20:31 +01:00
Michael Drake
6bfc8ba547 HTML content handler: Don't let aborted contents get stuck in LOADING.
Previously, aborted HTML fetches left the content in LOADING state,
and the hlcache clean code does not clean contents in the LOADING
state.  They, and their child contents ended up stuck in the
cache forever.
2017-03-23 14:31:38 +00:00
Michael Drake
0747e0ed53 HTML object fetch handler: Remove bogus parent content state assertion. 2017-03-23 14:31:22 +00:00
Michael Drake
be77f764e2 Improve content logging with content IDs (pointer values).
This makes it easier to track a content by its ID through a log.
2017-03-23 14:23:57 +00:00
Vincent Sanders
44c5aef1c8 make scrollbar redraw signal errors correctly
allow scrollbar redraw to return error codes and update documentation
commenst appropriately.
2017-03-01 23:30:29 +00:00
Vincent Sanders
d9a2c7b9c1 fix some doxygen errors 2017-02-24 14:02:31 +00:00
Vincent Sanders
1666944c7e Merge branch 'vince/plotctx' 2017-02-12 20:01:05 +00:00
Chris Young
46c9267a11 Make disabled textboxes read-only. Partially fixes 2521. 2017-02-11 17:26:03 +00:00
Vincent Sanders
18abdadac8 split border drawing out of html redraw 2017-02-11 13:57:06 +00:00
Vincent Sanders
30df27c3ba simplify html redraw border plotting error handling 2017-02-11 13:57:06 +00:00
Vincent Sanders
3722ff8d86 Update all core use of plotters to new API 2017-02-11 13:55:41 +00:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Vincent Sanders
70d700b26c rationalise use of utils/utils.h header 2017-01-19 21:15:08 +00:00
Vincent Sanders
7dab7cb43d move plot style header to netsurf include directory
move plotter style header and adjust all callers to use only what they
actually require.
2017-01-13 10:03:24 +00:00
Vincent Sanders
a2396edde4 complete transition to locale independant core operation
The netsurf core no longer uses any locale dependant operations
excepting the mall number or cases where such operations are
explicitly wanted.

the netsurf_init now calls setlocale with the empty string and lets
the c library setup as per its specific implementation.

any core functionality that specificaly processes ascii text must use
the utils/ascii.h header to do so.
2016-09-29 22:37:10 +01:00
Michael Drake
7b78ef3361 Style: Fix ignoring of STYLE elements with non-screen media.
We were handling the STYLE tag getting added in the
dom_default_action_DOMSubtreeModified_cb callback, however,
the media attribute dadn't been added by that point.

We now check it in the dom_default_action_DOMNodeInserted_cb
callback, at which time the media attribute is available for
checking.

Note, we should probably store the media type in the
html_stylesheet structure, but for now we just have an
`unused` boolean.

Also, it may be possible to optimise to avoid parsing non-
screen media STYLE element data if we could detect the media
earlier.
2016-09-24 12:44:28 +01:00
Vincent Sanders
c830d14d0b cleanup seevral doxygen warnings 2016-09-13 09:16:31 +01:00