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

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySet.h

Issue 2289333003: CSS Lazy Parsing perf jobs (Closed)
Patch Set: CL for src perf tryjob to run blink_style.top_25 benchmark on all-android platform(s) Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 m_isMutable(false), 148 m_isMutable(false),
149 m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize))) {} 149 m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize))) {}
150 150
151 unsigned m_cssParserMode : 3; 151 unsigned m_cssParserMode : 3;
152 mutable unsigned m_isMutable : 1; 152 mutable unsigned m_isMutable : 1;
153 unsigned m_arraySize : 28; 153 unsigned m_arraySize : 28;
154 154
155 friend class PropertySetCSSStyleDeclaration; 155 friend class PropertySetCSSStyleDeclaration;
156 }; 156 };
157 157
158 // Used for lazily parsing properties.
159 typedef Function<StylePropertySet*(), WTF::SameThreadAffinity>
160 DeferredPropertiesClosure;
161
158 class CORE_EXPORT ImmutableStylePropertySet : public StylePropertySet { 162 class CORE_EXPORT ImmutableStylePropertySet : public StylePropertySet {
159 public: 163 public:
160 ~ImmutableStylePropertySet(); 164 ~ImmutableStylePropertySet();
161 static ImmutableStylePropertySet* create(const CSSProperty* properties, 165 static ImmutableStylePropertySet* create(const CSSProperty* properties,
162 unsigned count, 166 unsigned count,
163 CSSParserMode); 167 CSSParserMode);
164 168
165 unsigned propertyCount() const { return m_arraySize; } 169 unsigned propertyCount() const { return m_arraySize; }
166 170
167 const Member<const CSSValue>* valueArray() const; 171 const Member<const CSSValue>* valueArray() const;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 template <typename T> 321 template <typename T>
318 inline int StylePropertySet::findPropertyIndex(T property) const { 322 inline int StylePropertySet::findPropertyIndex(T property) const {
319 if (m_isMutable) 323 if (m_isMutable)
320 return toMutableStylePropertySet(this)->findPropertyIndex(property); 324 return toMutableStylePropertySet(this)->findPropertyIndex(property);
321 return toImmutableStylePropertySet(this)->findPropertyIndex(property); 325 return toImmutableStylePropertySet(this)->findPropertyIndex(property);
322 } 326 }
323 327
324 } // namespace blink 328 } // namespace blink
325 329
326 #endif // StylePropertySet_h 330 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/ElementRuleCollector.cpp ('k') | third_party/WebKit/Source/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698