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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 1514583004: Clean up CSSParserContext arguments in property parsing code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('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) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 953
954 case MediaStreamTrackGetSources: 954 case MediaStreamTrackGetSources:
955 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom estatus.com/feature/4765305641369600 for more details."; 955 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom estatus.com/feature/4765305641369600 for more details.";
956 956
957 // Features that aren't deprecated don't have a deprecation message. 957 // Features that aren't deprecated don't have a deprecation message.
958 default: 958 default:
959 return String(); 959 return String();
960 } 960 }
961 } 961 }
962 962
963 void UseCounter::count(CSSParserContext context, CSSPropertyID feature) 963 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID feature)
964 { 964 {
965 ASSERT(feature >= firstCSSProperty); 965 ASSERT(feature >= firstCSSProperty);
966 ASSERT(feature <= lastUnresolvedCSSProperty); 966 ASSERT(feature <= lastUnresolvedCSSProperty);
967 967
968 if (!isUseCounterEnabledForMode(context.mode())) 968 if (!isUseCounterEnabledForMode(cssParserMode))
969 return; 969 return;
970 970
971 m_CSSFeatureBits.quickSet(feature); 971 m_CSSFeatureBits.quickSet(feature);
972 } 972 }
973 973
974 void UseCounter::count(Feature feature) 974 void UseCounter::count(Feature feature)
975 { 975 {
976 ASSERT(deprecationMessage(feature).isEmpty()); 976 ASSERT(deprecationMessage(feature).isEmpty());
977 recordMeasurement(feature); 977 recordMeasurement(feature);
978 } 978 }
(...skipping 15 matching lines...) Expand all
994 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) 994 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents)
995 { 995 {
996 // FIXME: We may want to handle stylesheets that have multiple owners 996 // FIXME: We may want to handle stylesheets that have multiple owners
997 // https://crbug.com/242125 997 // https://crbug.com/242125
998 if (sheetContents && sheetContents->hasSingleOwnerNode()) 998 if (sheetContents && sheetContents->hasSingleOwnerNode())
999 return getFrom(sheetContents->singleOwnerDocument()); 999 return getFrom(sheetContents->singleOwnerDocument());
1000 return 0; 1000 return 0;
1001 } 1001 }
1002 1002
1003 } // namespace blink 1003 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698