| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 frame->isMainFrame() | 871 frame->isMainFrame() |
| 872 ? nullptr | 872 ? nullptr |
| 873 : frame->tree().parent()->securityContext()->getFeaturePolicy(); | 873 : frame->tree().parent()->securityContext()->getFeaturePolicy(); |
| 874 Vector<String> messages; | 874 Vector<String> messages; |
| 875 const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy( | 875 const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy( |
| 876 featurePolicyHeader, frame->securityContext()->getSecurityOrigin(), | 876 featurePolicyHeader, frame->securityContext()->getSecurityOrigin(), |
| 877 &messages); | 877 &messages); |
| 878 WebParsedFeaturePolicy containerPolicy; | 878 WebParsedFeaturePolicy containerPolicy; |
| 879 if (frame->owner()) { | 879 if (frame->owner()) { |
| 880 containerPolicy = getContainerPolicyFromAllowedFeatures( | 880 containerPolicy = getContainerPolicyFromAllowedFeatures( |
| 881 frame->owner()->allowedFeatures(), | 881 frame->owner()->allowedFeatures(), frame->owner()->allowFullscreen(), |
| 882 frame->owner()->allowPaymentRequest(), |
| 882 frame->securityContext()->getSecurityOrigin()); | 883 frame->securityContext()->getSecurityOrigin()); |
| 883 } | 884 } |
| 884 frame->securityContext()->initializeFeaturePolicy( | 885 frame->securityContext()->initializeFeaturePolicy( |
| 885 parsedHeader, containerPolicy, parentFeaturePolicy); | 886 parsedHeader, containerPolicy, parentFeaturePolicy); |
| 886 | 887 |
| 887 for (auto& message : messages) { | 888 for (auto& message : messages) { |
| 888 document->addConsoleMessage( | 889 document->addConsoleMessage( |
| 889 ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, | 890 ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, |
| 890 "Error with Feature-Policy header: " + message)); | 891 "Error with Feature-Policy header: " + message)); |
| 891 } | 892 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 InstallNewDocumentReason::kJavascriptURL, | 946 InstallNewDocumentReason::kJavascriptURL, |
| 946 ForceSynchronousParsing, KURL()); | 947 ForceSynchronousParsing, KURL()); |
| 947 if (!source.isNull()) | 948 if (!source.isNull()) |
| 948 m_writer->appendReplacingData(source); | 949 m_writer->appendReplacingData(source); |
| 949 endWriting(); | 950 endWriting(); |
| 950 } | 951 } |
| 951 | 952 |
| 952 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 953 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 953 | 954 |
| 954 } // namespace blink | 955 } // namespace blink |
| OLD | NEW |