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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 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); | 135 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); |
136 } | 136 } |
137 | 137 |
138 String Deprecation::deprecationMessage(UseCounter::Feature feature) | 138 String Deprecation::deprecationMessage(UseCounter::Feature feature) |
139 { | 139 { |
140 switch (feature) { | 140 switch (feature) { |
141 // Quota | 141 // Quota |
142 case UseCounter::PrefixedStorageInfo: | 142 case UseCounter::PrefixedStorageInfo: |
143 return replacedBy("'window.webkitStorageInfo'", "'navigator.webkitTempor
aryStorage' or 'navigator.webkitPersistentStorage'"); | 143 return replacedBy("'window.webkitStorageInfo'", "'navigator.webkitTempor
aryStorage' or 'navigator.webkitPersistentStorage'"); |
144 | 144 |
145 // Keyboard Event (DOM Level 3) | |
146 case UseCounter::KeyboardEventKeyLocation: | |
147 return replacedWillBeRemoved("'KeyboardEvent.keyLocation'", "'KeyboardEv
ent.location'", 50, "4997403308457984"); | |
148 | |
149 case UseCounter::ConsoleMarkTimeline: | 145 case UseCounter::ConsoleMarkTimeline: |
150 return replacedBy("'console.markTimeline'", "'console.timeStamp'"); | 146 return replacedBy("'console.markTimeline'", "'console.timeStamp'"); |
151 | 147 |
152 case UseCounter::FileError: | 148 case UseCounter::FileError: |
153 return "FileError is deprecated. Please use the 'name' or 'message' attr
ibutes of DOMError rather than 'code'."; | 149 return "FileError is deprecated. Please use the 'name' or 'message' attr
ibutes of DOMError rather than 'code'."; |
154 | 150 |
155 case UseCounter::CSSStyleSheetInsertRuleOptionalArg: | 151 case UseCounter::CSSStyleSheetInsertRuleOptionalArg: |
156 return "Calling CSSStyleSheet.insertRule() with one argument is deprecat
ed. Please pass the index argument as well: insertRule(x, 0)."; | 152 return "Calling CSSStyleSheet.insertRule() with one argument is deprecat
ed. Please pass the index argument as well: insertRule(x, 0)."; |
157 | 153 |
158 case UseCounter::PrefixedVideoSupportsFullscreen: | 154 case UseCounter::PrefixedVideoSupportsFullscreen: |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 case UseCounter::ObjectObserve: | 342 case UseCounter::ObjectObserve: |
347 return willBeRemoved("'Object.observe'", 50, "6147094632988672"); | 343 return willBeRemoved("'Object.observe'", 50, "6147094632988672"); |
348 | 344 |
349 // Features that aren't deprecated don't have a deprecation message. | 345 // Features that aren't deprecated don't have a deprecation message. |
350 default: | 346 default: |
351 return String(); | 347 return String(); |
352 } | 348 } |
353 } | 349 } |
354 | 350 |
355 } // namespace blink | 351 } // namespace blink |
OLD | NEW |