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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 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, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 26
27 #ifndef HistoryItem_h 27 #ifndef HistoryItem_h
28 #define HistoryItem_h 28 #define HistoryItem_h
29 29
30 #include "bindings/core/v8/SerializedScriptValue.h" 30 #include "bindings/core/v8/SerializedScriptValue.h"
31 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
32 #include "core/loader/FrameLoaderTypes.h" 32 #include "core/loader/FrameLoaderTypes.h"
33 #include "platform/geometry/FloatPoint.h" 33 #include "platform/geometry/FloatPoint.h"
34 #include "platform/geometry/IntPoint.h" 34 #include "platform/geometry/IntPoint.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "platform/scroll/ScrollTypes.h"
36 #include "platform/weborigin/Referrer.h" 37 #include "platform/weborigin/Referrer.h"
37 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class Document; 42 class Document;
42 class DocumentState; 43 class DocumentState;
43 class EncodedFormData; 44 class EncodedFormData;
44 class KURL; 45 class KURL;
45 class ResourceRequest; 46 class ResourceRequest;
46 47
47 class CORE_EXPORT HistoryItem final 48 class CORE_EXPORT HistoryItem final
48 : public GarbageCollectedFinalized<HistoryItem> { 49 : public GarbageCollectedFinalized<HistoryItem> {
49 public: 50 public:
50 static HistoryItem* create() { return new HistoryItem; } 51 static HistoryItem* create() { return new HistoryItem; }
51 ~HistoryItem(); 52 ~HistoryItem();
52 53
53 const String& urlString() const; 54 const String& urlString() const;
54 KURL url() const; 55 KURL url() const;
55 56
56 const Referrer& referrer() const; 57 const Referrer& referrer() const;
57 const String& target() const; 58 const String& target() const;
58 59
59 EncodedFormData* formData(); 60 EncodedFormData* formData();
60 const AtomicString& formContentType() const; 61 const AtomicString& formContentType() const;
61 62
62 const FloatPoint& visualViewportScrollPoint() const; 63 const ScrollOffset& visualViewportScrollOffset() const;
63 void setVisualViewportScrollPoint(const FloatPoint&); 64 void setVisualViewportScrollOffset(const ScrollOffset&);
64 const IntPoint& scrollPoint() const; 65 const ScrollOffset& scrollOffset() const;
65 void setScrollPoint(const IntPoint&); 66 void setScrollOffset(const ScrollOffset&);
66 67
67 float pageScaleFactor() const; 68 float pageScaleFactor() const;
68 void setPageScaleFactor(float); 69 void setPageScaleFactor(float);
69 70
70 Vector<String> getReferencedFilePaths(); 71 Vector<String> getReferencedFilePaths();
71 const Vector<String>& documentState(); 72 const Vector<String>& documentState();
72 void setDocumentState(const Vector<String>&); 73 void setDocumentState(const Vector<String>&);
73 void setDocumentState(DocumentState*); 74 void setDocumentState(DocumentState*);
74 void clearDocumentState(); 75 void clearDocumentState();
75 76
(...skipping 30 matching lines...) Expand all
106 107
107 DECLARE_TRACE(); 108 DECLARE_TRACE();
108 109
109 private: 110 private:
110 HistoryItem(); 111 HistoryItem();
111 112
112 String m_urlString; 113 String m_urlString;
113 Referrer m_referrer; 114 Referrer m_referrer;
114 String m_target; 115 String m_target;
115 116
116 FloatPoint m_visualViewportScrollPoint; 117 ScrollOffset m_visualViewportScrollOffset;
117 IntPoint m_scrollPoint; 118 ScrollOffset m_scrollOffset;
118 float m_pageScaleFactor; 119 float m_pageScaleFactor;
119 Vector<String> m_documentStateVector; 120 Vector<String> m_documentStateVector;
120 Member<DocumentState> m_documentState; 121 Member<DocumentState> m_documentState;
121 122
122 // If two HistoryItems have the same item sequence number, then they are 123 // If two HistoryItems have the same item sequence number, then they are
123 // clones of one another. Traversing history from one such HistoryItem to 124 // clones of one another. Traversing history from one such HistoryItem to
124 // another is a no-op. HistoryItem clones are created for parent and 125 // another is a no-op. HistoryItem clones are created for parent and
125 // sibling frames when only a subframe navigates. 126 // sibling frames when only a subframe navigates.
126 int64_t m_itemSequenceNumber; 127 int64_t m_itemSequenceNumber;
127 128
(...skipping 11 matching lines...) Expand all
139 140
140 // info used to repost form data 141 // info used to repost form data
141 RefPtr<EncodedFormData> m_formData; 142 RefPtr<EncodedFormData> m_formData;
142 AtomicString m_formContentType; 143 AtomicString m_formContentType;
143 144
144 }; // class HistoryItem 145 }; // class HistoryItem
145 146
146 } // namespace blink 147 } // namespace blink
147 148
148 #endif // HISTORYITEM_H 149 #endif // HISTORYITEM_H
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698