Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 1965003002: Don't update subframes on parent frame commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 // sequence number in the same SiteInstance. Newly restored items may not have 1857 // sequence number in the same SiteInstance. Newly restored items may not have
1858 // a SiteInstance yet, in which case it will be assigned on first commit. 1858 // a SiteInstance yet, in which case it will be assigned on first commit.
1859 if (!old_item || 1859 if (!old_item ||
1860 new_item->item_sequence_number() != old_item->item_sequence_number() || 1860 new_item->item_sequence_number() != old_item->item_sequence_number() ||
1861 (new_item->site_instance() != nullptr && 1861 (new_item->site_instance() != nullptr &&
1862 new_item->site_instance() != old_item->site_instance())) { 1862 new_item->site_instance() != old_item->site_instance())) {
1863 if (old_item && 1863 if (old_item &&
1864 new_item->document_sequence_number() == 1864 new_item->document_sequence_number() ==
1865 old_item->document_sequence_number()) { 1865 old_item->document_sequence_number()) {
1866 same_document_loads->push_back(std::make_pair(frame, new_item)); 1866 same_document_loads->push_back(std::make_pair(frame, new_item));
1867
1868 // TODO(avi, creis): This is a bug; we should not return here. Rather, we
1869 // should continue on and navigate all child frames which have also
1870 // changed. This bug is the cause of <https://crbug.com/542299>, which is
1871 // a NC_IN_PAGE_NAVIGATION renderer kill.
1872 //
1873 // However, this bug is a bandaid over a deeper and worse problem. Doing a
1874 // pushState immediately after loading a subframe is a race, one that no
1875 // web page author expects. If we fix this bug, many large websites break.
1876 // For example, see <https://crbug.com/598043> and the spec discussion at
1877 // <https://github.com/whatwg/html/issues/1191>.
1878 //
1879 // For now, we accept this bug, and hope to resolve the race in a
1880 // different way that will one day allow us to fix this.
1881 return;
1867 } else { 1882 } else {
1868 different_document_loads->push_back(std::make_pair(frame, new_item)); 1883 different_document_loads->push_back(std::make_pair(frame, new_item));
1869 // For a different document, the subframes will be destroyed, so there's 1884 // For a different document, the subframes will be destroyed, so there's
1870 // no need to consider them. 1885 // no need to consider them.
1871 return; 1886 return;
1872 } 1887 }
1873 } 1888 }
1874 1889
1875 for (size_t i = 0; i < frame->child_count(); i++) { 1890 for (size_t i = 0; i < frame->child_count(); i++) {
1876 FindFramesToNavigate(frame->child_at(i), same_document_loads, 1891 FindFramesToNavigate(frame->child_at(i), same_document_loads,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 } 2054 }
2040 } 2055 }
2041 } 2056 }
2042 2057
2043 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2058 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2044 const base::Callback<base::Time()>& get_timestamp_callback) { 2059 const base::Callback<base::Time()>& get_timestamp_callback) {
2045 get_timestamp_callback_ = get_timestamp_callback; 2060 get_timestamp_callback_ = get_timestamp_callback;
2046 } 2061 }
2047 2062
2048 } // namespace content 2063 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698