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

Unified Diff: third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp

Issue 2671173002: Change CSSParserContext to have a Document handle (vs UseCounter). (Closed)
Patch Set: fix todo style Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSStyleSheet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
index 88cae61ce48c759a844bafe5a82910b0f8a098a8..f80fd37122b70ae8a87f947f367f92cfbab00d6a 100644
--- a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
+++ b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
@@ -173,8 +173,12 @@ CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const {
CSSKeyframeRule* CSSKeyframesRule::anonymousIndexedGetter(
unsigned index) const {
- if (UseCounter* useCounter = UseCounter::getFrom(parentStyleSheet()))
- useCounter->count(UseCounter::CSSKeyframesRuleAnonymousIndexedGetter);
+ const Document* parentDocument =
+ CSSStyleSheet::singleOwnerDocument(parentStyleSheet());
+ if (parentDocument) {
+ UseCounter::count(*parentDocument,
+ UseCounter::CSSKeyframesRuleAnonymousIndexedGetter);
+ }
return item(index);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSStyleSheet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698