mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 22:09:43 +03:00
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:
parent
e499f5c08f
commit
abdab90859
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user