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

Side by Side Diff: Source/core/loader/HistoryItem.cpp

Issue 927213004: Accept options in history APIs to allow scroll restoration to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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 | « Source/core/loader/HistoryItem.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // identifiers that overlap with those from past/future browser sessions. 42 // identifiers that overlap with those from past/future browser sessions.
43 static long long next = static_cast<long long>(currentTime() * 1000000.0); 43 static long long next = static_cast<long long>(currentTime() * 1000000.0);
44 return ++next; 44 return ++next;
45 } 45 }
46 46
47 HistoryItem::HistoryItem() 47 HistoryItem::HistoryItem()
48 : m_pageScaleFactor(0) 48 : m_pageScaleFactor(0)
49 , m_itemSequenceNumber(generateSequenceNumber()) 49 , m_itemSequenceNumber(generateSequenceNumber())
50 , m_documentSequenceNumber(generateSequenceNumber()) 50 , m_documentSequenceNumber(generateSequenceNumber())
51 , m_frameSequenceNumber(generateSequenceNumber()) 51 , m_frameSequenceNumber(generateSequenceNumber())
52 , m_scrollRestorationType(ScrollRestorationAuto)
52 { 53 {
53 } 54 }
54 55
55 HistoryItem::~HistoryItem() 56 HistoryItem::~HistoryItem()
56 { 57 {
57 } 58 }
58 59
59 void HistoryItem::generateNewItemSequenceNumber() 60 void HistoryItem::generateNewItemSequenceNumber()
60 { 61 {
61 m_itemSequenceNumber = generateSequenceNumber(); 62 m_itemSequenceNumber = generateSequenceNumber();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // FIXME: We should find a better way to check if this is the current docume nt. 217 // FIXME: We should find a better way to check if this is the current docume nt.
217 return equalIgnoringFragmentIdentifier(url(), doc->url()); 218 return equalIgnoringFragmentIdentifier(url(), doc->url());
218 } 219 }
219 220
220 DEFINE_TRACE(HistoryItem) 221 DEFINE_TRACE(HistoryItem)
221 { 222 {
222 visitor->trace(m_documentState); 223 visitor->trace(m_documentState);
223 } 224 }
224 225
225 } // namespace blink 226 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698