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

Side by Side Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 2295863002: Remove window.postMessage(message, transferables, targetOrigin) legacy overload (Closed)
Patch Set: leave milestoneString alone Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 336
342 case UseCounter::MediaStreamTrackGetSources: 337 case UseCounter::MediaStreamTrackGetSources:
343 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom estatus.com/feature/4765305641369600 for more details."; 338 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom estatus.com/feature/4765305641369600 for more details.";
344 339
345 case UseCounter::WebAnimationHyphenatedProperty: 340 case UseCounter::WebAnimationHyphenatedProperty:
346 return "Hyphenated property names in Web Animations keyframes are invali d and therefore ignored. Please use camelCase instead."; 341 return "Hyphenated property names in Web Animations keyframes are invali d and therefore ignored. Please use camelCase instead.";
347 342
348 case UseCounter::HTMLKeygenElement: 343 case UseCounter::HTMLKeygenElement:
349 return willBeRemoved("The <keygen> element", 56, "5716060992962560"); 344 return willBeRemoved("The <keygen> element", 56, "5716060992962560");
350 345
351 case UseCounter::WindowPostMessageWithLegacyTargetOriginArgument:
352 return replacedWillBeRemoved("'window.postMessage(message, transferables , targetOrigin)'", "'window.postMessage(message, targetOrigin, transferables)'", 54, "5719033043222528");
353
354 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs: 346 case UseCounter::EncryptedMediaAllSelectedContentTypesMissingCodecs:
355 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(54)); 347 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(54));
356 348
357 case UseCounter::UntrustedEventDefaultHandled: 349 case UseCounter::UntrustedEventDefaultHandled:
358 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)); 350 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));
359 351
360 case UseCounter::TouchStartUserGestureUtilized: 352 case UseCounter::TouchStartUserGestureUtilized:
361 return willBeRemoved("Performing operations that require explicit user i nteraction on touchstart events", 55, "5649871251963904"); 353 return willBeRemoved("Performing operations that require explicit user i nteraction on touchstart events", 55, "5649871251963904");
362 354
363 case UseCounter::TouchMoveUserGestureUtilized: 355 case UseCounter::TouchMoveUserGestureUtilized:
(...skipping 17 matching lines...) Expand all
381 case UseCounter::NavigatorPointerEnabled: 373 case UseCounter::NavigatorPointerEnabled:
382 return "Navigator.pointerEnabled is a non-standard API added for experim ents only. It will be removed in near future."; 374 return "Navigator.pointerEnabled is a non-standard API added for experim ents only. It will be removed in near future.";
383 375
384 // Features that aren't deprecated don't have a deprecation message. 376 // Features that aren't deprecated don't have a deprecation message.
385 default: 377 default:
386 return String(); 378 return String();
387 } 379 }
388 } 380 }
389 381
390 } // namespace blink 382 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698