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

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

Issue 1585383003: Add deprecation message for -webkit-background-composite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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) {

Powered by Google App Engine
This is Rietveld 408576698