We can reduce the amount of is<MutableStyleProperties>() checks in StyleProperties by removing the checks in each method of StyleProperties::PropertyReference, and replace them by a single check in StyleProperties::propertyAt(). We can also provide faster propertyCount() / propertyAt() / isEmpty() methods on MutableStyleProperties / ImmutableStyleProperties as a lot of callers use tight typing.
Created attachment 240290 [details] Patch
Comment on attachment 240290 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240290&action=review r=me! > Source/WebCore/css/StyleProperties.cpp:114 > + for (unsigned i = 0; i < immutableOther.propertyCount(); ++i) I'd cache the propertyCount() in a local.
Comment on attachment 240290 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240290&action=review >> Source/WebCore/css/StyleProperties.cpp:114 >> + for (unsigned i = 0; i < immutableOther.propertyCount(); ++i) > > I'd cache the propertyCount() in a local. In this case, I don't think there is a performance impact as it is inlined but OK, it is good practice.
Created attachment 240292 [details] Patch
Comment on attachment 240292 [details] Patch Clearing flags on attachment: 240292 Committed r175067: <http://trac.webkit.org/changeset/175067>
All reviewed patches have been landed. Closing bug.