Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Unified Diff: Source/core/frame/UseCounter.cpp

Issue 415753002: Deprecate the webkit-prefixed standard IndexedDB entry points (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More rebaselines for console warnings in property enumerating tests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ManualTests/indexeddb-persists.html ('k') | Source/devtools/front_end/resources/IndexedDBViews.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/UseCounter.cpp
diff --git a/Source/core/frame/UseCounter.cpp b/Source/core/frame/UseCounter.cpp
index b63ad32c535742f422e2435df2a5b604a3ff373e..6637330ffe7e862434946e63b8384ed128a89ddb 100644
--- a/Source/core/frame/UseCounter.cpp
+++ b/Source/core/frame/UseCounter.cpp
@@ -638,6 +638,12 @@ void UseCounter::countDeprecation(const Document& document, Feature feature)
}
}
+// FIXME: Update other UseCounter::deprecationMessage() cases to use this.
+static String replacedBy(const char* oldString, const char* newString)
+{
+ return String::format("'%s' is deprecated. Please use '%s' instead.", oldString, newString);
+}
+
String UseCounter::deprecationMessage(Feature feature)
{
switch (feature) {
@@ -647,7 +653,7 @@ String UseCounter::deprecationMessage(Feature feature)
// Keyboard Event (DOM Level 3)
case KeyboardEventKeyLocation:
- return "'KeyboardEvent.keyLocation' is deprecated. Please use 'KeyboardEvent.location' instead.";
+ return replacedBy("KeyboardEvent.keyLocation", "KeyboardEvent.location");
case ConsoleMarkTimeline:
return "console.markTimeline is deprecated. Please use the console.timeStamp instead.";
@@ -683,7 +689,34 @@ String UseCounter::deprecationMessage(Feature feature)
return "'MediaError.MEDIA_ERR_ENCRYPTED' is deprecated. This error code is never used.";
case PrefixedGamepad:
- return "'navigator.webkitGetGamepads' is deprecated. Please use 'navigator.getGamepads' instead.";
+ return replacedBy("navigator.webkitGetGamepads", "navigator.getGamepads");
+
+ case PrefixedIndexedDB:
+ return replacedBy("webkitIndexedDB", "indexedDB");
+
+ case PrefixedIDBCursorConstructor:
+ return replacedBy("webkitIDBCursor", "IDBCursor");
+
+ case PrefixedIDBDatabaseConstructor:
+ return replacedBy("webkitIDBDatabase", "IDBDatabase");
+
+ case PrefixedIDBFactoryConstructor:
+ return replacedBy("webkitIDBFactory", "IDBFactory");
+
+ case PrefixedIDBIndexConstructor:
+ return replacedBy("webkitIDBIndex", "IDBIndex");
+
+ case PrefixedIDBKeyRangeConstructor:
+ return replacedBy("webkitIDBKeyRange", "IDBKeyRange");
+
+ case PrefixedIDBObjectStoreConstructor:
+ return replacedBy("webkitIDBObjectStore", "IDBObjectStore");
+
+ case PrefixedIDBRequestConstructor:
+ return replacedBy("webkitIDBRequest", "IDBRequest");
+
+ case PrefixedIDBTransactionConstructor:
+ return replacedBy("webkitIDBTransaction", "IDBTransaction");
case PrefixedRequestAnimationFrame:
return "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.";
@@ -707,10 +740,10 @@ String UseCounter::deprecationMessage(Feature feature)
return "'NodeIterator.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-nodeiterator-detach).";
case AttrNodeValue:
- return "'Attr.nodeValue' is deprecated. Please use 'value' instead.";
+ return replacedBy("Attr.nodeValue", "value");
case AttrTextContent:
- return "'Attr.textContent' is deprecated. Please use 'value' instead.";
+ return replacedBy("Attr.textContent", "value");
case NodeIteratorExpandEntityReferences:
return "'NodeIterator.expandEntityReferences' is deprecated and has been removed from DOM. It always returns false.";
« no previous file with comments | « ManualTests/indexeddb-persists.html ('k') | Source/devtools/front_end/resources/IndexedDBViews.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698