https://drafts.csswg.org/css-scoping-1/#shadow-cascading "When comparing two declarations that have different tree contexts, then for normal rules the declaration earlier in the shadow-including tree order wins, and for important rules the declaration coming later in the shadow-including tree order wins."
<rdar://problem/26318781>
Created attachment 279109 [details] patch
Comment on attachment 279109 [details] patch Attachment 279109 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1335960 Number of test failures exceeded the failure limit.
Created attachment 279111 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 279118 [details] patch
Created attachment 279122 [details] patch
Comment on attachment 279122 [details] patch r=me
Comment on attachment 279122 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=279122&action=review > Source/WebCore/css/StyleResolver.cpp:2414 > +static bool hasImportantProperties(const StyleProperties& properties) > +{ > + for (unsigned i = 0, count = properties.propertyCount(); i < count; ++i) { > + if (properties.propertyAt(i).isImportant()) > + return true; > + } > + return false; > +} It seems a bit inefficient to call propertyAt just to find an important property. Can we add a new helper method on StyleProperty instead?
https://trac.webkit.org/r201073