OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 WebFeaturePolicy* parentFeaturePolicy = | 586 WebFeaturePolicy* parentFeaturePolicy = |
587 (isLoadingMainFrame() ? nullptr | 587 (isLoadingMainFrame() ? nullptr |
588 : m_frame->client() | 588 : m_frame->client() |
589 ->parent() | 589 ->parent() |
590 ->securityContext() | 590 ->securityContext() |
591 ->getFeaturePolicy()); | 591 ->getFeaturePolicy()); |
592 const String& featurePolicyHeader = | 592 const String& featurePolicyHeader = |
593 m_documentLoader->response().httpHeaderField( | 593 m_documentLoader->response().httpHeaderField( |
594 HTTPNames::Feature_Policy); | 594 HTTPNames::Feature_Policy); |
595 Vector<String> messages; | 595 Vector<String> messages; |
596 const WebParsedFeaturePolicyHeader& parsedHeader = parseFeaturePolicy( | 596 const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy( |
597 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(), | 597 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(), |
598 &messages); | 598 &messages); |
599 m_frame->securityContext()->initializeFeaturePolicy(parsedHeader, | 599 const WebParsedFeaturePolicy& containerPolicy = |
600 parentFeaturePolicy); | 600 getContainerPolicyFromAllowedFeatures( |
| 601 m_frame->owner()->allowedFeatures(), |
| 602 m_frame->securityContext()->getSecurityOrigin()); |
| 603 |
| 604 m_frame->securityContext()->initializeFeaturePolicy( |
| 605 parsedHeader, containerPolicy, parentFeaturePolicy); |
601 for (auto& message : messages) { | 606 for (auto& message : messages) { |
602 m_frame->document()->addConsoleMessage(ConsoleMessage::create( | 607 m_frame->document()->addConsoleMessage(ConsoleMessage::create( |
603 OtherMessageSource, ErrorMessageLevel, | 608 OtherMessageSource, ErrorMessageLevel, |
604 "Error with Feature-Policy header: " + message)); | 609 "Error with Feature-Policy header: " + message)); |
605 } | 610 } |
606 if (!parsedHeader.isEmpty()) | 611 if (!parsedHeader.isEmpty()) |
607 client()->didSetFeaturePolicyHeader(parsedHeader); | 612 client()->didSetFeaturePolicyHeader(parsedHeader); |
608 } | 613 } |
609 } | 614 } |
610 | 615 |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 frameLoadRequest.clientRedirect()); | 1982 frameLoadRequest.clientRedirect()); |
1978 | 1983 |
1979 loader->setLoadType(loadType); | 1984 loader->setLoadType(loadType); |
1980 loader->setNavigationType(navigationType); | 1985 loader->setNavigationType(navigationType); |
1981 loader->setReplacesCurrentHistoryItem(loadType == | 1986 loader->setReplacesCurrentHistoryItem(loadType == |
1982 FrameLoadTypeReplaceCurrentItem); | 1987 FrameLoadTypeReplaceCurrentItem); |
1983 return loader; | 1988 return loader; |
1984 } | 1989 } |
1985 | 1990 |
1986 } // namespace blink | 1991 } // namespace blink |
OLD | NEW |