diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2016-11-20 13:39:32 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-11-20 13:39:32 +0000 |
commit | 8e7e0412adc25060e70aa84ebbd43b37c9cc710b (patch) | |
tree | a5ae78f8745eb63e51d4d7d7464b02089141fc47 /src/select | |
parent | d986c1c356aba25bdf0b977133b387fbdad5aa90 (diff) | |
download | libcss-8e7e0412adc25060e70aa84ebbd43b37c9cc710b.tar.gz libcss-8e7e0412adc25060e70aa84ebbd43b37c9cc710b.tar.bz2 |
Selection: Try all previous sibling nodes for sharable styles.
Previously we would only consider the first candidate.
Diffstat (limited to 'src/select')
-rw-r--r-- | src/select/select.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/select/select.c b/src/select/select.c index e46134c..8488b74 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -964,14 +964,15 @@ printf(" \t%s\tno share: node id (%s)\n", lwc_string_data(state->element.na type, sharable_node_data); if (error != CSS_OK) { return error; - } else { - if (sharable_node_data == NULL) { - /* Can't share with this; look for another */ - continue; - } else { - break; - } } + + if (*sharable_node_data != NULL) { + /* Found style date we can share */ + break; + } + + /* Can't share with this; look for another */ + node = share_candidate_node; } return CSS_OK; |