| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 // FIXME: This should be an assertion, but there's some plugin code in the c
hromium repo | 625 // FIXME: This should be an assertion, but there's some plugin code in the c
hromium repo |
| 626 // that both determines its own referrer and expects to be associated with a
n originDocument. | 626 // that both determines its own referrer and expects to be associated with a
n originDocument. |
| 627 if (!request.httpReferrer().isEmpty()) | 627 if (!request.httpReferrer().isEmpty()) |
| 628 return; | 628 return; |
| 629 if (shouldSendReferrer == NeverSendReferrer) | 629 if (shouldSendReferrer == NeverSendReferrer) |
| 630 return; | 630 return; |
| 631 | 631 |
| 632 // Always use the initiating document to generate the referrer. | 632 // Always use the initiating document to generate the referrer. |
| 633 // We need to generateReferrerHeader(), because we haven't enforced Referrer
Policy or https->http | 633 // We need to generateReferrerHeader(), because we haven't enforced Referrer
Policy or https->http |
| 634 // referrer suppression yet. | 634 // referrer suppression yet. |
| 635 String referrer = SecurityPolicy::generateReferrerHeader(originDocument->ref
errerPolicy(), request.url(), originDocument->outgoingReferrer()); | 635 Referrer referrer = SecurityPolicy::generateReferrerHeader(originDocument->r
eferrerPolicy(), request.url(), originDocument->outgoingReferrer()); |
| 636 | 636 |
| 637 request.setHTTPReferrer(Referrer(referrer, originDocument->referrerPolicy())
); | 637 request.setHTTPReferrer(referrer); |
| 638 RefPtr<SecurityOrigin> referrerOrigin = SecurityOrigin::createFromString(ref
errer); | 638 RefPtr<SecurityOrigin> referrerOrigin = SecurityOrigin::createFromString(ref
errer.referrer); |
| 639 request.addHTTPOriginIfNeeded(referrerOrigin->toAtomicString()); | 639 request.addHTTPOriginIfNeeded(referrerOrigin->toAtomicString()); |
| 640 } | 640 } |
| 641 | 641 |
| 642 bool FrameLoader::isScriptTriggeredFormSubmissionInChildFrame(const FrameLoadReq
uest& request) const | 642 bool FrameLoader::isScriptTriggeredFormSubmissionInChildFrame(const FrameLoadReq
uest& request) const |
| 643 { | 643 { |
| 644 // If this is a child frame and the form submission was triggered by a scrip
t, lock the back/forward list | 644 // If this is a child frame and the form submission was triggered by a scrip
t, lock the back/forward list |
| 645 // to match IE and Opera. | 645 // to match IE and Opera. |
| 646 // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motiva
tion for this. | 646 // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motiva
tion for this. |
| 647 if (!m_frame->tree().parent() || UserGestureIndicator::processingUserGesture
()) | 647 if (!m_frame->tree().parent() || UserGestureIndicator::processingUserGesture
()) |
| 648 return false; | 648 return false; |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1481 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
| 1482 Frame* parentFrame = m_frame->tree().parent(); | 1482 Frame* parentFrame = m_frame->tree().parent(); |
| 1483 if (parentFrame && parentFrame->isLocalFrame()) | 1483 if (parentFrame && parentFrame->isLocalFrame()) |
| 1484 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1484 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
| 1485 if (FrameOwner* frameOwner = m_frame->owner()) | 1485 if (FrameOwner* frameOwner = m_frame->owner()) |
| 1486 flags |= frameOwner->sandboxFlags(); | 1486 flags |= frameOwner->sandboxFlags(); |
| 1487 return flags; | 1487 return flags; |
| 1488 } | 1488 } |
| 1489 | 1489 |
| 1490 } // namespace blink | 1490 } // namespace blink |
| OLD | NEW |