Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/43f8e77df7c36ceaa7b8851b779cf81661a686d3
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/43f8e77df7c36ceaa7b8851b779cf81661a686d3
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/43f8e77df7c36ceaa7b8851b779cf81661a686d3

The branch, master has been updated
       via  43f8e77df7c36ceaa7b8851b779cf81661a686d3 (commit)
      from  6a53b447e5726bc7d7b8405b1b1dd958c701b007 (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.git/commit/?id=43f8e77df7c36ceaa7b8851b779cf81661a686d3
commit 43f8e77df7c36ceaa7b8851b779cf81661a686d3
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    css/utils.c: Fix vw/vh handling in len2pt
    
    We were using integer multiplication rather than fixed-point
    multiplication when calculating point sizes relative to the viewport.
    
    This fixes that.
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/handlers/css/utils.c b/content/handlers/css/utils.c
index cac777c..cf48e89 100644
--- a/content/handlers/css/utils.c
+++ b/content/handlers/css/utils.c
@@ -117,8 +117,8 @@ css_fixed nscss_len2pt(
        case CSS_UNIT_PT: return length;
        /* 1pc = 12pt */
        case CSS_UNIT_PC: return FMUL(length, INTTOFIX(12));
-       case CSS_UNIT_VH: return FDIV(FMUL(FDIV((length * ctx->vh), F_100), 
F_72), F_96);
-       case CSS_UNIT_VW: return FDIV(FMUL(FDIV((length * ctx->vw), F_100), 
F_72), F_96);
+       case CSS_UNIT_VH: return FDIV(FMUL(FDIV(FMUL(length, ctx->vh), F_100), 
F_72), F_96);
+       case CSS_UNIT_VW: return FDIV(FMUL(FDIV(FMUL(length,ctx->vw), F_100), 
F_72), F_96);
        default: break;
        }
 


-----------------------------------------------------------------------

Summary of changes:
 content/handlers/css/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/content/handlers/css/utils.c b/content/handlers/css/utils.c
index cac777c..cf48e89 100644
--- a/content/handlers/css/utils.c
+++ b/content/handlers/css/utils.c
@@ -117,8 +117,8 @@ css_fixed nscss_len2pt(
        case CSS_UNIT_PT: return length;
        /* 1pc = 12pt */
        case CSS_UNIT_PC: return FMUL(length, INTTOFIX(12));
-       case CSS_UNIT_VH: return FDIV(FMUL(FDIV((length * ctx->vh), F_100), 
F_72), F_96);
-       case CSS_UNIT_VW: return FDIV(FMUL(FDIV((length * ctx->vw), F_100), 
F_72), F_96);
+       case CSS_UNIT_VH: return FDIV(FMUL(FDIV(FMUL(length, ctx->vh), F_100), 
F_72), F_96);
+       case CSS_UNIT_VW: return FDIV(FMUL(FDIV(FMUL(length,ctx->vw), F_100), 
F_72), F_96);
        default: break;
        }
 


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to