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

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

Issue 1159723003: Don't reuse HistoryItems for multiple navigations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/web/WebViewImpl.cpp » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 , m_itemSequenceNumber(generateSequenceNumber()) 49 , m_itemSequenceNumber(generateSequenceNumber())
50 , m_documentSequenceNumber(generateSequenceNumber()) 50 , m_documentSequenceNumber(generateSequenceNumber())
51 , m_scrollRestorationType(ScrollRestorationAuto) 51 , m_scrollRestorationType(ScrollRestorationAuto)
52 { 52 {
53 } 53 }
54 54
55 HistoryItem::~HistoryItem() 55 HistoryItem::~HistoryItem()
56 { 56 {
57 } 57 }
58 58
59 void HistoryItem::generateNewItemSequenceNumber()
60 {
61 m_itemSequenceNumber = generateSequenceNumber();
62 }
63
64 void HistoryItem::generateNewDocumentSequenceNumber()
65 {
66 m_documentSequenceNumber = generateSequenceNumber();
67 }
68
69 const String& HistoryItem::urlString() const 59 const String& HistoryItem::urlString() const
70 { 60 {
71 return m_urlString; 61 return m_urlString;
72 } 62 }
73 63
74 KURL HistoryItem::url() const 64 KURL HistoryItem::url() const
75 { 65 {
76 return KURL(ParsedURLString, m_urlString); 66 return KURL(ParsedURLString, m_urlString);
77 } 67 }
78 68
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 const IntPoint& HistoryItem::scrollPoint() const 111 const IntPoint& HistoryItem::scrollPoint() const
122 { 112 {
123 return m_scrollPoint; 113 return m_scrollPoint;
124 } 114 }
125 115
126 void HistoryItem::setScrollPoint(const IntPoint& point) 116 void HistoryItem::setScrollPoint(const IntPoint& point)
127 { 117 {
128 m_scrollPoint = point; 118 m_scrollPoint = point;
129 } 119 }
130 120
131 void HistoryItem::clearScrollPoint()
132 {
133 m_scrollPoint = IntPoint();
134 m_pinchViewportScrollPoint = FloatPoint();
135 }
136
137 float HistoryItem::pageScaleFactor() const 121 float HistoryItem::pageScaleFactor() const
138 { 122 {
139 return m_pageScaleFactor; 123 return m_pageScaleFactor;
140 } 124 }
141 125
142 void HistoryItem::setPageScaleFactor(float scaleFactor) 126 void HistoryItem::setPageScaleFactor(float scaleFactor)
143 { 127 {
144 m_pageScaleFactor = scaleFactor; 128 m_pageScaleFactor = scaleFactor;
145 } 129 }
146 130
(...skipping 69 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. 200 // FIXME: We should find a better way to check if this is the current docume nt.
217 return equalIgnoringFragmentIdentifier(url(), doc->url()); 201 return equalIgnoringFragmentIdentifier(url(), doc->url());
218 } 202 }
219 203
220 DEFINE_TRACE(HistoryItem) 204 DEFINE_TRACE(HistoryItem)
221 { 205 {
222 visitor->trace(m_documentState); 206 visitor->trace(m_documentState);
223 } 207 }
224 208
225 } // namespace blink 209 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698