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.
This commit is contained in:
Michael Drake 2017-04-06 17:14:58 +01:00
parent e499f5c08f
commit abdab90859

View File

@ -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;