OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/frame/Deprecation.h" | 5 #include "core/frame/Deprecation.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
9 #include "core/frame/FrameConsole.h" | 9 #include "core/frame/FrameConsole.h" |
10 #include "core/frame/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 String willBeRemoved(const char* feature, int milestone, const char* details) | 48 String willBeRemoved(const char* feature, int milestone, const char* details) |
49 { | 49 { |
50 return String::format("%s is deprecated and will be removed in %s. See https
://www.chromestatus.com/features/%s for more details.", feature, milestoneString
(milestone), details); | 50 return String::format("%s is deprecated and will be removed in %s. See https
://www.chromestatus.com/features/%s for more details.", feature, milestoneString
(milestone), details); |
51 } | 51 } |
52 | 52 |
53 String dopplerWillBeRemoved(const char* feature, int milestone, const char* deta
ils) | 53 String dopplerWillBeRemoved(const char* feature, int milestone, const char* deta
ils) |
54 { | 54 { |
55 return String::format("%s is deprecated and will be removed in %s. It has no
effect as the Web Audio doppler effects have already been removed internally. S
ee https://www.chromestatus.com/features/%s for more details.", feature, milesto
neString(milestone), details); | 55 return String::format("%s is deprecated and will be removed in %s. It has no
effect as the Web Audio doppler effects have already been removed internally. S
ee https://www.chromestatus.com/features/%s for more details.", feature, milesto
neString(milestone), details); |
56 } | 56 } |
57 | 57 |
58 String replacedWillBeRemoved(const char* feature, const char* replacement, int m
ilestone, const char* details) | |
59 { | |
60 return String::format("%s is deprecated and will be removed in %s. Please us
e %s instead. See https://www.chromestatus.com/features/%s for more details.", f
eature, milestoneString(milestone), replacement, details); | |
61 } | |
62 | |
63 } // anonymous namespace | 58 } // anonymous namespace |
64 | 59 |
65 namespace blink { | 60 namespace blink { |
66 | 61 |
67 Deprecation::Deprecation() | 62 Deprecation::Deprecation() |
68 : m_muteCount(0) | 63 : m_muteCount(0) |
69 { | 64 { |
70 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); | 65 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); |
71 } | 66 } |
72 | 67 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 339 |
345 case UseCounter::MediaStreamTrackGetSources: | 340 case UseCounter::MediaStreamTrackGetSources: |
346 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom
estatus.com/feature/4765305641369600 for more details."; | 341 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom
estatus.com/feature/4765305641369600 for more details."; |
347 | 342 |
348 case UseCounter::WebAnimationHyphenatedProperty: | 343 case UseCounter::WebAnimationHyphenatedProperty: |
349 return "Hyphenated property names in Web Animations keyframes are invali
d and therefore ignored. Please use camelCase instead."; | 344 return "Hyphenated property names in Web Animations keyframes are invali
d and therefore ignored. Please use camelCase instead."; |
350 | 345 |
351 case UseCounter::HTMLKeygenElement: | 346 case UseCounter::HTMLKeygenElement: |
352 return willBeRemoved("The <keygen> element", 56, "5716060992962560"); | 347 return willBeRemoved("The <keygen> element", 56, "5716060992962560"); |
353 | 348 |
354 case UseCounter::WindowPostMessageWithLegacyTargetOriginArgument: | |
355 return replacedWillBeRemoved("'window.postMessage(message, transferables
, targetOrigin)'", "'window.postMessage(message, targetOrigin, transferables)'",
54, "5719033043222528"); | |
356 | |
357 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: | 349 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: |
358 return String::format("EME requires that contentType strings accepted by
requestMediaKeySystemAccess() include codecs. Non-standard support for contentT
ype strings without codecs will be removed in %s. Please specify the desired cod
ec(s) as part of the contentType.", milestoneString(56)); | 350 return String::format("EME requires that contentType strings accepted by
requestMediaKeySystemAccess() include codecs. Non-standard support for contentT
ype strings without codecs will be removed in %s. Please specify the desired cod
ec(s) as part of the contentType.", milestoneString(56)); |
359 | 351 |
360 case UseCounter::UntrustedEventDefaultHandled: | 352 case UseCounter::UntrustedEventDefaultHandled: |
361 return String::format("A DOM event generated from JavaScript has trigger
ed a default action inside the browser. This behavior is non-standard and will b
e removed in %s. See https://www.chromestatus.com/features/5718803933560832 for
more details.", milestoneString(53)); | 353 return String::format("A DOM event generated from JavaScript has trigger
ed a default action inside the browser. This behavior is non-standard and will b
e removed in %s. See https://www.chromestatus.com/features/5718803933560832 for
more details.", milestoneString(53)); |
362 | 354 |
363 case UseCounter::TouchStartUserGestureUtilized: | 355 case UseCounter::TouchStartUserGestureUtilized: |
364 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchstart events", 55, "5649871251963904"); | 356 return willBeRemoved("Performing operations that require explicit user i
nteraction on touchstart events", 55, "5649871251963904"); |
365 | 357 |
366 case UseCounter::TouchMoveUserGestureUtilized: | 358 case UseCounter::TouchMoveUserGestureUtilized: |
(...skipping 17 matching lines...) Expand all Loading... |
384 case UseCounter::NavigatorPointerEnabled: | 376 case UseCounter::NavigatorPointerEnabled: |
385 return "Navigator.pointerEnabled is a non-standard API added for experim
ents only. It will be removed in near future."; | 377 return "Navigator.pointerEnabled is a non-standard API added for experim
ents only. It will be removed in near future."; |
386 | 378 |
387 // Features that aren't deprecated don't have a deprecation message. | 379 // Features that aren't deprecated don't have a deprecation message. |
388 default: | 380 default: |
389 return String(); | 381 return String(); |
390 } | 382 } |
391 } | 383 } |
392 | 384 |
393 } // namespace blink | 385 } // namespace blink |
OLD | NEW |