| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 ->parent() | 592 ->parent() |
| 593 ->securityContext() | 593 ->securityContext() |
| 594 ->getFeaturePolicy()); | 594 ->getFeaturePolicy()); |
| 595 const String& featurePolicyHeader = | 595 const String& featurePolicyHeader = |
| 596 m_documentLoader->response().httpHeaderField( | 596 m_documentLoader->response().httpHeaderField( |
| 597 HTTPNames::Feature_Policy); | 597 HTTPNames::Feature_Policy); |
| 598 Vector<String> messages; | 598 Vector<String> messages; |
| 599 const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy( | 599 const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy( |
| 600 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(), | 600 featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(), |
| 601 &messages); | 601 &messages); |
| 602 m_frame->securityContext()->initializeFeaturePolicy(parsedHeader, | 602 const WebParsedFeaturePolicy& containerPolicy = |
| 603 parentFeaturePolicy); | 603 getContainerPolicyFromAllowedFeatures( |
| 604 m_frame->owner()->allowedFeatures(), |
| 605 m_frame->securityContext()->getSecurityOrigin()); |
| 606 |
| 607 m_frame->securityContext()->initializeFeaturePolicy( |
| 608 parsedHeader, containerPolicy, parentFeaturePolicy); |
| 604 for (auto& message : messages) { | 609 for (auto& message : messages) { |
| 605 m_frame->document()->addConsoleMessage(ConsoleMessage::create( | 610 m_frame->document()->addConsoleMessage(ConsoleMessage::create( |
| 606 OtherMessageSource, ErrorMessageLevel, | 611 OtherMessageSource, ErrorMessageLevel, |
| 607 "Error with Feature-Policy header: " + message)); | 612 "Error with Feature-Policy header: " + message)); |
| 608 } | 613 } |
| 609 if (!parsedHeader.isEmpty()) | 614 if (!parsedHeader.isEmpty()) |
| 610 client()->didSetFeaturePolicyHeader(parsedHeader); | 615 client()->didSetFeaturePolicyHeader(parsedHeader); |
| 611 } | 616 } |
| 612 } | 617 } |
| 613 | 618 |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 frameLoadRequest.clientRedirect()); | 1987 frameLoadRequest.clientRedirect()); |
| 1983 | 1988 |
| 1984 loader->setLoadType(loadType); | 1989 loader->setLoadType(loadType); |
| 1985 loader->setNavigationType(navigationType); | 1990 loader->setNavigationType(navigationType); |
| 1986 loader->setReplacesCurrentHistoryItem(loadType == | 1991 loader->setReplacesCurrentHistoryItem(loadType == |
| 1987 FrameLoadTypeReplaceCurrentItem); | 1992 FrameLoadTypeReplaceCurrentItem); |
| 1988 return loader; | 1993 return loader; |
| 1989 } | 1994 } |
| 1990 | 1995 |
| 1991 } // namespace blink | 1996 } // namespace blink |
| OLD | NEW |