diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2015-08-22 11:33:23 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-11-19 14:30:07 +0000 |
commit | ba1261ab3f03a9e40f0f1be44a1a992e258662fc (patch) | |
tree | 0ed70c8847dc32aa87f9bb24e0b4f5f03f1e7a29 /src/select | |
parent | c953724a1a4bcaf03fc33a9f3bef8b864cb865d0 (diff) | |
download | libcss-ba1261ab3f03a9e40f0f1be44a1a992e258662fc.tar.gz libcss-ba1261ab3f03a9e40f0f1be44a1a992e258662fc.tar.bz2 |
Composition: Avoid extension block checks irrelevent to property group.
Diffstat (limited to 'src/select')
-rw-r--r-- | src/select/computed.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/select/computed.c b/src/select/computed.c index 182a7e7..107c884 100644 --- a/src/select/computed.c +++ b/src/select/computed.c @@ -296,20 +296,24 @@ css_error css_computed_style_compose(const css_computed_style *parent, /* Iterate through the properties */ for (i = 0; i < CSS_N_PROPERTIES; i++) { - /* Skip any in extension blocks if the block does not exist */ - if (prop_dispatch[i].group == GROUP_UNCOMMON && - parent->i.uncommon == NULL && - child->i.uncommon == NULL) - continue; - - if (prop_dispatch[i].group == GROUP_PAGE && - parent->page == NULL && child->page == NULL) - continue; - - if (prop_dispatch[i].group == GROUP_AURAL && - parent->i.aural == NULL && - child->i.aural == NULL) - continue; + /* Skip any in extension blocks if the block does not exist */ + switch(prop_dispatch[i].group) { + case GROUP_NORMAL: + break; + case GROUP_UNCOMMON: + if (parent->i.uncommon == NULL && + child->i.uncommon == NULL) + continue; + break; + case GROUP_PAGE: + if (parent->page == NULL && child->page == NULL) + continue; + break; + case GROUP_AURAL: + if (parent->i.aural == NULL && child->i.aural == NULL) + continue; + break; + } /* Compose the property */ error = prop_dispatch[i].compose(parent, child, *result); |