Chromium Code Reviews| 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 SecurityOrigin* securityOrigin = frame->securityContext()->securityOrigin(); | |
| 739 Frame* parent = frame->tree().parent(); | |
| 740 if (parent && !securityOrigin->canAccess(parent->securityContext()->security Origin())) | |
|
mlamouri (slow - plz ping)
2016/01/19 17:54:48
canAccess() is not exactly "cross origin". Maybe t
raymes
2016/01/20 00:13:12
Done. Actually you made me realise that this code
| |
| 741 count(frame, feature); | |
| 742 } | |
| 743 | |
| 733 static const char* milestoneString(int milestone) | 744 static const char* milestoneString(int milestone) |
| 734 { | 745 { |
| 735 switch (milestone) { | 746 switch (milestone) { |
| 736 case 50: | 747 case 50: |
| 737 return "M50, around April 2016"; | 748 return "M50, around April 2016"; |
| 738 case 53: | 749 case 53: |
| 739 return "M53, around September 2016"; | 750 return "M53, around September 2016"; |
| 740 } | 751 } |
| 741 | 752 |
| 742 ASSERT_NOT_REACHED(); | 753 ASSERT_NOT_REACHED(); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1011 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 1022 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
| 1012 { | 1023 { |
| 1013 // FIXME: We may want to handle stylesheets that have multiple owners | 1024 // FIXME: We may want to handle stylesheets that have multiple owners |
| 1014 // https://crbug.com/242125 | 1025 // https://crbug.com/242125 |
| 1015 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 1026 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
| 1016 return getFrom(sheetContents->singleOwnerDocument()); | 1027 return getFrom(sheetContents->singleOwnerDocument()); |
| 1017 return 0; | 1028 return 0; |
| 1018 } | 1029 } |
| 1019 | 1030 |
| 1020 } // namespace blink | 1031 } // namespace blink |
| OLD | NEW |