From: Eurogiciel-BOT
Date: Mon, 26 May 2014 09:36:58 +0000 (+0000)
Subject: Upstream version 7.35.143.0
X-Git-Tag: submit/tizen_common/20140610.145444~4
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fweb%2Fcrosswalk.git;a=commitdiff_plain;h=7f75a80e3261cd2f6184dec8ff4aff0df5987620
Upstream version 7.35.143.0
Upstream commit-id fae60a11a3307c5f863c51f7ad5795a27e55cd08
Change-Id: I7463f000aaf8b795ca7c531c41dcd4aba1f4e2b3
Signed-off-by: Eurogiciel-BOT
---
diff --git a/packaging/crosswalk.manifest b/packaging/crosswalk.manifest
index 09fdd97..4715caf 100644
--- a/packaging/crosswalk.manifest
+++ b/packaging/crosswalk.manifest
@@ -2,4 +2,10 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/packaging/crosswalk.spec b/packaging/crosswalk.spec
index 95cab71..29b4858 100644
--- a/packaging/crosswalk.spec
+++ b/packaging/crosswalk.spec
@@ -12,7 +12,7 @@
%endif
Name: crosswalk
-Version: 7.35.141.0
+Version: 7.35.143.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
diff --git a/src/ozone/wayland/wayland.gyp b/src/ozone/wayland/wayland.gyp
index b46fc33..9e4014c 100644
--- a/src/ozone/wayland/wayland.gyp
+++ b/src/ozone/wayland/wayland.gyp
@@ -13,7 +13,7 @@
'enable_xdg_shell%': '<(enable_xdg_shell)',
'conditions': [
['sysroot!=""', {
- 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+ 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
}, {
'pkg-config': 'pkg-config'
}],
diff --git a/src/xwalk/DEPS.xwalk b/src/xwalk/DEPS.xwalk
index a7eca55..d76a991 100644
--- a/src/xwalk/DEPS.xwalk
+++ b/src/xwalk/DEPS.xwalk
@@ -10,7 +10,7 @@ chromium_version = '35.0.1916.114'
chromium_crosswalk_point = 'e76fa1eeaea6745b72a693cf746e5d3d8ece1bef'
blink_crosswalk_point = '3cf743afc1a77a1141f08897c4f2c3b805124f25'
v8_crosswalk_point = '64b8b78dee87a9d465f9d095e2021bdb9d45d37d'
-ozone_wayland_point = 'f4faec532d7d2f482b3ffe1e52be6fa3e6fc8629'
+ozone_wayland_point = '55f39c62b461b92d3b0b912c7c80ae98d866b5a6'
deps_xwalk = {
'src': 'https://github.com/crosswalk-project/chromium-crosswalk.git@%s' % chromium_crosswalk_point,
diff --git a/src/xwalk/VERSION b/src/xwalk/VERSION
index 7068d33..a9f49de 100644
--- a/src/xwalk/VERSION
+++ b/src/xwalk/VERSION
@@ -1,4 +1,4 @@
MAJOR=7
MINOR=35
-BUILD=141
+BUILD=143
PATCH=0
diff --git a/src/xwalk/application/tools/linux/xwalk_application_tools.gyp b/src/xwalk/application/tools/linux/xwalk_application_tools.gyp
index bafe531..df49620 100644
--- a/src/xwalk/application/tools/linux/xwalk_application_tools.gyp
+++ b/src/xwalk/application/tools/linux/xwalk_application_tools.gyp
@@ -31,12 +31,18 @@
'../../../..',
],
'sources': [
- 'dbus_connection.h',
'dbus_connection.cc',
- 'xwalk_tizen_user.h',
- 'xwalk_tizen_user.cc',
+ 'dbus_connection.h',
'xwalkctl_main.cc',
],
+ 'conditions' : [
+ ['tizen==1', {
+ 'sources': [
+ 'xwalk_tizen_user.cc',
+ 'xwalk_tizen_user.h',
+ ],
+ }],
+ ],
},
{
'target_name': 'xwalk_launcher',
@@ -49,12 +55,10 @@
'../../../extensions/extensions.gyp:xwalk_extensions',
],
'sources': [
- 'dbus_connection.h',
'dbus_connection.cc',
- 'xwalk_extension_process_launcher.h',
+ 'dbus_connection.h',
'xwalk_extension_process_launcher.cc',
- 'xwalk_tizen_user.h',
- 'xwalk_tizen_user.cc',
+ 'xwalk_extension_process_launcher.h',
'xwalk_launcher_main.cc',
],
'conditions' : [
@@ -71,6 +75,8 @@
'sources': [
'xwalk_launcher_tizen.cc',
'xwalk_launcher_tizen.h',
+ 'xwalk_tizen_user.cc',
+ 'xwalk_tizen_user.h',
],
}],
],
diff --git a/src/xwalk/application/tools/linux/xwalk_launcher_main.cc b/src/xwalk/application/tools/linux/xwalk_launcher_main.cc
index 4718ce3..bf0b57a 100644
--- a/src/xwalk/application/tools/linux/xwalk_launcher_main.cc
+++ b/src/xwalk/application/tools/linux/xwalk_launcher_main.cc
@@ -17,8 +17,10 @@
#include "xwalk/application/tools/linux/dbus_connection.h"
#include "xwalk/application/tools/linux/xwalk_extension_process_launcher.h"
+#if defined(OS_TIZEN)
#include "xwalk/application/tools/linux/xwalk_launcher_tizen.h"
#include "xwalk/application/tools/linux/xwalk_tizen_user.h"
+#endif
static const char* xwalk_service_name = "org.crosswalkproject.Runtime1";
static const char* xwalk_running_path = "/running1";
@@ -243,8 +245,10 @@ int main(int argc, char** argv) {
g_type_init();
#endif
+#if defined(OS_TIZEN)
if (xwalk_tizen_check_user_app())
exit(1);
+#endif
GOptionContext* context =
g_option_context_new("- Crosswalk Application Launcher");
diff --git a/src/xwalk/application/tools/linux/xwalkctl_main.cc b/src/xwalk/application/tools/linux/xwalkctl_main.cc
index dd477ae..318b8fb 100644
--- a/src/xwalk/application/tools/linux/xwalkctl_main.cc
+++ b/src/xwalk/application/tools/linux/xwalkctl_main.cc
@@ -11,7 +11,9 @@
#include
#include "xwalk/application/tools/linux/dbus_connection.h"
+#if defined(OS_TIZEN)
#include "xwalk/application/tools/linux/xwalk_tizen_user.h"
+#endif
static const char* xwalk_service_name = "org.crosswalkproject.Runtime1";
static const char* xwalk_installed_path = "/installed1";
@@ -183,8 +185,10 @@ int main(int argc, char* argv[]) {
g_type_init();
#endif
+#if defined(OS_TIZEN)
if (xwalk_tizen_check_user_app())
exit(1);
+#endif
context = g_option_context_new("- Crosswalk Application Management");
g_option_context_add_main_entries(context, entries, NULL);
diff --git a/src/xwalk/packaging/crosswalk.manifest b/src/xwalk/packaging/crosswalk.manifest
index 09fdd97..4715caf 100644
--- a/src/xwalk/packaging/crosswalk.manifest
+++ b/src/xwalk/packaging/crosswalk.manifest
@@ -2,4 +2,10 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/src/xwalk/packaging/crosswalk.spec b/src/xwalk/packaging/crosswalk.spec
index 95cab71..29b4858 100644
--- a/src/xwalk/packaging/crosswalk.spec
+++ b/src/xwalk/packaging/crosswalk.spec
@@ -12,7 +12,7 @@
%endif
Name: crosswalk
-Version: 7.35.141.0
+Version: 7.35.143.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
diff --git a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkContent.java b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkContent.java
index ea3f43f..117a66d 100644
--- a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkContent.java
+++ b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkContent.java
@@ -29,6 +29,7 @@ import org.chromium.components.navigation_interception.InterceptNavigationDelega
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.ContentViewRenderView;
+import org.chromium.content.browser.ContentViewRenderView.CompositingSurfaceType;
import org.chromium.content.browser.ContentViewStatics;
import org.chromium.content.browser.LoadUrlParams;
import org.chromium.content.browser.NavigationHistory;
@@ -75,7 +76,10 @@ class XWalkContent extends FrameLayout implements XWalkPreferences.KeyValueChang
mWindow = new ActivityWindowAndroid(xwView.getActivity());
// Initialize ContentViewRenderView
- mContentViewRenderView = new ContentViewRenderView(context, mWindow) {
+ boolean animated = XWalkPreferences.getValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW);
+ CompositingSurfaceType surfaceType =
+ animated ? CompositingSurfaceType.TEXTURE_VIEW : CompositingSurfaceType.SURFACE_VIEW;
+ mContentViewRenderView = new ContentViewRenderView(context, mWindow, surfaceType) {
protected void onReadyToRender() {
if (mPendingUrl != null) {
doLoadUrl(mPendingUrl, mPendingData);
diff --git a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkPreferences.java b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkPreferences.java
index 08a0b78..6605711 100644
--- a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkPreferences.java
+++ b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkPreferences.java
@@ -30,8 +30,33 @@ public final class XWalkPreferences {
*/
public static final String REMOTE_DEBUGGING = "remote-debugging";
+ /**
+ * The key string to enable/disable animatable XWalkView. Default value is
+ * false.
+ *
+ * If this key is set to True, the XWalkView created by Crosswalk can be
+ * transformed and animated. Internally, Crosswalk is alternatively using
+ * TextureView as the backend of XWalkView.
+ *
+ *
+ * TextureView is a kind of
+ *
+ * android.view.View that is different from
+ *
+ * SurfaceView. Unlike SurfaceView, it can be resized, transformed and
+ * animated. Once this key is set to True, all XWalkView will use TextureView
+ * as the rendering target instead of SurfaceView. The downside of TextureView
+ * is, it would consume more graphics memory than SurfaceView and may have
+ * 1~3 extra frames of latency to display updates.
+ *
+ * Note this key MUST be set before creating the first XWalkView, otherwise
+ * a RuntimeException will be thrown.
+ */
+ public static final String ANIMATABLE_XWALK_VIEW = "animatable-xwalk-view";
+
static {
sPrefMap.put(REMOTE_DEBUGGING, Boolean.FALSE);
+ sPrefMap.put(ANIMATABLE_XWALK_VIEW, Boolean.FALSE);
}
/**
@@ -42,6 +67,12 @@ public final class XWalkPreferences {
*/
public static synchronized void setValue(String key, boolean enabled) throws RuntimeException {
checkKey(key);
+ // If the listener list is not empty, we consider the preference is
+ // loaded by Crosswalk and taken effect already.
+ if (key == ANIMATABLE_XWALK_VIEW && !sListeners.isEmpty()) {
+ throw new RuntimeException("Warning: the preference key " + key +
+ " can not be set if the preference is already loaded by Crosswalk");
+ }
if (sPrefMap.get(key) != enabled) {
sPrefMap.put(key, new Boolean(enabled));
onKeyValueChanged(key, enabled);
diff --git a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkView.java b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkView.java
index c7e0288..c46ff78 100644
--- a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkView.java
+++ b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkView.java
@@ -32,9 +32,13 @@ import org.xwalk.core.extension.XWalkExtensionManager;
*
XWalkView represents an Android view for web apps/pages. Thus most of attributes
* for Android view are valid for this class. Since it internally uses
*
- * android.view.SurfaceView for rendering web pages, it can't be resized, rotated,
- * transformed and animated due to the limitations of SurfaceView. Besides, XWalkView won't
- * be rendered if it's invisible.
+ * android.view.SurfaceView for rendering web pages by default, it can't be resized,
+ * rotated, transformed and animated due to the limitations of SurfaceView.
+ * Alternatively, if the preference key {@link XWalkPreferences#ANIMATABLE_XWALK_VIEW}
+ * is set to True, XWalkView can be transformed and animated because
+ *
+ * TextureView is intentionally used to render web pages for animation support.
+ * Besides, XWalkView won't be rendered if it's invisible.
*
*
XWalkView needs hardware acceleration to render web pages. As a result, the
* AndroidManifest.xml of the caller's app must be appended with the attribute
@@ -578,7 +582,7 @@ public class XWalkView extends android.widget.FrameLayout {
*/
// TODO(yongsheng): make it static?
public String getAPIVersion() {
- return "1.0";
+ return "2.0";
}
/**
diff --git a/src/xwalk/runtime/android/sample/AndroidManifest.xml b/src/xwalk/runtime/android/sample/AndroidManifest.xml
index 04c620c..d8d479b 100644
--- a/src/xwalk/runtime/android/sample/AndroidManifest.xml
+++ b/src/xwalk/runtime/android/sample/AndroidManifest.xml
@@ -120,6 +120,15 @@
+
+
+
+
+
+
diff --git a/src/xwalk/runtime/android/sample/res/layout/animatable_xwview_layout.xml b/src/xwalk/runtime/android/sample/res/layout/animatable_xwview_layout.xml
new file mode 100644
index 0000000..766f490
--- /dev/null
+++ b/src/xwalk/runtime/android/sample/res/layout/animatable_xwview_layout.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
diff --git a/src/xwalk/runtime/android/sample/src/org/xwalk/core/sample/AnimatableXWalkViewActivity.java b/src/xwalk/runtime/android/sample/src/org/xwalk/core/sample/AnimatableXWalkViewActivity.java
new file mode 100644
index 0000000..18f750b
--- /dev/null
+++ b/src/xwalk/runtime/android/sample/src/org/xwalk/core/sample/AnimatableXWalkViewActivity.java
@@ -0,0 +1,74 @@
+// Copyright (c) 2014 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.xwalk.core.sample;
+
+import org.xwalk.core.XWalkView;
+import org.xwalk.core.XWalkPreferences;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.view.View;
+
+/**
+ * Sample code to show how to use ANIMATED_XWALK_VIEW preference key to create
+ * animated XWalkView and apply alpha animation or scale animation on it.
+ */
+public class AnimatableXWalkViewActivity extends XWalkBaseActivity {
+ private final static float ANIMATION_FACTOR = 0.6f;
+ private Button mRunAnimationButton;
+
+ private void startAnimation() {
+ AnimatorSet combo = new AnimatorSet();
+
+ float targetAlpha = mXWalkView.getAlpha() == 1.f ? ANIMATION_FACTOR : 1.f;
+ float targetScaleFactor = mXWalkView.getScaleX() == 1.f ? ANIMATION_FACTOR : 1.f;
+
+ ObjectAnimator fade = ObjectAnimator.ofFloat(mXWalkView,
+ "alpha", mXWalkView.getAlpha(), targetAlpha);
+ ObjectAnimator scaleX = ObjectAnimator.ofFloat(mXWalkView,
+ "scaleX", mXWalkView.getScaleX(), targetScaleFactor);
+ ObjectAnimator scaleY = ObjectAnimator.ofFloat(mXWalkView,
+ "scaleY", mXWalkView.getScaleY(), targetScaleFactor);
+
+ combo.setDuration(400);
+ combo.playTogether(fade, scaleX, scaleY);
+ combo.start();
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // ANIMATABLE_XWALK_VIEW preference key MUST be set before XWalkView creation.
+ XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true);
+
+ setContentView(R.layout.animatable_xwview_layout);
+
+ mRunAnimationButton = (Button) findViewById(R.id.run_animation);
+ mRunAnimationButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startAnimation();
+ }
+ });
+
+ mXWalkView = (XWalkView) findViewById(R.id.xwalkview);
+ mXWalkView.load("http://www.baidu.com", null);
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+
+ // Reset the preference for animatable XWalkView.
+ XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, false);
+ }
+}
diff --git a/src/xwalk/runtime/browser/runtime_url_request_context_getter.cc b/src/xwalk/runtime/browser/runtime_url_request_context_getter.cc
index 7509218..c38579b 100644
--- a/src/xwalk/runtime/browser/runtime_url_request_context_getter.cc
+++ b/src/xwalk/runtime/browser/runtime_url_request_context_getter.cc
@@ -97,9 +97,16 @@ net::URLRequestContext* RuntimeURLRequestContextGetter::GetURLRequestContext() {
content::CookieStoreConfig::PERSISTANT_SESSION_COOKIES,
NULL, NULL);
net::CookieStore* cookie_store = content::CreateCookieStore(cookie_config);
- const char* schemes[] = {application::kApplicationScheme,
- content::kChromeDevToolsScheme};
- cookie_store->GetCookieMonster()->SetCookieableSchemes(schemes, 2);
+
+ std::vector cookieable_schemes(
+ net::CookieMonster::kDefaultCookieableSchemes,
+ net::CookieMonster::kDefaultCookieableSchemes +
+ net::CookieMonster::kDefaultCookieableSchemesCount - 1);
+ cookieable_schemes.push_back(application::kApplicationScheme);
+ cookieable_schemes.push_back(content::kChromeDevToolsScheme);
+
+ cookie_store->GetCookieMonster()->SetCookieableSchemes(
+ &cookieable_schemes[0], cookieable_schemes.size());
storage_->set_cookie_store(cookie_store);
#endif
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(