| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 String willBeRemoved(const char* feature, | 51 String willBeRemoved(const char* feature, |
| 52 Milestone milestone, | 52 Milestone milestone, |
| 53 const char* details) { | 53 const char* details) { |
| 54 return String::format( | 54 return String::format( |
| 55 "%s is deprecated and will be removed in %s. See " | 55 "%s is deprecated and will be removed in %s. See " |
| 56 "https://www.chromestatus.com/features/%s for more details.", | 56 "https://www.chromestatus.com/features/%s for more details.", |
| 57 feature, milestoneString(milestone), details); | 57 feature, milestoneString(milestone), details); |
| 58 } | 58 } |
| 59 | 59 |
| 60 String dopplerWillBeRemoved(const char* feature, | |
| 61 Milestone milestone, | |
| 62 const char* details) { | |
| 63 return String::format( | |
| 64 "%s is deprecated and will be removed in %s. It has no effect as the Web " | |
| 65 "Audio doppler effects have already been removed internally. See " | |
| 66 "https://www.chromestatus.com/features/%s for more details.", | |
| 67 feature, milestoneString(milestone), details); | |
| 68 } | |
| 69 | |
| 70 } // anonymous namespace | 60 } // anonymous namespace |
| 71 | 61 |
| 72 namespace blink { | 62 namespace blink { |
| 73 | 63 |
| 74 Deprecation::Deprecation() : m_muteCount(0) { | 64 Deprecation::Deprecation() : m_muteCount(0) { |
| 75 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); | 65 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); |
| 76 } | 66 } |
| 77 | 67 |
| 78 Deprecation::~Deprecation() {} | 68 Deprecation::~Deprecation() {} |
| 79 | 69 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 278 |
| 289 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: | 279 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: |
| 290 return "Synchronous XMLHttpRequest on the main thread is deprecated " | 280 return "Synchronous XMLHttpRequest on the main thread is deprecated " |
| 291 "because of its detrimental effects to the end user's experience. " | 281 "because of its detrimental effects to the end user's experience. " |
| 292 "For more help, check https://xhr.spec.whatwg.org/."; | 282 "For more help, check https://xhr.spec.whatwg.org/."; |
| 293 | 283 |
| 294 case UseCounter::GetMatchedCSSRules: | 284 case UseCounter::GetMatchedCSSRules: |
| 295 return "'getMatchedCSSRules()' is deprecated. For more help, check " | 285 return "'getMatchedCSSRules()' is deprecated. For more help, check " |
| 296 "https://code.google.com/p/chromium/issues/detail?id=437569#c2"; | 286 "https://code.google.com/p/chromium/issues/detail?id=437569#c2"; |
| 297 | 287 |
| 298 case UseCounter::AudioListenerDopplerFactor: | |
| 299 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", M55, | |
| 300 "5238926818148352"); | |
| 301 | |
| 302 case UseCounter::AudioListenerSpeedOfSound: | |
| 303 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", M55, | |
| 304 "5238926818148352"); | |
| 305 | |
| 306 case UseCounter::AudioListenerSetVelocity: | |
| 307 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", M55, | |
| 308 "5238926818148352"); | |
| 309 | |
| 310 case UseCounter::PannerNodeSetVelocity: | |
| 311 return dopplerWillBeRemoved("'PannerNode.setVelocity()'", M55, | |
| 312 "5238926818148352"); | |
| 313 | |
| 314 case UseCounter::PrefixedWindowURL: | 288 case UseCounter::PrefixedWindowURL: |
| 315 return replacedBy("'webkitURL'", "'URL'"); | 289 return replacedBy("'webkitURL'", "'URL'"); |
| 316 | 290 |
| 317 case UseCounter::PrefixedAudioContext: | 291 case UseCounter::PrefixedAudioContext: |
| 318 return replacedBy("'webkitAudioContext'", "'AudioContext'"); | 292 return replacedBy("'webkitAudioContext'", "'AudioContext'"); |
| 319 | 293 |
| 320 case UseCounter::PrefixedOfflineAudioContext: | 294 case UseCounter::PrefixedOfflineAudioContext: |
| 321 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); | 295 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"); |
| 322 | 296 |
| 323 case UseCounter::RangeExpand: | 297 case UseCounter::RangeExpand: |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 case UseCounter::PaymentAddressCareOf: | 460 case UseCounter::PaymentAddressCareOf: |
| 487 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); | 461 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); |
| 488 | 462 |
| 489 // Features that aren't deprecated don't have a deprecation message. | 463 // Features that aren't deprecated don't have a deprecation message. |
| 490 default: | 464 default: |
| 491 return String(); | 465 return String(); |
| 492 } | 466 } |
| 493 } | 467 } |
| 494 | 468 |
| 495 } // namespace blink | 469 } // namespace blink |
| OLD | NEW |