Gitweb links:
...log
http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/81c0ac1383d17959403a6885700963c17d6dbb98
...commit
http://git.netsurf-browser.org/netsurf-wiki.git/commit/81c0ac1383d17959403a6885700963c17d6dbb98
...tree
http://git.netsurf-browser.org/netsurf-wiki.git/tree/81c0ac1383d17959403a6885700963c17d6dbb98
The branch, master has been updated
via 81c0ac1383d17959403a6885700963c17d6dbb98 (commit)
from 3210b9c7ec8c92ef27e7cd1728b5cf8d3a8bee70 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf-wiki.git/commit/?id=81c0ac1383d17959403a6885700963c17d6dbb98
commit 81c0ac1383d17959403a6885700963c17d6dbb98
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Octorber hack weekend: Add thougts on calc().
diff --git a/developer-weekend/oct-2020.mdwn b/developer-weekend/oct-2020.mdwn
index d4fef43..2ccab48 100644
--- a/developer-weekend/oct-2020.mdwn
+++ b/developer-weekend/oct-2020.mdwn
@@ -45,6 +45,42 @@ Vince
* Added support to LibSVGTiny for paths using arcs.
* Added a chart renderer to NetSurf.
+Notes
+=====
+
+Thoughts around `calc()`
+------------------------
+
+> Currently the `tlsa/calc` branch contains our work-to-date
+
+Remaining work
+
+> Thought:
+>
+> In theory we could make the calculation bytecode be stored as a lwc_string,
which means we already have mechanisms for deduplication, identity checking,
etc. in libcss.
+
+1. Maybe update generator to construct valid/invalid UNIT types for each
property as a table for use later.
+ * This would involve repeating the validation expressions present in
`LENGTH_UNIT:()` in `properties.gen` or perhaps reworking that bit too.
+ * This is probably an array, indexed by property, whose values are a
bitfield of permitted unit types.
+2. Implementing the cascade
+ * Mostly in the common code.
+ * Should be able to type-check here (property-specific part).
+ * In theory type-check could happen in the parser, but once `var()` gets
involved it'll have to be in the cascade, so we may as well put it here from
the start.
+3. Reworking the computed style to have a calc section
+ * By this, we mean that the computed styles should have a representation
which means "Use calculation N" in the current packed content, and then in the
less compact struct we can have calculation bytecode for each unique
calculation needed to support the style.
+ * Also consider how this impacts computed style internment / sharing.
+4. Rework API for computed styles to support client functions so that calc can
run
+ * This is were we implement doing the calculation.
+ * May need care in the case of invalid results in calc
+ * May permit simplification of things like percentage units.
+ * Maybe the context structure should carry simple values like available
width/height viewport width/height, etc. But have a callback for things like
relative font sizes etc.
+ * Probably change so all widths emerge from libcss in px.
+5. Write selection tests involving `calc()`
+ * Will involve fixing `dump_computed.h` to the new API
+
+
+After all that, NetSurf needs updating to the new API, which should simplify
the CSS client code in NetSurf quite a bit.
+
Next time
=========
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/oct-2020.mdwn | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/developer-weekend/oct-2020.mdwn b/developer-weekend/oct-2020.mdwn
index d4fef43..2ccab48 100644
--- a/developer-weekend/oct-2020.mdwn
+++ b/developer-weekend/oct-2020.mdwn
@@ -45,6 +45,42 @@ Vince
* Added support to LibSVGTiny for paths using arcs.
* Added a chart renderer to NetSurf.
+Notes
+=====
+
+Thoughts around `calc()`
+------------------------
+
+> Currently the `tlsa/calc` branch contains our work-to-date
+
+Remaining work
+
+> Thought:
+>
+> In theory we could make the calculation bytecode be stored as a lwc_string,
which means we already have mechanisms for deduplication, identity checking,
etc. in libcss.
+
+1. Maybe update generator to construct valid/invalid UNIT types for each
property as a table for use later.
+ * This would involve repeating the validation expressions present in
`LENGTH_UNIT:()` in `properties.gen` or perhaps reworking that bit too.
+ * This is probably an array, indexed by property, whose values are a
bitfield of permitted unit types.
+2. Implementing the cascade
+ * Mostly in the common code.
+ * Should be able to type-check here (property-specific part).
+ * In theory type-check could happen in the parser, but once `var()` gets
involved it'll have to be in the cascade, so we may as well put it here from
the start.
+3. Reworking the computed style to have a calc section
+ * By this, we mean that the computed styles should have a representation
which means "Use calculation N" in the current packed content, and then in the
less compact struct we can have calculation bytecode for each unique
calculation needed to support the style.
+ * Also consider how this impacts computed style internment / sharing.
+4. Rework API for computed styles to support client functions so that calc can
run
+ * This is were we implement doing the calculation.
+ * May need care in the case of invalid results in calc
+ * May permit simplification of things like percentage units.
+ * Maybe the context structure should carry simple values like available
width/height viewport width/height, etc. But have a callback for things like
relative font sizes etc.
+ * Probably change so all widths emerge from libcss in px.
+5. Write selection tests involving `calc()`
+ * Will involve fixing `dump_computed.h` to the new API
+
+
+After all that, NetSurf needs updating to the new API, which should simplify
the CSS client code in NetSurf quite a bit.
+
Next time
=========
--
NetSurf Developer Wiki Backing Store
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]