| 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 UseCounter::countDeprecation(document.frame(), feature); | 723 UseCounter::countDeprecation(document.frame(), feature); |
| 724 } | 724 } |
| 725 | 725 |
| 726 void UseCounter::countDeprecationIfNotPrivateScript(v8::Isolate* isolate, Execut
ionContext* context, Feature feature) | 726 void UseCounter::countDeprecationIfNotPrivateScript(v8::Isolate* isolate, Execut
ionContext* context, Feature feature) |
| 727 { | 727 { |
| 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 void UseCounter::countCrossOriginIframe(const Document& document, Feature featur
e) |
| 734 { |
| 735 Frame* frame = document.frame(); |
| 736 if (!frame) |
| 737 return; |
| 738 // Check to see if the frame can script into the top level document. |
| 739 SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin(); |
| 740 Frame* top = frame->tree().top(); |
| 741 if (top && !securityOrigin->canAccess(top->securityContext()->securityOrigin
())) |
| 742 count(frame, feature); |
| 743 } |
| 744 |
| 733 static const char* milestoneString(int milestone) | 745 static const char* milestoneString(int milestone) |
| 734 { | 746 { |
| 735 switch (milestone) { | 747 switch (milestone) { |
| 736 case 50: | 748 case 50: |
| 737 return "M50, around April 2016"; | 749 return "M50, around April 2016"; |
| 738 case 53: | 750 case 53: |
| 739 return "M53, around September 2016"; | 751 return "M53, around September 2016"; |
| 740 } | 752 } |
| 741 | 753 |
| 742 ASSERT_NOT_REACHED(); | 754 ASSERT_NOT_REACHED(); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 1024 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
| 1013 { | 1025 { |
| 1014 // FIXME: We may want to handle stylesheets that have multiple owners | 1026 // FIXME: We may want to handle stylesheets that have multiple owners |
| 1015 // https://crbug.com/242125 | 1027 // https://crbug.com/242125 |
| 1016 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 1028 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
| 1017 return getFrom(sheetContents->singleOwnerDocument()); | 1029 return getFrom(sheetContents->singleOwnerDocument()); |
| 1018 return 0; | 1030 return 0; |
| 1019 } | 1031 } |
| 1020 | 1032 |
| 1021 } // namespace blink | 1033 } // namespace blink |
| OLD | NEW |