| Index: Source/core/inspector/InspectorCSSAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
|
| index 6eb982980782b86fd8c67b081a7cd12d87fb8ac4..ae9418a15a0a7335583068b20701750f93e56d5c 100644
|
| --- a/Source/core/inspector/InspectorCSSAgent.cpp
|
| +++ b/Source/core/inspector/InspectorCSSAgent.cpp
|
| @@ -683,14 +683,14 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int no
|
| // Matched rules.
|
| StyleResolver& styleResolver = ownerDocument->ensureStyleResolver();
|
|
|
| - RefPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, elementPseudoId, StyleResolver::AllCSSRules);
|
| + RefPtrWillBeRawPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, elementPseudoId, StyleResolver::AllCSSRules);
|
| matchedCSSRules = buildArrayForMatchedRuleList(matchedRules.get(), originalElement);
|
|
|
| // Pseudo elements.
|
| if (!elementPseudoId && (!includePseudo || *includePseudo)) {
|
| RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches> > pseudoElements = TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>::create();
|
| for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < AFTER_LAST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) {
|
| - RefPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
|
| + RefPtrWillBeRawPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
|
| if (matchedRules && matchedRules->length()) {
|
| RefPtr<TypeBuilder::CSS::PseudoIdMatches> matches = TypeBuilder::CSS::PseudoIdMatches::create()
|
| .setPseudoId(static_cast<int>(pseudoId))
|
| @@ -708,7 +708,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int no
|
| Element* parentElement = element->parentElement();
|
| while (parentElement) {
|
| StyleResolver& parentStyleResolver = parentElement->ownerDocument()->ensureStyleResolver();
|
| - RefPtr<CSSRuleList> parentMatchedRules = parentStyleResolver.cssRulesForElement(parentElement, StyleResolver::AllCSSRules);
|
| + RefPtrWillBeRawPtr<CSSRuleList> parentMatchedRules = parentStyleResolver.cssRulesForElement(parentElement, StyleResolver::AllCSSRules);
|
| RefPtr<TypeBuilder::CSS::InheritedStyleEntry> entry = TypeBuilder::CSS::InheritedStyleEntry::create()
|
| .setMatchedCSSRules(buildArrayForMatchedRuleList(parentMatchedRules.get(), parentElement));
|
| if (parentElement->style() && parentElement->style()->length()) {
|
| @@ -1084,8 +1084,8 @@ void InspectorCSSAgent::collectAllStyleSheets(Vector<InspectorStyleSheet*>& resu
|
|
|
| void InspectorCSSAgent::collectAllDocumentStyleSheets(Document* document, Vector<CSSStyleSheet*>& result)
|
| {
|
| - const Vector<RefPtr<StyleSheet> > activeStyleSheets = document->styleEngine()->activeStyleSheetsForInspector();
|
| - for (Vector<RefPtr<StyleSheet> >::const_iterator it = activeStyleSheets.begin(); it != activeStyleSheets.end(); ++it) {
|
| + const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> > activeStyleSheets = document->styleEngine()->activeStyleSheetsForInspector();
|
| + for (WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >::const_iterator it = activeStyleSheets.begin(); it != activeStyleSheets.end(); ++it) {
|
| StyleSheet* styleSheet = (*it).get();
|
| if (styleSheet->isCSSStyleSheet())
|
| collectStyleSheets(toCSSStyleSheet(styleSheet), result);
|
|
|