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

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

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)
Patch Set: add test Created 3 years, 10 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) 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 28 matching lines...) Expand all
39 // Initialize to the current time to reduce the likelihood of generating 39 // Initialize to the current time to reduce the likelihood of generating
40 // identifiers that overlap with those from past/future browser sessions. 40 // identifiers that overlap with those from past/future browser sessions.
41 static long long next = static_cast<long long>(currentTime() * 1000000.0); 41 static long long next = static_cast<long long>(currentTime() * 1000000.0);
42 return ++next; 42 return ++next;
43 } 43 }
44 44
45 HistoryItem::HistoryItem() 45 HistoryItem::HistoryItem()
46 : m_pageScaleFactor(0), 46 : m_pageScaleFactor(0),
47 m_itemSequenceNumber(generateSequenceNumber()), 47 m_itemSequenceNumber(generateSequenceNumber()),
48 m_documentSequenceNumber(generateSequenceNumber()), 48 m_documentSequenceNumber(generateSequenceNumber()),
49 m_scrollRestorationType(ScrollRestorationAuto) {} 49 m_scrollRestorationType(ScrollRestorationAuto),
50 m_didSaveScrollState(false) {}
50 51
51 HistoryItem::~HistoryItem() {} 52 HistoryItem::~HistoryItem() {}
52 53
53 const String& HistoryItem::urlString() const { 54 const String& HistoryItem::urlString() const {
54 return m_urlString; 55 return m_urlString;
55 } 56 }
56 57
57 KURL HistoryItem::url() const { 58 KURL HistoryItem::url() const {
58 return KURL(ParsedURLString, m_urlString); 59 return KURL(ParsedURLString, m_urlString);
59 } 60 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // FIXME: We should find a better way to check if this is the current 171 // FIXME: We should find a better way to check if this is the current
171 // document. 172 // document.
172 return equalIgnoringFragmentIdentifier(url(), doc->url()); 173 return equalIgnoringFragmentIdentifier(url(), doc->url());
173 } 174 }
174 175
175 DEFINE_TRACE(HistoryItem) { 176 DEFINE_TRACE(HistoryItem) {
176 visitor->trace(m_documentState); 177 visitor->trace(m_documentState);
177 } 178 }
178 179
179 } // namespace blink 180 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698