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

Side by Side Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 1260403002: Oilpan: Remove raw pointer to LocalFrame from MediaValuesDynamic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScannerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 const WillBeHeapVector<OwnPtrWillBeMember<MediaQuery> >& queryVector = queri es->queryVector(); 1056 const WillBeHeapVector<OwnPtrWillBeMember<MediaQuery> >& queryVector = queri es->queryVector();
1057 LocalFrame* frame = nullptr; 1057 LocalFrame* frame = nullptr;
1058 if (parentStyleSheet) { 1058 if (parentStyleSheet) {
1059 if (Document* document = parentStyleSheet->ownerDocument()) 1059 if (Document* document = parentStyleSheet->ownerDocument())
1060 frame = document->frame(); 1060 frame = document->frame();
1061 } 1061 }
1062 OwnPtr<MediaQueryEvaluator> mediaEvaluator = adoptPtr(new MediaQueryEvaluato r(frame)); 1062 OwnPtr<MediaQueryEvaluator> mediaEvaluator = adoptPtr(new MediaQueryEvaluato r(frame));
1063 1063
1064 InspectorStyleSheet* inspectorStyleSheet = parentStyleSheet ? m_cssStyleShee tToInspectorStyleSheet.get(parentStyleSheet) : nullptr; 1064 InspectorStyleSheet* inspectorStyleSheet = parentStyleSheet ? m_cssStyleShee tToInspectorStyleSheet.get(parentStyleSheet) : nullptr;
1065 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::MediaQuery> > mediaListArray = T ypeBuilder::Array<TypeBuilder::CSS::MediaQuery>::create(); 1065 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::MediaQuery> > mediaListArray = T ypeBuilder::Array<TypeBuilder::CSS::MediaQuery>::create();
1066 RefPtr<MediaValues> mediaValues = MediaValues::createDynamicIfFrameExists(fr ame); 1066 RefPtrWillBeRawPtr<MediaValues> mediaValues = MediaValues::createDynamicIfFr ameExists(frame);
1067 bool hasMediaQueryItems = false; 1067 bool hasMediaQueryItems = false;
1068 for (size_t i = 0; i < queryVector.size(); ++i) { 1068 for (size_t i = 0; i < queryVector.size(); ++i) {
1069 MediaQuery* query = queryVector.at(i).get(); 1069 MediaQuery* query = queryVector.at(i).get();
1070 const ExpressionHeapVector& expressions = query->expressions(); 1070 const ExpressionHeapVector& expressions = query->expressions();
1071 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::MediaQueryExpression> > expr essionArray = TypeBuilder::Array<TypeBuilder::CSS::MediaQueryExpression>::create (); 1071 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::MediaQueryExpression> > expr essionArray = TypeBuilder::Array<TypeBuilder::CSS::MediaQueryExpression>::create ();
1072 bool hasExpressionItems = false; 1072 bool hasExpressionItems = false;
1073 for (size_t j = 0; j < expressions.size(); ++j) { 1073 for (size_t j = 0; j < expressions.size(); ++j) {
1074 MediaQueryExp* mediaQueryExp = expressions.at(j).get(); 1074 MediaQueryExp* mediaQueryExp = expressions.at(j).get();
1075 MediaQueryExpValue expValue = mediaQueryExp->expValue(); 1075 MediaQueryExpValue expValue = mediaQueryExp->expValue();
1076 if (!expValue.isValue) 1076 if (!expValue.isValue)
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 visitor->trace(m_documentToCSSStyleSheets); 1672 visitor->trace(m_documentToCSSStyleSheets);
1673 visitor->trace(m_invalidatedDocuments); 1673 visitor->trace(m_invalidatedDocuments);
1674 visitor->trace(m_nodeToInspectorStyleSheet); 1674 visitor->trace(m_nodeToInspectorStyleSheet);
1675 visitor->trace(m_documentToViaInspectorStyleSheet); 1675 visitor->trace(m_documentToViaInspectorStyleSheet);
1676 #endif 1676 #endif
1677 visitor->trace(m_inspectorUserAgentStyleSheet); 1677 visitor->trace(m_inspectorUserAgentStyleSheet);
1678 InspectorBaseAgent::trace(visitor); 1678 InspectorBaseAgent::trace(visitor);
1679 } 1679 }
1680 1680
1681 } // namespace blink 1681 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScannerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698