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

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

Issue 2366493002: CSS Motion Path: report use of deprecated motion* properties (Closed)
Patch Set: 58 -> M58 Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/motion-path/motion-shorthand-deprecated-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 String message = deprecationMessage(unresolvedProperty); 114 String message = deprecationMessage(unresolvedProperty);
115 if (!message.isEmpty()) { 115 if (!message.isEmpty()) {
116 host->deprecation().suppress(unresolvedProperty); 116 host->deprecation().suppress(unresolvedProperty);
117 ConsoleMessage* consoleMessage = ConsoleMessage::create(DeprecationMessa geSource, WarningMessageLevel, message); 117 ConsoleMessage* consoleMessage = ConsoleMessage::create(DeprecationMessa geSource, WarningMessageLevel, message);
118 frame->console().addMessage(consoleMessage); 118 frame->console().addMessage(consoleMessage);
119 } 119 }
120 } 120 }
121 121
122 String Deprecation::deprecationMessage(CSSPropertyID unresolvedProperty) 122 String Deprecation::deprecationMessage(CSSPropertyID unresolvedProperty)
123 { 123 {
124 // TODO: Add a switch here when there are properties that we intend to depre cate. 124 switch (unresolvedProperty) {
125 // Returning an empty string for now. 125 case CSSPropertyAliasMotionOffset:
126 return emptyString(); 126 return willBeRemoved("motion-offset", M58, "6390764217040896");
127 case CSSPropertyAliasMotionRotation:
128 return willBeRemoved("motion-rotation", M58, "6390764217040896");
129 case CSSPropertyAliasMotionPath:
130 case CSSPropertyMotion:
131 return willBeRemoved("motion-path", M58, "6390764217040896");
132
133 default:
134 return emptyString();
135 }
127 } 136 }
128 137
129 void Deprecation::countDeprecation(const LocalFrame* frame, UseCounter::Feature feature) 138 void Deprecation::countDeprecation(const LocalFrame* frame, UseCounter::Feature feature)
130 { 139 {
131 if (!frame) 140 if (!frame)
132 return; 141 return;
133 FrameHost* host = frame->host(); 142 FrameHost* host = frame->host();
134 if (!host || host->deprecation().m_muteCount) 143 if (!host || host->deprecation().m_muteCount)
135 return; 144 return;
136 145
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 case UseCounter::ScriptInvalidTypeOrLanguage: 395 case UseCounter::ScriptInvalidTypeOrLanguage:
387 return willBeRemoved("Fetching scripts with an invalid type/language att ributes", M56, "5760718284521472"); 396 return willBeRemoved("Fetching scripts with an invalid type/language att ributes", M56, "5760718284521472");
388 397
389 // Features that aren't deprecated don't have a deprecation message. 398 // Features that aren't deprecated don't have a deprecation message.
390 default: 399 default:
391 return String(); 400 return String();
392 } 401 }
393 } 402 }
394 403
395 } // namespace blink 404 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/motion-path/motion-shorthand-deprecated-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698