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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 String replacedBy(const char* feature, const char* replacement) | 47 String replacedBy(const char* feature, const char* replacement) |
48 { | 48 { |
49 return String::format("%s is deprecated. Please use %s instead.", feature, r
eplacement); | 49 return String::format("%s is deprecated. Please use %s instead.", feature, r
eplacement); |
50 } | 50 } |
51 | 51 |
52 String willBeRemoved(const char* feature, Milestone milestone, const char* detai
ls) | 52 String willBeRemoved(const char* feature, Milestone milestone, const char* detai
ls) |
53 { | 53 { |
54 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); | 54 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); |
55 } | 55 } |
56 | 56 |
57 String dopplerWillBeRemoved(const char* feature, Milestone milestone, const char
* details) | |
58 { | |
59 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); | |
60 } | |
61 | |
62 } // anonymous namespace | 57 } // anonymous namespace |
63 | 58 |
64 namespace blink { | 59 namespace blink { |
65 | 60 |
66 Deprecation::Deprecation() | 61 Deprecation::Deprecation() |
67 : m_muteCount(0) | 62 : m_muteCount(0) |
68 { | 63 { |
69 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); | 64 m_cssPropertyDeprecationBits.ensureSize(lastUnresolvedCSSProperty + 1); |
70 } | 65 } |
71 | 66 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 259 |
265 case UseCounter::ConsoleTimelineEnd: | 260 case UseCounter::ConsoleTimelineEnd: |
266 return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); | 261 return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); |
267 | 262 |
268 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: | 263 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: |
269 return "Synchronous XMLHttpRequest on the main thread is deprecated beca
use of its detrimental effects to the end user's experience. For more help, chec
k https://xhr.spec.whatwg.org/."; | 264 return "Synchronous XMLHttpRequest on the main thread is deprecated beca
use of its detrimental effects to the end user's experience. For more help, chec
k https://xhr.spec.whatwg.org/."; |
270 | 265 |
271 case UseCounter::GetMatchedCSSRules: | 266 case UseCounter::GetMatchedCSSRules: |
272 return "'getMatchedCSSRules()' is deprecated. For more help, check https
://code.google.com/p/chromium/issues/detail?id=437569#c2"; | 267 return "'getMatchedCSSRules()' is deprecated. For more help, check https
://code.google.com/p/chromium/issues/detail?id=437569#c2"; |
273 | 268 |
274 case UseCounter::AudioListenerDopplerFactor: | |
275 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", M55, "52389
26818148352"); | |
276 | |
277 case UseCounter::AudioListenerSpeedOfSound: | |
278 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", M55, "523892
6818148352"); | |
279 | |
280 case UseCounter::AudioListenerSetVelocity: | |
281 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", M55, "52389
26818148352"); | |
282 | |
283 case UseCounter::PannerNodeSetVelocity: | |
284 return dopplerWillBeRemoved("'PannerNode.setVelocity()'", M55, "52389268
18148352"); | |
285 | |
286 case UseCounter::PrefixedWindowURL: | 269 case UseCounter::PrefixedWindowURL: |
287 return replacedBy("'webkitURL'", "'URL'"); | 270 return replacedBy("'webkitURL'", "'URL'"); |
288 | 271 |
289 case UseCounter::PrefixedAudioContext: | 272 case UseCounter::PrefixedAudioContext: |
290 return replacedBy("'webkitAudioContext'", "'AudioContext'"); | 273 return replacedBy("'webkitAudioContext'", "'AudioContext'"); |
291 | 274 |
292 case UseCounter::PrefixedOfflineAudioContext: | 275 case UseCounter::PrefixedOfflineAudioContext: |
293 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"
); | 276 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'"
); |
294 | 277 |
295 case UseCounter::RangeExpand: | 278 case UseCounter::RangeExpand: |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 case UseCounter::PaymentAddressCareOf: | 374 case UseCounter::PaymentAddressCareOf: |
392 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); | 375 return willBeRemoved("PaymentAddress.careOf", M56, "5728579069411328"); |
393 | 376 |
394 // Features that aren't deprecated don't have a deprecation message. | 377 // Features that aren't deprecated don't have a deprecation message. |
395 default: | 378 default: |
396 return String(); | 379 return String(); |
397 } | 380 } |
398 } | 381 } |
399 | 382 |
400 } // namespace blink | 383 } // namespace blink |
OLD | NEW |