Bug 154242

Summary: Optimize style invalidations for attribute selectors
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: kling, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch
kling: review+
for landing
none
for landing none

Description Antti Koivisto 2016-02-15 06:25:27 PST
Currently we invalidate the whole element subtree if there are any attribute selectors for the changed attribute. We should only invalidate what is really needed.
Comment 1 Antti Koivisto 2016-02-15 08:45:48 PST
Created attachment 271344 [details]
patch
Comment 2 Radar WebKit Bug Importer 2016-02-15 08:46:01 PST
<rdar://problem/24655799>
Comment 3 Antti Koivisto 2016-02-15 09:25:35 PST
Created attachment 271345 [details]
patch
Comment 4 Andreas Kling 2016-02-15 12:08:28 PST
Comment on attachment 271345 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=271345&action=review

r=me
This is a really solid performance hack!

> Source/WebCore/style/AttributeChangeInvalidation.h:47
> +    using ClassChangeVector = Vector<AtomicStringImpl*, 4>;

why
Comment 5 Antti Koivisto 2016-02-15 12:47:48 PST
Created attachment 271360 [details]
for landing
Comment 6 Antti Koivisto 2016-02-15 12:57:08 PST
Created attachment 271361 [details]
for landing
Comment 7 Antti Koivisto 2016-02-16 00:21:33 PST
https://trac.webkit.org/r196629