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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2710063002: Revert of Add DidSaveScrollOrScaleState flag to prevent restoreScrollPosition... (Closed)
Patch Set: rebase update Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // navigation, unless the before and after pages are logically related. This 345 // navigation, unless the before and after pages are logically related. This
346 // means they have the same url (ignoring fragment) and the new item was 346 // means they have the same url (ignoring fragment) and the new item was
347 // loaded via reload or client redirect. 347 // loaded via reload or client redirect.
348 HistoryCommitType history_commit_type = LoadTypeToCommitType(load_type); 348 HistoryCommitType history_commit_type = LoadTypeToCommitType(load_type);
349 if (navigation_type == HistoryNavigationType::kDifferentDocument && 349 if (navigation_type == HistoryNavigationType::kDifferentDocument &&
350 (history_commit_type != kHistoryInertCommit || 350 (history_commit_type != kHistoryInertCommit ||
351 !EqualIgnoringFragmentIdentifier(old_item->Url(), history_item_->Url()))) 351 !EqualIgnoringFragmentIdentifier(old_item->Url(), history_item_->Url())))
352 return; 352 return;
353 history_item_->SetDocumentSequenceNumber(old_item->DocumentSequenceNumber()); 353 history_item_->SetDocumentSequenceNumber(old_item->DocumentSequenceNumber());
354 history_item_->SetScrollOffset(old_item->GetScrollOffset()); 354 history_item_->SetScrollOffset(old_item->GetScrollOffset());
355 history_item_->SetDidSaveScrollOrScaleState(
356 old_item->DidSaveScrollOrScaleState());
357 history_item_->SetVisualViewportScrollOffset( 355 history_item_->SetVisualViewportScrollOffset(
358 old_item->VisualViewportScrollOffset()); 356 old_item->VisualViewportScrollOffset());
359 history_item_->SetPageScaleFactor(old_item->PageScaleFactor()); 357 history_item_->SetPageScaleFactor(old_item->PageScaleFactor());
360 history_item_->SetScrollRestorationType(old_item->ScrollRestorationType()); 358 history_item_->SetScrollRestorationType(old_item->ScrollRestorationType());
361 359
362 // The item sequence number determines whether items are "the same", such 360 // The item sequence number determines whether items are "the same", such
363 // back/forward navigation between items with the same item sequence number is 361 // back/forward navigation between items with the same item sequence number is
364 // a no-op. Only treat this as identical if the navigation did not create a 362 // a no-op. Only treat this as identical if the navigation did not create a
365 // back/forward entry and the url is identical or it was loaded via 363 // back/forward entry and the url is identical or it was loaded via
366 // history.replaceState(). 364 // history.replaceState().
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 InstallNewDocumentReason::kJavascriptURL, 1092 InstallNewDocumentReason::kJavascriptURL,
1095 kForceSynchronousParsing, KURL()); 1093 kForceSynchronousParsing, KURL());
1096 if (!source.IsNull()) 1094 if (!source.IsNull())
1097 writer_->AppendReplacingData(source); 1095 writer_->AppendReplacingData(source);
1098 EndWriting(); 1096 EndWriting();
1099 } 1097 }
1100 1098
1101 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 1099 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
1102 1100
1103 } // namespace blink 1101 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/data/page_state/serialized_v23.dat ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698