Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: Source/core/css/StylePropertySet.h

Issue 169453006: Optimize StylePropertySet::findPropertyIndex() to improve CSS properties performance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StylePropertySet.h
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h
index 73e7bf578498707567e21a631032a7e107430de3..46c89909512a44553ada28d105130bca62625208 100644
--- a/Source/core/css/StylePropertySet.h
+++ b/Source/core/css/StylePropertySet.h
@@ -149,6 +149,7 @@ public:
const CSSValue** valueArray() const;
const StylePropertyMetadata* metadataArray() const;
+ int findPropertyIndex(CSSPropertyID) const;
void* m_storage;
@@ -208,6 +209,7 @@ public:
void parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet);
CSSStyleDeclaration* ensureCSSStyleDeclaration();
+ int findPropertyIndex(CSSPropertyID) const;
Vector<CSSProperty, 4> m_propertyVector;
@@ -267,6 +269,13 @@ inline void StylePropertySet::deref()
delete toImmutableStylePropertySet(this);
}
+inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
+{
+ if (m_isMutable)
+ return toMutableStylePropertySet(this)->findPropertyIndex(propertyID);
+ return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID);
+}
+
} // namespace WebCore
#endif // StylePropertySet_h
« no previous file with comments | « no previous file | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698