| Index: third_party/WebKit/Source/core/css/StyleRule.h
|
| diff --git a/third_party/WebKit/Source/core/css/StyleRule.h b/third_party/WebKit/Source/core/css/StyleRule.h
|
| index 1cfe952aee2ffaf2da6f2f76c598554c86f03136..d18c771877c488c43dd89595665cfa6a6bada66f 100644
|
| --- a/third_party/WebKit/Source/core/css/StyleRule.h
|
| +++ b/third_party/WebKit/Source/core/css/StyleRule.h
|
| @@ -99,11 +99,17 @@ class CORE_EXPORT StyleRule : public StyleRuleBase {
|
| StylePropertySet* properties) {
|
| return new StyleRule(std::move(selectorList), properties);
|
| }
|
| + static StyleRule* createLazy(
|
| + CSSSelectorList selectorList,
|
| + std::unique_ptr<DeferredPropertiesClosure> deferredProperties) {
|
| + return new StyleRule(std::move(selectorList),
|
| + std::move(deferredProperties));
|
| + }
|
|
|
| ~StyleRule();
|
|
|
| const CSSSelectorList& selectorList() const { return m_selectorList; }
|
| - const StylePropertySet& properties() const { return *m_properties; }
|
| + const StylePropertySet& properties() const;
|
| MutableStylePropertySet& mutableProperties();
|
|
|
| void wrapperAdoptSelectorList(CSSSelectorList selectors) {
|
| @@ -114,14 +120,20 @@ class CORE_EXPORT StyleRule : public StyleRuleBase {
|
|
|
| static unsigned averageSizeInBytes();
|
|
|
| + // Helper methods to avoid parsing lazy properties when not needed.
|
| + bool propertiesHaveFailedOrCanceledSubresources() const;
|
| + bool shouldConsiderForMatchingRules(bool includeEmptyRules) const;
|
| +
|
| DECLARE_TRACE_AFTER_DISPATCH();
|
|
|
| private:
|
| StyleRule(CSSSelectorList, StylePropertySet*);
|
| + StyleRule(CSSSelectorList, std::unique_ptr<DeferredPropertiesClosure>);
|
| StyleRule(const StyleRule&);
|
|
|
| - Member<StylePropertySet> m_properties; // Cannot be null.
|
| CSSSelectorList m_selectorList;
|
| + mutable Member<StylePropertySet> m_properties;
|
| + mutable std::unique_ptr<DeferredPropertiesClosure> m_deferred;
|
| };
|
|
|
| class StyleRuleFontFace : public StyleRuleBase {
|
|
|