Update to Chromium revision 224895.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1460 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-10-16 00:25:38 +00:00
parent 901528b4a5
commit 4c3bd0b724
31 changed files with 157 additions and 134 deletions

View File

@@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '220934',
'chromium_revision': '224895',
}

View File

@@ -4,6 +4,8 @@
{
'variables': {
'use_ash': 0,
'use_aura': 0,
'conditions': [
# Directory for CEF source files.
[ 'OS=="win"', {

View File

@@ -26,8 +26,8 @@
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/mac/WebInputEventFactory.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "ui/base/keycodes/keyboard_codes_posix.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/keycodes/keyboard_codes_posix.h"
#include "ui/gfx/rect.h"
// Wrapper NSView for the native view. Necessary to destroy the browser when

View File

@@ -27,7 +27,7 @@
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/win/WebInputEventFactory.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/win/hwnd_util.h"
#pragma comment(lib, "dwmapi.lib")
@@ -458,7 +458,7 @@ LPCTSTR CefBrowserHostImpl::GetWndClass() {
LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam) {
CefBrowserHostImpl* browser =
static_cast<CefBrowserHostImpl*>(ui::GetWindowUserData(hwnd));
static_cast<CefBrowserHostImpl*>(gfx::GetWindowUserData(hwnd));
switch (message) {
case WM_CLOSE:
@@ -479,7 +479,7 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
case WM_DESTROY:
if (browser) {
// Clear the user data pointer.
ui::SetWindowUserData(hwnd, NULL);
gfx::SetWindowUserData(hwnd, NULL);
// Force the browser to be destroyed and release the reference added in
// PlatformCreateWindow().
@@ -542,7 +542,7 @@ bool CefBrowserHostImpl::PlatformCreateWindow() {
// Set window user data to this object for future reference from the window
// procedure.
ui::SetWindowUserData(window_info_.window, this);
gfx::SetWindowUserData(window_info_.window, this);
// Add a reference that will be released in the WM_DESTROY handler.
AddRef();

View File

@@ -623,6 +623,7 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
bool CefContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const GURL& target_url,

View File

@@ -110,6 +110,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::CertificateRequestResultType* result) OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual bool CanCreateWindow(const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
WindowContainerType container_type,
const GURL& target_url,

View File

@@ -18,6 +18,7 @@
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "grit/cef_resources.h"
@@ -60,13 +61,13 @@ content::DevToolsAgentHost* CefDevToolsBindingHandler::ForIdentifier(
if (!render_process_host->HasConnection())
continue;
content::RenderWidgetHost::List widgets =
content::RenderWidgetHost::GetRenderWidgetHosts();
for (size_t i = 0; i < widgets.size(); ++i) {
if (!widgets[i]->IsRenderView())
scoped_ptr<content::RenderWidgetHostIterator> widgets(
content::RenderWidgetHost::GetRenderWidgetHosts());
while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
if (!widget->IsRenderView())
continue;
content::RenderViewHost* host = content::RenderViewHost::From(widgets[i]);
content::RenderViewHost* host = content::RenderViewHost::From(widget);
if (GetIdentifier(host) == identifier) {
// May create a new agent host.
scoped_refptr<content::DevToolsAgentHost> agent_host(
@@ -163,11 +164,11 @@ std::string CefDevToolsDelegate::GetViewDescription(content::RenderViewHost*) {
return std::string();
}
scoped_refptr<net::StreamListenSocket>
scoped_ptr<net::StreamListenSocket>
CefDevToolsDelegate::CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
std::string* name) {
return NULL;
return scoped_ptr<net::StreamListenSocket>();
}
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,

View File

@@ -63,7 +63,7 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
virtual content::RenderViewHost* CreateNewTarget() OVERRIDE;
virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE;
virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE;
virtual scoped_refptr<net::StreamListenSocket> CreateSocketForTethering(
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate,
std::string* name) OVERRIDE;

View File

@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
#include "ui/base/events/event.h"
#include "ui/events/event.h"
// This file includes a selection of methods copied from
// chrome/browser/ui/gtk/gtk_util.cc.

View File

@@ -81,7 +81,6 @@ void CefJavaScriptDialogManager::RunJavaScriptDialog(
content::JavaScriptMessageType message_type,
const string16& message_text,
const string16& default_prompt_text,
bool user_gesture,
const DialogClosedCallback& callback,
bool* did_suppress_message) {
CefRefPtr<CefClient> client = browser_->GetClient();

View File

@@ -29,7 +29,6 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
content::JavaScriptMessageType message_type,
const string16& message_text,
const string16& default_prompt_text,
bool user_gesture,
const DialogClosedCallback& callback,
bool* did_suppress_message) OVERRIDE;

View File

@@ -206,15 +206,15 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
#if !defined(OS_MACOSX)
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(
ui::TextInputType type,
bool can_compose_inline,
ui::TextInputMode mode) {
ui::TextInputMode mode,
bool can_compose_inline) {
}
void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
}
void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
const ui::Range& range,
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) {
}
#endif // !defined(OS_MACOSX)
@@ -292,8 +292,8 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
return gfx::Rect();
}
void CefRenderWidgetHostViewOSR::OnAccessibilityNotifications(
const std::vector<AccessibilityHostMsg_NotificationParams>& params) {
void CefRenderWidgetHostViewOSR::OnAccessibilityEvents(
const std::vector<AccessibilityHostMsg_EventParams>& params) {
}
void CefRenderWidgetHostViewOSR::Destroy() {

View File

@@ -48,26 +48,26 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent);
void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent);
bool GetCachedFirstRectForCharacterRange(ui::Range range, gfx::Rect* rect,
ui::Range* actual_range) const;
bool GetCachedFirstRectForCharacterRange(gfx::Range range, gfx::Rect* rect,
gfx::Range* actual_range) const;
private:
// Returns composition character boundary rectangle. The |range| is
// composition based range. Also stores |actual_range| which is corresponding
// to actually used range for returned rectangle.
gfx::Rect GetFirstRectForCompositionRange(const ui::Range& range,
ui::Range* actual_range) const;
gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range,
gfx::Range* actual_range) const;
// Converts from given whole character range to composition oriented range. If
// the conversion failed, return ui::Range::InvalidRange.
ui::Range ConvertCharacterRangeToCompositionRange(
const ui::Range& request_range) const;
// the conversion failed, return gfx::Range::InvalidRange.
gfx::Range ConvertCharacterRangeToCompositionRange(
const gfx::Range& request_range) const;
// Returns true if there is line break in |range| and stores line breaking
// point to |line_breaking_point|. The |line_break_point| is valid only if
// this function returns true.
static bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds,
const ui::Range& range,
const gfx::Range& range,
size_t* line_break_point);
void DestroyNSTextInputOSR();
@@ -119,11 +119,11 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
virtual void TextInputTypeChanged(ui::TextInputType type,
bool can_compose_inline,
ui::TextInputMode mode) OVERRIDE;
ui::TextInputMode mode,
bool can_compose_inline) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
virtual void ImeCompositionRangeChanged(
const ui::Range& range,
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) OVERRIDE;
virtual void DidUpdateBackingStore(
const gfx::Rect& scroll_rect,
@@ -137,8 +137,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
#endif
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
void OnAccessibilityNotifications(
const std::vector<AccessibilityHostMsg_NotificationParams>& params)
virtual void OnAccessibilityEvents(
const std::vector<AccessibilityHostMsg_EventParams>& params)
OVERRIDE;
virtual void Destroy() OVERRIDE;
virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE;

View File

@@ -55,7 +55,7 @@ void CefRenderWidgetHostViewOSR::DestroyNSTextInputOSR() {
}
void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
const ui::Range& range,
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) {
CefTextInputClientOSRMac* client = GetInputClientFromContext(
text_input_context_osr_mac_);
@@ -76,14 +76,14 @@ void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(
ui::TextInputType type,
bool can_compose_inline,
ui::TextInputMode mode) {
ui::TextInputMode mode,
bool can_compose_inline) {
[NSApp updateWindows];
}
bool CefRenderWidgetHostViewOSR::GetLineBreakIndex(
const std::vector<gfx::Rect>& bounds,
const ui::Range& range,
const gfx::Range& range,
size_t* line_break_point) {
DCHECK(line_break_point);
if (range.start() >= bounds.size() || range.is_reversed() || range.is_empty())
@@ -111,7 +111,7 @@ bool CefRenderWidgetHostViewOSR::GetLineBreakIndex(
}
gfx::Rect CefRenderWidgetHostViewOSR::GetFirstRectForCompositionRange(
const ui::Range& range, ui::Range* actual_range) const {
const gfx::Range& range, gfx::Range* actual_range) const {
CefTextInputClientOSRMac* client = GetInputClientFromContext(
text_input_context_osr_mac_);
@@ -141,7 +141,7 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetFirstRectForCompositionRange(
range, &end_idx)) {
end_idx = range.end();
}
*actual_range = ui::Range(range.start(), end_idx);
*actual_range = gfx::Range(range.start(), end_idx);
gfx::Rect rect = client->composition_bounds_[range.start()];
for (size_t i = range.start() + 1; i < end_idx; ++i) {
rect.Union(client->composition_bounds_[i]);
@@ -149,44 +149,44 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetFirstRectForCompositionRange(
return rect;
}
ui::Range CefRenderWidgetHostViewOSR::ConvertCharacterRangeToCompositionRange(
const ui::Range& request_range) const {
gfx::Range CefRenderWidgetHostViewOSR::ConvertCharacterRangeToCompositionRange(
const gfx::Range& request_range) const {
CefTextInputClientOSRMac* client = GetInputClientFromContext(
text_input_context_osr_mac_);
DCHECK(client);
if (client->composition_range_.is_empty())
return ui::Range::InvalidRange();
return gfx::Range::InvalidRange();
if (request_range.is_reversed())
return ui::Range::InvalidRange();
return gfx::Range::InvalidRange();
if (request_range.start() < client->composition_range_.start()
|| request_range.start() > client->composition_range_.end()
|| request_range.end() > client->composition_range_.end())
return ui::Range::InvalidRange();
return gfx::Range::InvalidRange();
return ui::Range(request_range.start() - client->composition_range_.start(),
request_range.end() - client->composition_range_.start());
return gfx::Range(request_range.start() - client->composition_range_.start(),
request_range.end() - client->composition_range_.start());
}
bool CefRenderWidgetHostViewOSR::GetCachedFirstRectForCharacterRange(
ui::Range range, gfx::Rect* rect, ui::Range* actual_range) const {
gfx::Range range, gfx::Rect* rect, gfx::Range* actual_range) const {
DCHECK(rect);
CefTextInputClientOSRMac* client = GetInputClientFromContext(
text_input_context_osr_mac_);
// If requested range is same as caret location, we can just return it.
if (selection_range_.is_empty() && ui::Range(range) == selection_range_) {
if (selection_range_.is_empty() && gfx::Range(range) == selection_range_) {
if (actual_range)
*actual_range = range;
*rect = client->caret_rect_;
return true;
}
const ui::Range request_range_in_composition =
ConvertCharacterRangeToCompositionRange(ui::Range(range));
if (request_range_in_composition == ui::Range::InvalidRange())
const gfx::Range request_range_in_composition =
ConvertCharacterRangeToCompositionRange(gfx::Range(range));
if (request_range_in_composition == gfx::Range::InvalidRange())
return false;
// If firstRectForCharacterRange in WebFrame is failed in renderer,
@@ -197,11 +197,11 @@ bool CefRenderWidgetHostViewOSR::GetCachedFirstRectForCharacterRange(
DCHECK_EQ(client->composition_bounds_.size(),
client->composition_range_.length());
ui::Range ui_actual_range;
gfx::Range ui_actual_range;
*rect = GetFirstRectForCompositionRange(request_range_in_composition,
&ui_actual_range);
if (actual_range) {
*actual_range = ui::Range(
*actual_range = gfx::Range(
client->composition_range_.start() + ui_actual_range.start(),
client->composition_range_.start() + ui_actual_range.end()).ToNSRange();
}

View File

@@ -28,7 +28,7 @@
NSRange markedRange_;
// The current composition character range and its bounds.
ui::Range composition_range_;
gfx::Range composition_range_;
std::vector<gfx::Rect> composition_bounds_;
// The current caret bounds.

View File

@@ -97,7 +97,7 @@ extern "C" {
if (handlingKeyDown_) {
textToBeInserted_.append(base::SysNSStringToUTF16(im_text));
} else {
ui::Range replacement_range(replacementRange);
gfx::Range replacement_range(replacementRange);
renderWidgetHostView_->get_render_widget_host_impl()->ImeConfirmComposition(
base::SysNSStringToUTF16(im_text), replacement_range, false);
@@ -185,7 +185,7 @@ extern "C" {
// called in keyEvent: method.
if (!handlingKeyDown_) {
renderWidgetHostView_->get_render_widget_host_impl()->
ImeConfirmComposition(string16(), ui::Range::InvalidRange(), false);
ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false);
} else {
unmarkTextCalled_ = YES;
}
@@ -205,8 +205,8 @@ extern "C" {
actualRange:(NSRangePointer)actualRange {
NSRect rect;
gfx::Rect gfxRect;
ui::Range range(theRange);
ui::Range actual_range;
gfx::Range range(theRange);
gfx::Range actual_range;
if (!renderWidgetHostView_->GetCachedFirstRectForCharacterRange(range,
&gfxRect, &actual_range)) {
rect = content::TextInputClientMac::GetInstance()->
@@ -319,7 +319,7 @@ extern "C" {
if (textToBeInserted_.length() >
((hasMarkedText_ || oldHasMarkedText_) ? 0u : 1u)) {
renderWidgetHostView_->get_render_widget_host_impl()->ImeConfirmComposition(
textToBeInserted_, ui::Range::InvalidRange(), false);
textToBeInserted_, gfx::Range::InvalidRange(), false);
textToBeInserted_ = YES;
}
@@ -336,7 +336,7 @@ extern "C" {
} else if (oldHasMarkedText_ && !hasMarkedText_ && !textInserted) {
if (unmarkTextCalled_) {
renderWidgetHostView_->get_render_widget_host_impl()->
ImeConfirmComposition(string16(), ui::Range::InvalidRange(), false);
ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false);
} else {
renderWidgetHostView_->get_render_widget_host_impl()->
ImeCancelComposition();

View File

@@ -26,6 +26,7 @@ MSVC_POP_WARNING();
#include "libcef/renderer/render_process_observer.h"
#include "libcef/renderer/thread_util.h"
#include "libcef/renderer/v8_impl.h"
#include "libcef/renderer/webkit_glue.h"
#include "base/command_line.h"
#include "base/path_service.h"
@@ -542,7 +543,7 @@ void CefContentRendererClient::DidCreateScriptContext(
CefRefPtr<CefFrameImpl> framePtr = browserPtr->GetWebFrameImpl(frame);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(webkit_glue::GetV8Isolate(frame));
v8::Context::Scope scope(context);
WebCore::V8RecursionScope recursion_scope(
WebCore::getScriptExecutionContext());
@@ -575,7 +576,7 @@ void CefContentRendererClient::WillReleaseScriptContext(
if (browserPtr.get()) {
CefRefPtr<CefFrameImpl> framePtr = browserPtr->GetWebFrameImpl(frame);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(webkit_glue::GetV8Isolate(frame));
v8::Context::Scope scope(context);
WebCore::V8RecursionScope recursion_scope(
WebCore::getScriptExecutionContext());

View File

@@ -238,7 +238,7 @@ CefRefPtr<CefV8Context> CefFrameImpl::GetV8Context() {
CEF_REQUIRE_RT_RETURN(NULL);
if (frame_) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(webkit_glue::GetV8Isolate(frame_));
return new CefV8ContextImpl(webkit_glue::GetV8Context(frame_));
} else {
return NULL;

View File

@@ -46,7 +46,8 @@ class CefWebURLLoaderClient : public WebKit::WebURLLoaderClient {
WebURLLoader* loader,
const WebURLResponse& response) OVERRIDE;
virtual void didDownloadData(WebURLLoader* loader,
int dataLength) OVERRIDE;
int dataLength,
int encodedDataLength) OVERRIDE;
virtual void didReceiveData(WebURLLoader* loader,
const char* data,
int dataLength,
@@ -278,7 +279,8 @@ void CefWebURLLoaderClient::didReceiveResponse(
}
void CefWebURLLoaderClient::didDownloadData(WebURLLoader* loader,
int dataLength) {
int dataLength,
int encodedDataLength) {
}
void CefWebURLLoaderClient::didReceiveData(WebURLLoader* loader,

View File

@@ -2,6 +2,10 @@
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
// MSVC++ requires this to be set before any other includes to get M_PI.
// Otherwise there will be compile errors in wtf/MathExtras.h.
#define _USE_MATH_DEFINES
#include <map>
#include <string>
@@ -395,7 +399,7 @@ void TrackDestructor(v8::Isolate* isolate,
if (parameter)
delete parameter;
object->Dispose(isolate);
object->Reset();
object->Clear();
}
@@ -577,7 +581,8 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
v8::Handle<v8::Function> function,
v8::Handle<v8::Object> receiver,
int argc,
v8::Handle<v8::Value> args[]) {
v8::Handle<v8::Value> args[],
v8::Isolate* isolate) {
v8::Local<v8::Value> func_rv;
// Execute the function call using the ScriptController so that inspector
@@ -596,7 +601,7 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
if (controller) {
func_rv = WebCore::ScriptController::callFunctionWithInstrumentation(
controller->workerGlobalScope()->scriptExecutionContext(),
function, receiver, argc, args);
function, receiver, argc, args, isolate);
}
}
@@ -813,7 +818,7 @@ CefRefPtr<CefV8Context> CefV8Context::GetCurrentContext() {
CefRefPtr<CefV8Context> context;
CEF_V8_REQUIRE_ISOLATE_RETURN(context);
if (v8::Context::InContext()) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
context = new CefV8ContextImpl(v8::Context::GetCurrent());
}
return context;
@@ -824,7 +829,7 @@ CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext() {
CefRefPtr<CefV8Context> context;
CEF_V8_REQUIRE_ISOLATE_RETURN(context);
if (v8::Context::InContext()) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
context = new CefV8ContextImpl(v8::Context::GetEntered());
}
return context;
@@ -895,7 +900,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Context> context = GetV8Context();
v8::Context::Scope context_scope(context);
return new CefV8ValueImpl(context->Global());
@@ -904,7 +909,7 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
bool CefV8ContextImpl::Enter() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
WebCore::V8PerIsolateData::current()->incrementRecursionLevel();
handle_->GetNewV8Handle()->Enter();
@@ -917,7 +922,7 @@ bool CefV8ContextImpl::Enter() {
bool CefV8ContextImpl::Exit() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
DLOG_ASSERT(enter_count_ > 0);
handle_->GetNewV8Handle()->Exit();
@@ -949,7 +954,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
return false;
}
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Local<v8::Context> context = GetV8Context();
v8::Context::Scope context_scope(context);
v8::Local<v8::Object> obj = context->Global();
@@ -969,7 +974,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
exception = NULL;
v8::Local<v8::Value> func_rv =
CallV8Function(context, func, obj, 1, &code_val);
CallV8Function(context, func, obj, 1, &code_val, handle_->isolate());
if (try_catch.HasCaught()) {
exception = new CefV8ExceptionImpl(try_catch.Message());
@@ -986,7 +991,7 @@ v8::Handle<v8::Context> CefV8ContextImpl::GetV8Context() {
WebKit::WebFrame* CefV8ContextImpl::GetWebFrame() {
CEF_REQUIRE_RT();
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Context::Scope context_scope(GetV8Context());
WebKit::WebFrame* frame = WebKit::WebFrame::frameForCurrentContext();
return frame;
@@ -1005,7 +1010,7 @@ CefV8ValueImpl::Handle::~Handle() {
(tracker_ ? new CefV8MakeWeakParam(context_state_, tracker_) : NULL),
TrackDestructor);
} else {
handle_.Dispose(isolate());
handle_.Reset();
handle_.Clear();
if (tracker_)
@@ -1087,7 +1092,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
CefRefPtr<CefV8Accessor> accessor) {
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Local<v8::Context> context = v8::Context::GetCurrent();
if (context.IsEmpty()) {
@@ -1115,7 +1120,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Local<v8::Context> context = v8::Context::GetCurrent();
if (context.IsEmpty()) {
@@ -1149,7 +1154,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
return NULL;
}
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Local<v8::Context> context = v8::Context::GetCurrent();
if (context.IsEmpty()) {
@@ -1385,7 +1390,7 @@ bool CefV8ValueImpl::IsObject() {
bool CefV8ValueImpl::IsArray() {
CEF_V8_REQUIRE_MLT_RETURN(false);
if (type_ == TYPE_OBJECT) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
return handle_->GetNewV8Handle(false)->IsArray();
} else {
return false;
@@ -1395,7 +1400,7 @@ bool CefV8ValueImpl::IsArray() {
bool CefV8ValueImpl::IsFunction() {
CEF_V8_REQUIRE_MLT_RETURN(false);
if (type_ == TYPE_OBJECT) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
return handle_->GetNewV8Handle(false)->IsFunction();
} else {
return false;
@@ -1488,7 +1493,7 @@ CefString CefV8ValueImpl::GetStringValue() {
bool CefV8ValueImpl::IsUserCreated() {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1531,7 +1536,7 @@ bool CefV8ValueImpl::SetRethrowExceptions(bool rethrow) {
bool CefV8ValueImpl::HasValue(const CefString& key) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
return obj->Has(GetV8String(key));
@@ -1545,7 +1550,7 @@ bool CefV8ValueImpl::HasValue(int index) {
return false;
}
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
return obj->Has(index);
@@ -1554,7 +1559,7 @@ bool CefV8ValueImpl::HasValue(int index) {
bool CefV8ValueImpl::DeleteValue(const CefString& key) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1572,7 +1577,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
return false;
}
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1585,7 +1590,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1605,7 +1610,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
return NULL;
}
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1624,7 +1629,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
CefV8ValueImpl* impl = static_cast<CefV8ValueImpl*>(value.get());
if (impl && impl->IsValid()) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1649,7 +1654,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
CefV8ValueImpl* impl = static_cast<CefV8ValueImpl*>(value.get());
if (impl && impl->IsValid()) {
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1667,7 +1672,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings,
PropertyAttribute attribute) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1697,7 +1702,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings,
bool CefV8ValueImpl::GetKeys(std::vector<CefString>& keys) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1715,7 +1720,7 @@ bool CefV8ValueImpl::GetKeys(std::vector<CefString>& keys) {
bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBase> user_data) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1731,7 +1736,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBase> user_data) {
CefRefPtr<CefBase> CefV8ValueImpl::GetUserData() {
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1745,7 +1750,7 @@ CefRefPtr<CefBase> CefV8ValueImpl::GetUserData() {
int CefV8ValueImpl::GetExternallyAllocatedMemory() {
CEF_V8_REQUIRE_OBJECT_RETURN(0);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1759,7 +1764,7 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() {
int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
CEF_V8_REQUIRE_OBJECT_RETURN(0);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
v8::Handle<v8::Object> obj = value->ToObject();
@@ -1773,7 +1778,7 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
int CefV8ValueImpl::GetArrayLength() {
CEF_V8_REQUIRE_OBJECT_RETURN(0);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArray()) {
NOTREACHED() << "V8 value is not an array";
@@ -1789,7 +1794,7 @@ CefString CefV8ValueImpl::GetFunctionName() {
CefString rv;
CEF_V8_REQUIRE_OBJECT_RETURN(rv);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
@@ -1805,7 +1810,7 @@ CefString CefV8ValueImpl::GetFunctionName() {
CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
@@ -1834,7 +1839,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
const CefV8ValueList& arguments) {
CEF_V8_REQUIRE_OBJECT_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(handle_->isolate());
v8::Handle<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
@@ -1899,7 +1904,8 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
try_catch.SetVerbose(true);
v8::Local<v8::Value> func_rv =
CallV8Function(context_local, func, recv, argc, argv);
CallV8Function(context_local, func, recv, argc, argv,
handle_->isolate());
if (!HasCaught(try_catch) && !func_rv.IsEmpty())
retval = new CefV8ValueImpl(func_rv);
@@ -1931,7 +1937,7 @@ bool CefV8ValueImpl::HasCaught(v8::TryCatch& try_catch) {
CefRefPtr<CefV8StackTrace> CefV8StackTrace::GetCurrent(int frame_limit) {
CEF_V8_REQUIRE_ISOLATE_RETURN(NULL);
v8::HandleScope handle_scope;
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
v8::Handle<v8::StackTrace> stackTrace =
v8::StackTrace::CurrentStackTrace(
frame_limit, v8::StackTrace::kDetailed);

View File

@@ -131,7 +131,7 @@ class CefV8Handle : public CefV8HandleBase {
handle_(isolate(), v) {
}
virtual ~CefV8Handle() {
handle_.Dispose(isolate());
handle_.Reset();
handle_.Clear();
}

View File

@@ -3,6 +3,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// MSVC++ requires this to be set before any other includes to get M_PI.
// Otherwise there will be compile errors in wtf/MathExtras.h.
#define _USE_MATH_DEFINES
#include "libcef/renderer/webkit_glue.h"
#include "base/compiler_specific.h"
@@ -11,6 +15,7 @@
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/ScriptController.h"
#include "core/history/BackForwardController.h"
#include "core/page/Page.h"
@@ -53,6 +58,11 @@ void GoForward(WebKit::WebView* view) {
controller.goForward();
}
v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame) {
WebKit::WebFrameImpl* impl = static_cast<WebKit::WebFrameImpl*>(frame);
return WebCore::toIsolate(impl->frame());
}
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {
WebKit::WebFrameImpl* impl = static_cast<WebKit::WebFrameImpl*>(frame);
return WebCore::ScriptController::mainWorldContext(impl->frame());

View File

@@ -22,6 +22,9 @@ bool CanGoForward(WebKit::WebView* view);
void GoBack(WebKit::WebView* view);
void GoForward(WebKit::WebView* view);
// Retrieve the V8 isolate associated with the frame.
v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame);
// Retrieve the V8 context associated with the frame.
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);

View File

@@ -1,8 +1,8 @@
Index: gyp/generator/ninja.py
===================================================================
--- gyp/generator/ninja.py (revision 1693)
--- gyp/generator/ninja.py (revision 1735)
+++ gyp/generator/ninja.py (working copy)
@@ -705,7 +705,16 @@
@@ -722,7 +722,16 @@
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)

View File

@@ -1,8 +1,8 @@
Index: message_loop.cc
===================================================================
--- message_loop.cc (revision 217791)
--- message_loop.cc (revision 224845)
+++ message_loop.cc (working copy)
@@ -197,7 +197,7 @@
@@ -201,7 +201,7 @@
MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current());

View File

@@ -1,25 +1,23 @@
Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp (revision 157102)
--- page/FrameView.cpp (revision 158192)
+++ page/FrameView.cpp (working copy)
@@ -187,10 +187,12 @@
if (!page)
@@ -189,8 +189,10 @@
if (!isMainFrame())
return;
+#if 0
if (m_frame == page->mainFrame()) {
ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
}
ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
+#endif
}
PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm
===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 157102)
--- platform/mac/NSScrollerImpDetails.mm (revision 158192)
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -33,6 +33,7 @@
@@ -34,6 +34,7 @@
bool isScrollbarOverlayAPIAvailable()
{
@@ -27,7 +25,7 @@ Index: platform/mac/NSScrollerImpDetails.mm
static bool apiAvailable;
static bool shouldInitialize = true;
if (shouldInitialize) {
@@ -43,6 +44,9 @@
@@ -44,6 +45,9 @@
&& [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)];
}
return apiAvailable;

View File

@@ -1,8 +1,8 @@
Index: WebNode.cpp
===================================================================
--- WebNode.cpp (revision 156144)
--- WebNode.cpp (revision 158192)
+++ WebNode.cpp (working copy)
@@ -176,7 +176,7 @@
@@ -175,7 +175,7 @@
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
// Please do not add more eventTypes to this list without an API review.

View File

@@ -1,6 +1,6 @@
Index: public/web/WebView.h
===================================================================
--- public/web/WebView.h (revision 157102)
--- public/web/WebView.h (revision 158192)
+++ public/web/WebView.h (working copy)
@@ -444,6 +444,7 @@
@@ -12,9 +12,9 @@ Index: public/web/WebView.h
// Visited link state --------------------------------------------------
Index: Source/web/ChromeClientImpl.cpp
===================================================================
--- Source/web/ChromeClientImpl.cpp (revision 157102)
--- Source/web/ChromeClientImpl.cpp (revision 158192)
+++ Source/web/ChromeClientImpl.cpp (working copy)
@@ -887,7 +887,7 @@
@@ -878,7 +878,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const
{
@@ -25,9 +25,9 @@ Index: Source/web/ChromeClientImpl.cpp
return adoptRef(new PopupMenuChromium(frame, client));
Index: Source/web/WebViewImpl.cpp
===================================================================
--- Source/web/WebViewImpl.cpp (revision 157102)
--- Source/web/WebViewImpl.cpp (revision 158192)
+++ Source/web/WebViewImpl.cpp (working copy)
@@ -394,6 +394,7 @@
@@ -397,6 +397,7 @@
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false)
@@ -35,7 +35,7 @@ Index: Source/web/WebViewImpl.cpp
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_suppressNextKeypressEvent(false)
@@ -3671,9 +3672,14 @@
@@ -3709,9 +3710,14 @@
updateLayerTreeViewport();
}
@@ -53,7 +53,7 @@ Index: Source/web/WebViewImpl.cpp
void WebViewImpl::startDragging(Frame* frame,
Index: Source/web/WebViewImpl.h
===================================================================
--- Source/web/WebViewImpl.h (revision 157102)
--- Source/web/WebViewImpl.h (revision 158192)
+++ Source/web/WebViewImpl.h (working copy)
@@ -422,7 +422,8 @@
@@ -65,7 +65,7 @@ Index: Source/web/WebViewImpl.h
bool contextMenuAllowed() const
{
@@ -720,6 +721,8 @@
@@ -723,6 +724,8 @@
bool m_contextMenuAllowed;

View File

@@ -11,8 +11,8 @@
#include "tests/unittests/test_handler.h"
#include "base/logging.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#if defined(OS_MACOSX)
#include "tests/unittests/os_rendering_unittest_mac.h"

View File

@@ -6,7 +6,7 @@
#define CEF_TESTS_UNITTESTS_OS_RENDERING_UNITTEST_MAC_H_
#include "include/cef_base.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace osr_unittests {

View File

@@ -7,7 +7,7 @@
#include "os_rendering_unittest_mac.h"
#include "ui/base/keycodes/keyboard_code_conversion_mac.h"
#include "ui/events/keycodes/keyboard_code_conversion_mac.h"
#include "include/cef_base.h"