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

Unified Diff: Source/core/frame/Frame.cpp

Issue 46783003: Add a unique frame id and save it on HistoryItem. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index 1b7f0d1098515eec3985ea8f2b11d3ae18a2f1e3..b319fd0a283c1163e446b24b0351a261c5c51322 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -100,6 +100,12 @@ static inline float parentTextZoomFactor(Frame* frame)
return parent->textZoomFactor();
}
+static int64_t nextFrameID()
+{
+ static int64_t next = static_cast<long long>(currentTime() * 10000000);
+ return ++next;
+}
+
inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient)
: m_page(page)
, m_treeNode(this, parentFromOwnerElement(ownerElement))
@@ -113,6 +119,7 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
, m_eventHandler(adoptPtr(new EventHandler(this)))
, m_animationController(adoptPtr(new AnimationController(this)))
, m_inputMethodController(InputMethodController::create(*this))
+ , m_id(nextFrameID())
, m_pageZoomFactor(parentPageZoomFactor(this))
, m_textZoomFactor(parentTextZoomFactor(this))
#if ENABLE(ORIENTATION_EVENTS)

Powered by Google App Engine
This is Rietveld 408576698