[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jochen at chromium.org jochen at chromium.org
Wed Dec 22 14:00:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ac78faa57303b4475b0e38c74bad4984ab2eab72
Author: jochen at chromium.org <jochen at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 1 08:06:10 2010 +0000

    2010-10-01  Jochen Eisinger  <jochen at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] add an identifier method to WebFrame. The identifier can be used to identify
            a given frame of a view over time. Using a pointer to the WebFrame object is fragile,
            since a new frame might have been allocated at the same address as an old, deleted frame.
            https://bugs.webkit.org/show_bug.cgi?id=46884
    
            * public/WebFrame.h:
            * src/WebFrameImpl.cpp:
            (WebKit::generateFrameIdentifier):
            (WebKit::WebFrameImpl::identifier):
            (WebKit::WebFrameImpl::WebFrameImpl):
            * src/WebFrameImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68871 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 611eec6..b01aabe 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-01  Jochen Eisinger  <jochen at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] add an identifier method to WebFrame. The identifier can be used to identify
+        a given frame of a view over time. Using a pointer to the WebFrame object is fragile,
+        since a new frame might have been allocated at the same address as an old, deleted frame.
+        https://bugs.webkit.org/show_bug.cgi?id=46884
+
+        * public/WebFrame.h:
+        * src/WebFrameImpl.cpp:
+        (WebKit::generateFrameIdentifier):
+        (WebKit::WebFrameImpl::identifier):
+        (WebKit::WebFrameImpl::WebFrameImpl):
+        * src/WebFrameImpl.h:
+
 2010-09-29  John Abd-El-Malek  <jam at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 5d41d10..5f8539c 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -109,6 +109,9 @@ public:
     // frame name unique within the hierarchy.
     virtual void setName(const WebString&) = 0;
 
+    // A globally unique identifier for this frame.
+    virtual long long identifier() const = 0;
+
     // The url of the document loaded in this frame.  This is equivalent to
     // dataSource()->request().url().
     virtual WebURL url() const = 0;
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 1b64e5a..b93a792 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -261,6 +261,12 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame,
     }
 }
 
+static long long generateFrameIdentifier()
+{
+    static long long next = 0;
+    return ++next;
+}
+
 WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame)
 {
     if (!frame)
@@ -488,6 +494,11 @@ void WebFrameImpl::setName(const WebString& name)
     m_frame->tree()->setName(name);
 }
 
+long long WebFrameImpl::identifier() const
+{
+    return m_identifier;
+}
+
 WebURL WebFrameImpl::url() const
 {
     const WebDataSource* ds = dataSource();
@@ -1779,6 +1790,7 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
     , m_scopingComplete(false)
     , m_nextInvalidateAfter(0)
     , m_animationController(this)
+    , m_identifier(generateFrameIdentifier())
 {
     ChromiumBridge::incrementStatsCounter(webFrameActiveCount);
     frameCount++;
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index d93254b..4e8b1ea 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -67,6 +67,7 @@ public:
     // WebFrame methods:
     virtual WebString name() const;
     virtual void setName(const WebString&);
+    virtual long long identifier() const;
     virtual WebURL url() const;
     virtual WebURL favIconURL() const;
     virtual WebURL openSearchDescriptionURL() const;
@@ -386,6 +387,9 @@ private:
 
     // Keeps a reference to the frame's WebAnimationController.
     WebAnimationControllerImpl m_animationController;
+
+    // The identifier of this frame.
+    long long m_identifier;
 };
 
 } // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list