Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
index dd1ec1e8d8c81e2fb8b27cf5a7c3c0f4fc475fc0..a6610a0272c12f7eff39a30335f7c19bd5466f1b 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
@@ -163,6 +163,27 @@ StyleResolver::~StyleResolver() |
{ |
} |
+#if ENABLE(OILPAN) |
+void StyleResolver::dispose() |
+{ |
+ m_features.clear(); |
+ if (m_siblingRuleSet) { |
+ m_siblingRuleSet->dispose(); |
+ m_siblingRuleSet.clear(); |
+ } |
+ if (m_uncommonAttributeRuleSet) { |
+ m_uncommonAttributeRuleSet->dispose(); |
+ m_uncommonAttributeRuleSet.clear(); |
+ } |
+ m_styleSharingLists.clear(); |
+ if (m_watchedSelectorsRules) { |
+ m_watchedSelectorsRules->dispose(); |
+ m_watchedSelectorsRules.clear(); |
+ } |
+ m_pendingStyleSheets.clear(); |
+} |
+#endif |
+ |
void StyleResolver::initWatchedSelectorRules() |
{ |
CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*m_document); |
@@ -1461,8 +1482,8 @@ void StyleResolver::computeFont(ComputedStyle* style, const StylePropertySet& pr |
void StyleResolver::addMediaQueryResults(const MediaQueryResultList& list) |
{ |
- for (size_t i = 0; i < list.size(); ++i) |
- m_viewportDependentMediaQueryResults.append(list[i]); |
+ if (list.size()) |
+ m_viewportDependentMediaQueryResults.appendVector(list); |
} |
bool StyleResolver::mediaQueryAffectedByViewportChange() const |