| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |