Create 1453 release branch for CEF3.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1453@1183 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-04-05 21:38:48 +00:00
parent 0267930259
commit 3e4b1112a9
802 changed files with 132391 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
Index: common.gypi
===================================================================
--- common.gypi (revision 102269)
+++ common.gypi (working copy)
@@ -9,6 +9,9 @@
# Variables expected to be overriden on the GYP command line (-D) or by
# ~/.gyp/include.gypi.
'variables': {
+ # Directory for CEF source files. This will be set by cef.gypi.
+ 'cef_directory%' : '',
+
# Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary
Index: mac/strip_save_dsym
===================================================================
--- mac/strip_save_dsym (revision 102269)
+++ mac/strip_save_dsym (working copy)
@@ -48,7 +48,7 @@
"bundle"]
macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")"
- file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho],
+ file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho],
stdout=subprocess.PIPE)
archs = []

View File

@@ -0,0 +1,17 @@
Index: resource_ids
===================================================================
--- resource_ids (revision 149431)
+++ resource_ids (working copy)
@@ -16,6 +16,12 @@
{
"SRCDIR": "../..",
+ "cef/libcef/resources/cef_resources.grd": {
+ "includes": [27500],
+ },
+ "cef/libcef/resources/cef_strings.grd": {
+ "messages": [28000],
+ },
"chrome/browser/browser_resources.grd": {
"includes": [500],
"structures": [750],

View File

@@ -0,0 +1,13 @@
Index: message_loop.cc
===================================================================
--- message_loop.cc (revision 181864)
+++ message_loop.cc (working copy)
@@ -193,7 +193,7 @@
MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current());
- DCHECK(!run_loop_);
+ //DCHECK(!run_loop_);
// Clean up any unprocessed tasks, but take care: deleting a task could
// result in the addition of more tasks (e.g., via DeleteSoon). We set a

View File

@@ -0,0 +1,39 @@
Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp (revision 146842)
+++ page/FrameView.cpp (working copy)
@@ -209,10 +209,12 @@
if (!page)
return;
+#if 0
if (m_frame == page->mainFrame()) {
ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
}
+#endif
}
PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm
===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 146842)
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -34,6 +34,7 @@
#if PLATFORM(CHROMIUM)
bool isScrollbarOverlayAPIAvailable()
{
+#if 0
static bool apiAvailable;
static bool shouldInitialize = true;
if (shouldInitialize) {
@@ -44,6 +45,9 @@
&& [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
}
return apiAvailable;
+#else
+ return false;
+#endif
}
#endif

View File

@@ -0,0 +1,263 @@
Index: Platform/chromium/public/WebWorkerScriptObserver.h
===================================================================
--- Platform/chromium/public/WebWorkerScriptObserver.h (revision 0)
+++ Platform/chromium/public/WebWorkerScriptObserver.h (revision 0)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2013 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 WebWorkerScriptObserver_h
+#define WebWorkerScriptObserver_h
+
+#include <v8.h>
+
+namespace WebKit {
+
+ class WebURL;
+ class WebWorkerRunLoop;
+
+ class WebWorkerScriptObserver {
+ public:
+ // Notifies that a new script context has been created for a worker.
+ // This will be called only once per worker context.
+ virtual void didCreateWorkerScriptContext(const WebWorkerRunLoop&, const WebURL&, v8::Handle<v8::Context>) { }
+
+ // WebKit is about to release its reference to a v8 context for a worker.
+ virtual void willReleaseWorkerScriptContext(const WebWorkerRunLoop&, const WebURL&, v8::Handle<v8::Context>) { }
+
+ protected:
+ virtual ~WebWorkerScriptObserver() { }
+ };
+
+} // namespace WebKit
+
+#endif
Property changes on: Platform\chromium\public\WebWorkerScriptObserver.h
___________________________________________________________________
Added: svn:eol-style
+ LF
Index: WebCore/bindings/v8/WorkerScriptController.cpp
===================================================================
--- WebCore/bindings/v8/WorkerScriptController.cpp (revision 145278)
+++ WebCore/bindings/v8/WorkerScriptController.cpp (working copy)
@@ -51,11 +51,23 @@
#if PLATFORM(CHROMIUM)
#include <public/Platform.h>
+#include <public/WebURL.h>
#include <public/WebWorkerRunLoop.h>
+#include <public/WebWorkerScriptObserver.h>
#endif
namespace WebCore {
+namespace {
+
+static Vector<WebKit::WebWorkerScriptObserver*>& observerVector()
+{
+ AtomicallyInitializedStatic(Vector<WebKit::WebWorkerScriptObserver*>&, observers = *new Vector<WebKit::WebWorkerScriptObserver*>);
+ return observers;
+}
+
+} // namespace
+
WorkerScriptController::WorkerScriptController(WorkerContext* workerContext)
: m_workerContext(workerContext)
, m_isolate(v8::Isolate::New())
@@ -73,6 +85,8 @@
WorkerScriptController::~WorkerScriptController()
{
m_domDataStore.clear();
+ if (!m_context.isEmpty())
+ notifyWillReleaseWorkerScriptContext();
#if PLATFORM(CHROMIUM)
// The corresponding call to didStartWorkerRunLoop is in
// WorkerThread::workerThread().
@@ -134,6 +148,8 @@
v8::Handle<v8::Object> globalObject = v8::Handle<v8::Object>::Cast(m_context->Global()->GetPrototype());
globalObject->SetPrototype(jsWorkerContext);
+ notifyDidCreateWorkerScriptContext();
+
return true;
}
@@ -258,6 +274,39 @@
return workerContext->script();
}
+void WorkerScriptController::addObserver(WebKit::WebWorkerScriptObserver* observer)
+{
+ if (WebCore::WorkerThread::workerThreadCount() > 0)
+ return;
+
+ observerVector().append(observer);
+}
+
+void WorkerScriptController::removeObserver(WebKit::WebWorkerScriptObserver* observer)
+{
+ if (WebCore::WorkerThread::workerThreadCount() > 0)
+ return;
+
+ Vector<WebKit::WebWorkerScriptObserver*>& observers = observerVector();
+ size_t pos = observers.find(observer);
+ if (pos != notFound)
+ observers.remove(pos);
+}
+
+void WorkerScriptController::notifyDidCreateWorkerScriptContext()
+{
+ const Vector<WebKit::WebWorkerScriptObserver*>& observers = observerVector();
+ for (Vector<WebKit::WebWorkerScriptObserver*>::const_iterator i = observers.begin(); i != observers.end(); ++i)
+ (*i)->didCreateWorkerScriptContext(WebKit::WebWorkerRunLoop(&m_workerContext->thread()->runLoop()), m_workerContext->url(), m_context.get());
+}
+
+void WorkerScriptController::notifyWillReleaseWorkerScriptContext()
+{
+ const Vector<WebKit::WebWorkerScriptObserver*>& observers = observerVector();
+ for (Vector<WebKit::WebWorkerScriptObserver*>::const_iterator i = observers.begin(); i != observers.end(); ++i)
+ (*i)->willReleaseWorkerScriptContext(WebKit::WebWorkerRunLoop(&m_workerContext->thread()->runLoop()), m_workerContext->url(), m_context.get());
+}
+
} // namespace WebCore
#endif // ENABLE(WORKERS)
Index: WebCore/bindings/v8/WorkerScriptController.h
===================================================================
--- WebCore/bindings/v8/WorkerScriptController.h (revision 145278)
+++ WebCore/bindings/v8/WorkerScriptController.h (working copy)
@@ -40,6 +40,10 @@
#include <wtf/Threading.h>
#include <wtf/text/TextPosition.h>
+namespace WebKit {
+class WebWorkerScriptObserver;
+}
+
namespace WebCore {
class ScriptSourceCode;
@@ -95,10 +99,17 @@
// Returns a local handle of the context.
v8::Local<v8::Context> context() { return v8::Local<v8::Context>::New(m_context.get()); }
+ // Add or remove an observer. Can only be called while no WebWorkers exist.
+ static void addObserver(WebKit::WebWorkerScriptObserver*);
+ static void removeObserver(WebKit::WebWorkerScriptObserver*);
+
private:
bool initializeContextIfNeeded();
void disposeContext();
+ void notifyDidCreateWorkerScriptContext();
+ void notifyWillReleaseWorkerScriptContext();
+
WorkerContext* m_workerContext;
v8::Isolate* m_isolate;
ScopedPersistent<v8::Context> m_context;
Index: WebKit/chromium/public/WebWorkerInfo.h
===================================================================
--- WebKit/chromium/public/WebWorkerInfo.h (revision 145278)
+++ WebKit/chromium/public/WebWorkerInfo.h (working copy)
@@ -35,9 +35,15 @@
namespace WebKit {
+class WebWorkerScriptObserver;
+
class WebWorkerInfo {
public:
WEBKIT_EXPORT static unsigned dedicatedWorkerCount();
+
+ // Add or remove an observer. Can only be called while no WebWorkers exist.
+ WEBKIT_EXPORT static void addScriptObserver(WebWorkerScriptObserver*);
+ WEBKIT_EXPORT static void removeScriptObserver(WebWorkerScriptObserver*);
};
}
Index: WebKit/chromium/public/WebWorkerScriptObserver.h
===================================================================
--- WebKit/chromium/public/WebWorkerScriptObserver.h (revision 0)
+++ WebKit/chromium/public/WebWorkerScriptObserver.h (revision 0)
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "../../../Platform/chromium/public/WebWorkerScriptObserver.h"
Property changes on: WebKit\chromium\public\WebWorkerScriptObserver.h
___________________________________________________________________
Added: svn:eol-style
+ LF
Index: WebKit/chromium/src/WebWorkerInfo.cpp
===================================================================
--- WebKit/chromium/src/WebWorkerInfo.cpp (revision 145278)
+++ WebKit/chromium/src/WebWorkerInfo.cpp (working copy)
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebWorkerInfo.h"
+#include "WorkerScriptController.h"
#include "WorkerThread.h"
namespace WebKit {
@@ -40,4 +41,14 @@
return WebCore::WorkerThread::workerThreadCount();
}
+void WebWorkerInfo::addScriptObserver(WebWorkerScriptObserver* observer)
+{
+ WebCore::WorkerScriptController::addObserver(observer);
}
+
+void WebWorkerInfo::removeScriptObserver(WebWorkerScriptObserver* observer)
+{
+ WebCore::WorkerScriptController::removeObserver(observer);
+}
+
+}

