[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
darin at chromium.org
darin at chromium.org
Wed Jan 20 22:13:56 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit a7fb0e55ae8ab73a02f3e59b1fa53d93f451543a
Author: darin at chromium.org <darin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 6 07:56:06 2010 +0000
2010-01-05 Darin Fisher <darin at chromium.org>
Reviewed by Adam Barth.
[Chromium] Expose more APIs to eliminate WebCore usage in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=33249
* WebKit.gyp:
* public/WebFrame.h:
* public/WebGlyphCache.h: Added.
* public/WebKit.h:
* src/WebFrameImpl.cpp:
(WebKit::WebFrame::instanceCount):
(WebKit::WebFrameImpl::WebFrameImpl):
(WebKit::WebFrameImpl::~WebFrameImpl):
* src/WebFrameImpl.h:
* src/WebGlyphCache.cpp: Added.
(WebKit::WebGlyphCache::pageCount):
* src/WebKit.cpp:
(WebKit::enableLogChannel):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index fd977e3..99542d7 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,24 @@
+2010-01-05 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Expose more APIs to eliminate WebCore usage in Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=33249
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ * public/WebGlyphCache.h: Added.
+ * public/WebKit.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrame::instanceCount):
+ (WebKit::WebFrameImpl::WebFrameImpl):
+ (WebKit::WebFrameImpl::~WebFrameImpl):
+ * src/WebFrameImpl.h:
+ * src/WebGlyphCache.cpp: Added.
+ (WebKit::WebGlyphCache::pageCount):
+ * src/WebKit.cpp:
+ (WebKit::enableLogChannel):
+
2010-01-05 Adam Barth <abarth at webkit.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 3c84cb4..1660d3c 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -123,6 +123,7 @@
'public/WebFrameClient.h',
'public/WebFontCache.h',
'public/WebFormElement.h',
+ 'public/WebGlyphCache.h',
'public/WebHistoryItem.h',
'public/WebHTTPBody.h',
'public/WebImage.h',
@@ -272,6 +273,7 @@
'src/WebFormElement.cpp',
'src/WebFrameImpl.cpp',
'src/WebFrameImpl.h',
+ 'src/WebGlyphCache.cpp',
'src/WebHistoryItem.cpp',
'src/WebHTTPBody.cpp',
'src/WebImageCG.cpp',
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 3247274..4197c23 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -69,6 +69,9 @@ template <typename T> class WebVector;
class WebFrame {
public:
+ // Returns the number of live WebFrame objects, used for leak checking.
+ WEBKIT_API static int instanceCount();
+
// The two functions below retrieve the WebFrame instances relating the
// currently executing JavaScript. Since JavaScript can make function
// calls across frames, though, we need to be more precise.
diff --git a/WebKit/chromium/public/WebGlyphCache.h b/WebKit/chromium/public/WebGlyphCache.h
new file mode 100644
index 0000000..661767d
--- /dev/null
+++ b/WebKit/chromium/public/WebGlyphCache.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGlyphCache_h
+#define WebGlyphCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query WebKit's glyph cache (which maps unicode characters to
+// glyphs in particular fonts).
+class WebGlyphCache {
+public:
+ // Returns the number of pages in the glyph cache.
+ WEBKIT_API static size_t pageCount();
+
+private:
+ WebGlyphCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h
index b9e6407..732cac6 100644
--- a/WebKit/chromium/public/WebKit.h
+++ b/WebKit/chromium/public/WebKit.h
@@ -55,6 +55,9 @@ WEBKIT_API WebKitClient* webKitClient();
WEBKIT_API void setLayoutTestMode(bool);
WEBKIT_API bool layoutTestMode();
+// Enables the named log channel. See WebCore/platform/Logging.h for details.
+WEBKIT_API void enableLogChannel(const char*);
+
// Purge the plugin list cache. If |reloadPages| is true, any pages
// containing plugins will be reloaded after refreshing the plugin list.
WEBKIT_API void resetPluginCache(bool reloadPages);
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index e76825e..cb700ca 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -157,6 +157,8 @@ using namespace WebCore;
namespace WebKit {
+static int frameCount = 0;
+
// Key for a StatsCounter tracking how many WebFrames are active.
static const char* const webFrameActiveCount = "WebFrameActiveCount";
@@ -332,6 +334,11 @@ private:
// WebFrame -------------------------------------------------------------------
+int WebFrame::instanceCount()
+{
+ return frameCount;
+}
+
WebFrame* WebFrame::frameForEnteredContext()
{
Frame* frame =
@@ -1492,8 +1499,6 @@ WebString WebFrameImpl::counterValueForElementById(const WebString& id) const
// WebFrameImpl public ---------------------------------------------------------
-int WebFrameImpl::m_liveObjectCount = 0;
-
PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client)
{
return adoptRef(new WebFrameImpl(client));
@@ -1514,13 +1519,13 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
, m_animationController(this)
{
ChromiumBridge::incrementStatsCounter(webFrameActiveCount);
- m_liveObjectCount++;
+ frameCount++;
}
WebFrameImpl::~WebFrameImpl()
{
ChromiumBridge::decrementStatsCounter(webFrameActiveCount);
- m_liveObjectCount--;
+ frameCount--;
cancelPendingScopingEffort();
clearPasswordListeners();
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 1ad7e53..ba8d279 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -167,8 +167,6 @@ public:
static PassRefPtr<WebFrameImpl> create(WebFrameClient* client);
~WebFrameImpl();
- static int liveObjectCount() { return m_liveObjectCount; }
-
// Called by the WebViewImpl to initialize its main frame:
void initializeAsMainFrame(WebViewImpl*);
@@ -283,9 +281,6 @@ private:
void loadJavaScriptURL(const WebCore::KURL&);
- // Used to check for leaks of this object.
- static int m_liveObjectCount;
-
FrameLoaderClientImpl m_frameLoaderClient;
WebFrameClient* m_client;
diff --git a/WebKit/chromium/src/WebGlyphCache.cpp b/WebKit/chromium/src/WebGlyphCache.cpp
new file mode 100644
index 0000000..272c6cd
--- /dev/null
+++ b/WebKit/chromium/src/WebGlyphCache.cpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGlyphCache.h"
+
+#include "GlyphPageTreeNode.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+size_t WebGlyphCache::pageCount()
+{
+ return GlyphPageTreeNode::treeGlyphPageCount();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index a129f85..07f28f7 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -94,6 +94,13 @@ bool layoutTestMode()
return s_layoutTestMode;
}
+void enableLogChannel(const char* name)
+{
+ WTFLogChannel* channel = WebCore::getChannelFromName(name);
+ if (channel)
+ channel->state = WTFLogChannelOn;
+}
+
void resetPluginCache(bool reloadPages)
{
WebCore::Page::refreshPlugins(reloadPages);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list