| Index: third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| index 8e65609f65e41de83e72a10607d5b498947a6ca7..bdcbbb28d6134a13388854ed2e2c51340be60691 100644
|
| --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
|
| @@ -706,6 +706,16 @@ void UseCounter::countDeprecation(const LocalFrame* frame, Feature feature)
|
| }
|
| }
|
|
|
| +void UseCounter::showDeprecationWarning(const LocalFrame* frame, CSSPropertyID cssPropertyID)
|
| +{
|
| + if (!frame || !frame->host())
|
| + return;
|
| +
|
| + String message = deprecationMessage(cssPropertyID);
|
| + if (!message.isEmpty())
|
| + frame->console().addMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, message));
|
| +}
|
| +
|
| void UseCounter::countDeprecation(ExecutionContext* context, Feature feature)
|
| {
|
| if (!context)
|
| @@ -735,6 +745,8 @@ static const char* milestoneString(int milestone)
|
| switch (milestone) {
|
| case 50:
|
| return "M50, around April 2016";
|
| + case 51:
|
| + return "M51, around June 2016";
|
| case 53:
|
| return "M53, around September 2016";
|
| }
|
| @@ -758,6 +770,16 @@ static String replacedWillBeRemoved(const char* feature, const char* replacement
|
| return String::format("%s is deprecated and will be removed in %s. Please use %s instead. See https://www.chromestatus.com/features/%s for more details.", feature, milestoneString(milestone), replacement, details);
|
| }
|
|
|
| +String UseCounter::deprecationMessage(CSSPropertyID cssPropertyID)
|
| +{
|
| + switch (cssPropertyID) {
|
| + case CSSPropertyWebkitBackgroundComposite:
|
| + return willBeRemoved("'-webkit-background-composite'", 51, "6607299456008192");
|
| + default:
|
| + return emptyString();
|
| + }
|
| +}
|
| +
|
| String UseCounter::deprecationMessage(Feature feature)
|
| {
|
| switch (feature) {
|
|
|