View File

@@ -0,0 +1,13 @@
Index: WebNode.cpp
===================================================================
--- WebNode.cpp (revision 146842)
+++ WebNode.cpp (working copy)
@@ -181,7 +181,7 @@
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
// Please do not add more eventTypes to this list without an API review.
- RELEASE_ASSERT(eventType == "mousedown");
+ //RELEASE_ASSERT(eventType == "mousedown");
EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper(eventType, useCapture, m_private.get());
// The listenerWrapper is only referenced by the actual Node. Once it goes

View File

@@ -0,0 +1,13 @@
Index: features.gypi
===================================================================
--- features.gypi (revision 145278)
+++ features.gypi (working copy)
@@ -193,7 +193,7 @@
'ENABLE_CALENDAR_PICKER=1',
'ENABLE_DATALIST_ELEMENT=1',
'ENABLE_INPUT_SPEECH=1',
- 'ENABLE_INPUT_TYPE_COLOR=1',
+ 'ENABLE_INPUT_TYPE_COLOR=0',
'ENABLE_INPUT_TYPE_WEEK=1',
'ENABLE_INPUT_MULTIPLE_FIELDS_UI=1',
'ENABLE_LEGACY_NOTIFICATIONS=1',

View File

@@ -0,0 +1,13 @@
Index: contrib/minizip/unzip.c
===================================================================
--- contrib/minizip/unzip.c (revision 176706)
+++ contrib/minizip/unzip.c (working copy)
@@ -69,7 +69,7 @@
#include <string.h>
#ifndef NOUNCRYPT
- #define NOUNCRYPT
+// #define NOUNCRYPT
#endif
#include "third_party/zlib/zlib.h"