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

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

Issue 263853008: Added pinch viewport offset to history item. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/core/page/Page.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void HistoryItem::setReferrer(const Referrer& referrer) 97 void HistoryItem::setReferrer(const Referrer& referrer)
98 { 98 {
99 m_referrer = referrer; 99 m_referrer = referrer;
100 } 100 }
101 101
102 void HistoryItem::setTarget(const String& target) 102 void HistoryItem::setTarget(const String& target)
103 { 103 {
104 m_target = target; 104 m_target = target;
105 } 105 }
106 106
107 const FloatPoint& HistoryItem::pinchViewportScrollPoint() const
108 {
109 return m_pinchViewportScrollPoint;
110 }
111
112 void HistoryItem::setPinchViewportScrollPoint(const FloatPoint& point)
113 {
114 m_pinchViewportScrollPoint = point;
115 }
116
107 const IntPoint& HistoryItem::scrollPoint() const 117 const IntPoint& HistoryItem::scrollPoint() const
108 { 118 {
109 return m_scrollPoint; 119 return m_scrollPoint;
110 } 120 }
111 121
112 void HistoryItem::setScrollPoint(const IntPoint& point) 122 void HistoryItem::setScrollPoint(const IntPoint& point)
113 { 123 {
114 m_scrollPoint = point; 124 m_scrollPoint = point;
115 } 125 }
116 126
117 void HistoryItem::clearScrollPoint() 127 void HistoryItem::clearScrollPoint()
118 { 128 {
119 m_scrollPoint.setX(0); 129 m_scrollPoint = IntPoint();
120 m_scrollPoint.setY(0); 130 m_pinchViewportScrollPoint = FloatPoint();
121 } 131 }
122 132
123 float HistoryItem::pageScaleFactor() const 133 float HistoryItem::pageScaleFactor() const
124 { 134 {
125 return m_pageScaleFactor; 135 return m_pageScaleFactor;
126 } 136 }
127 137
128 void HistoryItem::setPageScaleFactor(float scaleFactor) 138 void HistoryItem::setPageScaleFactor(float scaleFactor)
129 { 139 {
130 m_pageScaleFactor = scaleFactor; 140 m_pageScaleFactor = scaleFactor;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 208 }
199 209
200 bool HistoryItem::isCurrentDocument(Document* doc) const 210 bool HistoryItem::isCurrentDocument(Document* doc) const
201 { 211 {
202 // FIXME: We should find a better way to check if this is the current docume nt. 212 // FIXME: We should find a better way to check if this is the current docume nt.
203 return equalIgnoringFragmentIdentifier(url(), doc->url()); 213 return equalIgnoringFragmentIdentifier(url(), doc->url());
204 } 214 }
205 215
206 } // namespace WebCore 216 } // namespace WebCore
207 217
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryItem.h ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698