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

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

Issue 2101143005: 0 -> nullptr for UseCounter pointer in CSSParserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 5 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 ASSERT(!selectorTextCache().contains(this)); 78 ASSERT(!selectorTextCache().contains(this));
79 String text = generateSelectorText(); 79 String text = generateSelectorText();
80 selectorTextCache().set(this, text); 80 selectorTextCache().set(this, text);
81 setHasCachedSelectorText(true); 81 setHasCachedSelectorText(true);
82 return text; 82 return text;
83 } 83 }
84 84
85 void CSSStyleRule::setSelectorText(const String& selectorText) 85 void CSSStyleRule::setSelectorText(const String& selectorText)
86 { 86 {
87 CSSParserContext context(parserContext(), 0); 87 CSSParserContext context(parserContext(), nullptr);
88 CSSSelectorList selectorList = CSSParser::parseSelector(context, parentStyle Sheet() ? parentStyleSheet()->contents() : nullptr, selectorText); 88 CSSSelectorList selectorList = CSSParser::parseSelector(context, parentStyle Sheet() ? parentStyleSheet()->contents() : nullptr, selectorText);
89 if (!selectorList.isValid()) 89 if (!selectorList.isValid())
90 return; 90 return;
91 91
92 CSSStyleSheet::RuleMutationScope mutationScope(this); 92 CSSStyleSheet::RuleMutationScope mutationScope(this);
93 93
94 m_styleRule->wrapperAdoptSelectorList(std::move(selectorList)); 94 m_styleRule->wrapperAdoptSelectorList(std::move(selectorList));
95 95
96 if (hasCachedSelectorText()) { 96 if (hasCachedSelectorText()) {
97 selectorTextCache().remove(this); 97 selectorTextCache().remove(this);
(...skipping 30 matching lines...) Expand all
128 } 128 }
129 129
130 DEFINE_TRACE_WRAPPERS(CSSStyleRule) 130 DEFINE_TRACE_WRAPPERS(CSSStyleRule)
131 { 131 {
132 visitor->traceWrappers(parentRule()); 132 visitor->traceWrappers(parentRule());
133 visitor->traceWrappers(parentStyleSheet()); 133 visitor->traceWrappers(parentStyleSheet());
134 CSSRule::traceWrappers(visitor); 134 CSSRule::traceWrappers(visitor);
135 } 135 }
136 136
137 } // namespace blink 137 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPageRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698