mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision ad468e8b (#292352).
- Building Chromium using SVN is no longer supported. - Remove CefDOMEvent and CefDOMEventListener (issue #933). - Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656). - Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -30,7 +30,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
IDS_BINDING BINARY "res\\binding.html"
|
||||
IDS_DIALOGS BINARY "res\\dialogs.html"
|
||||
IDS_DOMACCESS BINARY "res\\domaccess.html"
|
||||
IDS_LOCALSTORAGE BINARY "res\\localstorage.html"
|
||||
IDS_LOGO BINARY "res\\logo.png"
|
||||
IDS_OSRTEST BINARY "res\\osr_test.html"
|
||||
|
@@ -976,10 +976,6 @@ gint glarea_scroll_event(GtkWidget* widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void process(GdkEventKey* event) {
|
||||
|
||||
}
|
||||
|
||||
gint glarea_key_event(GtkWidget* widget,
|
||||
GdkEventKey* event,
|
||||
OSRWindow* window) {
|
||||
@@ -1091,7 +1087,6 @@ class ScopedGLContext {
|
||||
|
||||
private:
|
||||
bool swap_buffers_;
|
||||
GdkGLContext* glcontext_;
|
||||
GdkGLDrawable* gldrawable_;
|
||||
bool is_valid_;
|
||||
};
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "cefclient/client_app.h"
|
||||
#include "cefclient/client_renderer.h"
|
||||
#include "cefclient/dom_test.h"
|
||||
#include "cefclient/performance_test.h"
|
||||
#include "cefclient/scheme_test.h"
|
||||
|
||||
@@ -19,7 +18,6 @@ void ClientApp::CreateBrowserDelegates(BrowserDelegateSet& delegates) {
|
||||
// static
|
||||
void ClientApp::CreateRenderDelegates(RenderDelegateSet& delegates) {
|
||||
client_renderer::CreateRenderDelegates(delegates);
|
||||
dom_test::CreateRenderDelegates(delegates);
|
||||
performance_test::CreateRenderDelegates(delegates);
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include "cefclient/client_renderer.h"
|
||||
#include "cefclient/client_switches.h"
|
||||
#include "cefclient/dialog_test.h"
|
||||
#include "cefclient/dom_test.h"
|
||||
#include "cefclient/resource_util.h"
|
||||
#include "cefclient/string_util.h"
|
||||
#include "cefclient/window_test.h"
|
||||
@@ -462,12 +461,6 @@ void ClientHandler::OnLoadingStateChange(CefRefPtr<CefBrowser> browser,
|
||||
|
||||
SetLoading(isLoading);
|
||||
SetNavState(canGoBack, canGoForward);
|
||||
|
||||
if (!isLoading) {
|
||||
// Continue the DOM test.
|
||||
if (browser->GetMainFrame()->GetURL() == dom_test::kTestUrl)
|
||||
dom_test::OnLoadEnd(browser);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||
|
@@ -1,134 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "cefclient/dom_test.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "include/wrapper/cef_helpers.h"
|
||||
|
||||
namespace dom_test {
|
||||
|
||||
const char kTestUrl[] = "http://tests/domaccess";
|
||||
|
||||
namespace {
|
||||
|
||||
const char* kMessageName = "DOMTest.Message";
|
||||
|
||||
class ClientDOMEventListener : public CefDOMEventListener {
|
||||
public:
|
||||
ClientDOMEventListener() {
|
||||
}
|
||||
|
||||
virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) OVERRIDE {
|
||||
CefRefPtr<CefDOMDocument> document = event->GetDocument();
|
||||
DCHECK(document.get());
|
||||
|
||||
std::stringstream ss;
|
||||
|
||||
CefRefPtr<CefDOMNode> button = event->GetTarget();
|
||||
DCHECK(button.get());
|
||||
std::string buttonValue = button->GetElementAttribute("value");
|
||||
ss << "You clicked the " << buttonValue.c_str() << " button. ";
|
||||
|
||||
if (document->HasSelection()) {
|
||||
std::string startName, endName;
|
||||
|
||||
// Determine the start name by first trying to locate the "id" attribute
|
||||
// and then defaulting to the tag name.
|
||||
{
|
||||
CefRefPtr<CefDOMNode> node = document->GetSelectionStartNode();
|
||||
if (!node->IsElement())
|
||||
node = node->GetParent();
|
||||
if (node->IsElement() && node->HasElementAttribute("id"))
|
||||
startName = node->GetElementAttribute("id");
|
||||
else
|
||||
startName = node->GetName();
|
||||
}
|
||||
|
||||
// Determine the end name by first trying to locate the "id" attribute
|
||||
// and then defaulting to the tag name.
|
||||
{
|
||||
CefRefPtr<CefDOMNode> node = document->GetSelectionEndNode();
|
||||
if (!node->IsElement())
|
||||
node = node->GetParent();
|
||||
if (node->IsElement() && node->HasElementAttribute("id"))
|
||||
endName = node->GetElementAttribute("id");
|
||||
else
|
||||
endName = node->GetName();
|
||||
}
|
||||
|
||||
ss << "The selection is from " <<
|
||||
startName.c_str() << ":" << document->GetSelectionStartOffset() <<
|
||||
" to " <<
|
||||
endName.c_str() << ":" << document->GetSelectionEndOffset();
|
||||
} else {
|
||||
ss << "Nothing is selected.";
|
||||
}
|
||||
|
||||
// Update the description.
|
||||
CefRefPtr<CefDOMNode> desc = document->GetElementById("description");
|
||||
DCHECK(desc.get());
|
||||
CefRefPtr<CefDOMNode> text = desc->GetFirstChild();
|
||||
DCHECK(text.get());
|
||||
DCHECK(text->IsText());
|
||||
text->SetValue(ss.str());
|
||||
}
|
||||
|
||||
IMPLEMENT_REFCOUNTING(ClientDOMEventListener);
|
||||
};
|
||||
|
||||
class ClientDOMVisitor : public CefDOMVisitor {
|
||||
public:
|
||||
ClientDOMVisitor() {
|
||||
}
|
||||
|
||||
virtual void Visit(CefRefPtr<CefDOMDocument> document) OVERRIDE {
|
||||
// Register a click listener for the button.
|
||||
CefRefPtr<CefDOMNode> button = document->GetElementById("button");
|
||||
DCHECK(button.get());
|
||||
button->AddEventListener("click", new ClientDOMEventListener(), false);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFCOUNTING(ClientDOMVisitor);
|
||||
};
|
||||
|
||||
class DOMRenderDelegate : public ClientApp::RenderDelegate {
|
||||
public:
|
||||
DOMRenderDelegate() {
|
||||
}
|
||||
|
||||
virtual bool OnProcessMessageReceived(
|
||||
CefRefPtr<ClientApp> app,
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE {
|
||||
if (message->GetName() == kMessageName) {
|
||||
// Visit the DOM to attach the event listener.
|
||||
browser->GetMainFrame()->VisitDOM(new ClientDOMVisitor);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
IMPLEMENT_REFCOUNTING(DOMRenderDelegate);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
void CreateRenderDelegates(ClientApp::RenderDelegateSet& delegates) {
|
||||
delegates.insert(new DOMRenderDelegate);
|
||||
}
|
||||
|
||||
void OnLoadEnd(CefRefPtr<CefBrowser> browser) {
|
||||
// Send a message to the render process to continue the test setup.
|
||||
browser->SendProcessMessage(PID_RENDERER,
|
||||
CefProcessMessage::Create(kMessageName));
|
||||
}
|
||||
|
||||
} // namespace dom_test
|
@@ -1,25 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_TESTS_CEFCLIENT_DOM_TEST_H_
|
||||
#define CEF_TESTS_CEFCLIENT_DOM_TEST_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "cefclient/client_app.h"
|
||||
|
||||
namespace dom_test {
|
||||
|
||||
// The DOM test URL.
|
||||
extern const char kTestUrl[];
|
||||
|
||||
// Create the render delegate.
|
||||
void CreateRenderDelegates(ClientApp::RenderDelegateSet& delegates);
|
||||
|
||||
// Continue the test after the page has loaded.
|
||||
void OnLoadEnd(CefRefPtr<CefBrowser> browser);
|
||||
|
||||
} // namespace dom_test
|
||||
|
||||
#endif // CEF_TESTS_CEFCLIENT_DOM_TEST_H_
|
@@ -26,7 +26,6 @@ const char kCUPSPrintoutMode[] = "cups-PrintoutMode";
|
||||
const char kCUPSProcessColorModel[] = "cups-ProcessColorModel";
|
||||
const char kBlack[] = "Black";
|
||||
const char kCMYK[] = "CMYK";
|
||||
const char kKCMY[] = "KCMY";
|
||||
const char kCMY_K[] = "CMY+K";
|
||||
const char kCMY[] = "CMY";
|
||||
const char kColor[] = "Color";
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<html>
|
||||
<body bgcolor="white">
|
||||
<p id="instructions">Select some portion of the below page content and click the "Describe Selection" button. The selected region will then be described below.</p>
|
||||
<p id="p1">This is p1</p>
|
||||
<p id="p2">This is p2</p>
|
||||
<p id="p3">This is p3</p>
|
||||
<p id="p4">This is p4</p>
|
||||
<form>
|
||||
<input type="button" id="button" value="Describe Selection">
|
||||
<p id="description">The description will appear here.</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@@ -9,7 +9,6 @@
|
||||
<li><a href="http://webkit.org/blog-files/3d-transforms/poster-circle.html">Accelerated Layers</a></li>
|
||||
<li><a href="http://html5advent2011.digitpaint.nl/3/index.html">Cursors</a></li>
|
||||
<li><a href="http://tests/dialogs">Dialogs</a></li>
|
||||
<li><a href="http://tests/domaccess">DOM Access</a></li>
|
||||
<li><a href="http://html5demos.com/drag">Drag & Drop</a></li>
|
||||
<li><a href="http://www.adobe.com/software/flash/about/">Flash Plugin</a></li>
|
||||
<li><a href="http://html5demos.com/geo">Geolocation</a></li>
|
||||
|
@@ -42,17 +42,16 @@
|
||||
#define IDC_STATIC -1
|
||||
#define IDS_BINDING 1000
|
||||
#define IDS_DIALOGS 1001
|
||||
#define IDS_DOMACCESS 1002
|
||||
#define IDS_LOCALSTORAGE 1003
|
||||
#define IDS_LOGO 1004
|
||||
#define IDS_LOGOBALL 1005
|
||||
#define IDS_OSRTEST 1006
|
||||
#define IDS_OTHER_TESTS 1007
|
||||
#define IDS_PERFORMANCE 1008
|
||||
#define IDS_TRANSPARENCY 1009
|
||||
#define IDS_WINDOW 1010
|
||||
#define IDS_XMLHTTPREQUEST 1011
|
||||
#define IDS_PERFORMANCE2 1012
|
||||
#define IDS_LOCALSTORAGE 1002
|
||||
#define IDS_LOGO 1003
|
||||
#define IDS_LOGOBALL 1004
|
||||
#define IDS_OSRTEST 1005
|
||||
#define IDS_OTHER_TESTS 1006
|
||||
#define IDS_PERFORMANCE 1007
|
||||
#define IDS_TRANSPARENCY 1008
|
||||
#define IDS_WINDOW 1009
|
||||
#define IDS_XMLHTTPREQUEST 1010
|
||||
#define IDS_PERFORMANCE2 1011
|
||||
|
||||
// Avoid files associated with MacOS
|
||||
#define _X86_
|
||||
|
@@ -35,7 +35,6 @@ int GetResourceId(const char* resource_name) {
|
||||
} resource_map[] = {
|
||||
{"binding.html", IDS_BINDING},
|
||||
{"dialogs.html", IDS_DIALOGS},
|
||||
{"domaccess.html", IDS_DOMACCESS},
|
||||
{"localstorage.html", IDS_LOCALSTORAGE},
|
||||
{"logo.png", IDS_LOGO},
|
||||
{"osr_test.html", IDS_OSRTEST},
|
||||
|
@@ -22,7 +22,7 @@ void SimpleHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
|
||||
|
||||
// Retrieve the X11 window handle for the browser.
|
||||
::Window window = browser->GetHost()->GetWindowHandle();
|
||||
DCHECK_NE(window, kNullWindowHandle);
|
||||
DCHECK(window != kNullWindowHandle);
|
||||
|
||||
// Retrieve the atoms required by the below XChangeProperty call.
|
||||
const char* kAtoms[] = {
|
||||
|
@@ -82,7 +82,6 @@ const CefRect kDropDivRect(8, 332, 52, 52);
|
||||
const CefRect kDragDivRect(71, 342, 30, 30);
|
||||
const int kDefaultVerticalScrollbarWidth = 17;
|
||||
const int kVerticalScrollbarWidth = GetSystemMetrics(SM_CXVSCROLL);
|
||||
const int kHorizontalScrollbarWidth = GetSystemMetrics(SM_CXHSCROLL);
|
||||
#elif defined(OS_MACOSX)
|
||||
const CefRect kEditBoxRect(442, 251, 46, 16);
|
||||
const CefRect kNavigateButtonRect(375, 275, 130, 20);
|
||||
@@ -99,7 +98,6 @@ const CefRect kDropDivRect(8, 332, 52, 52);
|
||||
const CefRect kDragDivRect(71, 342, 30, 30);
|
||||
const int kDefaultVerticalScrollbarWidth = 14;
|
||||
const int kVerticalScrollbarWidth = 14;
|
||||
const int kHorizontalScrollbarWidth = 14;
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif // defined(OS_WIN)
|
||||
@@ -215,10 +213,6 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
event_count_(0),
|
||||
event_total_(1),
|
||||
started_(false) {
|
||||
if (test == OSR_TEST_SCROLLING) {
|
||||
// Wait for both the paint event and the scroll offset event.
|
||||
event_total_ = 2;
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~OSRTestHandler() {}
|
||||
@@ -856,12 +850,6 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser) OVERRIDE {
|
||||
if (test_type_ == OSR_TEST_SCROLLING && started()) {
|
||||
DestroySucceededTestSoon();
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool OnTooltip(CefRefPtr<CefBrowser> browser,
|
||||
CefString& text) OVERRIDE {
|
||||
if (test_type_ == OSR_TEST_TOOLTIP && started()) {
|
||||
|
Reference in New Issue
Block a user