diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-06 17:14:58 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-06 17:14:58 +0100 |
commit | abdab90859a7299b2cf7eb6c3f6e68df9d17d1d7 (patch) | |
tree | c5d4f7f7281fc8cdcb7efb450739ab1ab0036cad | |
parent | e499f5c08f27b0fa738f784dbb91d8fc28d8ca01 (diff) | |
download | netsurf-abdab90859a7299b2cf7eb6c3f6e68df9d17d1d7.tar.gz netsurf-abdab90859a7299b2cf7eb6c3f6e68df9d17d1d7.tar.bz2 |
Presentational hints: Ensure length is initialised for auto margins.
Although the length is unused when margin is auto, having
uninitialised values present in a computed style means that
the style hashing may give the same style different hashes
depending on the unintitialised info.
The effect of this would have been be to reduce the chance
of computed style sharing. It would have had no effect on
page rendering.
-rw-r--r-- | content/handlers/css/hints.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c index a96212386..9fe9ffb12 100644 --- a/content/handlers/css/hints.c +++ b/content/handlers/css/hints.c @@ -882,6 +882,7 @@ static void css_hint_margin_left_right_align_center( corestring_dom_align, &attr); if (exc == DOM_NO_ERR && attr != NULL) { + memset(hint, 0, sizeof(*hint) * 2); if (dom_string_caseless_lwc_isequal(attr, corestring_lwc_center) || dom_string_caseless_lwc_isequal(attr, @@ -1022,6 +1023,7 @@ static void css_hint_margin_left_right_hr( corestring_dom_align, &attr); if (exc == DOM_NO_ERR && attr != NULL) { + memset(hint, 0, sizeof(*hint) * 2); if (dom_string_caseless_lwc_isequal(attr, corestring_lwc_left)) { hint->prop = CSS_PROP_MARGIN_LEFT; |