| 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 f7098ecadac418056cfe9af359b134ddbb27045a..1394c876241ee6317a9965ed34a06b8b40f1b78c 100644
|
| --- a/third_party/WebKit/Source/core/css/StyleRule.h
|
| +++ b/third_party/WebKit/Source/core/css/StyleRule.h
|
| @@ -97,11 +97,15 @@ public:
|
| {
|
| 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) { m_selectorList = std::move(selectors); }
|
| @@ -110,14 +114,20 @@ public:
|
|
|
| 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 {
|
|
|