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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
735 Frame* frame = document.frame(); | 735 Frame* frame = document.frame(); |
736 if (!frame) | 736 if (!frame) |
737 return; | 737 return; |
738 // Check to see if the frame can script into the top level document. | 738 // Check to see if the frame can script into the top level document. |
739 SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin(); | 739 SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin(); |
740 Frame* top = frame->tree().top(); | 740 Frame* top = frame->tree().top(); |
741 if (top && !securityOrigin->canAccess(top->securityContext()->securityOrigin ())) | 741 if (top && !securityOrigin->canAccess(top->securityContext()->securityOrigin ())) |
742 count(frame, feature); | 742 count(frame, feature); |
743 } | 743 } |
744 | 744 |
745 // TODO(nainar): Migrate all console message functions to Deprecation | |
nainar
2016/02/01 07:48:41
removed space between TODO and (nainar)
| |
745 static const char* milestoneString(int milestone) | 746 static const char* milestoneString(int milestone) |
746 { | 747 { |
747 switch (milestone) { | 748 switch (milestone) { |
748 case 50: | 749 case 50: |
749 return "M50, around April 2016"; | 750 return "M50, around April 2016"; |
751 case 51: | |
752 return "M51, around June 2016"; | |
750 case 53: | 753 case 53: |
751 return "M53, around September 2016"; | 754 return "M53, around September 2016"; |
752 } | 755 } |
753 | 756 |
754 ASSERT_NOT_REACHED(); | 757 ASSERT_NOT_REACHED(); |
755 return nullptr; | 758 return nullptr; |
756 } | 759 } |
757 | 760 |
758 static String replacedBy(const char* feature, const char* replacement) | 761 static String replacedBy(const char* feature, const char* replacement) |
759 { | 762 { |
760 return String::format("%s is deprecated. Please use %s instead.", feature, r eplacement); | 763 return String::format("%s is deprecated. Please use %s instead.", feature, r eplacement); |
761 } | 764 } |
762 | 765 |
763 static String willBeRemoved(const char* feature, int milestone, const char* deta ils) | 766 String UseCounter::willBeRemoved(const char* feature, int milestone, const char* details) |
764 { | 767 { |
765 return String::format("%s is deprecated and will be removed in %s. See https ://www.chromestatus.com/features/%s for more details.", feature, milestoneString (milestone), details); | 768 return String::format("%s is deprecated and will be removed in %s. See https ://www.chromestatus.com/features/%s for more details.", feature, milestoneString (milestone), details); |
766 } | 769 } |
767 | 770 |
768 static String replacedWillBeRemoved(const char* feature, const char* replacement , int milestone, const char* details) | 771 static String replacedWillBeRemoved(const char* feature, const char* replacement , int milestone, const char* details) |
769 { | 772 { |
770 return String::format("%s is deprecated and will be removed in %s. Please us e %s instead. See https://www.chromestatus.com/features/%s for more details.", f eature, milestoneString(milestone), replacement, details); | 773 return String::format("%s is deprecated and will be removed in %s. Please us e %s instead. See https://www.chromestatus.com/features/%s for more details.", f eature, milestoneString(milestone), replacement, details); |
771 } | 774 } |
772 | 775 |
773 String UseCounter::deprecationMessage(Feature feature) | 776 String UseCounter::deprecationMessage(Feature feature) |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1024 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 1027 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
1025 { | 1028 { |
1026 // FIXME: We may want to handle stylesheets that have multiple owners | 1029 // FIXME: We may want to handle stylesheets that have multiple owners |
1027 // https://crbug.com/242125 | 1030 // https://crbug.com/242125 |
1028 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 1031 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
1029 return getFrom(sheetContents->singleOwnerDocument()); | 1032 return getFrom(sheetContents->singleOwnerDocument()); |
1030 return 0; | 1033 return 0; |
1031 } | 1034 } |
1032 | 1035 |
1033 } // namespace blink | 1036 } // namespace blink |
OLD | NEW |