| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 return false; | 3065 return false; |
| 3066 return UseCounter::isCounted(*document, | 3066 return UseCounter::isCounted(*document, |
| 3067 static_cast<UseCounter::Feature>(feature)); | 3067 static_cast<UseCounter::Feature>(feature)); |
| 3068 } | 3068 } |
| 3069 | 3069 |
| 3070 bool Internals::isCSSPropertyUseCounted(Document* document, | 3070 bool Internals::isCSSPropertyUseCounted(Document* document, |
| 3071 const String& propertyName) { | 3071 const String& propertyName) { |
| 3072 return UseCounter::isCounted(*document, propertyName); | 3072 return UseCounter::isCounted(*document, propertyName); |
| 3073 } | 3073 } |
| 3074 | 3074 |
| 3075 bool Internals::isAnimatedCSSPropertyUseCounted(Document* document, |
| 3076 const String& propertyName) { |
| 3077 return UseCounter::isCountedAnimatedCSS(*document, propertyName); |
| 3078 } |
| 3079 |
| 3075 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState, | 3080 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState, |
| 3076 Document* document, | 3081 Document* document, |
| 3077 uint32_t feature) { | 3082 uint32_t feature) { |
| 3078 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); | 3083 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
| 3079 ScriptPromise promise = resolver->promise(); | 3084 ScriptPromise promise = resolver->promise(); |
| 3080 if (feature >= UseCounter::NumberOfFeatures) { | 3085 if (feature >= UseCounter::NumberOfFeatures) { |
| 3081 resolver->reject(); | 3086 resolver->reject(); |
| 3082 return promise; | 3087 return promise; |
| 3083 } | 3088 } |
| 3084 | 3089 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3176 | 3181 |
| 3177 void Internals::crash() { | 3182 void Internals::crash() { |
| 3178 CHECK(false) << "Intentional crash"; | 3183 CHECK(false) << "Intentional crash"; |
| 3179 } | 3184 } |
| 3180 | 3185 |
| 3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3186 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3187 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3183 } | 3188 } |
| 3184 | 3189 |
| 3185 } // namespace blink | 3190 } // namespace blink |
| OLD | NEW |