There is no need to invalidate element style on class attribute change if neither the added or removed classes featured in any active stylesheet.
Created attachment 171495 [details] patch
Comment on attachment 171495 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=171495&action=review Cool idea! r- for causing unnecessary conversions from immutable to mutable attribute data, rest looks good. > Source/WebCore/css/RuleFeature.cpp:46 > + end = other.classesInRules.end(); > + for (HashSet<AtomicStringImpl*>::iterator it = other.classesInRules.begin(); it != end; ++it) > + classesInRules.add(*it); Looks like we could be using const_iterators in this function. > Source/WebCore/dom/Element.cpp:786 > + SpaceSplitString oldClasses = mutableAttributeData()->classNames(); This will force promotion from ImmutableElementAttributeData to MutableElementAttributeData for all elements with a class attribute the first time they're parsed. > Source/WebCore/dom/SpaceSplitString.cpp:122 > + // FIXME: add() does not allow duplicates but createVector() does. Huh.
Created attachment 171509 [details] another try
http://trac.webkit.org/changeset/132941