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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 return kFrameLoadTypeReload; | 698 return kFrameLoadTypeReload; |
699 if (request.GetResourceRequest().GetCachePolicy() == | 699 if (request.GetResourceRequest().GetCachePolicy() == |
700 WebCachePolicy::kBypassingCache) | 700 WebCachePolicy::kBypassingCache) |
701 return kFrameLoadTypeReloadBypassingCache; | 701 return kFrameLoadTypeReloadBypassingCache; |
702 // From the HTML5 spec for location.assign(): | 702 // From the HTML5 spec for location.assign(): |
703 // "If the browsing context's session history contains only one Document, | 703 // "If the browsing context's session history contains only one Document, |
704 // and that was the about:blank Document created when the browsing context | 704 // and that was the about:blank Document created when the browsing context |
705 // was created, then the navigation must be done with replacement enabled." | 705 // was created, then the navigation must be done with replacement enabled." |
706 if (request.ReplacesCurrentItem() || | 706 if (request.ReplacesCurrentItem() || |
707 (!state_machine_.CommittedMultipleRealLoads() && | 707 (!state_machine_.CommittedMultipleRealLoads() && |
708 EqualIgnoringCase(frame_->GetDocument()->Url(), BlankURL()))) | 708 DeprecatedEqualIgnoringCase(frame_->GetDocument()->Url(), BlankURL()))) |
709 return kFrameLoadTypeReplaceCurrentItem; | 709 return kFrameLoadTypeReplaceCurrentItem; |
710 | 710 |
711 if (request.GetResourceRequest().Url() == document_loader_->UrlForHistory()) { | 711 if (request.GetResourceRequest().Url() == document_loader_->UrlForHistory()) { |
712 if (request.GetResourceRequest().HttpMethod() == HTTPNames::POST) | 712 if (request.GetResourceRequest().HttpMethod() == HTTPNames::POST) |
713 return kFrameLoadTypeStandard; | 713 return kFrameLoadTypeStandard; |
714 if (!request.OriginDocument()) | 714 if (!request.OriginDocument()) |
715 return kFrameLoadTypeReload; | 715 return kFrameLoadTypeReload; |
716 return kFrameLoadTypeReplaceCurrentItem; | 716 return kFrameLoadTypeReplaceCurrentItem; |
717 } | 717 } |
718 | 718 |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 DetachDocumentLoader(provisional_document_loader_); | 1257 DetachDocumentLoader(provisional_document_loader_); |
1258 } | 1258 } |
1259 | 1259 |
1260 bool FrameLoader::ShouldPerformFragmentNavigation(bool is_form_submission, | 1260 bool FrameLoader::ShouldPerformFragmentNavigation(bool is_form_submission, |
1261 const String& http_method, | 1261 const String& http_method, |
1262 FrameLoadType load_type, | 1262 FrameLoadType load_type, |
1263 const KURL& url) { | 1263 const KURL& url) { |
1264 // We don't do this if we are submitting a form with method other than "GET", | 1264 // We don't do this if we are submitting a form with method other than "GET", |
1265 // explicitly reloading, currently displaying a frameset, or if the URL does | 1265 // explicitly reloading, currently displaying a frameset, or if the URL does |
1266 // not have a fragment. | 1266 // not have a fragment. |
1267 return EqualIgnoringCase(http_method, HTTPNames::GET) && | 1267 return DeprecatedEqualIgnoringCase(http_method, HTTPNames::GET) && |
1268 !IsReloadLoadType(load_type) && | 1268 !IsReloadLoadType(load_type) && |
1269 load_type != kFrameLoadTypeBackForward && | 1269 load_type != kFrameLoadTypeBackForward && |
1270 url.HasFragmentIdentifier() && | 1270 url.HasFragmentIdentifier() && |
1271 EqualIgnoringFragmentIdentifier(frame_->GetDocument()->Url(), url) | 1271 EqualIgnoringFragmentIdentifier(frame_->GetDocument()->Url(), url) |
1272 // We don't want to just scroll if a link from within a frameset is | 1272 // We don't want to just scroll if a link from within a frameset is |
1273 // trying to reload the frameset into _top. | 1273 // trying to reload the frameset into _top. |
1274 && !frame_->GetDocument()->IsFrameSet(); | 1274 && !frame_->GetDocument()->IsFrameSet(); |
1275 } | 1275 } |
1276 | 1276 |
1277 void FrameLoader::ProcessFragment(const KURL& url, | 1277 void FrameLoader::ProcessFragment(const KURL& url, |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1774 // TODO(japhet): This is needed because the browser process DCHECKs if the |
1775 // first entry we commit in a new frame has replacement set. It's unclear | 1775 // first entry we commit in a new frame has replacement set. It's unclear |
1776 // whether the DCHECK is right, investigate removing this special case. | 1776 // whether the DCHECK is right, investigate removing this special case. |
1777 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && | 1777 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && |
1778 (!Opener() || !request.Url().IsEmpty()); | 1778 (!Opener() || !request.Url().IsEmpty()); |
1779 loader->SetReplacesCurrentHistoryItem(replace_current_item); | 1779 loader->SetReplacesCurrentHistoryItem(replace_current_item); |
1780 return loader; | 1780 return loader; |
1781 } | 1781 } |
1782 | 1782 |
1783 } // namespace blink | 1783 } // namespace blink |
OLD | NEW |