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

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

Issue 2856513002: Revert of CSS Motion Path: delete implementation of motion-offset property (Closed)
Patch Set: Created 3 years, 7 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/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
11 #include "core/inspector/ConsoleMessage.h" 11 #include "core/inspector/ConsoleMessage.h"
12 #include "core/page/Page.h" 12 #include "core/page/Page.h"
13 #include "core/workers/WorkerOrWorkletGlobalScope.h" 13 #include "core/workers/WorkerOrWorkletGlobalScope.h"
14 14
15 namespace { 15 namespace {
16 16
17 enum Milestone { 17 enum Milestone {
18 M58,
18 M59, 19 M59,
19 M60, 20 M60,
20 M61, 21 M61,
21 M62, 22 M62,
22 }; 23 };
23 24
24 const char* milestoneString(Milestone milestone) { 25 const char* milestoneString(Milestone milestone) {
25 // These are the Estimated Stable Dates: 26 // These are the Estimated Stable Dates:
26 // https://www.chromium.org/developers/calendar 27 // https://www.chromium.org/developers/calendar
27 28
28 switch (milestone) { 29 switch (milestone) {
30 case M58:
31 return "M58, around April 2017";
29 case M59: 32 case M59:
30 return "M59, around June 2017"; 33 return "M59, around June 2017";
31 case M60: 34 case M60:
32 return "M60, around August 2017"; 35 return "M60, around August 2017";
33 case M61: 36 case M61:
34 return "M61, around September 2017"; 37 return "M61, around September 2017";
35 case M62: 38 case M62:
36 return "M62, around October 2017"; 39 return "M62, around October 2017";
37 } 40 }
38 41
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 String message = DeprecationMessage(unresolved_property); 110 String message = DeprecationMessage(unresolved_property);
108 if (!message.IsEmpty()) { 111 if (!message.IsEmpty()) {
109 page->GetDeprecation().Suppress(unresolved_property); 112 page->GetDeprecation().Suppress(unresolved_property);
110 ConsoleMessage* console_message = ConsoleMessage::Create( 113 ConsoleMessage* console_message = ConsoleMessage::Create(
111 kDeprecationMessageSource, kWarningMessageLevel, message); 114 kDeprecationMessageSource, kWarningMessageLevel, message);
112 frame->Console().AddMessage(console_message); 115 frame->Console().AddMessage(console_message);
113 } 116 }
114 } 117 }
115 118
116 String Deprecation::DeprecationMessage(CSSPropertyID unresolved_property) { 119 String Deprecation::DeprecationMessage(CSSPropertyID unresolved_property) {
117 // TODO: Add a switch here when there are properties that we intend to 120 switch (unresolved_property) {
118 // deprecate. 121 case CSSPropertyAliasMotionOffset:
119 // Returning an empty string for now. 122 return replacedWillBeRemoved("motion-offset", "offset-distance", M58,
120 return g_empty_string; 123 "6390764217040896");
124 default:
125 return g_empty_string;
126 }
121 } 127 }
122 128
123 void Deprecation::CountDeprecation(const LocalFrame* frame, 129 void Deprecation::CountDeprecation(const LocalFrame* frame,
124 UseCounter::Feature feature) { 130 UseCounter::Feature feature) {
125 if (!frame) 131 if (!frame)
126 return; 132 return;
127 Page* page = frame->GetPage(); 133 Page* page = frame->GetPage();
128 if (!page || page->GetDeprecation().mute_count_) 134 if (!page || page->GetDeprecation().mute_count_)
129 return; 135 return;
130 136
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 return willBeRemoved("SVGPathElement.getPathSegAtLength", M62, 420 return willBeRemoved("SVGPathElement.getPathSegAtLength", M62,
415 "5638783282184192"); 421 "5638783282184192");
416 422
417 // Features that aren't deprecated don't have a deprecation message. 423 // Features that aren't deprecated don't have a deprecation message.
418 default: 424 default:
419 return String(); 425 return String();
420 } 426 }
421 } 427 }
422 428
423 } // namespace blink 429 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698