| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 Google, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) | 728 if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) |
| 729 return; | 729 return; |
| 730 UseCounter::countDeprecation(context, feature); | 730 UseCounter::countDeprecation(context, feature); |
| 731 } | 731 } |
| 732 | 732 |
| 733 static const char* milestoneString(int milestone) | 733 static const char* milestoneString(int milestone) |
| 734 { | 734 { |
| 735 switch (milestone) { | 735 switch (milestone) { |
| 736 case 50: | 736 case 50: |
| 737 return "M50, around April 2016"; | 737 return "M50, around April 2016"; |
| 738 case 53: |
| 739 return "M53, around September 2016"; |
| 738 } | 740 } |
| 739 | 741 |
| 740 ASSERT_NOT_REACHED(); | 742 ASSERT_NOT_REACHED(); |
| 741 return nullptr; | 743 return nullptr; |
| 742 } | 744 } |
| 743 | 745 |
| 744 static String replacedBy(const char* feature, const char* replacement) | 746 static String replacedBy(const char* feature, const char* replacement) |
| 745 { | 747 { |
| 746 return String::format("%s is deprecated. Please use %s instead.", feature, r
eplacement); | 748 return String::format("%s is deprecated. Please use %s instead.", feature, r
eplacement); |
| 747 } | 749 } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 | 958 |
| 957 case MediaStreamTrackGetSources: | 959 case MediaStreamTrackGetSources: |
| 958 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom
estatus.com/feature/4765305641369600 for more details."; | 960 return "MediaStreamTrack.getSources is deprecated. See https://www.chrom
estatus.com/feature/4765305641369600 for more details."; |
| 959 | 961 |
| 960 case CSSXGetComputedStyleQueries: | 962 case CSSXGetComputedStyleQueries: |
| 961 return replacedWillBeRemoved("'getComputedStyle(e).cssXx' (except .cssFl
oat)", "'getComputedStyle(e).xx'", 50, "5006796888473600"); | 963 return replacedWillBeRemoved("'getComputedStyle(e).cssXx' (except .cssFl
oat)", "'getComputedStyle(e).xx'", 50, "5006796888473600"); |
| 962 | 964 |
| 963 case DocumentDefaultCharset: | 965 case DocumentDefaultCharset: |
| 964 return willBeRemoved("'Document.defaultCharset'", 50, "6217124578066432"
); | 966 return willBeRemoved("'Document.defaultCharset'", 50, "6217124578066432"
); |
| 965 | 967 |
| 968 case V8TouchEvent_InitTouchEvent_Method: |
| 969 return replacedWillBeRemoved("'TouchEvent.initTouchEvent'", "the TouchEv
ent constructor", 53, "5730982598541312"); |
| 970 |
| 966 // Features that aren't deprecated don't have a deprecation message. | 971 // Features that aren't deprecated don't have a deprecation message. |
| 967 default: | 972 default: |
| 968 return String(); | 973 return String(); |
| 969 } | 974 } |
| 970 } | 975 } |
| 971 | 976 |
| 972 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID feature) | 977 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID feature) |
| 973 { | 978 { |
| 974 ASSERT(feature >= firstCSSProperty); | 979 ASSERT(feature >= firstCSSProperty); |
| 975 ASSERT(feature <= lastUnresolvedCSSProperty); | 980 ASSERT(feature <= lastUnresolvedCSSProperty); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1003 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 1008 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
| 1004 { | 1009 { |
| 1005 // FIXME: We may want to handle stylesheets that have multiple owners | 1010 // FIXME: We may want to handle stylesheets that have multiple owners |
| 1006 // https://crbug.com/242125 | 1011 // https://crbug.com/242125 |
| 1007 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 1012 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
| 1008 return getFrom(sheetContents->singleOwnerDocument()); | 1013 return getFrom(sheetContents->singleOwnerDocument()); |
| 1009 return 0; | 1014 return 0; |
| 1010 } | 1015 } |
| 1011 | 1016 |
| 1012 } // namespace blink | 1017 } // namespace blink |
| OLD | NEW |