| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3099 return appliedViewportDescription; | 3099 return appliedViewportDescription; |
| 3100 } | 3100 } |
| 3101 | 3101 |
| 3102 void Document::updateViewportDescription() | 3102 void Document::updateViewportDescription() |
| 3103 { | 3103 { |
| 3104 if (frame() && frame()->isMainFrame()) { | 3104 if (frame() && frame()->isMainFrame()) { |
| 3105 frameHost()->chromeClient().dispatchViewportPropertiesDidChange(viewport
Description()); | 3105 frameHost()->chromeClient().dispatchViewportPropertiesDidChange(viewport
Description()); |
| 3106 } | 3106 } |
| 3107 } | 3107 } |
| 3108 | 3108 |
| 3109 void Document::processReferrerPolicy(const String& policy) | |
| 3110 { | |
| 3111 ReferrerPolicy referrerPolicy; | |
| 3112 if (!SecurityPolicy::referrerPolicyFromString(policy, &referrerPolicy)) { | |
| 3113 addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMe
ssageLevel, "Failed to set referrer policy: The value '" + policy + "' is not on
e of 'always', 'default', 'never', 'no-referrer', 'no-referrer-when-downgrade',
'origin', 'origin-when-crossorigin', or 'unsafe-url'. This document's referrer p
olicy has been left unchanged.")); | |
| 3114 return; | |
| 3115 } | |
| 3116 | |
| 3117 setReferrerPolicy(referrerPolicy); | |
| 3118 } | |
| 3119 | |
| 3120 String Document::outgoingReferrer() const | 3109 String Document::outgoingReferrer() const |
| 3121 { | 3110 { |
| 3122 if (getSecurityOrigin()->isUnique()) { | 3111 if (getSecurityOrigin()->isUnique()) { |
| 3123 // Return |no-referrer|. | 3112 // Return |no-referrer|. |
| 3124 return String(); | 3113 return String(); |
| 3125 } | 3114 } |
| 3126 | 3115 |
| 3127 // See http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources | 3116 // See http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources |
| 3128 // for why we walk the parent chain for srcdoc documents. | 3117 // for why we walk the parent chain for srcdoc documents. |
| 3129 const Document* referrerDocument = this; | 3118 const Document* referrerDocument = this; |
| (...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6020 } | 6009 } |
| 6021 | 6010 |
| 6022 void showLiveDocumentInstances() | 6011 void showLiveDocumentInstances() |
| 6023 { | 6012 { |
| 6024 WeakDocumentSet& set = liveDocumentSet(); | 6013 WeakDocumentSet& set = liveDocumentSet(); |
| 6025 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6014 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6026 for (Document* document : set) | 6015 for (Document* document : set) |
| 6027 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6016 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6028 } | 6017 } |
| 6029 #endif | 6018 #endif |
| OLD | NEW |