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

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

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compilation on gcc and msvc Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSValuePool.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | 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) 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 } 212 }
213 return result; 213 return result;
214 } 214 }
215 215
216 void ElementRuleCollector::appendCSSOMWrapperForRule(CSSStyleSheet* parentStyleS heet, StyleRule* rule) 216 void ElementRuleCollector::appendCSSOMWrapperForRule(CSSStyleSheet* parentStyleS heet, StyleRule* rule)
217 { 217 {
218 // |parentStyleSheet| is 0 if and only if the |rule| is coming from User Age nt. In this case, 218 // |parentStyleSheet| is 0 if and only if the |rule| is coming from User Age nt. In this case,
219 // it is safe to create CSSOM wrappers without parentStyleSheets as they wil l be used only 219 // it is safe to create CSSOM wrappers without parentStyleSheets as they wil l be used only
220 // by inspector which will not try to edit them. 220 // by inspector which will not try to edit them.
221 RefPtrWillBeRawPtr<CSSRule> cssRule; 221 RefPtrWillBeRawPtr<CSSRule> cssRule = nullptr;
222 if (parentStyleSheet) 222 if (parentStyleSheet)
223 cssRule = findStyleRule(parentStyleSheet, rule); 223 cssRule = findStyleRule(parentStyleSheet, rule);
224 else 224 else
225 cssRule = rule->createCSSOMWrapper(); 225 cssRule = rule->createCSSOMWrapper();
226 ASSERT(!parentStyleSheet || cssRule); 226 ASSERT(!parentStyleSheet || cssRule);
227 ensureRuleList()->rules().append(cssRule); 227 ensureRuleList()->rules().append(cssRule);
228 } 228 }
229 229
230 void ElementRuleCollector::sortAndTransferMatchedRules() 230 void ElementRuleCollector::sortAndTransferMatchedRules()
231 { 231 {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // information about "scope". 365 // information about "scope".
366 int firstRuleIndex = -1, lastRuleIndex = -1; 366 int firstRuleIndex = -1, lastRuleIndex = -1;
367 RuleRange ruleRange(firstRuleIndex, lastRuleIndex); 367 RuleRange ruleRange(firstRuleIndex, lastRuleIndex);
368 // FIXME: Verify whether it's ok to ignore CascadeScope here. 368 // FIXME: Verify whether it's ok to ignore CascadeScope here.
369 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Stay sWithinTreeScope); 369 collectMatchingRules(MatchRequest(ruleSet), ruleRange, SelectorChecker::Stay sWithinTreeScope);
370 370
371 return m_matchedRules && !m_matchedRules->isEmpty(); 371 return m_matchedRules && !m_matchedRules->isEmpty();
372 } 372 }
373 373
374 } // namespace WebCore 374 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSValuePool.cpp ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698