OLD | NEW |
---|---|
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 | 49 |
50 String message = deprecationMessage(unresolvedProperty); | 50 String message = deprecationMessage(unresolvedProperty); |
51 if (!message.isEmpty()) { | 51 if (!message.isEmpty()) { |
52 host->deprecation().suppress(unresolvedProperty); | 52 host->deprecation().suppress(unresolvedProperty); |
53 frame->console().addMessage(ConsoleMessage::create(DeprecationMessageSou rce, WarningMessageLevel, message)); | 53 frame->console().addMessage(ConsoleMessage::create(DeprecationMessageSou rce, WarningMessageLevel, message)); |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
57 String Deprecation::deprecationMessage(CSSPropertyID unresolvedProperty) | 57 String Deprecation::deprecationMessage(CSSPropertyID unresolvedProperty) |
58 { | 58 { |
59 switch (unresolvedProperty) { | 59 switch (unresolvedProperty) { |
Timothy Loh
2016/02/29 02:36:32
this doesn't compile on some platforms. maybe we s
nainar
2016/02/29 03:18:33
Returning an empty string for now and leaving a co
| |
60 case CSSPropertyWebkitBackgroundComposite: | |
61 return willBeRemoved("'-webkit-background-composite'", 51, "660729945600 8192"); | |
62 default: | 60 default: |
63 return emptyString(); | 61 return emptyString(); |
64 } | 62 } |
65 } | 63 } |
66 | 64 |
67 void Deprecation::countDeprecation(const LocalFrame* frame, UseCounter::Feature feature) | 65 void Deprecation::countDeprecation(const LocalFrame* frame, UseCounter::Feature feature) |
68 { | 66 { |
69 if (!frame) | 67 if (!frame) |
70 return; | 68 return; |
71 FrameHost* host = frame->host(); | 69 FrameHost* host = frame->host(); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 case UseCounter::WebAnimationHyphenatedProperty: | 338 case UseCounter::WebAnimationHyphenatedProperty: |
341 return replacedWillBeRemoved("Hyphenated naming in Web Animations keyfra mes", "camelCase", 51, "5650817352728576"); | 339 return replacedWillBeRemoved("Hyphenated naming in Web Animations keyfra mes", "camelCase", 51, "5650817352728576"); |
342 | 340 |
343 // Features that aren't deprecated don't have a deprecation message. | 341 // Features that aren't deprecated don't have a deprecation message. |
344 default: | 342 default: |
345 return String(); | 343 return String(); |
346 } | 344 } |
347 } | 345 } |
348 | 346 |
349 } // namespace blink | 347 } // namespace blink |
OLD | NEW |