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

Side by Side Diff: third_party/WebKit/Source/core/css/ElementRuleCollector.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 ElementRuleCollector::~ElementRuleCollector() 62 ElementRuleCollector::~ElementRuleCollector()
63 { 63 {
64 } 64 }
65 65
66 const MatchResult& ElementRuleCollector::matchedResult() const 66 const MatchResult& ElementRuleCollector::matchedResult() const
67 { 67 {
68 return m_result; 68 return m_result;
69 } 69 }
70 70
71 RawPtr<StyleRuleList> ElementRuleCollector::matchedStyleRuleList() 71 StyleRuleList* ElementRuleCollector::matchedStyleRuleList()
72 { 72 {
73 ASSERT(m_mode == SelectorChecker::CollectingStyleRules); 73 ASSERT(m_mode == SelectorChecker::CollectingStyleRules);
74 return m_styleRuleList.release(); 74 return m_styleRuleList.release();
75 } 75 }
76 76
77 RawPtr<CSSRuleList> ElementRuleCollector::matchedCSSRuleList() 77 CSSRuleList* ElementRuleCollector::matchedCSSRuleList()
78 { 78 {
79 ASSERT(m_mode == SelectorChecker::CollectingCSSRules); 79 ASSERT(m_mode == SelectorChecker::CollectingCSSRules);
80 return m_cssRuleList.release(); 80 return m_cssRuleList.release();
81 } 81 }
82 82
83 void ElementRuleCollector::clearMatchedRules() 83 void ElementRuleCollector::clearMatchedRules()
84 { 84 {
85 m_matchedRules.clear(); 85 m_matchedRules.clear();
86 } 86 }
87 87
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 } 248 }
249 return result; 249 return result;
250 } 250 }
251 251
252 void ElementRuleCollector::appendCSSOMWrapperForRule(CSSStyleSheet* parentStyleS heet, StyleRule* rule) 252 void ElementRuleCollector::appendCSSOMWrapperForRule(CSSStyleSheet* parentStyleS heet, StyleRule* rule)
253 { 253 {
254 // |parentStyleSheet| is 0 if and only if the |rule| is coming from User Age nt. In this case, 254 // |parentStyleSheet| is 0 if and only if the |rule| is coming from User Age nt. In this case,
255 // it is safe to create CSSOM wrappers without parentStyleSheets as they wil l be used only 255 // it is safe to create CSSOM wrappers without parentStyleSheets as they wil l be used only
256 // by inspector which will not try to edit them. 256 // by inspector which will not try to edit them.
257 RawPtr<CSSRule> cssRule = nullptr; 257 CSSRule* cssRule = nullptr;
258 if (parentStyleSheet) 258 if (parentStyleSheet)
259 cssRule = findStyleRule(parentStyleSheet, rule); 259 cssRule = findStyleRule(parentStyleSheet, rule);
260 else 260 else
261 cssRule = rule->createCSSOMWrapper(); 261 cssRule = rule->createCSSOMWrapper();
262 ASSERT(!parentStyleSheet || cssRule); 262 ASSERT(!parentStyleSheet || cssRule);
263 ensureRuleList()->rules().append(cssRule); 263 ensureRuleList()->rules().append(cssRule);
264 } 264 }
265 265
266 void ElementRuleCollector::sortAndTransferMatchedRules() 266 void ElementRuleCollector::sortAndTransferMatchedRules()
267 { 267 {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // should not see the element's treescope. Because RuleSet has no 335 // should not see the element's treescope. Because RuleSet has no
336 // information about "scope". 336 // information about "scope".
337 MatchRequest matchRequest(ruleSet); 337 MatchRequest matchRequest(ruleSet);
338 collectMatchingRules(matchRequest); 338 collectMatchingRules(matchRequest);
339 collectMatchingShadowHostRules(matchRequest); 339 collectMatchingShadowHostRules(matchRequest);
340 340
341 return !m_matchedRules.isEmpty(); 341 return !m_matchedRules.isEmpty();
342 } 342 }
343 343
344 } // namespace blink 344 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/ElementRuleCollector.h ('k') | third_party/WebKit/Source/core/css/FontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698