diff -Nru oxide-qt-1.7.8/CHROMIUM_VERSION oxide-qt-1.7.9/CHROMIUM_VERSION --- oxide-qt-1.7.8/CHROMIUM_VERSION 2015-05-15 14:15:13.000000000 +0000 +++ oxide-qt-1.7.9/CHROMIUM_VERSION 2015-06-23 12:11:11.000000000 +0000 @@ -1 +1 @@ -43.0.2357.65 +43.0.2357.130 diff -Nru oxide-qt-1.7.8/debian/changelog oxide-qt-1.7.9/debian/changelog --- oxide-qt-1.7.8/debian/changelog 2015-05-19 16:51:59.000000000 +0000 +++ oxide-qt-1.7.9/debian/changelog 2015-06-23 16:07:36.000000000 +0000 @@ -1,3 +1,11 @@ +oxide-qt (1.7.9-0ubuntu0.14.04.1) trusty-security; urgency=medium + + * Update to v1.7.9 + - see USN-2652-1 + - Bump Chromium rev to 43.0.2357.130 + + -- Chris Coulson Tue, 23 Jun 2015 16:45:08 +0100 + oxide-qt (1.7.8-0ubuntu0.14.04.1) trusty-security; urgency=medium * Update to v1.7.8 diff -Nru oxide-qt-1.7.8/qt/VERSION oxide-qt-1.7.9/qt/VERSION --- oxide-qt-1.7.8/qt/VERSION 2015-05-15 14:38:09.000000000 +0000 +++ oxide-qt-1.7.9/qt/VERSION 2015-06-23 15:01:56.000000000 +0000 @@ -1,3 +1,3 @@ MAJOR=1 MINOR=7 -PATCH=8 \ No newline at end of file +PATCH=9 \ No newline at end of file diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/aw_permission_manager.cc oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/aw_permission_manager.cc --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/aw_permission_manager.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/aw_permission_manager.cc 2015-06-23 12:14:25.000000000 +0000 @@ -4,28 +4,163 @@ #include "android_webview/browser/aw_permission_manager.h" +#include + #include "android_webview/browser/aw_browser_permission_request_delegate.h" #include "base/callback.h" +#include "base/containers/hash_tables.h" +#include "base/logging.h" +#include "base/memory/weak_ptr.h" #include "content/public/browser/permission_type.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +using content::PermissionStatus; +using content::PermissionType; + namespace android_webview { +class LastRequestResultCache { + public: + LastRequestResultCache() : weak_factory_(this) {} + + void SetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + PermissionStatus status) { + DCHECK(status == content::PERMISSION_STATUS_GRANTED || + status == content::PERMISSION_STATUS_DENIED); + + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + DLOG(WARNING) << "Not caching result because of empty origin."; + return; + } + + if (!requesting_origin.is_valid()) { + NOTREACHED() << requesting_origin.possibly_invalid_spec(); + return; + } + if (!embedding_origin.is_valid()) { + NOTREACHED() << embedding_origin.possibly_invalid_spec(); + return; + } + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + if (key.empty()) { + NOTREACHED(); + // Never store an empty key because it could inadvertently be used for + // another combination. + return; + } + pmi_result_cache_[key] = status; + } + + PermissionStatus GetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) const { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + NOTREACHED() << "Results are only cached for PROTECTED_MEDIA_IDENTIFIER"; + return content::PERMISSION_STATUS_ASK; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + StatusMap::const_iterator it = pmi_result_cache_.find(key); + if (it == pmi_result_cache_.end()) { + DLOG(WARNING) << "GetResult() called for uncached origins: " << key; + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(!key.empty()); + return it->second; + } + + void ClearResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached, so nothing to clear. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + pmi_result_cache_.erase(key); + } + + base::WeakPtr GetWeakPtr() { + return weak_factory_.GetWeakPtr(); + } + + private: + // Returns a concatenation of the origins to be used as the index. + // Returns the empty string if either origin is invalid or empty. + static std::string GetCacheKey(const GURL& requesting_origin, + const GURL& embedding_origin) { + const std::string& requesting = requesting_origin.spec(); + const std::string& embedding = embedding_origin.spec(); + if (requesting.empty() || embedding.empty()) + return std::string(); + return requesting + "," + embedding; + } + + using StatusMap = base::hash_map; + StatusMap pmi_result_cache_; + + base::WeakPtrFactory weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(LastRequestResultCache); +}; + namespace { void CallbackPermisisonStatusWrapper( + const base::WeakPtr& result_cache, const base::Callback& callback, + PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, bool allowed) { - callback.Run(allowed ? content::PERMISSION_STATUS_GRANTED - : content::PERMISSION_STATUS_DENIED); + PermissionStatus status = allowed ? content::PERMISSION_STATUS_GRANTED + : content::PERMISSION_STATUS_DENIED; + if (result_cache.get()) { + result_cache->SetResult(permission, requesting_origin, embedding_origin, + status); + } + + callback.Run(status); } } // anonymous namespace AwPermissionManager::AwPermissionManager() - : content::PermissionManager() { + : content::PermissionManager(), result_cache_(new LastRequestResultCache) { } AwPermissionManager::~AwPermissionManager() { @@ -50,14 +185,21 @@ return; } + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + switch (permission) { case content::PermissionType::GEOLOCATION: delegate->RequestGeolocationPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: delegate->RequestProtectedMediaIdentifierPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::MIDI_SYSEX: case content::PermissionType::NOTIFICATIONS: @@ -78,6 +220,13 @@ content::WebContents* web_contents, int request_id, const GURL& origin) { + // The caller is canceling (presumably) the most recent request. Assuming the + // request did not complete, the user did not respond to the requset. + // Thus, assume we do not know the result. + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + result_cache_->ClearResult(permission, origin, embedding_origin); + int render_process_id = web_contents->GetRenderProcessHost()->GetID(); int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID(); AwBrowserPermissionRequestDelegate* delegate = @@ -109,12 +258,19 @@ content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + result_cache_->ClearResult(permission, requesting_origin, embedding_origin); } content::PermissionStatus AwPermissionManager::GetPermissionStatus( content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + // Method is called outside the Permissions API only for this permission. + if (permission == PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + return result_cache_->GetResult(permission, requesting_origin, + embedding_origin); + } + return content::PERMISSION_STATUS_DENIED; } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/aw_permission_manager.h oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/aw_permission_manager.h --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/aw_permission_manager.h 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/aw_permission_manager.h 2015-06-23 12:14:25.000000000 +0000 @@ -7,10 +7,13 @@ #include "base/callback_forward.h" #include "base/macros.h" +#include "base/memory/scoped_ptr.h" #include "content/public/browser/permission_manager.h" namespace android_webview { +class LastRequestResultCache; + class AwPermissionManager : public content::PermissionManager { public: AwPermissionManager(); @@ -46,6 +49,8 @@ void UnsubscribePermissionStatusChange(int subscription_id) override; private: + scoped_ptr result_cache_; + DISALLOW_COPY_AND_ASSIGN(AwPermissionManager); }; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/scoped_app_gl_state_restore.cc oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/scoped_app_gl_state_restore.cc --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/browser/scoped_app_gl_state_restore.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/browser/scoped_app_gl_state_restore.cc 2015-06-23 12:13:04.000000000 +0000 @@ -297,8 +297,11 @@ i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); } - // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. - glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT) { + // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. + glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + } + DCHECK(ClearGLErrors(false, NULL)); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/common/aw_crash_handler.cc oxide-qt-1.7.9/third_party/chromium/src/android_webview/common/aw_crash_handler.cc --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/common/aw_crash_handler.cc 2015-04-24 01:55:49.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/common/aw_crash_handler.cc 2015-06-23 12:14:25.000000000 +0000 @@ -49,7 +49,7 @@ } } - if ((info != NULL && info->si_pid) || sig == SIGABRT) { + if ((info != NULL && SI_FROMUSER(info)) || sig == SIGABRT) { // This signal was triggered by somebody sending us the signal with kill(). // In order to retrigger it, we have to queue a new signal by calling // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java 2015-06-23 12:13:04.000000000 +0000 @@ -6,20 +6,18 @@ /** * Helper class used to fix up resource ids. - * This is mostly a copy of the code in frameworks/base/core/java/android/app/LoadedApk.java. - * TODO: Remove if a cleaner mechanism is provided (either public API or AAPT is changed to generate - * this code). */ class ResourceRewriter { /** * Rewrite the R 'constants' for the WebView library apk. */ public static void rewriteRValues(final int packageId) { - // TODO: We should use jarjar to remove the redundant R classes here, but due - // to a bug in jarjar it's not possible to rename classes with '$' in their name. - // See b/15684775. + // This list must be kept up to date to include all R classes depended on directly or + // indirectly by android_webview_java. + // TODO(torne): find a better way to do this, http://crbug.com/492166. com.android.webview.chromium.R.onResourcesLoaded(packageId); org.chromium.android_webview.R.onResourcesLoaded(packageId); + org.chromium.components.web_contents_delegate_android.R.onResourcesLoaded(packageId); org.chromium.content.R.onResourcesLoaded(packageId); org.chromium.ui.R.onResourcesLoaded(packageId); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java 2015-06-23 12:14:25.000000000 +0000 @@ -273,6 +273,10 @@ // through the resourcethrottle. This is only used for popup windows. private boolean mDeferredShouldOverrideUrlLoadingIsPendingForPopup; + // This is a workaround for some qualcomm devices discarding buffer on + // Activity restore. + private boolean mInvalidateRootViewOnNextDraw; + // The framework may temporarily detach our container view, for example during layout if // we are a child of a ListView. This may cause many toggles of View focus, which we suppress // when in this state. @@ -1251,8 +1255,7 @@ if (url == null) { return; } - LoadUrlParams params = new LoadUrlParams(url); - loadUrl(params); + loadUrl(url, null); } /** @@ -2154,6 +2157,8 @@ } private void setWindowVisibilityInternal(boolean visible) { + mInvalidateRootViewOnNextDraw |= Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP + && visible && !mIsWindowVisible; mIsWindowVisible = visible; if (!isDestroyed()) nativeSetWindowVisibility(mNativeAwContents, mIsWindowVisible); } @@ -2620,6 +2625,13 @@ }); } + protected void insertVisualStateCallbackIfNotDestroyed( + long requestId, VisualStateCallback callback) { + if (TRACE) Log.d(TAG, "insertVisualStateCallbackIfNotDestroyed"); + if (isDestroyed()) return; + nativeInsertVisualStateCallback(mNativeAwContents, requestId, callback); + } + // -------------------------------------------------------------------------------------------- // This is the AwViewMethods implementation that does real work. The AwViewMethodsImpl is // hooked up to the WebView in embedded mode and to the FullScreenView in fullscreen mode, @@ -2666,6 +2678,11 @@ mScrollOffsetManager.computeMaximumVerticalScrollOffset())) { postInvalidateOnAnimation(); } + + if (mInvalidateRootViewOnNextDraw) { + mContainerView.getRootView().invalidate(); + mInvalidateRootViewOnNextDraw = false; + } } @Override diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java 2015-06-23 12:14:25.000000000 +0000 @@ -271,11 +271,6 @@ } } - @Override - public void loadingStateChanged() { - mContentsClient.onReceivedTitle(mAwContents.getTitle()); - } - private static class GetDisplayNameTask extends AsyncTask { final int mProcessId; final int mRenderId; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java 2015-06-23 12:14:25.000000000 +0000 @@ -41,9 +41,4 @@ @Override @CalledByNative public abstract void navigationStateChanged(int flags); - - // Not an override, because WebContentsDelegateAndroid maps this call - // into onLoad{Started|Stopped}. - @CalledByNative - public abstract void loadingStateChanged(); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java 2015-04-24 01:55:49.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java 2015-06-23 12:14:25.000000000 +0000 @@ -68,14 +68,15 @@ public void run() { AwContents awContents = mAwContents.get(); if (awContents != null) { - awContents.insertVisualStateCallback(0, new VisualStateCallback() { - @Override - public void onComplete(long requestId) { - AwContentsClient client = mAwContentsClient.get(); - if (client == null) return; - client.onPageCommitVisible(url); - } - }); + awContents.insertVisualStateCallbackIfNotDestroyed( + 0, new VisualStateCallback() { + @Override + public void onComplete(long requestId) { + AwContentsClient client = mAwContentsClient.get(); + if (client == null) return; + client.onPageCommitVisible(url); + } + }); } } }); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java oxide-qt-1.7.9/third_party/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java 2015-06-23 12:14:25.000000000 +0000 @@ -320,23 +320,4 @@ } }); } - - // See http://crbug.com/481570 - @SmallTest - public void testTitleUpdatedWhenGoingBack() throws Throwable { - final TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishedHelper = - mContentsClient.getOnPageFinishedHelper(); - NavigationHistory list = getNavigationHistory(mAwContents); - assertEquals(0, list.getEntryCount()); - - final String page1Url = addPage1ToServer(mWebServer); - final String page2Url = addPage2ToServer(mWebServer); - - loadUrlSync(mAwContents, onPageFinishedHelper, page1Url); - loadUrlSync(mAwContents, onPageFinishedHelper, page2Url); - assertEquals(PAGE_2_TITLE, mContentsClient.getUpdatedTitle()); - HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getWebContents(), - onPageFinishedHelper); - assertEquals(PAGE_1_TITLE, mContentsClient.getUpdatedTitle()); - } } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/lib/main/aw_main_delegate.cc oxide-qt-1.7.9/third_party/chromium/src/android_webview/lib/main/aw_main_delegate.cc --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/lib/main/aw_main_delegate.cc 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/lib/main/aw_main_delegate.cc 2015-06-23 12:14:25.000000000 +0000 @@ -90,6 +90,9 @@ // WebView does not yet support screen orientation locking. cl->AppendSwitch(switches::kDisableScreenOrientationLock); + // WebView does not currently support the Permissions API (crbug.com/490120) + cl->AppendSwitch(switches::kDisablePermissionsAPI); + // WebView does not (yet) save Chromium data during shutdown, so add setting // for Chrome to aggressively persist DOM Storage to minimize data loss. // http://crbug.com/479767 diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.cc oxide-qt-1.7.9/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.cc --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.cc 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.cc 2015-06-23 12:14:25.000000000 +0000 @@ -204,18 +204,6 @@ } } -void AwWebContentsDelegate::LoadingStateChanged(WebContents* source, - bool to_different_document) { - // Page title may have changed, need to inform the embedder. - // |source| may be null if loading has started. - JNIEnv* env = AttachCurrentThread(); - - ScopedJavaLocalRef java_delegate = GetJavaDelegate(env); - if (java_delegate.obj()) { - Java_AwWebContentsDelegate_loadingStateChanged(env, java_delegate.obj()); - } -} - void AwWebContentsDelegate::RequestMediaAccessPermission( WebContents* web_contents, const content::MediaStreamRequest& request, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.h oxide-qt-1.7.9/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.h --- oxide-qt-1.7.8/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.h 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/android_webview/native/aw_web_contents_delegate.h 2015-06-23 12:14:25.000000000 +0000 @@ -50,8 +50,6 @@ void CloseContents(content::WebContents* source) override; void ActivateContents(content::WebContents* contents) override; - void LoadingStateChanged(content::WebContents* source, - bool to_different_document) override; void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/display/cursor_window_controller.cc oxide-qt-1.7.9/third_party/chromium/src/ash/display/cursor_window_controller.cc --- oxide-qt-1.7.8/third_party/chromium/src/ash/display/cursor_window_controller.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/display/cursor_window_controller.cc 2015-06-23 12:14:25.000000000 +0000 @@ -179,8 +179,6 @@ } void CursorWindowController::SetVisibility(bool visible) { - if (!cursor_window_) - return; visible_ = visible; UpdateCursorVisibility(); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/display/cursor_window_controller_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/ash/display/cursor_window_controller_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/ash/display/cursor_window_controller_unittest.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/display/cursor_window_controller_unittest.cc 2015-06-23 12:13:04.000000000 +0000 @@ -25,9 +25,7 @@ // test::AshTestBase: void SetUp() override { AshTestBase::SetUp(); - cursor_window_controller_ = - Shell::GetInstance()->display_controller()->cursor_window_controller(); - cursor_window_controller_->SetCursorCompositingEnabled(true); + SetCursorCompositionEnabled(true); } int GetCursorType() const { return cursor_window_controller_->cursor_type_; } @@ -44,6 +42,12 @@ return cursor_window_controller_->display_.id(); } + void SetCursorCompositionEnabled(bool enabled) { + cursor_window_controller_ = + Shell::GetInstance()->display_controller()->cursor_window_controller(); + cursor_window_controller_->SetCursorCompositingEnabled(enabled); + } + private: // Not owned. CursorWindowController* cursor_window_controller_; @@ -105,4 +109,39 @@ EXPECT_EQ(50, cursor_bounds.y() + hot_point.y()); } +// Windows doesn't support compositor based cursor. +#if !defined(OS_WIN) +// Make sure that composition cursor inherits the visibility state. +TEST_F(CursorWindowControllerTest, VisibilityTest) { + ASSERT_TRUE(GetCursorWindow()); + EXPECT_TRUE(GetCursorWindow()->IsVisible()); + aura::client::CursorClient* client = Shell::GetInstance()->cursor_manager(); + client->HideCursor(); + ASSERT_TRUE(GetCursorWindow()); + EXPECT_FALSE(GetCursorWindow()->IsVisible()); + + // Normal cursor should be in the correct state. + SetCursorCompositionEnabled(false); + ASSERT_FALSE(GetCursorWindow()); + ASSERT_FALSE(client->IsCursorVisible()); + + // Cursor was hidden. + SetCursorCompositionEnabled(true); + ASSERT_TRUE(GetCursorWindow()); + EXPECT_FALSE(GetCursorWindow()->IsVisible()); + + // Goback to normal cursor and show the cursor. + SetCursorCompositionEnabled(false); + ASSERT_FALSE(GetCursorWindow()); + ASSERT_FALSE(client->IsCursorVisible()); + client->ShowCursor(); + ASSERT_TRUE(client->IsCursorVisible()); + + // Cursor was shown. + SetCursorCompositionEnabled(true); + ASSERT_TRUE(GetCursorWindow()); + EXPECT_TRUE(GetCursorWindow()->IsVisible()); +} +#endif + } // namespace ash diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos.cc oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos.cc --- oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos.cc 2015-06-23 12:14:25.000000000 +0000 @@ -17,6 +17,9 @@ casting_session_count_(0), power_manager_client_(power_manager_client) { DCHECK(power_manager_client); +#if defined(USE_OZONE) + is_initial_configuration_ = true; +#endif } ProjectingObserver::~ProjectingObserver() {} @@ -33,6 +36,13 @@ } } +#if defined(USE_OZONE) + if (is_initial_configuration_) { + is_initial_configuration_ = false; + return; + } +#endif + SetIsProjecting(); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos.h oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos.h --- oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos.h 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos.h 2015-06-23 12:14:25.000000000 +0000 @@ -45,6 +45,14 @@ // Weak pointer to the DBusClient PowerManagerClient; chromeos::PowerManagerClient* power_manager_client_; +#if defined(USE_OZONE) + // TODO(dnicoara) Remove once merged to M43. + // Used to skip the first call to the power management during the initial + // display configuration to avoid changing power settings due to possibly + // invalid display configuration. + bool is_initial_configuration_; +#endif + DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); }; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/ash/display/projecting_observer_chromeos_unittest.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/display/projecting_observer_chromeos_unittest.cc 2015-06-23 12:14:25.000000000 +0000 @@ -30,6 +30,14 @@ ~ProjectingObserverTest() override {} +#if defined(USE_OZONE) + void SetUp() override { + // First configuration event is ignored on Ozone to work around setting the + // wrong power state during startup. + observer_.OnDisplayModeChanged(std::vector()); + } +#endif + protected: chromeos::FakePowerManagerClient fake_power_client_; ProjectingObserver observer_; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/rotator/screen_rotation_animator.cc oxide-qt-1.7.9/third_party/chromium/src/ash/rotator/screen_rotation_animator.cc --- oxide-qt-1.7.8/third_party/chromium/src/ash/rotator/screen_rotation_animator.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/rotator/screen_rotation_animator.cc 2015-06-23 12:14:25.000000000 +0000 @@ -12,6 +12,7 @@ #include "ash/display/display_info.h" #include "ash/display/display_manager.h" #include "ash/rotator/screen_rotation_animation.h" +#include "ash/session/session_state_delegate.h" #include "ash/shell.h" #include "base/command_line.h" #include "base/time/time.h" @@ -268,6 +269,22 @@ ScreenRotationAnimator::~ScreenRotationAnimator() { } +bool ScreenRotationAnimator::CanAnimate() const { + // Animations are currently broken on the login screen. + // (chrome-os-partners:40118). Disabling the animations on this screen for + // M-43 + return Shell::GetInstance() + ->display_manager() + ->GetDisplayForId(display_id_) + .is_valid() && + Shell::GetInstance() + ->session_state_delegate() + ->IsActiveUserSessionStarted() && + !Shell::GetInstance()->session_state_delegate()->IsScreenLocked() && + Shell::GetInstance()->session_state_delegate()->GetSessionState() == + SessionStateDelegate::SESSION_STATE_ACTIVE; +} + void ScreenRotationAnimator::Rotate(gfx::Display::Rotation new_rotation, gfx::Display::RotationSource source) { const gfx::Display::Rotation current_rotation = @@ -280,7 +297,7 @@ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kAshEnableScreenRotationAnimation); - if (switch_value == kRotationAnimation_None) { + if (!CanAnimate() || switch_value == kRotationAnimation_None) { Shell::GetInstance()->display_manager()->SetDisplayRotation( display_id_, new_rotation, source); } else if (kRotationAnimation_Default == switch_value || diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ash/rotator/screen_rotation_animator.h oxide-qt-1.7.9/third_party/chromium/src/ash/rotator/screen_rotation_animator.h --- oxide-qt-1.7.8/third_party/chromium/src/ash/rotator/screen_rotation_animator.h 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ash/rotator/screen_rotation_animator.h 2015-06-23 12:14:25.000000000 +0000 @@ -17,6 +17,12 @@ explicit ScreenRotationAnimator(int64 display_id); ~ScreenRotationAnimator(); + // Returns true if the screen rotation animation can be completed + // successfully. For example an animation is not possible if |display_id_| + // specifies a gfx::Display that is not currently active. See + // www.crbug.com/479503. + bool CanAnimate() const; + // Rotates |display_| to the |new_rotation| orientation, for the given // |source|. The rotation will also become active. void Rotate(gfx::Display::Rotation new_rotation, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java oxide-qt-1.7.9/third_party/chromium/src/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java --- oxide-qt-1.7.8/third_party/chromium/src/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java 2015-06-23 12:14:25.000000000 +0000 @@ -299,6 +299,9 @@ apkFilePath = context.getApplicationInfo().sourceDir; if (mProbeMapApkWithExecPermission) { mMapApkWithExecPermission = Linker.checkMapExecSupport(apkFilePath); + } else { + // Assume map executable support on Samsung devices. + mMapApkWithExecPermission = true; } if (!mMapApkWithExecPermission && Linker.isInZipFile()) { Log.w(TAG, "the no map executable support fallback will be used because" diff -Nru oxide-qt-1.7.8/third_party/chromium/src/breakpad/src/client/linux/handler/exception_handler.cc oxide-qt-1.7.9/third_party/chromium/src/breakpad/src/client/linux/handler/exception_handler.cc --- oxide-qt-1.7.8/third_party/chromium/src/breakpad/src/client/linux/handler/exception_handler.cc 2015-04-24 01:55:55.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/breakpad/src/client/linux/handler/exception_handler.cc 2015-06-23 12:14:33.000000000 +0000 @@ -365,7 +365,8 @@ pthread_mutex_unlock(&g_handler_stack_mutex_); - if (info->si_pid || sig == SIGABRT) { + // info->si_code <= 0 iff SI_FROMUSER (SI_FROMKERNEL otherwise). + if (info->si_code <= 0 || sig == SIGABRT) { // This signal was triggered by somebody sending us the signal with kill(). // In order to retrigger it, we have to queue a new signal by calling // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/breakpad/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/breakpad/src/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/build/util/LASTCHANGE oxide-qt-1.7.9/third_party/chromium/src/build/util/LASTCHANGE --- oxide-qt-1.7.8/third_party/chromium/src/build/util/LASTCHANGE 2015-05-14 15:35:23.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/build/util/LASTCHANGE 2015-06-23 12:19:30.000000000 +0000 @@ -1 +1 @@ -LASTCHANGE=bbd9270c4234d436bb05bd4502b230fc17887d08 +LASTCHANGE=aa8b82d8e6337201aa9477f25c603c289b5d7d0e diff -Nru oxide-qt-1.7.8/third_party/chromium/src/build/util/LASTCHANGE.blink oxide-qt-1.7.9/third_party/chromium/src/build/util/LASTCHANGE.blink --- oxide-qt-1.7.8/third_party/chromium/src/build/util/LASTCHANGE.blink 2015-05-14 15:35:24.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/build/util/LASTCHANGE.blink 2015-06-23 12:19:30.000000000 +0000 @@ -1 +1 @@ -LASTCHANGE=195283 +LASTCHANGE=197431 Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/buildtools/clang_format/script/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/buildtools/clang_format/script/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/buildtools/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/buildtools/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/buildtools/third_party/libc++/trunk/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/buildtools/third_party/libc++/trunk/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/buildtools/third_party/libc++abi/trunk/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/buildtools/third_party/libc++abi/trunk/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/layers/delegated_renderer_layer_impl.cc oxide-qt-1.7.9/third_party/chromium/src/cc/layers/delegated_renderer_layer_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/layers/delegated_renderer_layer_impl.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/layers/delegated_renderer_layer_impl.cc 2015-06-23 12:14:25.000000000 +0000 @@ -79,6 +79,7 @@ own_child_id_ = false; if (have_render_passes_to_push_) { + DCHECK(child_id_); // This passes ownership of the render passes to the active tree. delegated_layer->SetRenderPasses(&render_passes_in_draw_order_); // Once resources are on the active tree, give them to the ResourceProvider @@ -206,6 +207,7 @@ void DelegatedRendererLayerImpl::ReleaseResources() { ClearRenderPasses(); ClearChildId(); + have_render_passes_to_push_ = false; } static inline int IndexToId(int index) { return index + 1; } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/layers/layer_impl.cc oxide-qt-1.7.9/third_party/chromium/src/cc/layers/layer_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/layers/layer_impl.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/layers/layer_impl.cc 2015-06-23 12:14:25.000000000 +0000 @@ -348,6 +348,8 @@ float fill_width = width * 3; gfx::Rect fill_rect = quad_rect; fill_rect.Inset(fill_width / 2.f, fill_width / 2.f); + if (fill_rect.IsEmpty()) + return; gfx::Rect visible_fill_rect = gfx::IntersectRects(visible_quad_rect, fill_rect); DebugBorderDrawQuad* fill_quad = diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/layers/picture_layer_impl_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/cc/layers/picture_layer_impl_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/layers/picture_layer_impl_unittest.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/layers/picture_layer_impl_unittest.cc 2015-06-23 12:14:25.000000000 +0000 @@ -2421,7 +2421,7 @@ // Gpu rasterization is disabled by default. EXPECT_FALSE(host_impl_.use_gpu_rasterization()); // Toggling the gpu rasterization clears all tilings on both trees. - host_impl_.SetUseGpuRasterization(true); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::ON); EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings()); EXPECT_EQ(0u, active_layer_->tilings()->num_tilings()); @@ -2442,7 +2442,7 @@ // Toggling the gpu rasterization clears all tilings on both trees. EXPECT_TRUE(host_impl_.use_gpu_rasterization()); - host_impl_.SetUseGpuRasterization(false); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings()); EXPECT_EQ(0u, active_layer_->tilings()->num_tilings()); } @@ -2487,7 +2487,7 @@ gfx::Size layer_bounds(default_tile_size.width() * 4, default_tile_size.height() * 4); - host_impl_.SetUseGpuRasterization(false); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); SetupDefaultTrees(layer_bounds); EXPECT_FALSE(host_impl_.use_gpu_rasterization()); @@ -2500,7 +2500,7 @@ gfx::Size layer_bounds(default_tile_size.width() * 4, default_tile_size.height() * 4); - host_impl_.SetUseGpuRasterization(true); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::ON); SetupDefaultTrees(layer_bounds); EXPECT_TRUE(host_impl_.use_gpu_rasterization()); @@ -2796,7 +2796,7 @@ gfx::Size viewport_size(1000, 1000); SetupDefaultTrees(layer_bounds); host_impl_.SetViewportSize(viewport_size); - host_impl_.SetUseGpuRasterization(true); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::ON); float contents_scale = 1.f; float device_scale = 1.3f; @@ -4929,7 +4929,7 @@ host_impl_.SetViewportSize(gfx::Size(1000, 1000)); gfx::Size result; - host_impl_.SetUseGpuRasterization(false); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); // Default tile-size for large layers. result = layer->CalculateTileSize(gfx::Size(10000, 10000)); @@ -4948,7 +4948,7 @@ // Gpu-rasterization uses 25% viewport-height tiles. // The +2's below are for border texels. - host_impl_.SetUseGpuRasterization(true); + host_impl_.SetGpuRasterizationStatus(GpuRasterizationStatus::ON); host_impl_.SetViewportSize(gfx::Size(2000, 2000)); layer->set_gpu_raster_max_texture_size(host_impl_.device_viewport_size()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/output/gl_renderer.cc oxide-qt-1.7.9/third_party/chromium/src/cc/output/gl_renderer.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/output/gl_renderer.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/output/gl_renderer.cc 2015-06-23 12:14:25.000000000 +0000 @@ -162,7 +162,13 @@ public: static scoped_ptr Create(GLRenderer* renderer, DrawingFrame* frame) { - return make_scoped_ptr(new ScopedUseGrContext(renderer, frame)); + // GrContext for filters is created lazily, and may fail if the context + // is lost. + // TODO(vmiura,bsalomon): crbug.com/487850 Ensure that + // ContextProvider::GrContext() does not return NULL. + if (renderer->output_surface_->context_provider()->GrContext()) + return make_scoped_ptr(new ScopedUseGrContext(renderer, frame)); + return nullptr; } ~ScopedUseGrContext() { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/output/renderer_pixeltest.cc oxide-qt-1.7.9/third_party/chromium/src/cc/output/renderer_pixeltest.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/output/renderer_pixeltest.cc 2015-04-21 09:26:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/output/renderer_pixeltest.cc 2015-06-23 12:14:25.000000000 +0000 @@ -2485,6 +2485,114 @@ ExactPixelComparator(true))); } +// This disables filtering by setting |nearest_neighbor| to true on the +// TextureDrawQuad. +TYPED_TEST(SoftwareRendererPixelTest, TextureDrawQuadNearestNeighbor) { + gfx::Rect viewport(this->device_viewport_size_); + bool nearest_neighbor = true; + + SkBitmap bitmap; + bitmap.allocN32Pixels(2, 2); + { + SkAutoLockPixels lock(bitmap); + SkCanvas canvas(bitmap); + canvas.drawPoint(0, 0, SK_ColorGREEN); + canvas.drawPoint(0, 1, SK_ColorBLUE); + canvas.drawPoint(1, 0, SK_ColorBLUE); + canvas.drawPoint(1, 1, SK_ColorGREEN); + } + + gfx::Size tile_size(2, 2); + ResourceProvider::ResourceId resource = + this->resource_provider_->CreateResource( + tile_size, GL_CLAMP_TO_EDGE, ResourceProvider::TEXTURE_HINT_IMMUTABLE, + RGBA_8888); + + { + SkAutoLockPixels lock(bitmap); + this->resource_provider_->CopyToResource( + resource, static_cast(bitmap.getPixels()), tile_size); + } + + RenderPassId id(1, 1); + gfx::Transform transform_to_root; + scoped_ptr pass = + CreateTestRenderPass(id, viewport, transform_to_root); + + gfx::Transform content_to_target_transform; + SharedQuadState* shared_state = CreateTestSharedQuadState( + content_to_target_transform, viewport, pass.get()); + + float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + TextureDrawQuad* quad = pass->CreateAndAppendDrawQuad(); + quad->SetNew(shared_state, viewport, gfx::Rect(), viewport, resource, false, + gfx::PointF(0, 0), gfx::PointF(1, 1), SK_ColorBLACK, + vertex_opacity, false, nearest_neighbor); + + RenderPassList pass_list; + pass_list.push_back(pass.Pass()); + + EXPECT_TRUE(this->RunPixelTest( + &pass_list, + base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")), + FuzzyPixelComparator(false, 2.f, 0.f, 256.f, 256, 0.f))); +} + +// This ensures filtering is enabled by setting |nearest_neighbor| to false on +// the TextureDrawQuad. +TYPED_TEST(SoftwareRendererPixelTest, TextureDrawQuadLinear) { + gfx::Rect viewport(this->device_viewport_size_); + bool nearest_neighbor = false; + + SkBitmap bitmap; + bitmap.allocN32Pixels(2, 2); + { + SkAutoLockPixels lock(bitmap); + SkCanvas canvas(bitmap); + canvas.drawPoint(0, 0, SK_ColorGREEN); + canvas.drawPoint(0, 1, SK_ColorBLUE); + canvas.drawPoint(1, 0, SK_ColorBLUE); + canvas.drawPoint(1, 1, SK_ColorGREEN); + } + + gfx::Size tile_size(2, 2); + ResourceProvider::ResourceId resource = + this->resource_provider_->CreateResource( + tile_size, GL_CLAMP_TO_EDGE, ResourceProvider::TEXTURE_HINT_IMMUTABLE, + RGBA_8888); + + { + SkAutoLockPixels lock(bitmap); + this->resource_provider_->CopyToResource( + resource, static_cast(bitmap.getPixels()), tile_size); + } + + RenderPassId id(1, 1); + gfx::Transform transform_to_root; + scoped_ptr pass = + CreateTestRenderPass(id, viewport, transform_to_root); + + gfx::Transform content_to_target_transform; + SharedQuadState* shared_state = CreateTestSharedQuadState( + content_to_target_transform, viewport, pass.get()); + + float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + TextureDrawQuad* quad = pass->CreateAndAppendDrawQuad(); + quad->SetNew(shared_state, viewport, gfx::Rect(), viewport, resource, false, + gfx::PointF(0, 0), gfx::PointF(1, 1), SK_ColorBLACK, + vertex_opacity, false, nearest_neighbor); + + RenderPassList pass_list; + pass_list.push_back(pass.Pass()); + + // Allow for a small amount of error as the blending alogrithm used by Skia is + // affected by the offset in the expanded rect. + EXPECT_TRUE(this->RunPixelTest( + &pass_list, + base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers_linear.png")), + FuzzyPixelComparator(false, 100.f, 0.f, 16.f, 16.f, 0.f))); +} + TYPED_TEST(SoftwareRendererPixelTest, PictureDrawQuadNonIdentityScale) { gfx::Size pile_tile_size(1000, 1000); gfx::Rect viewport(this->device_viewport_size_); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/output/software_renderer.cc oxide-qt-1.7.9/third_party/chromium/src/cc/output/software_renderer.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/output/software_renderer.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/output/software_renderer.cc 2015-06-23 12:14:25.000000000 +0000 @@ -455,6 +455,8 @@ background_paint.setColor(quad->background_color); current_canvas_->drawRect(quad_rect, background_paint); } + current_paint_.setFilterQuality( + quad->nearest_neighbor ? kNone_SkFilterQuality : kLow_SkFilterQuality); SkShader::TileMode tile_mode = WrapModeToTileMode(lock.wrap_mode()); if (tile_mode != SkShader::kClamp_TileMode) { SkMatrix matrix; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/scheduler/scheduler_state_machine.cc oxide-qt-1.7.9/third_party/chromium/src/cc/scheduler/scheduler_state_machine.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/scheduler/scheduler_state_machine.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/scheduler/scheduler_state_machine.cc 2015-06-23 12:14:26.000000000 +0000 @@ -841,6 +841,14 @@ // Clear funnels for any actions we perform during the deadline. request_swap_funnel_ = false; + +#if defined(OS_ANDROID) + // Allow one PrepareTiles per draw for synchronous compositor. + if (settings_.using_synchronous_renderer_compositor) { + if (prepare_tiles_funnel_ > 0) + prepare_tiles_funnel_--; + } +#endif } void SchedulerStateMachine::OnBeginImplFrameIdle() { Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/cc/test/data/four_blue_green_checkers_linear.png and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/cc/test/data/four_blue_green_checkers_linear.png differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/test/fake_output_surface.h oxide-qt-1.7.9/third_party/chromium/src/cc/test/fake_output_surface.h --- oxide-qt-1.7.8/third_party/chromium/src/cc/test/fake_output_surface.h 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/test/fake_output_surface.h 2015-06-23 12:14:26.000000000 +0000 @@ -29,7 +29,8 @@ static scoped_ptr Create3d( scoped_refptr context_provider) { - return make_scoped_ptr(new FakeOutputSurface(context_provider, false)); + return make_scoped_ptr(new FakeOutputSurface( + context_provider, TestContextProvider::Create(), false)); } static scoped_ptr Create3d( @@ -41,8 +42,9 @@ static scoped_ptr Create3d( scoped_ptr context) { - return make_scoped_ptr(new FakeOutputSurface( - TestContextProvider::Create(context.Pass()), false)); + return make_scoped_ptr( + new FakeOutputSurface(TestContextProvider::Create(context.Pass()), + TestContextProvider::Create(), false)); } static scoped_ptr CreateSoftware( diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host.cc oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host.cc 2015-06-23 12:14:26.000000000 +0000 @@ -338,8 +338,7 @@ sync_tree->set_top_controls_height(top_controls_height_); sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); - host_impl->SetUseGpuRasterization(UseGpuRasterization()); - host_impl->set_gpu_rasterization_status(GetGpuRasterizationStatus()); + host_impl->SetGpuRasterizationStatus(GetGpuRasterizationStatus()); RecordGpuRasterizationHistogram(); host_impl->SetViewportSize(device_viewport_size_); @@ -440,7 +439,7 @@ settings_, client, proxy_.get(), rendering_stats_instrumentation_.get(), shared_bitmap_manager_, gpu_memory_buffer_manager_, task_graph_runner_, id_); - host_impl->SetUseGpuRasterization(UseGpuRasterization()); + host_impl->SetGpuRasterizationStatus(GetGpuRasterizationStatus()); shared_bitmap_manager_ = NULL; gpu_memory_buffer_manager_ = NULL; task_graph_runner_ = NULL; @@ -582,17 +581,6 @@ proxy_->SetDebugState(debug_state); } -bool LayerTreeHost::UseGpuRasterization() const { - if (settings_.gpu_rasterization_forced) { - return true; - } else if (settings_.gpu_rasterization_enabled) { - return has_gpu_rasterization_trigger_ && - content_is_suitable_for_gpu_rasterization_; - } else { - return false; - } -} - GpuRasterizationStatus LayerTreeHost::GetGpuRasterizationStatus() const { if (settings_.gpu_rasterization_forced) { return GpuRasterizationStatus::ON_FORCED; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host.h oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host.h --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host.h 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host.h 2015-06-23 12:14:26.000000000 +0000 @@ -193,7 +193,6 @@ return has_gpu_rasterization_trigger_; } void SetHasGpuRasterizationTrigger(bool has_trigger); - bool UseGpuRasterization() const; GpuRasterizationStatus GetGpuRasterizationStatus() const; void SetViewportSize(const gfx::Size& device_viewport_size); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl.cc oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl.cc 2015-06-23 12:14:26.000000000 +0000 @@ -1616,7 +1616,36 @@ renderer_->Finish(); } -void LayerTreeHostImpl::SetUseGpuRasterization(bool use_gpu) { +bool LayerTreeHostImpl::CanUseGpuRasterization() { + if (!(output_surface_ && output_surface_->context_provider() && + output_surface_->worker_context_provider())) + return false; + + ContextProvider* context_provider = + output_surface_->worker_context_provider(); + base::AutoLock context_lock(*context_provider->GetLock()); + if (!context_provider->GrContext()) + return false; + + return true; +} + +void LayerTreeHostImpl::SetGpuRasterizationStatus( + GpuRasterizationStatus gpu_rasterization_status) { + bool use_gpu = gpu_rasterization_status == GpuRasterizationStatus::ON || + gpu_rasterization_status == GpuRasterizationStatus::ON_FORCED; + if (use_gpu && !use_gpu_rasterization_) { + if (!CanUseGpuRasterization()) { + // If GPU rasterization is unusable, e.g. if GlContext could not + // be created due to losing the GL context, force use of software + // raster. + use_gpu = false; + gpu_rasterization_status = GpuRasterizationStatus::OFF_DEVICE; + } + } + + gpu_rasterization_status_ = gpu_rasterization_status; + if (use_gpu == use_gpu_rasterization_) return; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl.h oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl.h --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl.h 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl.h 2015-06-23 12:14:26.000000000 +0000 @@ -314,16 +314,14 @@ virtual bool InitializeRenderer(scoped_ptr output_surface); TileManager* tile_manager() { return tile_manager_.get(); } - void SetUseGpuRasterization(bool use_gpu); + bool CanUseGpuRasterization(); + void SetGpuRasterizationStatus( + GpuRasterizationStatus gpu_rasterization_status); bool use_gpu_rasterization() const { return use_gpu_rasterization_; } GpuRasterizationStatus gpu_rasterization_status() const { return gpu_rasterization_status_; } - void set_gpu_rasterization_status( - GpuRasterizationStatus gpu_rasterization_status) { - gpu_rasterization_status_ = gpu_rasterization_status; - } bool create_low_res_tiling() const { return settings_.create_low_res_tiling && !use_gpu_rasterization_; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_impl_unittest.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_impl_unittest.cc 2015-06-23 12:14:26.000000000 +0000 @@ -6701,9 +6701,8 @@ // when visible. LayerTreeSettings settings; settings.gpu_rasterization_enabled = true; - host_impl_ = LayerTreeHostImpl::Create( - settings, this, &proxy_, &stats_instrumentation_, NULL, NULL, NULL, 0); - host_impl_->SetUseGpuRasterization(true); + CreateHostImpl(settings, CreateOutputSurface()); + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON); host_impl_->SetVisible(true); host_impl_->SetMemoryPolicy(policy1); EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_); @@ -6745,20 +6744,84 @@ host_impl_->ResetRequiresHighResToDraw(); - host_impl_->SetUseGpuRasterization(false); + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); EXPECT_FALSE(host_impl_->RequiresHighResToDraw()); - host_impl_->SetUseGpuRasterization(true); + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON); EXPECT_TRUE(host_impl_->RequiresHighResToDraw()); - host_impl_->SetUseGpuRasterization(false); + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); EXPECT_TRUE(host_impl_->RequiresHighResToDraw()); host_impl_->ResetRequiresHighResToDraw(); EXPECT_FALSE(host_impl_->RequiresHighResToDraw()); - host_impl_->SetUseGpuRasterization(true); + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON); EXPECT_TRUE(host_impl_->RequiresHighResToDraw()); } +TEST_F(LayerTreeHostImplTest, SetGpuRasterizationStatus) { + ASSERT_TRUE(host_impl_->active_tree()); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON); + EXPECT_TRUE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::ON, host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON_FORCED); + EXPECT_TRUE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::ON_FORCED, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_VIEWPORT); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_CONTENT); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_CONTENT, + host_impl_->gpu_rasterization_status()); +} + +TEST_F(LayerTreeHostImplTest, SetGpuRasterizationStatusNoContext) { + // Initialize output surface with no worker context privider. + scoped_ptr output_surface = + FakeOutputSurface::Create3d(TestContextProvider::Create(), nullptr); + CreateHostImpl(DefaultSettings(), output_surface.Pass()); + + ASSERT_TRUE(host_impl_->active_tree()); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::ON_FORCED); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_DEVICE); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_VIEWPORT); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT, + host_impl_->gpu_rasterization_status()); + + host_impl_->SetGpuRasterizationStatus(GpuRasterizationStatus::OFF_CONTENT); + EXPECT_FALSE(host_impl_->use_gpu_rasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_CONTENT, + host_impl_->gpu_rasterization_status()); +} + class LayerTreeHostImplTestPrepareTiles : public LayerTreeHostImplTest { public: void SetUp() override { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_unittest.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_unittest.cc 2015-06-23 12:14:26.000000000 +0000 @@ -5316,12 +5316,14 @@ EXPECT_TRUE(layer->IsSuitableForGpuRasterization()); EXPECT_TRUE(recording_source->IsSuitableForGpuRasterization()); EXPECT_FALSE(layer_tree_host()->has_gpu_rasterization_trigger()); - EXPECT_FALSE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + layer_tree_host()->GetGpuRasterizationStatus()); // Setting gpu rasterization trigger does not enable gpu rasterization. layer_tree_host()->SetHasGpuRasterizationTrigger(true); EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger()); - EXPECT_FALSE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_DEVICE, + layer_tree_host()->GetGpuRasterizationStatus()); PostSetNeedsCommitToMainThread(); } @@ -5372,12 +5374,14 @@ EXPECT_TRUE(layer->IsSuitableForGpuRasterization()); EXPECT_TRUE(recording_source->IsSuitableForGpuRasterization()); EXPECT_FALSE(layer_tree_host()->has_gpu_rasterization_trigger()); - EXPECT_FALSE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT, + layer_tree_host()->GetGpuRasterizationStatus()); // Gpu rasterization trigger is relevant. layer_tree_host()->SetHasGpuRasterizationTrigger(true); EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger()); - EXPECT_TRUE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::ON, + layer_tree_host()->GetGpuRasterizationStatus()); // Content-based veto is relevant as well. recording_source->SetUnsuitableForGpuRasterizationForTesting(); @@ -5440,10 +5444,12 @@ EXPECT_FALSE(layer_tree_host()->has_gpu_rasterization_trigger()); // With gpu rasterization forced, gpu rasterization trigger is irrelevant. - EXPECT_TRUE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::ON_FORCED, + layer_tree_host()->GetGpuRasterizationStatus()); layer_tree_host()->SetHasGpuRasterizationTrigger(true); EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger()); - EXPECT_TRUE(layer_tree_host()->UseGpuRasterization()); + EXPECT_EQ(GpuRasterizationStatus::ON_FORCED, + layer_tree_host()->GetGpuRasterizationStatus()); // Content-based veto is irrelevant as well. recording_source->SetUnsuitableForGpuRasterizationForTesting(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_unittest_delegated.cc oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_unittest_delegated.cc --- oxide-qt-1.7.8/third_party/chromium/src/cc/trees/layer_tree_host_unittest_delegated.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/cc/trees/layer_tree_host_unittest_delegated.cc 2015-06-23 12:14:26.000000000 +0000 @@ -404,6 +404,37 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCreateChildId); +class LayerTreeHostDelegatedTestDontUseLostChildIdAfterCommit + : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { + protected: + void BeginTest() override { + SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1))); + LayerTreeHostDelegatedTestCaseSingleDelegatedLayer::BeginTest(); + } + + void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { + // Act like the context was lost while the layer is in the pending tree. + LayerImpl* root_impl = host_impl->sync_tree()->root_layer(); + FakeDelegatedRendererLayerImpl* delegated_impl = + static_cast(root_impl->children()[0]); + delegated_impl->ReleaseResources(); + } + + void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { + LayerImpl* root_impl = host_impl->active_tree()->root_layer(); + FakeDelegatedRendererLayerImpl* delegated_impl = + static_cast(root_impl->children()[0]); + + // Should not try to activate a frame without a child id. If we did try to + // activate we would crash. + EXPECT_FALSE(delegated_impl->ChildId()); + EndTest(); + } +}; + +MULTI_THREAD_IMPL_TEST_F( + LayerTreeHostDelegatedTestDontUseLostChildIdAfterCommit); + // Test that we can gracefully handle invalid frames after the context was lost. // For example, we might be trying to use the previous frame in that case and // have to make sure we don't crash because our resource accounting goes wrong. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/res/layout/search_engine.xml oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/res/layout/search_engine.xml --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/res/layout/search_engine.xml 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/res/layout/search_engine.xml 2015-06-23 12:14:26.000000000 +0000 @@ -12,13 +12,12 @@ android:paddingTop="6dp" android:paddingBottom="6dp"> - = Build.VERSION_CODES.LOLLIPOP) { + radioButton.setBackgroundResource(0); + } radioButton.setChecked(selected); TextView description = (TextView) view.findViewById(R.id.description); @@ -183,7 +195,7 @@ resources.getColor(R.color.pref_accent_color)); if (LocationSettings.getInstance().isSystemLocationSettingEnabled()) { String message = mContext.getString( - locationEnabled(position) + locationEnabled(position, true) ? R.string.search_engine_location_allowed : R.string.search_engine_location_blocked); SpannableString messageWithLink = new SpannableString(message); @@ -226,7 +238,7 @@ SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mContext); if (sharedPreferences.getBoolean(PrefServiceBridge.LOCATION_AUTO_ALLOWED, false)) { - if (locationEnabled(mSelectedSearchEnginePosition)) { + if (locationEnabled(mSelectedSearchEnginePosition, false)) { String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toIndex(mSelectedSearchEnginePosition)); WebsitePreferenceBridge.nativeSetGeolocationSettingForOrigin( @@ -244,17 +256,10 @@ mCallback.currentSearchEngineDetermined(getSearchEngineNameAndDomain( mContext.getResources(), templateUrl)); - PrefServiceBridge.maybeCreatePermissionForDefaultSearchEngine(true, mContext); notifyDataSetChanged(); } private void onLocationLinkClicked() { - // This catches the case where the user has reset permissions for a site that's set as the - // default search engine. If the user notices that Location is blocked for the current - // search engine and clicks the link to enable then the Location record must exist - // (otherwise it is seemingly impossible to enable after resetting a site). - PrefServiceBridge.maybeCreatePermissionForDefaultSearchEngine(false, mContext); - if (!LocationSettings.getInstance().isSystemLocationSettingEnabled()) { mContext.startActivity( LocationSettings.getInstance().getSystemLocationSettingsIntent()); @@ -263,20 +268,26 @@ mContext, SingleWebsitePreferences.class.getName()); String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toIndex(mSelectedSearchEnginePosition)); - settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, - SingleWebsitePreferences.createFragmentArgsForSite(url)); + Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); + fragmentArgs.putBoolean(SingleWebsitePreferences.EXTRA_LOCATION, + locationEnabled(mSelectedSearchEnginePosition, true)); + settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); mContext.startActivity(settingsIntent); } mCallback.onDismissDialog(); } - private boolean locationEnabled(int position) { + private boolean locationEnabled(int position, boolean checkGeoHeader) { if (position == -1) return false; String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl( toIndex(position)); GeolocationInfo locationSettings = new GeolocationInfo(url, null); ContentSetting locationPermission = locationSettings.getContentSetting(); + // Handle the case where the geoHeader being sent when no permission has been specified. + if (locationPermission == ContentSetting.ASK && checkGeoHeader) { + return PrefServiceBridge.isGeoHeaderEnabledForUrl(mContext, url, false); + } return locationPermission == ContentSetting.ALLOW; } } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java 2015-06-23 12:14:26.000000000 +0000 @@ -35,12 +35,15 @@ implements DialogInterface.OnClickListener, OnPreferenceChangeListener, OnPreferenceClickListener { // SingleWebsitePreferences expects either EXTRA_SITE (a Website) or - // EXTRA_ADDRESS (a WebsiteAddress) to be present (but not both). If + // EXTRA_ORIGIN (a WebsiteAddress) to be present (but not both). If // EXTRA_SITE is present, the fragment will display the permissions in that - // Website object. If EXTRA_ADDRESS is present, the fragment will find all - // permissions for that website address and display those. + // Website object. If EXTRA_ORIGIN is present, the fragment will find all + // permissions for that website address and display those. If EXTRA_LOCATION + // is present, the fragment will add a Location toggle, even if the site + // specifies no Location permission. public static final String EXTRA_SITE = "org.chromium.chrome.preferences.site"; public static final String EXTRA_ORIGIN = "org.chromium.chrome.preferences.origin"; + public static final String EXTRA_LOCATION = "org.chromium.chrome.preferences.location"; // Preference keys, see single_website_preferences.xml // Headings: @@ -264,7 +267,15 @@ } else if (PREF_JAVASCRIPT_PERMISSION.equals(preference.getKey())) { setUpListPreference(preference, mSite.getJavaScriptPermission()); } else if (PREF_LOCATION_ACCESS.equals(preference.getKey())) { - setUpListPreference(preference, mSite.getGeolocationPermission()); + Object locationAllowed = getArguments().getSerializable(EXTRA_LOCATION); + if (mSite.getGeolocationPermission() == null && locationAllowed != null) { + String origin = mSite.getAddress().getOrigin(); + mSite.setGeolocationInfo(new GeolocationInfo(origin, origin)); + setUpListPreference(preference, (boolean) locationAllowed + ? ContentSetting.ALLOW : ContentSetting.BLOCK); + } else { + setUpListPreference(preference, mSite.getGeolocationPermission()); + } } else if (PREF_MIDI_SYSEX_PERMISSION.equals(preference.getKey())) { setUpListPreference(preference, mSite.getMidiPermission()); } else if (PREF_POPUP_PERMISSION.equals(preference.getKey())) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java 2015-04-21 09:26:57.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/tab/TabRedirectHandler.java 2015-06-23 12:14:26.000000000 +0000 @@ -176,11 +176,17 @@ */ public boolean shouldStayInChrome() { return mIsInitialIntentHeadingToChrome - || mInitialNavigationType == NAVIGATION_TYPE_FROM_USER_TYPING || mInitialNavigationType == NAVIGATION_TYPE_FROM_LINK_WITHOUT_USER_GESTURE; } /** + * @return whether navigation is from a user's typing or not. + */ + public boolean isNavigationFromUserTyping() { + return mInitialNavigationType == NAVIGATION_TYPE_FROM_USER_TYPING; + } + + /** * @return whether we should stay in Chrome or not. */ public boolean shouldNotOverrideUrlLoading() { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java 2015-06-23 12:14:26.000000000 +0000 @@ -383,7 +383,7 @@ @SmallTest public void testTypedRedirectToExternalProtocol() { - // http://crbug.com/331571 reverted http://crbug.com/169549 + // http://crbug.com/169549 check("market://1234", null, /* referrer */ false, /* incognito */ @@ -392,8 +392,8 @@ true, false, null, - OverrideUrlLoadingResult.NO_OVERRIDE, - IGNORE); + OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT, + START_ACTIVITY); // http://crbug.com/143118 check("market://1234", null, /* referrer */ @@ -658,10 +658,10 @@ PageTransition.TYPED, NO_REDIRECT, true, false, redirectHandler, OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE); - redirectHandler.updateNewUrlLoading(PageTransition.TYPED, true, false, 0, 0); + redirectHandler.updateNewUrlLoading(PageTransition.LINK, false, false, 0, 0); check(INTENT_URL_WITH_FALLBACK_URL_WITHOUT_PACKAGE_NAME, null, /* referrer */ false, /* incognito */ - PageTransition.TYPED, REDIRECT, true, false, redirectHandler, + PageTransition.LINK, NO_REDIRECT, true, false, redirectHandler, OverrideUrlLoadingResult.OVERRIDE_WITH_CLOBBERING_TAB, IGNORE); // Now the user opens a link. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java 2015-06-23 12:14:26.000000000 +0000 @@ -21,6 +21,7 @@ import org.chromium.chrome.browser.preferences.website.WebsitePreferenceBridge; import org.chromium.chrome.browser.search_engines.TemplateUrlService; import org.chromium.chrome.browser.search_engines.TemplateUrlService.LoadListener; +import org.chromium.chrome.browser.search_engines.TemplateUrlService.TemplateUrl; import org.chromium.chrome.shell.ChromeShellTestBase; import org.chromium.chrome.shell.preferences.ChromeShellMainPreferences; import org.chromium.content.browser.test.util.CallbackHelper; @@ -28,6 +29,7 @@ import java.lang.reflect.Method; import java.text.NumberFormat; +import java.util.List; /** * Tests for the Settings menu. @@ -98,11 +100,11 @@ assertEquals("1", pref.getValueForTesting()); // Simulate selecting the third search engine, ensure that TemplateUrlService is - // updated, and location permission granted for the new engine. + // updated, but location permission not granted for the new engine. pref.setValueForTesting("2"); TemplateUrlService templateUrlService = TemplateUrlService.getInstance(); assertEquals(2, templateUrlService.getDefaultSearchEngineIndex()); - assertEquals(ContentSetting.ALLOW, locationPermissionForSearchEngine(2)); + assertEquals(ContentSetting.ASK, locationPermissionForSearchEngine(2)); // Simulate selecting the fourth search engine and but set a blocked permission // first and ensure that location permission is NOT granted. @@ -129,53 +131,53 @@ } /** - * Test migration path to creating a search engine permission. + * Make sure that when a user switches to a search engine that uses HTTP, the location + * permission is not added. */ @SmallTest @Feature({"Preferences"}) - public void testPrepopulateDoesNotCrash() throws Exception { + public void testSearchEnginePreferenceHttp() throws Exception { ensureTemplateUrlServiceLoaded(); - // Create the default permission from the UI thread. + final Preferences prefActivity = startPreferences(getInstrumentation(), + ChromeShellMainPreferences.class.getName()); + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { - PrefServiceBridge.maybeCreatePermissionForDefaultSearchEngine( - true, getInstrumentation().getTargetContext()); - assertEquals(ContentSetting.ALLOW, locationPermissionForSearchEngine( - TemplateUrlService.getInstance().getDefaultSearchEngineIndex())); - } - }); - } + // Ensure that the second search engine in the list is selected. + PreferenceFragment fragment = (PreferenceFragment) + prefActivity.getFragmentForTest(); + SearchEnginePreference pref = (SearchEnginePreference) + fragment.findPreference(SearchEnginePreference.PREF_SEARCH_ENGINE); + assertNotNull(pref); + assertEquals("0", pref.getValueForTesting()); - /** - * Test that migration path does NOT create a search engine permission if one already exists. - */ - @SmallTest - @Feature({"Preferences"}) - public void testPrepopulateDoesNothing() throws Exception { - ensureTemplateUrlServiceLoaded(); + // Simulate selecting a search engine that uses HTTP. + int index = indexOfFirstHttpSearchEngine(); + pref.setValueForTesting(Integer.toString(index)); - // Create the default permission from the UI thread. - ThreadUtils.runOnUiThreadBlocking(new Runnable() { - @Override - public void run() { - // Create a Blocked record. TemplateUrlService templateUrlService = TemplateUrlService.getInstance(); - String url = templateUrlService.getSearchEngineUrlFromTemplateUrl( - templateUrlService.getDefaultSearchEngineIndex()); - WebsitePreferenceBridge.nativeSetGeolocationSettingForOrigin( - url, url, ContentSetting.BLOCK.toInt()); - - // See if it overwrites it with an Allowed record (spoiler-alert: it shouldn't). - PrefServiceBridge.maybeCreatePermissionForDefaultSearchEngine( - true, getInstrumentation().getTargetContext()); - assertEquals(ContentSetting.BLOCK, locationPermissionForSearchEngine( - templateUrlService.getDefaultSearchEngineIndex())); + assertEquals(index, templateUrlService.getDefaultSearchEngineIndex()); + assertEquals(ContentSetting.ASK, locationPermissionForSearchEngine(index)); } }); } + private int indexOfFirstHttpSearchEngine() { + TemplateUrlService templateUrlService = TemplateUrlService.getInstance(); + List urls = templateUrlService.getLocalizedSearchEngines(); + int index; + for (index = 0; index < urls.size(); ++index) { + String url = templateUrlService.getSearchEngineUrlFromTemplateUrl(index); + if (url.startsWith("http:")) { + return index; + } + } + fail(); + return index; + } + private void ensureTemplateUrlServiceLoaded() throws Exception { // Make sure the template_url_service is loaded. final CallbackHelper onTemplateUrlServiceLoadedHelper = new CallbackHelper(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabRedirectHandlerTest.java oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabRedirectHandlerTest.java --- oxide-qt-1.7.8/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabRedirectHandlerTest.java 2015-04-21 09:26:57.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabRedirectHandlerTest.java 2015-06-23 12:14:26.000000000 +0000 @@ -213,12 +213,12 @@ TabRedirectHandler handler = new TabRedirectHandler(mContext); handler.updateIntent(sYtIntent); assertFalse(handler.isOnNavigation()); - assertFalse(handler.shouldStayInChrome()); + assertFalse(handler.isNavigationFromUserTyping()); handler.updateNewUrlLoading(PageTransition.TYPED, false, false, 0, 0); - assertTrue(handler.shouldStayInChrome()); + assertTrue(handler.isNavigationFromUserTyping()); handler.updateNewUrlLoading(PageTransition.LINK, false, false, 0, 1); - assertTrue(handler.shouldStayInChrome()); + assertTrue(handler.isNavigationFromUserTyping()); assertTrue(handler.isOnNavigation()); assertEquals(0, handler.getLastCommittedEntryIndexBeforeStartingNavigation()); @@ -226,7 +226,7 @@ SystemClock.sleep(1); handler.updateNewUrlLoading( PageTransition.LINK, false, true, SystemClock.elapsedRealtime(), 2); - assertFalse(handler.shouldStayInChrome()); + assertFalse(handler.isNavigationFromUserTyping()); assertTrue(handler.isOnNavigation()); assertEquals(2, handler.getLastCommittedEntryIndexBeforeStartingNavigation()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/android/password_ui_view_android.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/android/password_ui_view_android.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/android/password_ui_view_android.cc 2015-04-21 09:26:57.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/android/password_ui_view_android.cc 2015-06-23 12:14:26.000000000 +0000 @@ -8,7 +8,10 @@ #include "base/android/jni_weak_ref.h" #include "base/command_line.h" #include "base/metrics/field_trial.h" +#include "base/prefs/pref_service.h" #include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" +#include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/common/experiments.h" @@ -73,9 +76,10 @@ ConvertUTF8ToJavaString(env, std::string()).obj(), ConvertUTF16ToJavaString(env, base::string16()).obj()); } + std::string human_readable_origin = GetHumanReadableOrigin( + *form, GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages)); return Java_PasswordUIView_createSavedPasswordEntry( - env, - ConvertUTF8ToJavaString(env, form->origin.spec()).obj(), + env, ConvertUTF8ToJavaString(env, human_readable_origin).obj(), ConvertUTF16ToJavaString(env, form->username_value).obj()); } @@ -85,7 +89,9 @@ password_manager_presenter_.GetPasswordException(index); if (!form) return ConvertUTF8ToJavaString(env, std::string()); - return ConvertUTF8ToJavaString(env, form->origin.spec()); + std::string human_readable_origin = GetHumanReadableOrigin( + *form, GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages)); + return ConvertUTF8ToJavaString(env, human_readable_origin); } void PasswordUIViewAndroid::HandleRemoveSavedPasswordEntry( diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/extension_service_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/extension_service_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/extension_service_unittest.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/extension_service_unittest.cc 2015-06-23 12:14:26.000000000 +0000 @@ -196,7 +196,6 @@ const char theme_crx[] = "iamefpfkojoapidjnbafmgkgncegbkad"; const char theme2_crx[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf"; const char permissions_crx[] = "eagpmdpfmaekmmcejjbmjoecnejeiiin"; -const char unpacked[] = "cbcdidchbppangcjoddlpdjlenngjldk"; const char updates_from_webstore[] = "akjooamlhcgeopfifcmlggaebeocgokj"; const char permissions_blocklist[] = "noffkehfcaggllbcojjbopcmlhcnhcdn"; @@ -2325,49 +2324,6 @@ ASSERT_TRUE(base::DeleteFile(theme_file, false)); // Not recursive. } -// Tests that we can change the ID of an unpacked extension by adding a key -// to its manifest. -TEST_F(ExtensionServiceTest, UnpackedExtensionCanChangeID) { - InitializeEmptyExtensionService(); - - base::ScopedTempDir temp; - ASSERT_TRUE(temp.CreateUniqueTempDir()); - - base::FilePath extension_path = temp.path(); - base::FilePath manifest_path = - extension_path.Append(extensions::kManifestFilename); - base::FilePath manifest_no_key = - data_dir().AppendASCII("unpacked").AppendASCII("manifest_no_key.json"); - - base::FilePath manifest_with_key = - data_dir().AppendASCII("unpacked").AppendASCII("manifest_with_key.json"); - - ASSERT_TRUE(base::PathExists(manifest_no_key)); - ASSERT_TRUE(base::PathExists(manifest_with_key)); - - // Load the unpacked extension with no key. - base::CopyFile(manifest_no_key, manifest_path); - extensions::UnpackedInstaller::Create(service())->Load(extension_path); - - base::RunLoop().RunUntilIdle(); - EXPECT_EQ(0u, GetErrors().size()); - ASSERT_EQ(1u, loaded_.size()); - EXPECT_EQ(1u, registry()->enabled_extensions().size()); - - // Add the key to the manifest. - base::CopyFile(manifest_with_key, manifest_path); - loaded_.clear(); - - // Reload the extensions. - service()->ReloadExtensionsForTest(); - const Extension* extension = service()->GetExtensionById(unpacked, false); - EXPECT_EQ(unpacked, extension->id()); - ASSERT_EQ(1u, loaded_.size()); - - // TODO(jstritar): Right now this just makes sure we don't crash and burn, but - // we should also test that preferences are preserved. -} - #if defined(OS_POSIX) TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) { base::FilePath source_data_dir = diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/installed_loader.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/installed_loader.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/installed_loader.cc 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/installed_loader.cc 2015-06-23 12:14:26.000000000 +0000 @@ -169,6 +169,12 @@ } void InstalledLoader::Load(const ExtensionInfo& info, bool write_to_prefs) { + // TODO(asargent): add a test to confirm that we can't load extensions if + // their ID in preferences does not match the extension's actual ID. + if (invalid_extensions_.find(info.extension_path) != + invalid_extensions_.end()) + return; + std::string error; scoped_refptr extension(NULL); if (info.extension_manifest) { @@ -269,7 +275,8 @@ GetCreationFlags(info), &error)); - if (!extension.get()) { + if (!extension.get() || extension->id() != info->extension_id) { + invalid_extensions_.insert(info->extension_path); ExtensionErrorReporter::GetInstance()->ReportLoadError( info->extension_path, error, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/installed_loader.h oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/installed_loader.h --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/extensions/installed_loader.h 2015-04-21 09:26:57.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/extensions/installed_loader.h 2015-06-23 12:13:06.000000000 +0000 @@ -5,6 +5,10 @@ #ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ +#include + +#include "base/files/file_path.h" + class ExtensionService; namespace extensions { @@ -37,6 +41,9 @@ ExtensionRegistry* extension_registry_; ExtensionPrefs* extension_prefs_; + + // Paths to invalid extension manifests, which should not be loaded. + std::set invalid_extensions_; }; } // namespace extensions diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json 2015-06-23 12:14:27.000000000 +0000 @@ -668,19 +668,6 @@ "input_view": "inputview.html#id=m17n:vi_viqr&language=vi&passwordLayout=us-ltr&name=keyboard_vietnamese_viqr" }, { - "name": "__MSG_keyboard_vietnamese_vni__", - "type": "ime", - "id": "vkd_vi_vni", - "description": "", - "language": [ - "vi" - ], - "layouts": [ - "us" - ], - "input_view": "inputview.html#id=m17n:vi_vni&language=vi&passwordLayout=us-ltr&name=keyboard_vietnamese_vni" - }, - { "name": "__MSG_keyboard_arabic__", "type": "ime", "id": "vkd_ar", diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/extensions/extension_list.js oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/extensions/extension_list.js --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/extensions/extension_list.js 2015-05-14 15:35:08.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/extensions/extension_list.js 2015-06-23 12:14:27.000000000 +0000 @@ -664,14 +664,14 @@ !extension.optionsPage.openInTab); // The 'View in Web Store/View Web Site' link. - var siteLinkEnabled = !!extension.homepageUrl && + var siteLinkEnabled = !!extension.homePage.url && !this.enableAppInfoDialog_; this.updateVisibility_(row, '.site-link', siteLinkEnabled, function(item) { - item.href = extension.homepageUrl; + item.href = extension.homePage.url; item.textContent = loadTimeData.getString( - extension.homepageProvided ? 'extensionSettingsVisitWebsite' : - 'extensionSettingsVisitWebStore'); + extension.homePage.specified ? 'extensionSettingsVisitWebsite' : + 'extensionSettingsVisitWebStore'); }); var isUnpacked = diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/gaia_auth_host/authenticator.js oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/gaia_auth_host/authenticator.js --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/gaia_auth_host/authenticator.js 2015-04-21 09:28:06.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/gaia_auth_host/authenticator.js 2015-06-23 12:14:27.000000000 +0000 @@ -449,10 +449,13 @@ } else if (this.samlHandler_.scrapedPasswordCount == 0) { if (this.noPasswordCallback) { this.noPasswordCallback(this.email_); - } else { - console.error('Authenticator: No password scraped for SAML.'); + return; } - return; + + // Fall through to finish the auth flow even if this.needPassword + // is true. This is because the flag is used as an intention to get + // password when it is available but not a mandatory requirement. + console.warn('Authenticator: No password scraped for SAML.'); } else if (this.needPassword) { if (this.confirmPasswordCallback) { // Confirm scraped password. The flow follows in diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/google_now/background.js oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/google_now/background.js --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/resources/google_now/background.js 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/resources/google_now/background.js 2015-06-23 12:14:27.000000000 +0000 @@ -202,6 +202,7 @@ // Add error processing to API calls. wrapper.instrumentChromeApiFunction('gcm.onMessage.addListener', 0); wrapper.instrumentChromeApiFunction('gcm.register', 1); +wrapper.instrumentChromeApiFunction('gcm.unregister', 0); wrapper.instrumentChromeApiFunction('metricsPrivate.getVariationParams', 1); wrapper.instrumentChromeApiFunction('notifications.clear', 1); wrapper.instrumentChromeApiFunction('notifications.create', 2); @@ -1027,7 +1028,8 @@ */ function initialize() { recordEvent(GoogleNowEvent.EXTENSION_START); - registerForGcm(); + // TODO(skare): Reenable, after signin. + unregisterFromGcm(); onStateChange(); } @@ -1310,6 +1312,24 @@ }); } +/** + * Unregisters from GCM if previously registered. + */ +function unregisterFromGcm() { + fillFromChromeLocalStorage({gcmRegistrationId: undefined}) + .then(function(items) { + if (items.gcmRegistrationId) { + console.log('Unregistering from gcm.'); + instrumented.gcm.unregister(function() { + if (!chrome.runtime.lastError) { + chrome.storage.local.remove( + ['gcmNotificationKey', 'gcmRegistrationId']); + } + }); + } + }); +} + /** * Polls the optin state. * Sometimes we get the response to the opted in result too soon during diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/search_engines/template_url_service_android.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/search_engines/template_url_service_android.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/search_engines/template_url_service_android.cc 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/search_engines/template_url_service_android.cc 2015-06-23 12:13:07.000000000 +0000 @@ -253,7 +253,7 @@ TemplateURL* template_url = template_url_service_->GetTemplateURLs()[index]; std::string url(template_url->url_ref().ReplaceSearchTerms( TemplateURLRef::SearchTermsArgs( - base::string16()), SearchTermsData(), nullptr)); + base::ASCIIToUTF16("query")), SearchTermsData(), nullptr)); return base::android::ConvertUTF8ToJavaString(env, url); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc 2015-06-23 12:14:27.000000000 +0000 @@ -4,10 +4,10 @@ #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" -#include #include #include +#include #include "base/command_line.h" #include "base/debug/leak_annotations.h" @@ -49,6 +49,7 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/gfx/skia_util.h" +#include "ui/gfx/x/x11_types.h" #include "ui/resources/grit/ui_resources.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/label_button_border.h" @@ -381,20 +382,27 @@ return params; } -double GetDPI() { +double GetBaseDPI() { + XDisplay* xdisplay = gfx::GetXDisplay(); + int xscreen = DefaultScreen(xdisplay); + return (DisplayHeight(xdisplay, xscreen) * 25.4) / + DisplayHeightMM(xdisplay, xscreen); +} + +double GetFontDPI() { GtkSettings* gtk_settings = gtk_settings_get_default(); CHECK(gtk_settings); gint gtk_dpi = -1; g_object_get(gtk_settings, "gtk-xft-dpi", >k_dpi, NULL); // GTK multiplies the DPI by 1024 before storing it. - return (gtk_dpi > 0) ? gtk_dpi / 1024.0 : 96.0; + return (gtk_dpi > 0) ? gtk_dpi / 1024.0 : GetBaseDPI(); } // Queries GTK for its font DPI setting and returns the number of pixels in a // point. double GetPixelsInPoint(float device_scale_factor) { - double dpi = GetDPI(); + double dpi = GetFontDPI(); // Take device_scale_factor into account — if Chrome already scales the // entire UI up by 2x, we should not also scale up. @@ -1426,10 +1434,9 @@ } float Gtk2UI::GetDeviceScaleFactor() const { - const int kCSSDefaultDPI = 96; - float scale = GetDPI() / kCSSDefaultDPI; - // Round to 2 decimals, e.g. to 1.33. - return roundf(scale * 100) / 100; + float scale = GetFontDPI() / GetBaseDPI(); + // Round to 1 decimal, e.g. to 1.4. + return roundf(scale * 10) / 10; } } // namespace libgtk2ui diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/startup/default_browser_prompt.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/startup/default_browser_prompt.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/startup/default_browser_prompt.cc 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/startup/default_browser_prompt.cc 2015-06-23 12:14:27.000000000 +0000 @@ -14,6 +14,7 @@ #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -194,8 +195,28 @@ ShellIntegration::SET_DEFAULT_INTERACTIVE)); } -void CheckDefaultBrowserCallback(chrome::HostDesktopType desktop_type) { - if (ShellIntegration::GetDefaultBrowser() == ShellIntegration::NOT_DEFAULT) { +void ResetCheckDefaultBrowserPrefOnUIThread( + const base::FilePath& profile_path) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + Profile* profile = + g_browser_process->profile_manager()->GetProfileByPath(profile_path); + if (profile) + profile->GetPrefs()->SetBoolean(prefs::kCheckDefaultBrowser, true); +} + +void CheckDefaultBrowserOnFileThread(const base::FilePath& profile_path, + bool show_prompt, + chrome::HostDesktopType desktop_type) { + DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); + ShellIntegration::DefaultWebClientState state = + ShellIntegration::GetDefaultBrowser(); + if (state == ShellIntegration::IS_DEFAULT) { + // Notify the user in the future if Chrome ceases to be the user's chosen + // default browser. + content::BrowserThread::PostTask( + content::BrowserThread::UI, FROM_HERE, + base::Bind(&ResetCheckDefaultBrowserPrefOnUIThread, profile_path)); + } else if (show_prompt && state == ShellIntegration::NOT_DEFAULT) { ShellIntegration::DefaultWebClientSetPermission default_change_mode = ShellIntegration::CanSetAsDefaultBrowser(); @@ -218,12 +239,13 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) { // We do not check if we are the default browser if: - // - The user said "don't ask me again" on the infobar earlier. // - There is a policy in control of this setting. + // We check if we are the default browser but do not prompt if: + // - The user said "don't ask me again" on the infobar earlier. // - The "suppress_default_browser_prompt_for_version" master preference is // set to the current version. - if (!profile->GetPrefs()->GetBoolean(prefs::kCheckDefaultBrowser)) - return; + bool show_prompt = + profile->GetPrefs()->GetBoolean(prefs::kCheckDefaultBrowser); if (g_browser_process->local_state()->IsManagedPreference( prefs::kDefaultBrowserSettingEnabled)) { @@ -240,20 +262,23 @@ return; } - const std::string disable_version_string = - g_browser_process->local_state()->GetString( - prefs::kBrowserSuppressDefaultBrowserPrompt); - const Version disable_version(disable_version_string); - DCHECK(disable_version_string.empty() || disable_version.IsValid()); - if (disable_version.IsValid()) { - const chrome::VersionInfo version_info; - if (disable_version.Equals(Version(version_info.Version()))) - return; + if (show_prompt) { + const std::string disable_version_string = + g_browser_process->local_state()->GetString( + prefs::kBrowserSuppressDefaultBrowserPrompt); + const Version disable_version(disable_version_string); + DCHECK(disable_version_string.empty() || disable_version.IsValid()); + if (disable_version.IsValid()) { + const chrome::VersionInfo version_info; + if (disable_version.Equals(Version(version_info.Version()))) + show_prompt = false; + } } content::BrowserThread::PostTask( content::BrowserThread::FILE, FROM_HERE, - base::Bind(&CheckDefaultBrowserCallback, desktop_type)); + base::Bind(&CheckDefaultBrowserOnFileThread, profile->GetPath(), + show_prompt, desktop_type)); } #if !defined(OS_WIN) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/webui/options/browser_options_handler.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/webui/options/browser_options_handler.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/webui/options/browser_options_handler.cc 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/webui/options/browser_options_handler.cc 2015-06-23 12:14:27.000000000 +0000 @@ -1147,6 +1147,10 @@ if (state == ShellIntegration::STATE_IS_DEFAULT) { status_string_id = IDS_OPTIONS_DEFAULTBROWSER_DEFAULT; + // Notify the user in the future if Chrome ceases to be the user's chosen + // default browser. + PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); + prefs->SetBoolean(prefs::kCheckDefaultBrowser, true); } else if (state == ShellIntegration::STATE_NOT_DEFAULT) { if (ShellIntegration::CanSetAsDefaultBrowser() == ShellIntegration::SET_DEFAULT_NOT_ALLOWED) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/webui/options/password_manager_handler.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/webui/options/password_manager_handler.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/browser/ui/webui/options/password_manager_handler.cc 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/browser/ui/webui/options/password_manager_handler.cc 2015-06-23 12:14:27.000000000 +0000 @@ -219,8 +219,8 @@ const ScopedVector& password_exception_list) { base::ListValue entries; for (size_t i = 0; i < password_exception_list.size(); ++i) { - entries.Append(new base::StringValue( - net::FormatUrl(password_exception_list[i]->origin, languages_))); + entries.AppendString( + GetHumanReadableOrigin(*password_exception_list[i], languages_)); } web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/chrome_installer.gypi oxide-qt-1.7.9/third_party/chromium/src/chrome/chrome_installer.gypi --- oxide-qt-1.7.8/third_party/chromium/src/chrome/chrome_installer.gypi 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/chrome_installer.gypi 2015-06-23 12:14:27.000000000 +0000 @@ -97,6 +97,7 @@ 'installer/setup/compat_checks_unittest.cc', 'installer/setup/setup_constants.cc', 'installer/util/advanced_firewall_manager_win_unittest.cc', + 'installer/util/beacons_unittest.cc', 'installer/util/callback_work_item_unittest.cc', 'installer/util/channel_info_unittest.cc', 'installer/util/copy_tree_work_item_unittest.cc', @@ -135,6 +136,8 @@ 'installer/util/self_cleaning_temp_dir_unittest.cc', 'installer/util/set_reg_value_work_item_unittest.cc', 'installer/util/shell_util_unittest.cc', + 'installer/util/test_app_registration_data.cc', + 'installer/util/test_app_registration_data.h', 'installer/util/uninstall_metrics_unittest.cc', 'installer/util/wmi_unittest.cc', 'installer/util/work_item_list_unittest.cc', diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/chrome_installer_util.gypi oxide-qt-1.7.9/third_party/chromium/src/chrome/chrome_installer_util.gypi --- oxide-qt-1.7.8/third_party/chromium/src/chrome/chrome_installer_util.gypi 2015-04-21 09:26:58.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/chrome_installer_util.gypi 2015-06-23 12:14:27.000000000 +0000 @@ -20,6 +20,8 @@ 'installer/util/app_registration_data.h', 'installer/util/auto_launch_util.cc', 'installer/util/auto_launch_util.h', + 'installer/util/beacons.cc', + 'installer/util/beacons.h', 'installer/util/browser_distribution.cc', 'installer/util/browser_distribution.h', 'installer/util/callback_work_item.cc', diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/setup/install.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/setup/install.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/setup/install.cc 2015-04-21 09:26:59.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/setup/install.cc 2015-06-23 12:13:09.000000000 +0000 @@ -25,6 +25,7 @@ #include "chrome/installer/setup/install_worker.h" #include "chrome/installer/setup/setup_constants.h" #include "chrome/installer/util/auto_launch_util.h" +#include "chrome/installer/util/beacons.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/create_reg_key_work_item.h" #include "chrome/installer/util/delete_after_reboot_helper.h" @@ -582,6 +583,13 @@ installer_state.target_path()); } } + + if (!installer_state.system_install()) { + DCHECK_EQ(chrome_product->distribution(), + BrowserDistribution::GetDistribution()); + UpdateDefaultBrowserBeaconForPath( + installer_state.target_path().Append(installer::kChromeExe)); + } } installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); @@ -617,6 +625,11 @@ CreateOrUpdateShortcuts( chrome_exe, chrome, prefs, level, INSTALL_SHORTCUT_REPLACE_EXISTING); RegisterChromeOnMachine(installer_state, chrome, false); + + UpdateOsUpgradeBeacon(installer_state.system_install(), + BrowserDistribution::GetDistribution()); + if (!installer_state.system_install()) + UpdateDefaultBrowserBeaconForPath(chrome_exe); } } @@ -644,6 +657,8 @@ base::FilePath chrome_exe(installation_root.Append(kChromeExe)); CreateOrUpdateShortcuts( chrome_exe, chrome, prefs, CURRENT_USER, install_operation); + + UpdateDefaultBrowserBeaconForPath(chrome_exe); } } // namespace installer diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/setup/install_worker.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/setup/install_worker.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/setup/install_worker.cc 2015-04-21 09:26:59.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/setup/install_worker.cc 2015-06-23 12:14:27.000000000 +0000 @@ -61,7 +61,7 @@ // on user login by way of Active Setup. Increase this value if the work done // in setup_main.cc's handling of kConfigureUserSettings changes and should be // executed again for all users. -const wchar_t kActiveSetupVersion[] = L"24,0,0,0"; +const wchar_t kActiveSetupVersion[] = L"43,0,0,0"; // Although the UUID of the ChromeFrame class is used for the "current" value, // this is done only as a convenience; there is no need for the GUID of the Low diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons.cc 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons.cc 2015-06-23 12:13:09.000000000 +0000 @@ -0,0 +1,151 @@ +// Copyright 2015 The Chromium 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 "chrome/installer/util/beacons.h" + +#include "base/win/registry.h" +#include "base/win/win_util.h" +#include "chrome/installer/util/app_registration_data.h" +#include "chrome/installer/util/browser_distribution.h" +#include "chrome/installer/util/install_util.h" +#include "chrome/installer/util/shell_util.h" + +void UpdateDefaultBrowserBeaconForPath(const base::FilePath& chrome_exe) { + // Getting Chrome's default state causes the beacon to be updated via a call + // to UpdateDefaultBrowserBeaconWithState below. + ignore_result(ShellUtil::GetChromeDefaultStateFromPath(chrome_exe)); +} + +void UpdateDefaultBrowserBeaconWithState( + const base::FilePath& chrome_exe, + BrowserDistribution* distribution, + ShellUtil::DefaultState default_state) { + const bool system_install = !InstallUtil::IsPerUserInstall(chrome_exe); + const AppRegistrationData& registration_data = + distribution->GetAppRegistrationData(); + switch (default_state) { + case ShellUtil::NOT_DEFAULT: + installer_util::MakeFirstNotDefaultBeacon(system_install, + registration_data)->Update(); + break; + case ShellUtil::IS_DEFAULT: + installer_util::MakeLastWasDefaultBeacon(system_install, + registration_data)->Update(); + installer_util::MakeFirstNotDefaultBeacon(system_install, + registration_data)->Remove(); + break; + case ShellUtil::UNKNOWN_DEFAULT: + break; + } +} + +void UpdateOsUpgradeBeacon(bool system_install, + BrowserDistribution* distribution) { + installer_util::MakeLastOsUpgradeBeacon( + system_install, distribution->GetAppRegistrationData())->Update(); +} + +namespace installer_util { + +scoped_ptr MakeLastOsUpgradeBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon(L"LastOsUpgrade", Beacon::BeaconType::LAST, + Beacon::BeaconScope::PER_INSTALL, + system_install, registration_data)); +} + +scoped_ptr MakeLastWasDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon(L"LastWasDefault", Beacon::BeaconType::LAST, + Beacon::BeaconScope::PER_USER, + system_install, registration_data)); +} + +scoped_ptr MakeFirstNotDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon( + L"FirstNotDefault", Beacon::BeaconType::FIRST, + Beacon::BeaconScope::PER_USER, system_install, registration_data)); +} + +// Beacon ---------------------------------------------------------------------- + +Beacon::Beacon(base::StringPiece16 name, + BeaconType type, + BeaconScope scope, + bool system_install, + const AppRegistrationData& registration_data) + : type_(type), + root_(system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER), + scope_(scope) { + Initialize(name, system_install, registration_data); +} + +Beacon::~Beacon() { +} + +void Beacon::Update() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_QUERY_VALUE | KEY_SET_VALUE; + base::win::RegKey key; + + // Nothing to update if the key couldn't be created. This should only be the + // case for a developer build. + if (key.Create(root_, key_path_.c_str(), kAccess) != ERROR_SUCCESS) + return; + + // Nothing to do if this beacon is tracking the first occurrence of an event + // that has already been recorded. + if (type_ == BeaconType::FIRST && key.HasValue(value_name_.c_str())) + return; + + int64_t now(base::Time::Now().ToInternalValue()); + key.WriteValue(value_name_.c_str(), &now, sizeof(now), REG_QWORD); +} + +void Beacon::Remove() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_SET_VALUE; + base::win::RegKey key; + + if (key.Open(root_, key_path_.c_str(), kAccess) == ERROR_SUCCESS) + key.DeleteValue(value_name_.c_str()); +} + +base::Time Beacon::Get() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_QUERY_VALUE; + base::win::RegKey key; + int64_t now; + + if (key.Open(root_, key_path_.c_str(), kAccess) != ERROR_SUCCESS || + key.ReadInt64(value_name_.c_str(), &now) != ERROR_SUCCESS) { + return base::Time(); + } + + return base::Time::FromInternalValue(now); +} + +void Beacon::Initialize(base::StringPiece16 name, + bool system_install, + const AppRegistrationData& registration_data) { + // When possible, beacons are located in the app's ClientState key. Per-user + // beacons for a per-machine install are located in a beacon-specific sub-key + // of the app's ClientStateMedium key. + if (!system_install || scope_ == BeaconScope::PER_INSTALL) { + key_path_ = registration_data.GetStateKey(); + value_name_ = name.as_string(); + } else { + key_path_ = registration_data.GetStateMediumKey(); + key_path_.push_back(L'\\'); + key_path_.append(name.data(), name.size()); + // This should never fail. If it does, the beacon will be written in the + // key's default value, which is okay since the majority case is likely a + // machine with a single user. + if (!base::win::GetUserSidString(&value_name_)) + NOTREACHED(); + } +} + +} // namespace installer_util diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons.h oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons.h --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons.h 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons.h 2015-06-23 12:13:09.000000000 +0000 @@ -0,0 +1,126 @@ +// Copyright 2015 The Chromium 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 CHROME_INSTALLER_UTIL_BEACONS_H_ +#define CHROME_INSTALLER_UTIL_BEACONS_H_ + +#include + +#include "base/macros.h" +#include "base/memory/scoped_ptr.h" +#include "base/strings/string16.h" +#include "base/strings/string_piece.h" +#include "base/time/time.h" +#include "chrome/installer/util/shell_util.h" + +class AppRegistrationData; +class BrowserDistribution; + +namespace base { +class FilePath; +} + +// Checks the default state of the browser for the current user and updates the +// appropriate beacon (last was default or first not default). +void UpdateDefaultBrowserBeaconForPath(const base::FilePath& chrome_exe); + +// Updates the last was default or first not default beacon for the current user +// based on |default_state|. +void UpdateDefaultBrowserBeaconWithState(const base::FilePath& chrome_exe, + BrowserDistribution* distribution, + ShellUtil::DefaultState default_state); + +// Updates the last OS upgrade beacon for the install. +void UpdateOsUpgradeBeacon(bool system_install, + BrowserDistribution* distribution); + +namespace installer_util { + +class Beacon; + +// Returns a Beacon representing the last time the machine's OS was ugpraded. +scoped_ptr MakeLastOsUpgradeBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// Returns a Beacon representing the last time Chrome was the user's default +// browser. +scoped_ptr MakeLastWasDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// Returns a Beacon representing the first time Chrome was not the user's +// default browser. +scoped_ptr MakeFirstNotDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// A named beacon stored in the registry representing the first or last time at +// which some event took place. A beacon may apply to a per-user event or a +// per-install event. In general, beacons should be created via factory methods +// such as those above. +class Beacon { + public: + enum class BeaconType { + // A beacon that marks the first occurrence of an event. + FIRST, + // A beacon that marks the last occurrence of an event. + LAST, + }; + + enum class BeaconScope { + // A beacon that applies to a per-user event. + PER_USER, + // A beacon that applies to a per-install event. + PER_INSTALL, + }; + + // Creates a beacon named |name| for the product identified by + // |registration_data| installed as either a per-user or a per-machine app + // according to |system_install|. + Beacon(base::StringPiece16 name, + BeaconType type, + BeaconScope scope, + bool system_install, + const AppRegistrationData& registration_data); + ~Beacon(); + + // Updates the beacon. For a type LAST beacon, the current time is written + // unconditionally. For a type FIRST beacon, the beacon is only updated if it + // does not already exist. + void Update(); + + // Removes the beacon. + void Remove(); + + // Returns the beacon's value or a null time if not found. + base::Time Get(); + + private: + // Initializes the key_path_ and value_name_ fields of the beacon. + void Initialize(base::StringPiece16 name, + bool system_install, + const AppRegistrationData& registration_data); + + // The type of beacon. + const BeaconType type_; + + // The root key in the registry where this beacon is stored. + const HKEY root_; + + // The scope of the beacon. + const BeaconScope scope_; + + // The path to the registry key holding the beacon. + base::string16 key_path_; + + // The name of the registry value holding the beacon. + base::string16 value_name_; + + DISALLOW_COPY_AND_ASSIGN(Beacon); +}; + +} // namespace installer_util + +#endif // CHROME_INSTALLER_UTIL_BEACONS_H_ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/beacons_unittest.cc 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/beacons_unittest.cc 2015-06-23 12:13:09.000000000 +0000 @@ -0,0 +1,277 @@ +// Copyright 2015 The Chromium 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 "chrome/installer/util/beacons.h" + +#include "base/base_paths.h" +#include "base/memory/scoped_vector.h" +#include "base/path_service.h" +#include "base/test/scoped_path_override.h" +#include "base/test/test_reg_util_win.h" +#include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" +#include "base/win/registry.h" +#include "base/win/win_util.h" +#include "chrome/installer/util/browser_distribution.h" +#include "chrome/installer/util/test_app_registration_data.h" +#include "chrome/installer/util/util_constants.h" +#include "testing/gtest/include/gtest/gtest.h" + +using ::testing::Bool; +using ::testing::Combine; +using ::testing::Values; +using BeaconType = installer_util::Beacon::BeaconType; +using BeaconScope = installer_util::Beacon::BeaconScope; + +namespace installer_util { + +// A test fixture that exercises a beacon. +class BeaconTest : public ::testing::TestWithParam< + ::testing::tuple> { + protected: + static const base::char16 kBeaconName[]; + + BeaconTest() + : beacon_type_(::testing::get<0>(GetParam())), + beacon_scope_(::testing::get<1>(GetParam())), + system_install_(::testing::get<2>(GetParam())), + beacon_(kBeaconName, + beacon_type_, + beacon_scope_, + system_install_, + app_registration_data_) { + // Override the registry so that tests can freely push state to it. + registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); + registry_override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE); + } + + TestAppRegistrationData app_registration_data_; + BeaconType beacon_type_; + BeaconScope beacon_scope_; + bool system_install_; + Beacon beacon_; + + private: + registry_util::RegistryOverrideManager registry_override_manager_; +}; + +// static +const base::char16 BeaconTest::kBeaconName[] = L"TestBeacon"; + +// Nothing in the regsitry, so the beacon should not exist. +TEST_P(BeaconTest, GetNonExistant) { + ASSERT_TRUE(beacon_.Get().is_null()); +} + +// Updating and then getting the beacon should return a value, and that it is +// within range. +TEST_P(BeaconTest, UpdateAndGet) { + base::Time before(base::Time::Now()); + beacon_.Update(); + base::Time after(base::Time::Now()); + base::Time beacon_time(beacon_.Get()); + ASSERT_FALSE(beacon_time.is_null()); + ASSERT_LE(before, beacon_time); + ASSERT_GE(after, beacon_time); +} + +// Tests that updating a first beacon only updates it the first time, but doing +// so for a last beacon always updates. +TEST_P(BeaconTest, UpdateTwice) { + beacon_.Update(); + base::Time beacon_time(beacon_.Get()); + + base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); + + beacon_.Update(); + if (beacon_type_ == BeaconType::FIRST) { + ASSERT_EQ(beacon_time, beacon_.Get()); + } else { + ASSERT_NE(beacon_time, beacon_.Get()); + } +} + +// Tests that the beacon is written into the proper location in the registry. +TEST_P(BeaconTest, Location) { + beacon_.Update(); + HKEY right_root = system_install_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; + HKEY wrong_root = system_install_ ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; + base::string16 right_key; + base::string16 wrong_key; + base::string16 value_name; + + if (beacon_scope_ == BeaconScope::PER_INSTALL || !system_install_) { + value_name = kBeaconName; + right_key = app_registration_data_.GetStateKey(); + wrong_key = app_registration_data_.GetStateMediumKey(); + } else { + ASSERT_TRUE(base::win::GetUserSidString(&value_name)); + right_key = + app_registration_data_.GetStateMediumKey() + L"\\" + kBeaconName; + wrong_key = app_registration_data_.GetStateKey(); + } + + // Keys should not exist in the wrong root or in the right root but wrong key. + ASSERT_FALSE(base::win::RegKey(wrong_root, right_key.c_str(), + KEY_READ).Valid()) << right_key; + ASSERT_FALSE(base::win::RegKey(wrong_root, wrong_key.c_str(), + KEY_READ).Valid()) << wrong_key; + ASSERT_FALSE(base::win::RegKey(right_root, wrong_key.c_str(), + KEY_READ).Valid()) << wrong_key; + // The right key should exist. + base::win::RegKey key(right_root, right_key.c_str(), KEY_READ); + ASSERT_TRUE(key.Valid()) << right_key; + // And should have the value. + ASSERT_TRUE(key.HasValue(value_name.c_str())) << value_name; +} + +// Run the tests for all combinations of beacon type, scope, and install level. +INSTANTIATE_TEST_CASE_P(BeaconTest, + BeaconTest, + Combine(Values(BeaconType::FIRST, BeaconType::LAST), + Values(BeaconScope::PER_USER, + BeaconScope::PER_INSTALL), + Bool())); + +enum class DistributionVariant { + SYSTEM_LEVEL, + USER_LEVEL, + SXS, +}; + +class DefaultBrowserBeaconTest + : public ::testing::TestWithParam { + protected: + using Super = ::testing::TestWithParam; + + DefaultBrowserBeaconTest() + : system_install_(GetParam() == DistributionVariant::SYSTEM_LEVEL), + chrome_sxs_(GetParam() == DistributionVariant::SXS), + chrome_exe_(GetChromePathForParams()), + distribution_(nullptr) {} + + void SetUp() override { + Super::SetUp(); + + // Override FILE_EXE so that various InstallUtil functions will consider + // this to be a user/system Chrome or Chrome SxS. + path_overrides_.push_back(new base::ScopedPathOverride( + base::FILE_EXE, chrome_exe_, true /* is_absolute */, + false /* !create */)); + + // Override these paths with their own values so that they can be found + // after the registry override manager is in place. Getting them would + // otherwise fail since the underlying calls to the OS need to see the real + // contents of the registry. + static const int kPathKeys[] = { + base::DIR_PROGRAM_FILES, + base::DIR_PROGRAM_FILESX86, + base::DIR_LOCAL_APP_DATA, + }; + for (int key : kPathKeys) { + base::FilePath temp; + PathService::Get(key, &temp); + path_overrides_.push_back(new base::ScopedPathOverride(key, temp)); + } + + // Override the registry so that tests can freely push state to it. + registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); + registry_override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE); + + distribution_ = BrowserDistribution::GetDistribution(); + } + + bool system_install_; + bool chrome_sxs_; + base::FilePath chrome_exe_; + BrowserDistribution* distribution_; + + private: + base::FilePath GetChromePathForParams() const { + base::FilePath chrome_exe; + int dir_key = base::DIR_LOCAL_APP_DATA; + + if (system_install_) { +#if defined(_WIN64) + static const int kSystemKey = base::DIR_PROGRAM_FILESX86; +#else + static const int kSystemKey = base::DIR_PROGRAM_FILES; +#endif + dir_key = kSystemKey; + } + PathService::Get(dir_key, &chrome_exe); +#if defined(GOOGLE_CHROME_BUILD) + chrome_exe = chrome_exe.Append(installer::kGoogleChromeInstallSubDir1); + if (chrome_sxs_) { + chrome_exe = chrome_exe.Append( + base::string16(installer::kGoogleChromeInstallSubDir2) + + installer::kSxSSuffix); + } else { + chrome_exe = chrome_exe.Append(installer::kGoogleChromeInstallSubDir2); + } +#else + chrome_exe = chrome_exe.AppendASCII("Chromium"); +#endif + chrome_exe = chrome_exe.Append(installer::kInstallBinaryDir); + return chrome_exe.Append(installer::kChromeExe); + } + + ScopedVector path_overrides_; + registry_util::RegistryOverrideManager registry_override_manager_; +}; + +// Tests that the default browser beacons work as expected. +TEST_P(DefaultBrowserBeaconTest, All) { + scoped_ptr last_was_default(MakeLastWasDefaultBeacon( + system_install_, distribution_->GetAppRegistrationData())); + scoped_ptr first_not_default(MakeFirstNotDefaultBeacon( + system_install_, distribution_->GetAppRegistrationData())); + + ASSERT_TRUE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // Chrome is not default. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_TRUE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); + + // Then it is. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::IS_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // It still is. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::IS_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // Now it's not again. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); + + // And it still isn't. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); +} + +INSTANTIATE_TEST_CASE_P(SystemLevelChrome, + DefaultBrowserBeaconTest, + Values(DistributionVariant::SYSTEM_LEVEL)); +INSTANTIATE_TEST_CASE_P(UserLevelChrome, + DefaultBrowserBeaconTest, + Values(DistributionVariant::USER_LEVEL)); +#if 0 && defined(GOOGLE_CHROME_BUILD) +// Disabled for now since InstallUtil::IsChromeSxSProcess makes this impossible. +INSTANTIATE_TEST_CASE_P(ChromeSxS, DefaultBrowserBeaconTest, + Values(DistributionVariant::SXS)); +#endif + +} // namespace installer_util diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/BUILD.gn oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/BUILD.gn --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/BUILD.gn 2015-04-21 09:26:59.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/BUILD.gn 2015-06-23 12:14:27.000000000 +0000 @@ -79,6 +79,8 @@ "app_registration_data.h", "auto_launch_util.cc", "auto_launch_util.h", + "beacons.cc", + "beacons.h", "browser_distribution.cc", "browser_distribution.h", "callback_work_item.cc", diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/shell_util.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/shell_util.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/shell_util.cc 2015-04-21 09:26:59.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/shell_util.cc 2015-06-23 12:14:27.000000000 +0000 @@ -42,6 +42,7 @@ #include "base/win/windows_version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/installer/util/beacons.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/l10n_string_util.h" @@ -1933,9 +1934,10 @@ // flag. There is doubtless some other key we can hook into to cause "Repair" // to show up in Add/Remove programs for us. static const wchar_t* const kChromeProtocols[] = { L"http", L"https" }; - return ProbeProtocolHandlers(chrome_exe, - kChromeProtocols, - arraysize(kChromeProtocols)); + DefaultState default_state = ProbeProtocolHandlers( + chrome_exe, kChromeProtocols, arraysize(kChromeProtocols)); + UpdateDefaultBrowserBeaconWithState(chrome_exe, distribution, default_state); + return default_state; } ShellUtil::DefaultState ShellUtil::GetChromeDefaultProtocolClientState( diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/shell_util.h oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/shell_util.h --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/shell_util.h 2015-04-21 09:26:59.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/shell_util.h 2015-06-23 12:14:27.000000000 +0000 @@ -411,11 +411,12 @@ // Windows prior to Windows 8. static bool CanMakeChromeDefaultUnattended(); - // Returns the DefaultState of Chrome for HTTP and HTTPS. + // Returns the DefaultState of Chrome for HTTP and HTTPS and updates the + // default browser beacons as appropriate. static DefaultState GetChromeDefaultState(); - // Returns the DefaultState of the Chrome instance with the specified path - // for HTTP and HTTPs. + // Returns the DefaultState of the Chrome instance with the specified path for + // HTTP and HTTPs and updates the default browser beacons as appropriate. static DefaultState GetChromeDefaultStateFromPath( const base::FilePath& chrome_exe); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/test_app_registration_data.cc oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/test_app_registration_data.cc --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/test_app_registration_data.cc 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/test_app_registration_data.cc 2015-06-23 12:13:09.000000000 +0000 @@ -0,0 +1,27 @@ +// Copyright 2015 The Chromium 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 "chrome/installer/util/test_app_registration_data.h" + +TestAppRegistrationData::TestAppRegistrationData() { +} + +TestAppRegistrationData::~TestAppRegistrationData() { +} + +base::string16 TestAppRegistrationData::GetAppGuid() const { + return L"test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetStateKey() const { + return L"Software\\Chromium\\ClientState\\test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetStateMediumKey() const { + return L"Software\\Chromium\\ClientStateMedium\\test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetVersionKey() const { + return L"Software\\Chromium\\Clients\\test_app_guid"; +} diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/test_app_registration_data.h oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/test_app_registration_data.h --- oxide-qt-1.7.8/third_party/chromium/src/chrome/installer/util/test_app_registration_data.h 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/installer/util/test_app_registration_data.h 2015-06-23 12:13:09.000000000 +0000 @@ -0,0 +1,20 @@ +// Copyright 2015 The Chromium 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 CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ +#define CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ + +#include "chrome/installer/util/app_registration_data.h" + +class TestAppRegistrationData : public AppRegistrationData { + public: + TestAppRegistrationData(); + ~TestAppRegistrationData() override; + base::string16 GetAppGuid() const override; + base::string16 GetStateKey() const override; + base::string16 GetStateMediumKey() const override; + base::string16 GetVersionKey() const override; +}; + +#endif // CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chrome/VERSION oxide-qt-1.7.9/third_party/chromium/src/chrome/VERSION --- oxide-qt-1.7.8/third_party/chromium/src/chrome/VERSION 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chrome/VERSION 2015-06-23 12:14:26.000000000 +0000 @@ -1,4 +1,4 @@ MAJOR=43 MINOR=0 BUILD=2357 -PATCH=65 +PATCH=130 diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.cc oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.cc --- oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.cc 2015-06-23 12:13:12.000000000 +0000 @@ -55,6 +55,11 @@ namespace chromeos { +// static +bool ProcessOutputWatcher::VerifyFileDescriptor(int fd) { + return (fd >= 0) && (fd < FD_SETSIZE); +} + ProcessOutputWatcher::ProcessOutputWatcher( int out_fd, int stop_fd, @@ -63,8 +68,8 @@ out_fd_(out_fd), stop_fd_(stop_fd), on_read_callback_(callback) { - VerifyFileDescriptor(out_fd_); - VerifyFileDescriptor(stop_fd_); + CHECK(VerifyFileDescriptor(out_fd_)); + CHECK(VerifyFileDescriptor(stop_fd_)); max_fd_ = std::max(out_fd_, stop_fd_); // We want to be sure we will be able to add 0 at the end of the input, so -1. read_buffer_capacity_ = arraysize(read_buffer_) - 1; @@ -106,11 +111,6 @@ } } -void ProcessOutputWatcher::VerifyFileDescriptor(int fd) { - CHECK_LE(0, fd); - CHECK_GT(FD_SETSIZE, fd); -} - void ProcessOutputWatcher::ReadFromFd(ProcessOutputType type, int* fd) { // We don't want to necessary read pipe until it is empty so we don't starve // other streams in case data is written faster than we read it. If there is diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.h oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.h --- oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.h 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_output_watcher.h 2015-06-23 12:13:12.000000000 +0000 @@ -28,6 +28,9 @@ // underlying thread block. It deletes itself when watching is stopped. class CHROMEOS_EXPORT ProcessOutputWatcher { public: + // Verifies that fds that we got are properly set. + static bool VerifyFileDescriptor(int fd); + ProcessOutputWatcher(int out_fd, int stop_fd, const ProcessOutputCallback& callback); @@ -43,9 +46,6 @@ // fds, it would be nicer if it was). void WatchProcessOutput(); - // Verifies that fds that we got are properly set. - void VerifyFileDescriptor(int fd); - // Reads data from fd, and when it's done, invokes callback function. void ReadFromFd(ProcessOutputType type, int* fd); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_proxy.cc oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_proxy.cc --- oxide-qt-1.7.8/third_party/chromium/src/chromeos/process_proxy/process_proxy.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/chromeos/process_proxy/process_proxy.cc 2015-06-23 12:14:27.000000000 +0000 @@ -70,14 +70,17 @@ DCHECK(process_launched_); if (watcher_started_) return false; - if (pipe(shutdown_pipe_)) + if (pipe(shutdown_pipe_) || + !ProcessOutputWatcher::VerifyFileDescriptor( + shutdown_pipe_[PIPE_END_READ])) { return false; + } // We give ProcessOutputWatcher a copy of master to make life easier during // tear down. // TODO(tbarzic): improve fd managment. int master_copy = HANDLE_EINTR(dup(pt_pair_[PT_MASTER_FD])); - if (master_copy == -1) + if (!ProcessOutputWatcher::VerifyFileDescriptor(master_copy)) return false; callback_set_ = true; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc 2015-06-23 12:13:13.000000000 +0000 @@ -114,7 +114,6 @@ pad_state_[pad_index].status = XINPUT_CONNECTED; pad_state_[pad_index].xinput_index = i; pad_state_[pad_index].mapper = NULL; - pads->length++; } } @@ -150,7 +149,6 @@ else pad.mapping[0] = 0; - pads->length++; } } } @@ -176,6 +174,7 @@ if (devices_changed_hint) EnumerateDevices(pads); + pads->length = 0; for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) { // We rely on device_changed and GetCapabilities to tell us that // something's been connected, but we will mark as disconnected if @@ -187,6 +186,9 @@ GetXInputPadData(i, &pads->items[i]); else if (pad_state_[i].status == RAWINPUT_CONNECTED) GetRawInputPadData(i, &pads->items[i]); + + if (pads->items[i].connected) + pads->length++; } } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/plugin_service_impl.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/plugin_service_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/plugin_service_impl.cc 2015-05-14 15:35:08.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/plugin_service_impl.cc 2015-06-23 12:14:28.000000000 +0000 @@ -805,6 +805,11 @@ const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); npapi_plugins_enabled_ = command_line->HasSwitch(switches::kEnableNpapi); +#if defined(OS_WIN) + // NPAPI plugins don't play well with Win32k renderer lockdown. + if (npapi_plugins_enabled_) + DisableWin32kRendererLockdown(); +#endif NPAPIPluginStatus status = npapi_plugins_enabled_ ? NPAPI_STATUS_ENABLED : NPAPI_STATUS_DISABLED; #else diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/renderer_host/render_process_host_impl.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/renderer_host/render_process_host_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/renderer_host/render_process_host_impl.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/renderer_host/render_process_host_impl.cc 2015-06-23 12:14:28.000000000 +0000 @@ -1225,6 +1225,7 @@ switches::kDisableMojoChannel, switches::kDisableNotifications, switches::kDisableOverlayScrollbar, + switches::kDisablePermissionsAPI, switches::kDisablePinch, switches::kDisablePrefixedEncryptedMedia, switches::kDisableSeccompFilterSandbox, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_browsertest.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_browsertest.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_browsertest.cc 2015-04-24 01:55:50.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_browsertest.cc 2015-06-23 12:14:28.000000000 +0000 @@ -131,6 +131,25 @@ result); } +void ReceiveFindRegistrationStatus( + BrowserThread::ID run_quit_thread, + const base::Closure& quit, + ServiceWorkerStatusCode* out_status, + ServiceWorkerStatusCode status, + const scoped_refptr& registration) { + *out_status = status; + if (!quit.is_null()) + BrowserThread::PostTask(run_quit_thread, FROM_HERE, quit); +} + +ServiceWorkerStorage::FindRegistrationCallback CreateFindRegistrationReceiver( + BrowserThread::ID run_quit_thread, + const base::Closure& quit, + ServiceWorkerStatusCode* status) { + return base::Bind(&ReceiveFindRegistrationStatus, run_quit_thread, quit, + status); +} + void ReadResponseBody(std::string* body, storage::BlobDataHandle* blob_data_handle) { ASSERT_TRUE(blob_data_handle); @@ -228,7 +247,7 @@ void CreateLongLivedResourceInterceptors( const GURL& worker_url, const GURL& import_url) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); scoped_ptr interceptor; interceptor.reset(new LongLivedResourceInterceptor( @@ -515,6 +534,7 @@ } void SetUpRegistrationOnIOThread(const std::string& worker_url) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); const GURL pattern = embedded_test_server()->GetURL("/service_worker/"); registration_ = new ServiceWorkerRegistration( pattern, @@ -539,6 +559,32 @@ version_->OnPingTimeout(); } + void AddControlleeOnIOThread() { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + scoped_ptr host(new ServiceWorkerProviderHost( + 33 /* dummy render process id */, + MSG_ROUTING_NONE /* render_frame_id */, 1 /* dummy provider_id */, + SERVICE_WORKER_PROVIDER_FOR_WINDOW, wrapper()->context()->AsWeakPtr(), + NULL)); + host->SetDocumentUrl( + embedded_test_server()->GetURL("/service_worker/host")); + host->AssociateRegistration(registration_.get(), + false /* notify_controllerchange */); + wrapper()->context()->AddProviderHost(host.Pass()); + } + + void AddWaitingWorkerOnIOThread(const std::string& worker_url) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + scoped_refptr waiting_version( + new ServiceWorkerVersion( + registration_.get(), embedded_test_server()->GetURL(worker_url), + wrapper()->context()->storage()->NewVersionId(), + wrapper()->context()->AsWeakPtr())); + waiting_version->SetStatus(ServiceWorkerVersion::INSTALLED); + registration_->SetWaitingVersion(waiting_version.get()); + registration_->ActivateWaitingVersionWhenReady(); + } + void StartWorker(ServiceWorkerStatusCode expected_status) { ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; @@ -563,6 +609,58 @@ ASSERT_EQ(expected_status, status); } + void StoreRegistration(int64 version_id, + ServiceWorkerStatusCode expected_status) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); + ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; + base::RunLoop store_run_loop; + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::Bind(&self::StoreOnIOThread, this, store_run_loop.QuitClosure(), + &status, version_id)); + store_run_loop.Run(); + ASSERT_EQ(expected_status, status); + + RunOnIOThread(base::Bind(&self::NotifyDoneInstallingRegistrationOnIOThread, + this, status)); + } + + void FindRegistrationForId(int64 id, + const GURL& origin, + ServiceWorkerStatusCode expected_status) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); + ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; + base::RunLoop run_loop; + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::Bind(&self::FindRegistrationForIdOnIOThread, this, + run_loop.QuitClosure(), &status, id, origin)); + run_loop.Run(); + ASSERT_EQ(expected_status, status); + } + + void FindRegistrationForIdOnIOThread(const base::Closure& done, + ServiceWorkerStatusCode* result, + int64 id, + const GURL& origin) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + wrapper()->context()->storage()->FindRegistrationForId( + id, origin, + CreateFindRegistrationReceiver(BrowserThread::UI, done, result)); + } + + void NotifyDoneInstallingRegistrationOnIOThread( + ServiceWorkerStatusCode status) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + wrapper()->context()->storage()->NotifyDoneInstallingRegistration( + registration_.get(), version_.get(), status); + } + + void RemoveLiveRegistrationOnIOThread(int64 id) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + wrapper()->context()->RemoveLiveRegistration(id); + } + void StartOnIOThread(const base::Closure& done, ServiceWorkerStatusCode* result) { ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -577,10 +675,22 @@ CreateReceiver(BrowserThread::UI, done, result)); } + void StoreOnIOThread(const base::Closure& done, + ServiceWorkerStatusCode* result, + int64 version_id) { + ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); + ServiceWorkerVersion* version = + wrapper()->context()->GetLiveVersion(version_id); + wrapper()->context()->storage()->StoreRegistration( + registration_.get(), version, + CreateReceiver(BrowserThread::UI, done, result)); + } + void ActivateOnIOThread(const base::Closure& done, ServiceWorkerStatusCode* result) { ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); version_->SetStatus(ServiceWorkerVersion::ACTIVATING); + registration_->SetActiveVersion(version_.get()); version_->DispatchActivateEvent( CreateReceiver(BrowserThread::UI, done, result)); } @@ -697,6 +807,76 @@ StartWorker(SERVICE_WORKER_ERROR_NETWORK); } +IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, ReadResourceFailure) { + // Create and store a registration. + RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this, + "/service_worker/worker.js")); + version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + StoreRegistration(version_->version_id(), SERVICE_WORKER_OK); + + // Add a non-existent resource to the version. + std::vector records; + records.push_back( + ServiceWorkerDatabase::ResourceRecord(30, version_->script_url(), 100)); + version_->script_cache_map()->SetResources(records); + + // Start the worker. We'll fail to read the resource. + StartWorker(SERVICE_WORKER_ERROR_START_WORKER_FAILED); + EXPECT_EQ(ServiceWorkerVersion::REDUNDANT, version_->status()); + + // The registration should be deleted from storage since the broken worker was + // the stored one. + RunOnIOThread(base::Bind(&self::RemoveLiveRegistrationOnIOThread, this, + registration_->id())); + FindRegistrationForId(registration_->id(), + registration_->pattern().GetOrigin(), + SERVICE_WORKER_ERROR_NOT_FOUND); +} + +IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, + ReadResourceFailure_WaitingWorker) { + // Create a registration and active version. + RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this, + "/service_worker/worker.js")); + base::RunLoop activate_run_loop; + ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, + base::Bind(&self::ActivateOnIOThread, this, + activate_run_loop.QuitClosure(), &status)); + activate_run_loop.Run(); + EXPECT_EQ(SERVICE_WORKER_OK, status); + ASSERT_TRUE(registration_->active_version()); + + // Give the version a controllee. + RunOnIOThread(base::Bind(&self::AddControlleeOnIOThread, this)); + + // Add a non-existent resource to the version. + std::vector records; + records.push_back( + ServiceWorkerDatabase::ResourceRecord(30, version_->script_url(), 100)); + version_->script_cache_map()->SetResources(records); + + // Make a waiting version and store it. + RunOnIOThread(base::Bind(&self::AddWaitingWorkerOnIOThread, this, + "/service_worker/worker.js")); + StoreRegistration(registration_->waiting_version()->version_id(), + SERVICE_WORKER_OK); + + // Start the broken worker. We'll fail to read from disk and the worker should + // be doomed. + StopWorker(SERVICE_WORKER_OK); // in case it's already running + StartWorker(SERVICE_WORKER_ERROR_START_WORKER_FAILED); + EXPECT_EQ(ServiceWorkerVersion::REDUNDANT, version_->status()); + + // The registration should still be in storage since the waiting worker was + // the stored one. + RunOnIOThread(base::Bind(&self::RemoveLiveRegistrationOnIOThread, this, + registration_->id())); + FindRegistrationForId(registration_->id(), + registration_->pattern().GetOrigin(), + SERVICE_WORKER_OK); +} + IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, Install) { InstallTestHelper("/service_worker/worker.js", SERVICE_WORKER_OK); } @@ -1196,11 +1376,11 @@ // Activate the worker. ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED; - base::RunLoop acrivate_run_loop; + base::RunLoop activate_run_loop; BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(&self::ActivateOnIOThread, this, - acrivate_run_loop.QuitClosure(), &status)); - acrivate_run_loop.Run(); + activate_run_loop.QuitClosure(), &status)); + activate_run_loop.Run(); ASSERT_EQ(SERVICE_WORKER_OK, status); // Stop the worker. StopWorker(SERVICE_WORKER_OK); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.cc 2015-06-23 12:14:28.000000000 +0000 @@ -12,6 +12,7 @@ #include "content/browser/service_worker/service_worker_context_core.h" #include "content/browser/service_worker/service_worker_disk_cache.h" #include "content/browser/service_worker/service_worker_metrics.h" +#include "content/public/browser/browser_thread.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_request_headers.h" @@ -157,7 +158,7 @@ DCHECK_LT(result, 0); ServiceWorkerMetrics::CountReadResponseResult( ServiceWorkerMetrics::READ_HEADERS_ERROR); - NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); + Done(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); return; } DCHECK_GE(result, 0); @@ -198,14 +199,27 @@ range_requested_, resource_size, true /* replace status line */); } +void ServiceWorkerReadFromCacheJob::Done(const net::URLRequestStatus& status) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + if (!status.is_success()) { + // TODO(falken): Retry before evicting. + if (context_) { + ServiceWorkerRegistration* registration = + context_->GetLiveRegistration(version_->registration_id()); + registration->DeleteVersion(version_); + } + } + NotifyDone(status); +} + void ServiceWorkerReadFromCacheJob::OnReadComplete(int result) { ServiceWorkerMetrics::ReadResponseResult check_result; if (result == 0) { check_result = ServiceWorkerMetrics::READ_OK; - NotifyDone(net::URLRequestStatus()); + Done(net::URLRequestStatus()); } else if (result < 0) { check_result = ServiceWorkerMetrics::READ_DATA_ERROR; - NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); + Done(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); } else { check_result = ServiceWorkerMetrics::READ_OK; SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.h oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.h --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.h 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_read_from_cache_job.h 2015-06-23 12:13:14.000000000 +0000 @@ -55,6 +55,7 @@ const net::HttpResponseInfo* http_info() const; bool is_range_request() const { return range_requested_.IsValid(); } void SetupRangeResponse(int response_data_size); + void Done(const net::URLRequestStatus& status); base::WeakPtr context_; scoped_refptr version_; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_registration.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_registration.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_registration.cc 2015-05-14 15:35:08.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_registration.cc 2015-06-23 12:14:28.000000000 +0000 @@ -242,6 +242,8 @@ } void ServiceWorkerRegistration::OnNoControllees(ServiceWorkerVersion* version) { + if (!context_) + return; DCHECK_EQ(active_version(), version); if (is_uninstalling_) Clear(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job.cc 2015-06-23 12:14:28.000000000 +0000 @@ -359,7 +359,10 @@ return; case FORWARD_TO_SERVICE_WORKER: - DCHECK(provider_host_ && provider_host_->active_version()); + if (!provider_host_ || !provider_host_->active_version()) { + DeliverErrorResponse(); + return; + } DCHECK(!fetch_dispatcher_); // Send a fetch event to the ServiceWorker associated to the // provider_host. @@ -549,8 +552,14 @@ DCHECK(version); const net::HttpResponseInfo* main_script_http_info = version->GetMainScriptHttpResponseInfo(); - DCHECK(main_script_http_info); - http_response_info_.reset(new net::HttpResponseInfo(*main_script_http_info)); + if (main_script_http_info) { + // In normal case |main_script_http_info| must be set while starting the + // ServiceWorker. But when the ServiceWorker registration database was not + // written correctly, it may be null. + // TODO(horo): Change this line to DCHECK when crbug.com/485900 is fixed. + http_response_info_.reset( + new net::HttpResponseInfo(*main_script_http_info)); + } // Set up a request for reading the stream. if (response.stream_url.is_valid()) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job_unittest.cc 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/service_worker/service_worker_url_request_job_unittest.cc 2015-06-23 12:14:28.000000000 +0000 @@ -116,7 +116,8 @@ SetUpWithHelper(new EmbeddedWorkerTestHelper(base::FilePath(), kProcessID)); } - void SetUpWithHelper(EmbeddedWorkerTestHelper* helper) { + void SetUpWithHelper(EmbeddedWorkerTestHelper* helper, + bool set_main_script_http_response_info = true) { helper_.reset(helper); registration_ = new ServiceWorkerRegistration( @@ -140,15 +141,16 @@ base::RunLoop().RunUntilIdle(); ASSERT_EQ(SERVICE_WORKER_OK, status); - net::HttpResponseInfo http_info; - http_info.ssl_info.cert = - net::ImportCertFromFile(net::GetTestCertsDirectory(), - "ok_cert.pem"); - EXPECT_TRUE(http_info.ssl_info.is_valid()); - http_info.ssl_info.security_bits = 0x100; - // SSL3 TLS_DHE_RSA_WITH_AES_256_CBC_SHA - http_info.ssl_info.connection_status = 0x300039; - version_->SetMainScriptHttpResponseInfo(http_info); + if (set_main_script_http_response_info) { + net::HttpResponseInfo http_info; + http_info.ssl_info.cert = + net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"); + EXPECT_TRUE(http_info.ssl_info.is_valid()); + http_info.ssl_info.security_bits = 0x100; + // SSL3 TLS_DHE_RSA_WITH_AES_256_CBC_SHA + http_info.ssl_info.connection_status = 0x300039; + version_->SetMainScriptHttpResponseInfo(http_info); + } scoped_ptr provider_host( new ServiceWorkerProviderHost(kProcessID, MSG_ROUTING_NONE, kProviderID, @@ -258,7 +260,7 @@ DISALLOW_COPY_AND_ASSIGN(ProviderDeleteHelper); }; -TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHost) { +TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHostOnFetchEvent) { version_->SetStatus(ServiceWorkerVersion::ACTIVATED); // Shouldn't crash if the ProviderHost is deleted prior to completion of // the fetch event. @@ -268,6 +270,23 @@ TestRequest(200, "OK", std::string()); } +TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHostBeforeFetchEvent) { + version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + request_ = url_request_context_.CreateRequest( + GURL("http://example.com/foo.html"), net::DEFAULT_PRIORITY, + &url_request_delegate_); + + request_->set_method("GET"); + request_->Start(); + helper_->context()->RemoveProviderHost(kProcessID, kProviderID); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(request_->status().is_success()); + EXPECT_EQ(500, request_->response_headers()->response_code()); + EXPECT_EQ("Service Worker Response Error", + request_->response_headers()->GetStatusText()); + EXPECT_EQ(std::string(), url_request_delegate_.response_data()); +} + // Responds to fetch events with a blob. class BlobResponder : public EmbeddedWorkerTestHelper { public: @@ -577,6 +596,23 @@ EXPECT_FALSE(request_->status().is_success()); } +// TODO(horo): Remove this test when crbug.com/485900 is fixed. +TEST_F(ServiceWorkerURLRequestJobTest, MainScriptHTTPResponseInfoNotSet) { + // Shouldn't crash if MainScriptHttpResponseInfo is not set. + SetUpWithHelper(new EmbeddedWorkerTestHelper(base::FilePath(), kProcessID), + false); + version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + request_ = url_request_context_.CreateRequest( + GURL("http://example.com/foo.html"), net::DEFAULT_PRIORITY, + &url_request_delegate_); + request_->set_method("GET"); + request_->Start(); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(request_->status().is_success()); + EXPECT_EQ(200, request_->GetResponseCode()); + EXPECT_EQ("", url_request_delegate_.response_data()); +} + // TODO(kinuko): Add more tests with different response data and also for // FallbackToNetwork case. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/site_instance_impl_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/site_instance_impl_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/site_instance_impl_unittest.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/site_instance_impl_unittest.cc 2015-06-23 12:14:28.000000000 +0000 @@ -14,6 +14,7 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/site_instance_impl.h" #include "content/browser/web_contents/web_contents_impl.h" +#include "content/browser/webui/content_web_ui_controller_factory.h" #include "content/browser/webui/web_ui_controller_factory_registry.h" #include "content/public/common/content_client.h" #include "content/public/common/content_constants.h" @@ -34,35 +35,17 @@ const char kPrivilegedScheme[] = "privileged"; -class SiteInstanceTestWebUIControllerFactory : public WebUIControllerFactory { - public: - WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, - const GURL& url) const override { - return NULL; - } - WebUI::TypeID GetWebUIType(BrowserContext* browser_context, - const GURL& url) const override { - return WebUI::kNoWebUI; - } - bool UseWebUIForURL(BrowserContext* browser_context, - const GURL& url) const override { - return HasWebUIScheme(url); - } - bool UseWebUIBindingsForURL(BrowserContext* browser_context, - const GURL& url) const override { - return HasWebUIScheme(url); - } -}; - class SiteInstanceTestBrowserClient : public TestContentBrowserClient { public: SiteInstanceTestBrowserClient() : privileged_process_id_(-1) { - WebUIControllerFactory::RegisterFactory(&factory_); + WebUIControllerFactory::RegisterFactory( + ContentWebUIControllerFactory::GetInstance()); } ~SiteInstanceTestBrowserClient() override { - WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); + WebUIControllerFactory::UnregisterFactoryForTesting( + ContentWebUIControllerFactory::GetInstance()); } bool IsSuitableHost(RenderProcessHost* process_host, @@ -76,7 +59,6 @@ } private: - SiteInstanceTestWebUIControllerFactory factory_; int privileged_process_id_; }; @@ -625,12 +607,12 @@ // Create some WebUI instances and make sure they share a process. scoped_refptr webui1_instance(CreateSiteInstance( - browser_context.get(), GURL(kChromeUIScheme + std::string("://newtab")))); + browser_context.get(), GURL(kChromeUIScheme + std::string("://gpu")))); policy->GrantWebUIBindings(webui1_instance->GetProcess()->GetID()); - scoped_refptr webui2_instance( - CreateSiteInstance(browser_context.get(), - GURL(kChromeUIScheme + std::string("://history")))); + scoped_refptr webui2_instance(CreateSiteInstance( + browser_context.get(), + GURL(kChromeUIScheme + std::string("://media-internals")))); scoped_ptr dom_host(webui1_instance->GetProcess()); EXPECT_EQ(webui1_instance->GetProcess(), webui2_instance->GetProcess()); @@ -677,10 +659,10 @@ EXPECT_FALSE(instance->HasWrongProcessForURL( GURL("javascript:alert(document.location.href);"))); - EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); + EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://gpu"))); // Test that WebUI SiteInstances reject normal web URLs. - const GURL webui_url("chrome://settings"); + const GURL webui_url("chrome://gpu"); scoped_refptr webui_instance(static_cast( SiteInstance::Create(browser_context.get()))); webui_instance->SetSite(webui_url); @@ -693,6 +675,7 @@ EXPECT_TRUE(webui_instance->HasProcess()); EXPECT_FALSE(webui_instance->HasWrongProcessForURL(webui_url)); EXPECT_TRUE(webui_instance->HasWrongProcessForURL(GURL("http://google.com"))); + EXPECT_TRUE(webui_instance->HasWrongProcessForURL(GURL("http://gpu"))); // WebUI uses process-per-site, so another instance will use the same process // even if we haven't called GetProcess yet. Make sure HasWrongProcessForURL @@ -736,7 +719,7 @@ EXPECT_FALSE(instance->HasWrongProcessForURL( GURL("javascript:alert(document.location.href);"))); - EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); + EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://gpu"))); DrainMessageLoops(); } @@ -755,7 +738,7 @@ // Simulate navigating to a WebUI URL in a process that does not have WebUI // bindings. This already requires bypassing security checks. - const GURL webui_url("chrome://settings"); + const GURL webui_url("chrome://gpu"); instance->SetSite(webui_url); EXPECT_TRUE(instance->HasSite()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/web_contents/web_contents_impl_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/web_contents/web_contents_impl_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/web_contents/web_contents_impl_unittest.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/web_contents/web_contents_impl_unittest.cc 2015-06-23 12:14:28.000000000 +0000 @@ -12,6 +12,7 @@ #include "content/browser/media/audio_state_provider.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/site_instance_impl.h" +#include "content/browser/webui/content_web_ui_controller_factory.h" #include "content/browser/webui/web_ui_controller_factory_registry.h" #include "content/common/frame_messages.h" #include "content/common/input/synthetic_web_input_event_builders.h" @@ -42,39 +43,6 @@ namespace content { namespace { -const char kTestWebUIUrl[] = "chrome://blah"; - -class WebContentsImplTestWebUIControllerFactory - : public WebUIControllerFactory { - public: - WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, - const GURL& url) const override { - if (!UseWebUI(url)) - return nullptr; - return new WebUIController(web_ui); - } - - WebUI::TypeID GetWebUIType(BrowserContext* browser_context, - const GURL& url) const override { - return WebUI::kNoWebUI; - } - - bool UseWebUIForURL(BrowserContext* browser_context, - const GURL& url) const override { - return UseWebUI(url); - } - - bool UseWebUIBindingsForURL(BrowserContext* browser_context, - const GURL& url) const override { - return UseWebUI(url); - } - - private: - bool UseWebUI(const GURL& url) const { - return url == GURL(kTestWebUIUrl); - } -}; - class TestInterstitialPage; class TestInterstitialPageDelegate : public InterstitialPageDelegate { @@ -258,16 +226,15 @@ public: void SetUp() override { RenderViewHostImplTestHarness::SetUp(); - WebUIControllerFactory::RegisterFactory(&factory_); + WebUIControllerFactory::RegisterFactory( + ContentWebUIControllerFactory::GetInstance()); } void TearDown() override { - WebUIControllerFactory::UnregisterFactoryForTesting(&factory_); + WebUIControllerFactory::UnregisterFactoryForTesting( + ContentWebUIControllerFactory::GetInstance()); RenderViewHostImplTestHarness::TearDown(); } - - private: - WebContentsImplTestWebUIControllerFactory factory_; }; class TestWebContentsObserver : public WebContentsObserver { @@ -1042,7 +1009,7 @@ TEST_F(WebContentsImplTest, CrossSiteNavigationBackPreempted) { // Start with a web ui page, which gets a new RVH with WebUI bindings. - const GURL url1("chrome://blah"); + const GURL url1("chrome://gpu"); controller().LoadURL( url1, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); TestRenderFrameHost* ntp_rfh = contents()->GetMainFrame(); @@ -1181,8 +1148,8 @@ // We should only preempt the cross-site navigation if the previous renderer // has started a new navigation. See http://crbug.com/79176. TEST_F(WebContentsImplTest, CrossSiteNotPreemptedDuringBeforeUnload) { - // Navigate to NTP URL. - const GURL url("chrome://blah"); + // Navigate to WebUI URL. + const GURL url("chrome://gpu"); controller().LoadURL( url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); TestRenderFrameHost* orig_rfh = contents()->GetMainFrame(); @@ -1199,7 +1166,7 @@ // Suppose the first navigation tries to commit now, with a // FrameMsg_Stop in flight. This should not cancel the pending navigation, // but it should act as if the beforeunload ack arrived. - orig_rfh->SendNavigate(1, GURL("chrome://blah")); + orig_rfh->SendNavigate(1, GURL("chrome://gpu")); EXPECT_TRUE(contents()->cross_navigation_pending()); EXPECT_EQ(orig_rfh, contents()->GetMainFrame()); EXPECT_FALSE(orig_rfh->IsWaitingForBeforeUnloadACK()); @@ -2687,8 +2654,12 @@ contents->NavigateAndCommit(GURL("http://a.com")); EXPECT_EQ(1u, instance->GetRelatedActiveContentsCount()); + // Navigate to a URL which sort of looks like a chrome:// url. + contents->NavigateAndCommit(GURL("http://gpu")); + EXPECT_EQ(1u, instance->GetRelatedActiveContentsCount()); + // Navigate to a URL with WebUI. This will change BrowsingInstances. - contents->GetController().LoadURL(GURL(kTestWebUIUrl), + contents->GetController().LoadURL(GURL("chrome://gpu"), Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.cc oxide-qt-1.7.9/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.cc 2015-06-23 12:13:14.000000000 +0000 @@ -23,6 +23,9 @@ WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType( BrowserContext* browser_context, const GURL& url) const { + if (!url.SchemeIs(kChromeUIScheme)) + return WebUI::kNoWebUI; + if (url.host() == kChromeUIWebRTCInternalsHost || #if !defined(OS_ANDROID) url.host() == kChromeUITracingHost || @@ -49,6 +52,9 @@ WebUIController* ContentWebUIControllerFactory::CreateWebUIControllerForURL( WebUI* web_ui, const GURL& url) const { + if (!url.SchemeIs(kChromeUIScheme)) + return nullptr; + if (url.host() == kChromeUIGpuHost) return new GpuInternalsUI(web_ui); if (url.host() == kChromeUIIndexedDBInternalsHost) @@ -69,7 +75,7 @@ return new WebRTCInternalsUI(web_ui); #endif - return NULL; + return nullptr; } // static diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.h oxide-qt-1.7.9/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.h --- oxide-qt-1.7.8/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.h 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/browser/webui/content_web_ui_controller_factory.h 2015-06-23 12:13:14.000000000 +0000 @@ -12,7 +12,8 @@ namespace content { -class ContentWebUIControllerFactory : public WebUIControllerFactory { +class CONTENT_EXPORT ContentWebUIControllerFactory + : public WebUIControllerFactory { public: WebUI::TypeID GetWebUIType(BrowserContext* browser_context, const GURL& url) const override; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/child/child_discardable_shared_memory_manager.cc oxide-qt-1.7.9/third_party/chromium/src/content/child/child_discardable_shared_memory_manager.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/child/child_discardable_shared_memory_manager.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/child/child_discardable_shared_memory_manager.cc 2015-06-23 12:14:28.000000000 +0000 @@ -20,12 +20,7 @@ namespace { // Default allocation size. -#if defined(OS_ANDROID) -// Larger allocation size on Android to avoid reaching the FD-limit. -const size_t kAllocationSize = 32 * 1024 * 1024; -#else const size_t kAllocationSize = 4 * 1024 * 1024; -#endif // Global atomic to generate unique discardable shared memory IDs. base::StaticAtomicSequenceNumber g_next_discardable_shared_memory_id; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/child/runtime_features.cc oxide-qt-1.7.9/third_party/chromium/src/content/child/runtime_features.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/child/runtime_features.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/child/runtime_features.cc 2015-06-23 12:14:28.000000000 +0000 @@ -193,6 +193,9 @@ if (command_line.HasSwitch(switches::kEnablePushMessagingHasPermission)) WebRuntimeFeatures::enablePushMessagingHasPermission(true); + if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) + WebRuntimeFeatures::enablePermissionsAPI(false); + // Delete "StaleWhileRevalidate" line from chrome_browser_field_trials.cc // when this experiment is done. if (base::FieldTrialList::FindFullName("StaleWhileRevalidate") == "Enabled" || diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/common/gpu/client/context_provider_command_buffer.cc oxide-qt-1.7.9/third_party/chromium/src/content/common/gpu/client/context_provider_command_buffer.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/common/gpu/client/context_provider_command_buffer.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/common/gpu/client/context_provider_command_buffer.cc 2015-06-23 12:14:28.000000000 +0000 @@ -136,7 +136,7 @@ new webkit::gpu::GrContextForWebGraphicsContext3D(context3d_.get())); // If GlContext is already lost, also abandon the new GrContext. - if (IsContextLost()) + if (gr_context_->get() && IsContextLost()) gr_context_->get()->abandonContext(); return gr_context_->get(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/common/host_discardable_shared_memory_manager.cc oxide-qt-1.7.9/third_party/chromium/src/content/common/host_discardable_shared_memory_manager.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/common/host_discardable_shared_memory_manager.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/common/host_discardable_shared_memory_manager.cc 2015-06-23 12:14:28.000000000 +0000 @@ -68,7 +68,12 @@ base::LazyInstance g_discardable_shared_memory_manager = LAZY_INSTANCE_INITIALIZER; +#if defined(OS_ANDROID) +// Limits the number of FDs used to 32, assuming a 4MB allocation size. +const int64_t kMaxDefaultMemoryLimit = 128 * 1024 * 1024; +#else const int64_t kMaxDefaultMemoryLimit = 512 * 1024 * 1024; +#endif const int kEnforceMemoryPolicyDelayMs = 1000; @@ -89,7 +94,11 @@ : memory_limit_( // Allow 25% of physical memory to be used for discardable memory. std::min(base::SysInfo::AmountOfPhysicalMemory() / 4, - kMaxDefaultMemoryLimit)), + base::SysInfo::IsLowEndDevice() + ? + // Use 1/8th of discardable memory on low-end devices. + kMaxDefaultMemoryLimit / 8 + : kMaxDefaultMemoryLimit)), bytes_allocated_(0), memory_pressure_listener_(new base::MemoryPressureListener( base::Bind(&HostDiscardableSharedMemoryManager::OnMemoryPressure, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java oxide-qt-1.7.9/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java --- oxide-qt-1.7.8/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java 2015-06-23 12:14:28.000000000 +0000 @@ -343,6 +343,11 @@ */ @Override public boolean deleteSurroundingText(int beforeLength, int afterLength) { + return deleteSurroundingTextImpl(beforeLength, afterLength, false); + } + + private boolean deleteSurroundingTextImpl( + int beforeLength, int afterLength, boolean fromPhysicalKey) { if (DEBUG) { Log.w(TAG, "deleteSurroundingText [" + beforeLength + " " + afterLength + "]"); } @@ -355,6 +360,12 @@ super.deleteSurroundingText(beforeLength, afterLength); updateSelectionIfRequired(); + // If this was called due to a physical key, no need to generate a key event here as + // the caller will take care of forwarding the original. + if (fromPhysicalKey) { + return true; + } + // For single-char deletion calls |ImeAdapter.sendKeyEventWithKeyCode| with the real key // code. For multi-character deletion, executes deletion by calling // |ImeAdapter.deleteSurroundingText| and sends synthetic key events with a dummy key code. @@ -387,43 +398,37 @@ if (DEBUG) { Log.w(TAG, "sendKeyEvent [" + event.getAction() + "] [" + event.getKeyCode() + "]"); } - // If this is a key-up, and backspace/del or if the key has a character representation, + + int action = event.getAction(); + int keycode = event.getKeyCode(); + int unicodeChar = event.getUnicodeChar(); + + // If this is backspace/del or if the key has a character representation, // need to update the underlying Editable (i.e. the local representation of the text - // being edited). - if (event.getAction() == KeyEvent.ACTION_UP) { - if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) { - deleteSurroundingText(1, 0); - return true; - } else if (event.getKeyCode() == KeyEvent.KEYCODE_FORWARD_DEL) { - deleteSurroundingText(0, 1); - return true; - } else { - int unicodeChar = event.getUnicodeChar(); - if (unicodeChar != 0) { - int selectionStart = Selection.getSelectionStart(mEditable); - int selectionEnd = Selection.getSelectionEnd(mEditable); - if (selectionStart > selectionEnd) { - int temp = selectionStart; - selectionStart = selectionEnd; - selectionEnd = temp; - } - mEditable.replace(selectionStart, selectionEnd, - Character.toString((char) unicodeChar)); - } - } - } else if (event.getAction() == KeyEvent.ACTION_DOWN) { + // being edited). Some IMEs like Jellybean stock IME and Samsung IME mix in delete + // KeyPress events instead of calling deleteSurroundingText. + if (action == KeyEvent.ACTION_DOWN && keycode == KeyEvent.KEYCODE_DEL) { + deleteSurroundingTextImpl(1, 0, true); + } else if (action == KeyEvent.ACTION_DOWN && keycode == KeyEvent.KEYCODE_FORWARD_DEL) { + deleteSurroundingTextImpl(0, 1, true); + } else if (action == KeyEvent.ACTION_DOWN && keycode == KeyEvent.KEYCODE_ENTER) { + // Finish text composition when pressing enter, as that may submit a form field. // TODO(aurimas): remove this workaround when crbug.com/278584 is fixed. - if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) { - beginBatchEdit(); - finishComposingText(); - mImeAdapter.translateAndSendNativeEvents(event); - endBatchEdit(); - return true; - } else if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) { - return true; - } else if (event.getKeyCode() == KeyEvent.KEYCODE_FORWARD_DEL) { - return true; + beginBatchEdit(); + finishComposingText(); + mImeAdapter.translateAndSendNativeEvents(event); + endBatchEdit(); + return true; + } else if (action == KeyEvent.ACTION_UP && unicodeChar != 0) { + int selectionStart = Selection.getSelectionStart(mEditable); + int selectionEnd = Selection.getSelectionEnd(mEditable); + if (selectionStart > selectionEnd) { + int temp = selectionStart; + selectionStart = selectionEnd; + selectionEnd = temp; } + mEditable.replace(selectionStart, selectionEnd, + Character.toString((char) unicodeChar)); } mImeAdapter.translateAndSendNativeEvents(event); return true; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java oxide-qt-1.7.9/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java --- oxide-qt-1.7.8/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java 2015-06-23 12:13:15.000000000 +0000 @@ -309,6 +309,9 @@ } public boolean dispatchKeyEvent(KeyEvent event) { + if (mInputConnection != null) { + return mInputConnection.sendKeyEvent(event); + } return translateAndSendNativeEvents(event); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java oxide-qt-1.7.9/third_party/chromium/src/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java --- oxide-qt-1.7.8/third_party/chromium/src/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java 2015-06-23 12:14:28.000000000 +0000 @@ -520,6 +520,96 @@ @SmallTest @Feature({"TextInput", "Main"}) + public void testBackspaceKeycode() throws Throwable { + DOMUtils.focusNode(mWebContents, "textarea"); + assertWaitForKeyboardStatus(true); + + mConnection = (TestAdapterInputConnection) getAdapterInputConnection(); + waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 0, "", 0, 0, -1, -1); + + // H + expectUpdateStateCall(mConnection); + commitText(mConnection, "h", 1); + assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + + // O + expectUpdateStateCall(mConnection); + commitText(mConnection, "o", 1); + assertEquals(KeyEvent.KEYCODE_O, mImeAdapter.mLastSyntheticKeyCode); + assertEquals("ho", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("ho", mConnection.getTextBeforeCursor(9, 0)); + + // DEL, sent via dispatchKeyEvent like it is in Android WebView or a physical keyboard. + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + mContentViewCore.dispatchKeyEvent( + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)); + mContentViewCore.dispatchKeyEvent( + new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL)); + } + }); + + // DEL + expectUpdateStateCall(mConnection); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + } + + @SmallTest + @Feature({"TextInput", "Main"}) + public void testRepeatBackspaceKeycode() throws Throwable { + DOMUtils.focusNode(mWebContents, "textarea"); + assertWaitForKeyboardStatus(true); + + mConnection = (TestAdapterInputConnection) getAdapterInputConnection(); + waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 0, "", 0, 0, -1, -1); + + // H + expectUpdateStateCall(mConnection); + commitText(mConnection, "h", 1); + assertEquals(KeyEvent.KEYCODE_H, mImeAdapter.mLastSyntheticKeyCode); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("h", mConnection.getTextBeforeCursor(9, 0)); + + // O + expectUpdateStateCall(mConnection); + commitText(mConnection, "o", 1); + assertEquals(KeyEvent.KEYCODE_O, mImeAdapter.mLastSyntheticKeyCode); + assertEquals("ho", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("ho", mConnection.getTextBeforeCursor(9, 0)); + + // Multiple keydowns should each delete one character (this is for physical keyboard + // key-repeat). + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + mContentViewCore.dispatchKeyEvent( + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)); + mContentViewCore.dispatchKeyEvent( + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)); + mContentViewCore.dispatchKeyEvent( + new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL)); + } + }); + + // DEL + expectUpdateStateCall(mConnection); + assertEquals("", mConnection.getTextBeforeCursor(9, 0)); + assertUpdateStateCall(mConnection, 1000); + assertEquals("", mConnection.getTextBeforeCursor(9, 0)); + } + + + @SmallTest + @Feature({"TextInput", "Main"}) public void testKeyCodesWhileTypingText() throws Throwable { DOMUtils.focusNode(mWebContents, "textarea"); assertWaitForKeyboardStatus(true); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/public/common/content_switches.cc oxide-qt-1.7.9/third_party/chromium/src/content/public/common/content_switches.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/public/common/content_switches.cc 2015-05-14 15:47:22.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/public/common/content_switches.cc 2015-06-23 12:32:44.000000000 +0000 @@ -207,6 +207,9 @@ // Disable Pepper3D. const char kDisablePepper3d[] = "disable-pepper-3d"; +// Disables the Permissions API. +const char kDisablePermissionsAPI[] = "disable-permissions-api"; + // Disables compositor-accelerated touch-screen pinch gestures. const char kDisablePinch[] = "disable-pinch"; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/public/common/content_switches.h oxide-qt-1.7.9/third_party/chromium/src/content/public/common/content_switches.h --- oxide-qt-1.7.8/third_party/chromium/src/content/public/common/content_switches.h 2015-05-14 15:47:22.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/public/common/content_switches.h 2015-06-23 12:32:44.000000000 +0000 @@ -72,6 +72,7 @@ CONTENT_EXPORT extern const char kDisableOneCopy[]; extern const char kDisablePepper3d[]; CONTENT_EXPORT extern const char kDisablePinch[]; +CONTENT_EXPORT extern const char kDisablePermissionsAPI[]; CONTENT_EXPORT extern const char kDisablePluginsDiscovery[]; CONTENT_EXPORT extern const char kDisableReadingFromCanvas[]; extern const char kDisableRemoteFonts[]; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/renderer/media/android/webmediaplayer_android.cc oxide-qt-1.7.9/third_party/chromium/src/content/renderer/media/android/webmediaplayer_android.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/renderer/media/android/webmediaplayer_android.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/renderer/media/android/webmediaplayer_android.cc 2015-06-23 12:14:28.000000000 +0000 @@ -685,7 +685,7 @@ // flip_y==false means to keep the intrinsic orientation. web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture, texture, - 0, internal_format, type); + internal_format, type); web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, false); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/renderer/pepper/pepper_try_catch.cc oxide-qt-1.7.9/third_party/chromium/src/content/renderer/pepper/pepper_try_catch.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/renderer/pepper/pepper_try_catch.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/renderer/pepper/pepper_try_catch.cc 2015-06-23 12:14:28.000000000 +0000 @@ -151,8 +151,13 @@ if (context_.IsEmpty()) { exception_message = "The v8 context has been destroyed."; } else if (try_catch_.HasCaught()) { - v8::String::Utf8Value utf8(try_catch_.Message()->Get()); - exception_message = std::string(*utf8, utf8.length()); + v8::Local message(try_catch_.Message()); + if (!message.IsEmpty()) { + v8::String::Utf8Value utf8(try_catch_.Message()->Get()); + exception_message = std::string(*utf8, utf8.length()); + } else { + exception_message = "There was a v8 exception."; + } } if (!exception_message.empty()) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/renderer/render_thread_impl.cc oxide-qt-1.7.9/third_party/chromium/src/content/renderer/render_thread_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/content/renderer/render_thread_impl.cc 2015-05-14 15:47:15.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/renderer/render_thread_impl.cc 2015-06-23 12:32:40.000000000 +0000 @@ -681,12 +681,8 @@ } } - // In single process, browser main loop set up the discardable memory - // allocator. - if (!command_line.HasSwitch(switches::kSingleProcess)) { - base::DiscardableMemoryAllocator::SetInstance( - ChildThreadImpl::discardable_shared_memory_manager()); - } + base::DiscardableMemoryAllocator::SetInstance( + ChildThreadImpl::discardable_shared_memory_manager()); service_registry()->AddService( base::Bind(CreateRenderFrameSetup)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/test/gpu/gpu_tests/pixel_expectations.py oxide-qt-1.7.9/third_party/chromium/src/content/test/gpu/gpu_tests/pixel_expectations.py --- oxide-qt-1.7.8/third_party/chromium/src/content/test/gpu/gpu_tests/pixel_expectations.py 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/test/gpu/gpu_tests/pixel_expectations.py 2015-06-23 12:14:28.000000000 +0000 @@ -11,4 +11,6 @@ # Sample Usage: # self.Fail('Pixel.Canvas2DRedBox', # ['mac', 'amd', ('nvidia', 0x1234)], bug=123) - pass + self.Fail('Pixel.Canvas2DRedBox', bug=485183) + self.Fail('Pixel.CSS3DBlueBox', bug=485183) + self.Fail('Pixel.WebGLGreenTriangle', bug=485183) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/content/test/gpu/page_sets/pixel_tests.py oxide-qt-1.7.9/third_party/chromium/src/content/test/gpu/page_sets/pixel_tests.py --- oxide-qt-1.7.8/third_party/chromium/src/content/test/gpu/page_sets/pixel_tests.py 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/content/test/gpu/page_sets/pixel_tests.py 2015-06-23 12:13:15.000000000 +0000 @@ -30,19 +30,19 @@ url='file://../../data/gpu/pixel_canvas2d.html', name=base_name + '.Canvas2DRedBox', test_rect=[0, 0, 300, 300], - revision=4, + revision=5, page_set=self)) self.AddUserStory(PixelTestsPage( url='file://../../data/gpu/pixel_css3d.html', name=base_name + '.CSS3DBlueBox', test_rect=[0, 0, 300, 300], - revision=12, + revision=13, page_set=self)) self.AddUserStory(PixelTestsPage( url='file://../../data/gpu/pixel_webgl.html', name=base_name + '.WebGLGreenTriangle', test_rect=[0, 0, 300, 300], - revision=9, + revision=10, page_set=self)) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/DEPS oxide-qt-1.7.9/third_party/chromium/src/DEPS --- oxide-qt-1.7.8/third_party/chromium/src/DEPS 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/DEPS 2015-06-23 12:14:25.000000000 +0000 @@ -1,379 +1,323 @@ vars = { - 'angleproject': - 'http://angleproject.googlecode.com/svn', - 'bidichecker': - 'http://bidichecker.googlecode.com/svn', - 'blink': - 'http://src.chromium.org/blink', + 'angle_revision': + '99f075dade7cfb0b56e80a065de3218745e4c177', + 'boringssl_git': + 'https://boringssl.googlesource.com', + 'boringssl_revision': + '40acdaeb86c516b68e3442f3a008e8d21e514bda', 'buildspec_platforms': 'all', - 'cld2': - 'https://cld2.googlecode.com/svn', - 'eyes-free': - 'http://eyes-free.googlecode.com/svn', - 'git.chromium.org': + 'buildtools_revision': + '3b302fef93f7cc58d9b8168466905237484b2772', + 'chromium_git': 'https://chromium.googlesource.com', - 'google-breakpad': - 'http://google-breakpad.googlecode.com/svn', - 'google-cache-invalidation-api': - 'http://google-cache-invalidation-api.googlecode.com/svn', - 'google-safe-browsing': - 'http://google-safe-browsing.googlecode.com/svn', - 'google-toolbox-for-mac': - 'http://google-toolbox-for-mac.googlecode.com/svn', - 'google-url': - 'http://google-url.googlecode.com/svn', - 'googlemock': - 'http://googlemock.googlecode.com/svn', - 'googletest': - 'http://googletest.googlecode.com/svn', - 'grit-i18n': - 'http://grit-i18n.googlecode.com/svn', - 'gyp': - 'http://gyp.googlecode.com/svn', - 'jsoncpp': - 'http://svn.code.sf.net/p/jsoncpp/code', - 'jsr-305': - 'http://jsr-305.googlecode.com/svn', - 'leveldb': - 'http://leveldb.googlecode.com/svn', - 'libaddressinput': - 'http://libaddressinput.googlecode.com/svn', - 'libjingle': - 'http://libjingle.googlecode.com/svn', - 'libphonenumber': - 'http://libphonenumber.googlecode.com/svn', - 'libyuv': - 'http://libyuv.googlecode.com/svn', - 'linux-syscall-support': - 'http://linux-syscall-support.googlecode.com/svn', - 'mozc': - 'http://mozc.googlecode.com/svn', - 'native_client': - 'http://src.chromium.org/native_client', - 'octane-benchmark': - 'http://octane-benchmark.googlecode.com/svn', - 'open-vcdiff': - 'http://open-vcdiff.googlecode.com/svn', - 'ots': - 'http://ots.googlecode.com/svn', - 'pdfsqueeze': - 'http://pdfsqueeze.googlecode.com/svn', - 'pefile': - 'http://pefile.googlecode.com/svn', - 'ppapi': - 'http://ppapi.googlecode.com/svn', - 'protobuf': - 'http://protobuf.googlecode.com/svn', - 'pyftpdlib': - 'http://pyftpdlib.googlecode.com/svn', - 'pymox': - 'http://pymox.googlecode.com/svn', - 'pywebsocket': - 'http://pywebsocket.googlecode.com/svn', - 'rlz': - 'http://rlz.googlecode.com/svn', - 'sawbuck': - 'http://sawbuck.googlecode.com/svn', - 'sctp-refimpl': - 'https://sctp-refimpl.googlecode.com/svn', - 'seccompsandbox': - 'http://seccompsandbox.googlecode.com/svn', - 'selenium': - 'http://selenium.googlecode.com/svn', - 'sfntly': - 'http://sfntly.googlecode.com/svn', - 'skia': - 'http://skia.googlecode.com/svn', - 'smhasher': - 'http://smhasher.googlecode.com/svn', - 'snappy': - 'http://snappy.googlecode.com/svn', - 'trace-viewer': - 'http://trace-viewer.googlecode.com/svn', - 'v8': - 'http://v8.googlecode.com/svn', - 'v8-i18n': - 'http://v8-i18n.googlecode.com/svn', - 'web-page-replay': - 'http://web-page-replay.googlecode.com/svn', + 'chromiumos_git': + 'https://chromium.googlesource.com/chromiumos', + 'google_toolbox_for_mac_revision': + '17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + 'googlecode_url': + 'http://%s.googlecode.com/svn', + 'libvpx_revision': + '861f35b01c87a021540aace739cb7415c08e987b', + 'lighttpd_revision': + '9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + 'llvm_git': + 'https://llvm.googlesource.com', + 'llvm_url': + 'http://src.chromium.org/llvm-project', + 'lss_revision': + 'e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + 'nacl_revision': + 'bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', + 'nss_revision': + 'bb4e75a43d007518ae7d618665ea2f25b0c60b63', + 'openmax_dl_revision': + '0b238cb62c32b6f45680cf577eddb1b051ae0219', + 'pdfium_git': + 'https://pdfium.googlesource.com', + 'pdfium_revision': + 'e3dd159edee8cf2eec3f30f77ef6830597c1bc2f', + 'sfntly_revision': + '1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + 'skia_git': + 'https://skia.googlesource.com', + 'skia_revision': + 'aa4c7a704289b7adcbfbd23580667a1950a9ca6e', + 'sourceforge_url': + 'http://svn.code.sf.net/p/%(repo)s/code', + 'swarming_revision': + '13e7c88b5a9494467259603486f001694ea85721', + 'v8_branch': + 'trunk', + 'v8_revision': + 'f5c0a23a505616796a628d64f4ffe377d1fc4bcf', + 'webkit_revision': + '54ac8d7272b177ae0d94ca8de98bd236c7b8dbea', 'webkit_trunk': - 'http://src.chromium.org/blink/trunk', - 'webrtc': - 'http://webrtc.googlecode.com/svn' + 'http://src.chromium.org/blink/trunk' } +allowed_hosts = [ + 'android.googlesource.com', + 'boringssl.googlesource.com', + 'chromium.googlesource.com', + 'pdfium.googlesource.com' +] + deps = { - 'build': - '/trunk/tools/build@294688', - 'build/scripts/command_wrapper/bin': - '/trunk/tools/command_wrapper/bin@135178', - 'build/scripts/gsd_generate_index': - '/trunk/tools/gsd_generate_index@164784', - 'build/scripts/private/data/reliability': - '/trunk/src/chrome/test/data/reliability@291312', - 'build/scripts/tools/deps2git': - '/trunk/tools/deps2git@292856', - 'build/third_party/lighttpd': - '/trunk/deps/third_party/lighttpd@58968', - 'depot_tools': - '/trunk/tools/depot_tools@294679', 'src/breakpad/src': - (Var("git.chromium.org")) + '/external/google-breakpad/src.git@38d621e6fc2d720590c1a912aa9b1e7f2853ce50', + (Var("chromium_git")) + '/external/google-breakpad/src.git@39f710989688f8e1a1c7e7f7c1ecd827f2b1a1f4', 'src/buildtools': - (Var("git.chromium.org")) + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', + (Var("chromium_git")) + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', 'src/chrome/test/data/perf/canvas_bench': - (Var("git.chromium.org")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', + (Var("chromium_git")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', 'src/chrome/test/data/perf/frame_rate/content': - (Var("git.chromium.org")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', + (Var("chromium_git")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', 'src/media/cdm/ppapi/api': - (Var("git.chromium.org")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', + (Var("chromium_git")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', 'src/native_client': - (Var("git.chromium.org")) + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', + (Var("chromium_git")) + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', 'src/sdch/open-vcdiff': - (Var("git.chromium.org")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', + (Var("chromium_git")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', 'src/testing/gmock': - (Var("git.chromium.org")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', + (Var("chromium_git")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', 'src/testing/gtest': - (Var("git.chromium.org")) + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', + (Var("chromium_git")) + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', 'src/third_party/WebKit': - (Var("git.chromium.org")) + '/chromium/blink.git@7f5dc867c185f736a5201e96ca9516df5104ccbe', + (Var("chromium_git")) + '/chromium/blink.git@c7e580c606277e12855abfd3dfb0e10eb7e715ca', 'src/third_party/angle': - (Var("git.chromium.org")) + '/angle/angle.git@99f075dade7cfb0b56e80a065de3218745e4c177', + (Var("chromium_git")) + '/angle/angle.git@99f075dade7cfb0b56e80a065de3218745e4c177', 'src/third_party/bidichecker': - (Var("git.chromium.org")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', + (Var("chromium_git")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', + (Var("boringssl_git")) + '/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', 'src/third_party/cacheinvalidation/src': - (Var("git.chromium.org")) + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', + (Var("chromium_git")) + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', 'src/third_party/cld_2/src': - (Var("git.chromium.org")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', + (Var("chromium_git")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', 'src/third_party/colorama/src': - (Var("git.chromium.org")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', + (Var("chromium_git")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'src/third_party/crashpad/crashpad': - (Var("git.chromium.org")) + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', + (Var("chromium_git")) + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', 'src/third_party/dom_distiller_js/dist': - (Var("git.chromium.org")) + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', + (Var("chromium_git")) + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', 'src/third_party/ffmpeg': - (Var("git.chromium.org")) + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', + (Var("chromium_git")) + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', 'src/third_party/flac': - (Var("git.chromium.org")) + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', + (Var("chromium_git")) + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', 'src/third_party/hunspell': - (Var("git.chromium.org")) + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', + (Var("chromium_git")) + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', 'src/third_party/hunspell_dictionaries': - (Var("git.chromium.org")) + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', + (Var("chromium_git")) + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', 'src/third_party/icu': - (Var("git.chromium.org")) + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', + (Var("chromium_git")) + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', 'src/third_party/jsoncpp/source/include': - (Var("git.chromium.org")) + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', + (Var("chromium_git")) + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', 'src/third_party/jsoncpp/source/src/lib_json': - (Var("git.chromium.org")) + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', + (Var("chromium_git")) + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', 'src/third_party/leveldatabase/src': - (Var("git.chromium.org")) + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', + (Var("chromium_git")) + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', 'src/third_party/libaddressinput/src': - (Var("git.chromium.org")) + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', + (Var("chromium_git")) + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', 'src/third_party/libexif/sources': - (Var("git.chromium.org")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', + (Var("chromium_git")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', 'src/third_party/libjingle/source/talk': - (Var("git.chromium.org")) + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', + (Var("chromium_git")) + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', 'src/third_party/libjpeg_turbo': - (Var("git.chromium.org")) + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', + (Var("chromium_git")) + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', 'src/third_party/libphonenumber/src/phonenumbers': - (Var("git.chromium.org")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', + (Var("chromium_git")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', 'src/third_party/libphonenumber/src/resources': - (Var("git.chromium.org")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', + (Var("chromium_git")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', 'src/third_party/libphonenumber/src/test': - (Var("git.chromium.org")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', + (Var("chromium_git")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', 'src/third_party/libsrtp': - (Var("git.chromium.org")) + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', + (Var("chromium_git")) + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', 'src/third_party/libvpx': - (Var("git.chromium.org")) + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', + (Var("chromium_git")) + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', 'src/third_party/libyuv': - (Var("git.chromium.org")) + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', + (Var("chromium_git")) + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', 'src/third_party/mesa/src': - (Var("git.chromium.org")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', + (Var("chromium_git")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', 'src/third_party/openmax_dl': - (Var("git.chromium.org")) + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', + (Var("chromium_git")) + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', 'src/third_party/opus/src': - (Var("git.chromium.org")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', + (Var("chromium_git")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', 'src/third_party/pdfium': - 'https://pdfium.googlesource.com/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', + (Var("pdfium_git")) + '/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', 'src/third_party/py_trace_event/src': - (Var("git.chromium.org")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', + (Var("chromium_git")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', 'src/third_party/pyftpdlib/src': - (Var("git.chromium.org")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', + (Var("chromium_git")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', 'src/third_party/pywebsocket/src': - (Var("git.chromium.org")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', + (Var("chromium_git")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', 'src/third_party/safe_browsing/testing': - (Var("git.chromium.org")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', + (Var("chromium_git")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', 'src/third_party/scons-2.0.1': - (Var("git.chromium.org")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', + (Var("chromium_git")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', 'src/third_party/sfntly/cpp/src': - (Var("git.chromium.org")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + (Var("chromium_git")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', 'src/third_party/skia': - (Var("git.chromium.org")) + '/skia.git@969098603fc16538a5f5acd3f9c1cf0269faa039', + (Var("chromium_git")) + '/skia.git@7be37a9beb17711b8f297fc47a4ae473d9b3c018', 'src/third_party/smhasher/src': - (Var("git.chromium.org")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', + (Var("chromium_git")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', 'src/third_party/snappy/src': - (Var("git.chromium.org")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', + (Var("chromium_git")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', 'src/third_party/swig/Lib': - (Var("git.chromium.org")) + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', + (Var("chromium_git")) + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', 'src/third_party/trace-viewer': - (Var("git.chromium.org")) + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', + (Var("chromium_git")) + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', 'src/third_party/usrsctp/usrsctplib': - (Var("git.chromium.org")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', + (Var("chromium_git")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', 'src/third_party/webdriver/pylib': - (Var("git.chromium.org")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', + (Var("chromium_git")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', 'src/third_party/webgl/src': - (Var("git.chromium.org")) + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', + (Var("chromium_git")) + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', 'src/third_party/webpagereplay': - (Var("git.chromium.org")) + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', + (Var("chromium_git")) + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', 'src/third_party/webrtc': - (Var("git.chromium.org")) + '/external/webrtc/trunk/webrtc.git@d6a4e22b76e6ee740dc6a3e35483264ecbca117f', + (Var("chromium_git")) + '/external/webrtc/trunk/webrtc.git@0528a0544e300cfce85fe14c22f7fc22dee0e116', 'src/third_party/yasm/source/patched-yasm': - (Var("git.chromium.org")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', + (Var("chromium_git")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', 'src/tools/deps2git': - (Var("git.chromium.org")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', + (Var("chromium_git")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', 'src/tools/grit': - (Var("git.chromium.org")) + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', + (Var("chromium_git")) + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', 'src/tools/gyp': - (Var("git.chromium.org")) + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', + (Var("chromium_git")) + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', 'src/tools/page_cycler/acid3': - (Var("git.chromium.org")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', + (Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', 'src/tools/swarming_client': - (Var("git.chromium.org")) + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', + (Var("chromium_git")) + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', 'src/v8': - (Var("git.chromium.org")) + '/v8/v8.git@48b6d3283632db4a13c6f6ca99068f75dad66fac' + (Var("chromium_git")) + '/v8/v8.git@4c09ecee43d4464c6ecf6ffc0a28ead56f91937c' } deps_os = { 'android': { - 'src/pdf': None, 'src/third_party/android_protobuf/src': - (Var("git.chromium.org")) + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', + (Var("chromium_git")) + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', 'src/third_party/android_tools': - (Var("git.chromium.org")) + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', + (Var("chromium_git")) + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', 'src/third_party/apache-mime4j': - (Var("git.chromium.org")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', + (Var("chromium_git")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', 'src/third_party/appurify-python/src': - (Var("git.chromium.org")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', + (Var("chromium_git")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', 'src/third_party/elfutils/src': - (Var("git.chromium.org")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', + (Var("chromium_git")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', 'src/third_party/findbugs': - (Var("git.chromium.org")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', + (Var("chromium_git")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', 'src/third_party/freetype': - (Var("git.chromium.org")) + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', + (Var("chromium_git")) + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', 'src/third_party/httpcomponents-client': - (Var("git.chromium.org")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', + (Var("chromium_git")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', 'src/third_party/httpcomponents-core': - (Var("git.chromium.org")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', + (Var("chromium_git")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', 'src/third_party/jarjar': - (Var("git.chromium.org")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', + (Var("chromium_git")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', 'src/third_party/jsr-305/src': - (Var("git.chromium.org")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', + (Var("chromium_git")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', 'src/third_party/junit/src': - (Var("git.chromium.org")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', + (Var("chromium_git")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', 'src/third_party/lss': - (Var("git.chromium.org")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', 'src/third_party/mockito/src': - (Var("git.chromium.org")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', + (Var("chromium_git")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', 'src/third_party/requests/src': - (Var("git.chromium.org")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', + (Var("chromium_git")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', 'src/third_party/robolectric/lib': - (Var("git.chromium.org")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810' + (Var("chromium_git")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810' }, 'ios': { 'src/chrome/test/data/perf/canvas_bench': None, 'src/chrome/test/data/perf/frame_rate/content': None, 'src/ios/third_party/gcdwebserver/src': - (Var("git.chromium.org")) + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', + (Var("chromium_git")) + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', 'src/native_client': None, 'src/testing/iossim/third_party/class-dump': - (Var("git.chromium.org")) + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', + (Var("chromium_git")) + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', 'src/third_party/ffmpeg': None, 'src/third_party/google_toolbox_for_mac/src': - (Var("git.chromium.org")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', 'src/third_party/hunspell': None, 'src/third_party/hunspell_dictionaries': None, 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', + (Var("chromium_git")) + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', 'src/third_party/webgl': None }, 'mac': { 'src/chrome/installer/mac/third_party/xz/xz': - (Var("git.chromium.org")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', + (Var("chromium_git")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', 'src/chrome/tools/test/reference_build/chrome_mac': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', 'src/third_party/google_toolbox_for_mac/src': - (Var("git.chromium.org")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', 'src/third_party/lighttpd': - (Var("git.chromium.org")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', + (Var("chromium_git")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', 'src/third_party/pdfsqueeze': - (Var("git.chromium.org")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', + (Var("chromium_git")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', 'src/third_party/swig/mac': - (Var("git.chromium.org")) + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e' + (Var("chromium_git")) + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e' }, 'unix': { - 'build/third_party/xvfb': - '/trunk/tools/third_party/xvfb@125214', 'src/chrome/tools/test/reference_build/chrome_linux': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', 'src/third_party/chromite': - (Var("git.chromium.org")) + '/chromiumos/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', + (Var("chromiumos_git")) + '/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', 'src/third_party/cros_system_api': - (Var("git.chromium.org")) + '/chromiumos/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', + (Var("chromiumos_git")) + '/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', 'src/third_party/fontconfig/src': - (Var("git.chromium.org")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', + (Var("chromium_git")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', 'src/third_party/freetype2/src': - (Var("git.chromium.org")) + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', + (Var("chromium_git")) + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', 'src/third_party/liblouis/src': - (Var("git.chromium.org")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', + (Var("chromium_git")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', 'src/third_party/lss': - (Var("git.chromium.org")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', 'src/third_party/pyelftools': - (Var("git.chromium.org")) + '/chromiumos/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', + (Var("chromiumos_git")) + '/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', 'src/third_party/stp/src': - (Var("git.chromium.org")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', + (Var("chromium_git")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', 'src/third_party/swig/linux': - (Var("git.chromium.org")) + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', + (Var("chromium_git")) + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', 'src/third_party/undoview': - (Var("git.chromium.org")) + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', + (Var("chromium_git")) + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', 'src/third_party/xdg-utils': - (Var("git.chromium.org")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d' + (Var("chromium_git")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d' }, 'win': { 'src/chrome/tools/test/reference_build/chrome_win': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', 'src/third_party/bison': - (Var("git.chromium.org")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', + (Var("chromium_git")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', 'src/third_party/cygwin': - (Var("git.chromium.org")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', + (Var("chromium_git")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', 'src/third_party/gnu_binutils': - (Var("git.chromium.org")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', + (Var("chromium_git")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', 'src/third_party/gperf': - (Var("git.chromium.org")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', + (Var("chromium_git")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', 'src/third_party/lighttpd': - (Var("git.chromium.org")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', 'src/third_party/mingw-w64/mingw/bin': - (Var("git.chromium.org")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', + (Var("chromium_git")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', 'src/third_party/nacl_sdk_binaries': - (Var("git.chromium.org")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', + (Var("chromium_git")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', + (Var("chromium_git")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', 'src/third_party/omaha/src/omaha': - (Var("git.chromium.org")) + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', + (Var("chromium_git")) + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', 'src/third_party/pefile': - (Var("git.chromium.org")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', + (Var("chromium_git")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', 'src/third_party/perl': - (Var("git.chromium.org")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', + (Var("chromium_git")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', 'src/third_party/psyco_win32': - (Var("git.chromium.org")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', + (Var("chromium_git")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', 'src/third_party/swig/win': - (Var("git.chromium.org")) + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', + (Var("chromium_git")) + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', 'src/third_party/yasm/binaries': - (Var("git.chromium.org")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881' + (Var("chromium_git")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881' } } @@ -723,17 +667,6 @@ 'src/tools/.*\\.py', 'name': 'remove_stale_pyc_files' - }, - { - 'action': [ - 'python', - 'build/scripts/tools/runit.py', - 'python', - 'build/scripts/common/cros_chromite.py', - '-v' - ], - 'pattern': - '.*/cros_chromite\\.py' } ] diff -Nru oxide-qt-1.7.8/third_party/chromium/src/.DEPS.git oxide-qt-1.7.9/third_party/chromium/src/.DEPS.git --- oxide-qt-1.7.8/third_party/chromium/src/.DEPS.git 2015-05-14 15:35:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/.DEPS.git 1970-01-01 00:00:00.000000000 +0000 @@ -1,813 +0,0 @@ -# DO NOT EDIT EXCEPT FOR LOCAL TESTING. -# THIS IS A GENERATED FILE. -# ALL MANUAL CHANGES WILL BE OVERWRITTEN. -# SEE http://code.google.com/p/chromium/wiki/UsingGit -# FOR HOW TO ROLL DEPS -vars = { - 'eyes-free': - 'http://eyes-free.googlecode.com/svn', - 'webkit_rev': - '@7f5dc867c185f736a5201e96ca9516df5104ccbe', - 'blink': - 'http://src.chromium.org/blink', - 'skia': - 'http://skia.googlecode.com/svn', - 'google-breakpad': - 'http://google-breakpad.googlecode.com/svn', - 'sawbuck': - 'http://sawbuck.googlecode.com/svn', - 'mozc': - 'http://mozc.googlecode.com/svn', - 'git.chromium.org': - 'https://chromium.googlesource.com', - 'v8-i18n': - 'http://v8-i18n.googlecode.com/svn', - 'selenium': - 'http://selenium.googlecode.com/svn', - 'buildspec_platforms': - 'all', - 'webkit_url': - 'https://chromium.googlesource.com/chromium/blink.git', - 'snappy': - 'http://snappy.googlecode.com/svn', - 'ppapi': - 'http://ppapi.googlecode.com/svn', - 'pywebsocket': - 'http://pywebsocket.googlecode.com/svn', - 'libaddressinput': - 'http://libaddressinput.googlecode.com/svn', - 'pyftpdlib': - 'http://pyftpdlib.googlecode.com/svn', - 'google-url': - 'http://google-url.googlecode.com/svn', - 'googletest': - 'http://googletest.googlecode.com/svn', - 'gyp': - 'http://gyp.googlecode.com/svn', - 'seccompsandbox': - 'http://seccompsandbox.googlecode.com/svn', - 'ots': - 'http://ots.googlecode.com/svn', - 'angleproject': - 'http://angleproject.googlecode.com/svn', - 'pefile': - 'http://pefile.googlecode.com/svn', - 'open-vcdiff': - 'http://open-vcdiff.googlecode.com/svn', - 'linux-syscall-support': - 'http://linux-syscall-support.googlecode.com/svn', - 'jsoncpp': - 'http://svn.code.sf.net/p/jsoncpp/code', - 'webrtc': - 'http://webrtc.googlecode.com/svn', - 'web-page-replay': - 'http://web-page-replay.googlecode.com/svn', - 'libjingle': - 'http://libjingle.googlecode.com/svn', - 'cld2': - 'https://cld2.googlecode.com/svn', - 'google-cache-invalidation-api': - 'http://google-cache-invalidation-api.googlecode.com/svn', - 'jsr-305': - 'http://jsr-305.googlecode.com/svn', - 'angle_revision': - '99f075dade7cfb0b56e80a065de3218745e4c177', - 'bidichecker': - 'http://bidichecker.googlecode.com/svn', - 'git_url': - 'https://chromium.googlesource.com', - 'native_client': - 'http://src.chromium.org/native_client', - 'trace-viewer': - 'http://trace-viewer.googlecode.com/svn', - 'leveldb': - 'http://leveldb.googlecode.com/svn', - 'webkit_trunk': - 'http://src.chromium.org/blink/trunk', - 'googlemock': - 'http://googlemock.googlecode.com/svn', - 'grit-i18n': - 'http://grit-i18n.googlecode.com/svn', - 'pdfsqueeze': - 'http://pdfsqueeze.googlecode.com/svn', - 'protobuf': - 'http://protobuf.googlecode.com/svn', - 'smhasher': - 'http://smhasher.googlecode.com/svn', - 'google-toolbox-for-mac': - 'http://google-toolbox-for-mac.googlecode.com/svn', - 'libyuv': - 'http://libyuv.googlecode.com/svn', - 'rlz': - 'http://rlz.googlecode.com/svn', - 'v8': - 'http://v8.googlecode.com/svn', - 'octane-benchmark': - 'http://octane-benchmark.googlecode.com/svn', - 'sfntly': - 'http://sfntly.googlecode.com/svn', - 'sctp-refimpl': - 'https://sctp-refimpl.googlecode.com/svn', - 'libphonenumber': - 'http://libphonenumber.googlecode.com/svn', - 'pymox': - 'http://pymox.googlecode.com/svn', - 'google-safe-browsing': - 'http://google-safe-browsing.googlecode.com/svn' -} - -deps = { - 'build': - Var('git_url') + '/chromium/tools/build.git@ad95e885714a6d2dfb9a1da8edea1a3ebc23466c', - 'build/scripts/command_wrapper/bin': - Var('git_url') + '/chromium/tools/command_wrapper/bin.git@2eeebba9a512cae9e4e9312f5ec728dbdad80bd0', - 'build/scripts/gsd_generate_index': - Var('git_url') + '/chromium/tools/gsd_generate_index.git@d2f5d5a5d212d8fb337d751c0351644a6ac83ac8', - 'build/scripts/private/data/reliability': - Var('git_url') + '/chromium/src/chrome/test/data/reliability.git@ba644102a2f81bb33582e9474a10812fef825389', - 'build/scripts/tools/deps2git': - Var('git_url') + '/chromium/tools/deps2git.git@27ce444f50f3c6732982d225d3f4cf67f0979a98', - 'build/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'depot_tools': - Var('git_url') + '/chromium/tools/depot_tools.git@46309bf41f2cde51a180d8e011adfd5467a23ec6', - 'src/breakpad/src': - Var('git_url') + '/external/google-breakpad/src.git@38d621e6fc2d720590c1a912aa9b1e7f2853ce50', - 'src/buildtools': - Var('git_url') + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', - 'src/chrome/test/data/perf/canvas_bench': - Var('git_url') + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', - 'src/chrome/test/data/perf/frame_rate/content': - Var('git_url') + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', - 'src/media/cdm/ppapi/api': - Var('git_url') + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', - 'src/native_client': - Var('git_url') + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', - 'src/sdch/open-vcdiff': - Var('git_url') + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', - 'src/testing/gmock': - Var('git_url') + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', - 'src/testing/gtest': - Var('git_url') + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', - 'src/third_party/WebKit': - Var('webkit_url') + '' + Var('webkit_rev'), - 'src/third_party/angle': - Var('git_url') + '/angle/angle.git' + '@' + Var('angle_revision'), - 'src/third_party/bidichecker': - Var('git_url') + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', - 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', - 'src/third_party/cacheinvalidation/src': - Var('git_url') + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', - 'src/third_party/cld_2/src': - Var('git_url') + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', - 'src/third_party/colorama/src': - Var('git_url') + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - 'src/third_party/crashpad/crashpad': - Var('git_url') + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', - 'src/third_party/dom_distiller_js/dist': - Var('git_url') + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', - 'src/third_party/ffmpeg': - Var('git_url') + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', - 'src/third_party/flac': - Var('git_url') + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', - 'src/third_party/hunspell': - Var('git_url') + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', - 'src/third_party/hunspell_dictionaries': - Var('git_url') + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', - 'src/third_party/icu': - Var('git_url') + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', - 'src/third_party/jsoncpp/source/include': - Var('git_url') + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', - 'src/third_party/jsoncpp/source/src/lib_json': - Var('git_url') + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', - 'src/third_party/leveldatabase/src': - Var('git_url') + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', - 'src/third_party/libaddressinput/src': - Var('git_url') + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', - 'src/third_party/libexif/sources': - Var('git_url') + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', - 'src/third_party/libjingle/source/talk': - Var('git_url') + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', - 'src/third_party/libjpeg_turbo': - Var('git_url') + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', - 'src/third_party/libphonenumber/src/phonenumbers': - Var('git_url') + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', - 'src/third_party/libphonenumber/src/resources': - Var('git_url') + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', - 'src/third_party/libphonenumber/src/test': - Var('git_url') + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', - 'src/third_party/libsrtp': - Var('git_url') + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', - 'src/third_party/libvpx': - Var('git_url') + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', - 'src/third_party/libyuv': - Var('git_url') + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', - 'src/third_party/mesa/src': - Var('git_url') + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', - 'src/third_party/openmax_dl': - Var('git_url') + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', - 'src/third_party/opus/src': - Var('git_url') + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', - 'src/third_party/pdfium': - 'https://pdfium.googlesource.com/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', - 'src/third_party/py_trace_event/src': - Var('git_url') + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', - 'src/third_party/pyftpdlib/src': - Var('git_url') + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', - 'src/third_party/pywebsocket/src': - Var('git_url') + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', - 'src/third_party/safe_browsing/testing': - Var('git_url') + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', - 'src/third_party/scons-2.0.1': - Var('git_url') + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', - 'src/third_party/sfntly/cpp/src': - Var('git_url') + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', - 'src/third_party/skia': - Var('git_url') + '/skia.git@969098603fc16538a5f5acd3f9c1cf0269faa039', - 'src/third_party/smhasher/src': - Var('git_url') + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', - 'src/third_party/snappy/src': - Var('git_url') + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', - 'src/third_party/swig/Lib': - Var('git_url') + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', - 'src/third_party/trace-viewer': - Var('git_url') + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', - 'src/third_party/usrsctp/usrsctplib': - Var('git_url') + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', - 'src/third_party/webdriver/pylib': - Var('git_url') + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', - 'src/third_party/webgl/src': - Var('git_url') + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', - 'src/third_party/webpagereplay': - Var('git_url') + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', - 'src/third_party/webrtc': - Var('git_url') + '/external/webrtc/trunk/webrtc.git@d6a4e22b76e6ee740dc6a3e35483264ecbca117f', - 'src/third_party/yasm/source/patched-yasm': - Var('git_url') + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', - 'src/tools/deps2git': - Var('git_url') + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', - 'src/tools/grit': - Var('git_url') + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', - 'src/tools/gyp': - Var('git_url') + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', - 'src/tools/page_cycler/acid3': - Var('git_url') + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', - 'src/tools/swarming_client': - Var('git_url') + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', - 'src/v8': - Var('git_url') + '/v8/v8.git@48b6d3283632db4a13c6f6ca99068f75dad66fac', -} - -deps_os = { - 'android': - { - 'src/pdf': - None, - 'src/third_party/android_protobuf/src': - Var('git_url') + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', - 'src/third_party/android_tools': - Var('git_url') + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', - 'src/third_party/apache-mime4j': - Var('git_url') + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', - 'src/third_party/appurify-python/src': - Var('git_url') + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', - 'src/third_party/elfutils/src': - Var('git_url') + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', - 'src/third_party/findbugs': - Var('git_url') + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', - 'src/third_party/freetype': - Var('git_url') + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', - 'src/third_party/httpcomponents-client': - Var('git_url') + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', - 'src/third_party/httpcomponents-core': - Var('git_url') + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', - 'src/third_party/jarjar': - Var('git_url') + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', - 'src/third_party/jsr-305/src': - Var('git_url') + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', - 'src/third_party/junit/src': - Var('git_url') + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', - 'src/third_party/lss': - Var('git_url') + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', - 'src/third_party/mockito/src': - Var('git_url') + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', - 'src/third_party/requests/src': - Var('git_url') + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', - 'src/third_party/robolectric/lib': - Var('git_url') + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810', - }, - 'ios': - { - 'src/chrome/test/data/perf/canvas_bench': - None, - 'src/chrome/test/data/perf/frame_rate/content': - None, - 'src/ios/third_party/gcdwebserver/src': - Var('git_url') + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', - 'src/native_client': - None, - 'src/testing/iossim/third_party/class-dump': - Var('git_url') + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', - 'src/third_party/ffmpeg': - None, - 'src/third_party/google_toolbox_for_mac/src': - Var('git_url') + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', - 'src/third_party/hunspell': - None, - 'src/third_party/hunspell_dictionaries': - None, - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', - 'src/third_party/webgl': - None, - }, - 'mac': - { - 'src/chrome/installer/mac/third_party/xz/xz': - Var('git_url') + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', - 'src/chrome/tools/test/reference_build/chrome_mac': - Var('git_url') + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', - 'src/third_party/google_toolbox_for_mac/src': - Var('git_url') + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', - 'src/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', - 'src/third_party/pdfsqueeze': - Var('git_url') + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', - 'src/third_party/swig/mac': - Var('git_url') + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e', - }, - 'unix': - { - 'build/third_party/xvfb': - Var('git_url') + '/chromium/tools/third_party/xvfb.git@aebb1aadf1422e4d81e831e13746b8f7ae322e07', - 'src/chrome/tools/test/reference_build/chrome_linux': - Var('git_url') + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', - 'src/third_party/chromite': - Var('git_url') + '/chromiumos/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', - 'src/third_party/cros_system_api': - Var('git_url') + '/chromiumos/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', - 'src/third_party/fontconfig/src': - Var('git_url') + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', - 'src/third_party/freetype2/src': - Var('git_url') + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', - 'src/third_party/liblouis/src': - Var('git_url') + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', - 'src/third_party/lss': - Var('git_url') + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', - 'src/third_party/pyelftools': - Var('git_url') + '/chromiumos/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', - 'src/third_party/stp/src': - Var('git_url') + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', - 'src/third_party/swig/linux': - Var('git_url') + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', - 'src/third_party/undoview': - Var('git_url') + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', - 'src/third_party/xdg-utils': - Var('git_url') + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d', - }, - 'win': - { - 'src/chrome/tools/test/reference_build/chrome_win': - Var('git_url') + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', - 'src/third_party/bison': - Var('git_url') + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', - 'src/third_party/cygwin': - Var('git_url') + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', - 'src/third_party/gnu_binutils': - Var('git_url') + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', - 'src/third_party/gperf': - Var('git_url') + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', - 'src/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'src/third_party/mingw-w64/mingw/bin': - Var('git_url') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', - 'src/third_party/nacl_sdk_binaries': - Var('git_url') + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', - 'src/third_party/omaha/src/omaha': - Var('git_url') + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', - 'src/third_party/pefile': - Var('git_url') + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', - 'src/third_party/perl': - Var('git_url') + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', - 'src/third_party/psyco_win32': - Var('git_url') + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', - 'src/third_party/swig/win': - Var('git_url') + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', - 'src/third_party/yasm/binaries': - Var('git_url') + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881', - }, -} - -include_rules = [ - '+base', - '+build', - '+ipc', - '+library_loaders', - '+testing', - '+third_party/icu/source/common/unicode', - '+third_party/icu/source/i18n/unicode', - '+url' -] - -skip_child_includes = [ - 'breakpad', - 'native_client_sdk', - 'out', - 'sdch', - 'skia', - 'testing', - 'v8', - 'win8' -] - -hooks = [ - { - 'action': - [ - 'python', - 'src/build/landmines.py' -], - 'pattern': - '.', - 'name': - 'landmines' -}, - { - 'action': - [ - 'python', - 'src/build/download_nacl_toolchains.py', - '--mode', - 'nacl_core_sdk', - 'sync', - '--extract' -], - 'pattern': - '.', - 'name': - 'nacltools' -}, - { - 'action': - [ - 'python', - 'src/build/download_sdk_extras.py' -], - 'pattern': - '.', - 'name': - 'sdkextras' -}, - { - 'action': - [ - 'python', - 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py', - '--linux-only' -], - 'pattern': - '.', - 'name': - 'sysroot' -}, - { - 'action': - [ - 'python', - 'src/build/vs_toolchain.py', - 'update' -], - 'pattern': - '.', - 'name': - 'win_toolchain' -}, - { - 'action': - [ - 'python', - 'src/tools/clang/scripts/update.py', - '--if-needed' -], - 'pattern': - '.', - 'name': - 'clang' -}, - { - 'action': - [ - 'python', - 'src/build/util/lastchange.py', - '-o', - 'src/build/util/LASTCHANGE' -], - 'pattern': - '.', - 'name': - 'lastchange' -}, - { - 'action': - [ - 'python', - 'src/build/util/lastchange.py', - '-s', - 'src/third_party/WebKit', - '-o', - 'src/build/util/LASTCHANGE.blink' -], - 'pattern': - '.', - 'name': - 'lastchange' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/win/gn.exe.sha1' -], - 'pattern': - '.', - 'name': - 'gn_win' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/mac/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_mac' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/linux32/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_linux32' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/linux64/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_linux64' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/win/clang-format.exe.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_win' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/mac/clang-format.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_mac' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/linux64/clang-format.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_linux' -}, - { - 'action': - [ - 'python', - 'src/third_party/binutils/download.py' -], - 'pattern': - 'src/third_party/binutils', - 'name': - 'binutils' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-eu-strip', - '-s', - 'src/build/linux/bin/eu-strip.sha1' -], - 'pattern': - '.', - 'name': - 'eu-strip' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-drmemory', - '-s', - 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1' -], - 'pattern': - '.', - 'name': - 'drmemory' -}, - { - 'action': - [ - 'python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/syzygy/binaries', - '--revision=e869aa03e0f40f74321a70d6d4578f5bbbc29bda', - '--overwrite' -], - 'pattern': - '.', - 'name': - 'syzygy-binaries' -}, - { - 'action': - [ - 'python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/kasko', - '--revision=3278b959bdf6c9aa4b326a38e8b953e566c1ec58', - '--resource=kasko.zip', - '--resource=kasko_symbols.zip', - '--overwrite' -], - 'pattern': - '.', - 'name': - 'kasko' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--directory', - '--recursive', - '--no_auth', - '--num_threads=16', - '--bucket', - 'chromium-apache-win32', - 'src/third_party/apache-win32' -], - 'pattern': - '\\.sha1', - 'name': - 'apache_win32' -}, - { - 'action': - [ - 'python', - 'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py', - '--tools-directory=../../../../../../tools' -], - 'pattern': - '', - 'name': - 'download_mojo_shell' -}, - { - 'action': - [ - 'python', - 'src/third_party/instrumented_libraries/scripts/download_binaries.py' -], - 'pattern': - '\\.sha1', - 'name': - 'instrumented_libraries' -}, - { - 'action': - [ - 'python', - 'src/build/gyp_chromium' -], - 'pattern': - '.', - 'name': - 'gyp' -}, - { - 'action': - [ - 'python', - 'src/tools/check_git_config.py', - '--running-as-hook' -], - 'pattern': - '.', - 'name': - 'check_git_config' -}, - { - 'action': - [ - 'python', - 'src/tools/remove_stale_pyc_files.py', - 'src/tools' -], - 'pattern': - 'src/tools/.*\\.py', - 'name': - 'remove_stale_pyc_files' -}, - { - 'action': - [ - 'python', - 'build/scripts/tools/runit.py', - 'python', - 'build/scripts/common/cros_chromite.py', - '-v' -], - 'pattern': - '.*/cros_chromite\\.py' -} -] diff -Nru oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/api/app_window/app_window_api.cc oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/api/app_window/app_window_api.cc --- oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/api/app_window/app_window_api.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/api/app_window/app_window_api.cc 2015-06-23 12:14:28.000000000 +0000 @@ -335,8 +335,10 @@ AppWindowClient::Get()->CreateAppWindow(browser_context(), extension()); app_window->Init(url, new AppWindowContentsImpl(app_window), create_params); - if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()) + if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode() && + !app_window->is_ime_window()) { app_window->ForcedFullscreen(); + } content::RenderViewHost* created_view = app_window->web_contents()->GetRenderViewHost(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/api/app_window/app_window_apitest.cc oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/api/app_window/app_window_apitest.cc --- oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/api/app_window/app_window_apitest.cc 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/api/app_window/app_window_apitest.cc 2015-06-23 12:13:16.000000000 +0000 @@ -6,6 +6,7 @@ #include "base/strings/string_number_conversions.h" #include "chrome/browser/apps/app_browsertest_util.h" #include "chrome/browser/ui/browser.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/features/feature_channel.h" #include "chrome/test/base/testing_profile.h" #include "extensions/browser/app_window/app_window.h" @@ -198,6 +199,18 @@ "platform_apps/windows_api_ime/no_permissions_platform_app")) << message_; } + +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, + WindowsApiImeWindowNotFullscreen) { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + command_line->AppendSwitch(switches::kForceAppMode); + command_line->AppendSwitchASCII(switches::kAppId, + "jkghodnilhceideoidjikpgommlajknk"); + + EXPECT_TRUE(RunComponentExtensionTest( + "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) + << message_; +} #endif // OS_CHROMEOS } // namespace extensions diff -Nru oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/event_router.cc oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/event_router.cc --- oxide-qt-1.7.8/third_party/chromium/src/extensions/browser/event_router.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/extensions/browser/event_router.cc 2015-06-23 12:14:28.000000000 +0000 @@ -155,14 +155,30 @@ const EventFilteringInfo& info) { int event_id = g_extension_event_id.GetNext(); +#if defined(OS_CHROMEOS) + if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { + // This is called from WebRequest API. + // TODO(lazyboy): Skip this entirely: http://crbug.com/488747. + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&EventRouter::IncrementInFlightEventsOnUI, + browser_context_id, extension_id, event_id, event_name)); + } else { + IncrementInFlightEventsOnUI(browser_context_id, extension_id, event_id, + event_name); + } +#endif + DispatchExtensionMessage(ipc_sender, browser_context_id, extension_id, event_id, event_name, event_args.get(), user_gesture, info); +#if !defined(OS_CHROMEOS) BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&EventRouter::IncrementInFlightEventsOnUI, browser_context_id, extension_id, event_id, event_name)); +#endif } EventRouter::EventRouter(BrowserContext* browser_context, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/extensions/DEPS oxide-qt-1.7.9/third_party/chromium/src/extensions/DEPS --- oxide-qt-1.7.8/third_party/chromium/src/extensions/DEPS 2015-04-21 09:27:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/extensions/DEPS 2015-06-23 12:14:28.000000000 +0000 @@ -47,6 +47,7 @@ "+chrome/browser/extensions/test_extension_prefs.h", "+chrome/browser/extensions/test_extension_system.h", "+chrome/browser/ui/browser.h", + "+chrome/common/chrome_switches.h", "+chrome/common/extensions/features/feature_channel.h", "+chrome/test/base/chrome_render_view_test.h", "+chrome/test/base/testing_profile.h", Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/gpu/command_buffer/service/feature_info.cc oxide-qt-1.7.9/third_party/chromium/src/gpu/command_buffer/service/feature_info.cc --- oxide-qt-1.7.8/third_party/chromium/src/gpu/command_buffer/service/feature_info.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/gpu/command_buffer/service/feature_info.cc 2015-06-23 12:14:28.000000000 +0000 @@ -1017,38 +1017,40 @@ feature_flags_.chromium_sync_query = true; } - bool blend_equation_advanced_coherent = - extensions.Contains("GL_NV_blend_equation_advanced_coherent") || - extensions.Contains("GL_KHR_blend_equation_advanced_coherent"); + if (!workarounds_.disable_blend_equation_advanced) { + bool blend_equation_advanced_coherent = + extensions.Contains("GL_NV_blend_equation_advanced_coherent") || + extensions.Contains("GL_KHR_blend_equation_advanced_coherent"); - if (blend_equation_advanced_coherent || - extensions.Contains("GL_NV_blend_equation_advanced") || - extensions.Contains("GL_KHR_blend_equation_advanced")) { - const GLenum equations[] = {GL_MULTIPLY_KHR, - GL_SCREEN_KHR, - GL_OVERLAY_KHR, - GL_DARKEN_KHR, - GL_LIGHTEN_KHR, - GL_COLORDODGE_KHR, - GL_COLORBURN_KHR, - GL_HARDLIGHT_KHR, - GL_SOFTLIGHT_KHR, - GL_DIFFERENCE_KHR, - GL_EXCLUSION_KHR, - GL_HSL_HUE_KHR, - GL_HSL_SATURATION_KHR, - GL_HSL_COLOR_KHR, - GL_HSL_LUMINOSITY_KHR}; + if (blend_equation_advanced_coherent || + extensions.Contains("GL_NV_blend_equation_advanced") || + extensions.Contains("GL_KHR_blend_equation_advanced")) { + const GLenum equations[] = {GL_MULTIPLY_KHR, + GL_SCREEN_KHR, + GL_OVERLAY_KHR, + GL_DARKEN_KHR, + GL_LIGHTEN_KHR, + GL_COLORDODGE_KHR, + GL_COLORBURN_KHR, + GL_HARDLIGHT_KHR, + GL_SOFTLIGHT_KHR, + GL_DIFFERENCE_KHR, + GL_EXCLUSION_KHR, + GL_HSL_HUE_KHR, + GL_HSL_SATURATION_KHR, + GL_HSL_COLOR_KHR, + GL_HSL_LUMINOSITY_KHR}; - for (GLenum equation : equations) - validators_.equation.AddValue(equation); - if (blend_equation_advanced_coherent) - AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); + for (GLenum equation : equations) + validators_.equation.AddValue(equation); + if (blend_equation_advanced_coherent) + AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); - AddExtensionString("GL_KHR_blend_equation_advanced"); - feature_flags_.blend_equation_advanced = true; - feature_flags_.blend_equation_advanced_coherent = - blend_equation_advanced_coherent; + AddExtensionString("GL_KHR_blend_equation_advanced"); + feature_flags_.blend_equation_advanced = true; + feature_flags_.blend_equation_advanced_coherent = + blend_equation_advanced_coherent; + } } if (extensions.Contains("GL_NV_path_rendering")) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/gpu/command_buffer/service/feature_info_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/gpu/command_buffer/service/feature_info_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/gpu/command_buffer/service/feature_info_unittest.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/gpu/command_buffer/service/feature_info_unittest.cc 2015-06-23 12:14:28.000000000 +0000 @@ -1386,6 +1386,18 @@ EXPECT_FALSE(gfx::GLFence::IsSupported()); } +TEST_F(FeatureInfoTest, BlendEquationAdvancedDisabled) { + base::CommandLine command_line(0, NULL); + command_line.AppendSwitchASCII( + switches::kGpuDriverBugWorkarounds, + base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); + SetupInitExpectationsWithCommandLine( + "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", + command_line); + EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); + EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent); +} + TEST_F(FeatureInfoTest, InitializeCHROMIUM_path_rendering) { SetupInitExpectationsWithGLVersion( "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access", diff -Nru oxide-qt-1.7.8/third_party/chromium/src/gpu/config/gpu_driver_bug_list_json.cc oxide-qt-1.7.9/third_party/chromium/src/gpu/config/gpu_driver_bug_list_json.cc --- oxide-qt-1.7.8/third_party/chromium/src/gpu/config/gpu_driver_bug_list_json.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/gpu/config/gpu_driver_bug_list_json.cc 2015-06-23 12:14:28.000000000 +0000 @@ -19,7 +19,7 @@ { "name": "gpu driver bug list", // Please update the version number whenever you change this file. - "version": "7.27", + "version": "8.07", "entries": [ { "id": 1, @@ -507,13 +507,13 @@ }, { "id": 42, - "cr_bugs": [290876], + "cr_bugs": [290876, 488463], "description": "Framebuffer discarding causes flickering on older IMG drivers", "os": { "type": "android" }, "gl_vendor": "Imagination.*", - "gl_renderer": "PowerVR SGX 540", + "gl_renderer": "PowerVR SGX 5.*", "features": [ "disable_discard_framebuffer" ] @@ -607,7 +607,8 @@ }, "gl_vendor": "Qualcomm.*", "features": [ - "disable_chromium_framebuffer_multisample" + "disable_chromium_framebuffer_multisample", + "disable_multisampled_render_to_texture" ] }, { @@ -1258,6 +1259,19 @@ "features": [ "disable_egl_khr_wait_sync" ] + }, + { + "id": 117, + "description": "GL_KHR_blend_equation_advanced breaks blending on Adreno 4xx", + "cr_bugs": [488485], + "os": { + "type": "android" + }, + "gl_vendor": "Qualcomm.*", + "gl_renderer": ".*4\\d\\d", + "features": [ + "disable_blend_equation_advanced" + ] } ] } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/gpu/config/gpu_driver_bug_workaround_type.h oxide-qt-1.7.9/third_party/chromium/src/gpu/config/gpu_driver_bug_workaround_type.h --- oxide-qt-1.7.8/third_party/chromium/src/gpu/config/gpu_driver_bug_workaround_type.h 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/gpu/config/gpu_driver_bug_workaround_type.h 2015-06-23 12:14:28.000000000 +0000 @@ -24,6 +24,8 @@ disable_arb_sync) \ GPU_OP(DISABLE_ASYNC_READPIXELS, \ disable_async_readpixels) \ + GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \ + disable_blend_equation_advanced) \ GPU_OP(DISABLE_CHROMIUM_FRAMEBUFFER_MULTISAMPLE, \ disable_chromium_framebuffer_multisample) \ GPU_OP(DISABLE_D3D11, \ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/media/cdm/ppapi/api/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/media/cdm/ppapi/api/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/media/midi/midi_manager_win.cc oxide-qt-1.7.9/third_party/chromium/src/media/midi/midi_manager_win.cc --- oxide-qt-1.7.8/third_party/chromium/src/media/midi/midi_manager_win.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/media/midi/midi_manager_win.cc 2015-06-23 12:14:29.000000000 +0000 @@ -305,6 +305,12 @@ } } +bool IsUnsupportedDevice(const MidiDeviceInfo& info) { + return info.manufacturer_id == MM_MICROSOFT && + (info.product_id == MM_MSFT_WDMAUDIO_MIDIOUT || + info.product_id == MM_MSFT_GENERIC_MIDISYNTH); +} + using PortNumberCache = base::hash_map< MidiDeviceInfo, std::priority_queue, std::greater>, @@ -828,6 +834,8 @@ make_scoped_refptr(new MidiOutputDeviceState(MidiDeviceInfo(caps))); state->midi_handle = midi_out_handle; const auto& state_device_info = state->device_info; + if (IsUnsupportedDevice(state_device_info)) + return; bool add_new_port = false; uint32 port_number = 0; { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/media/renderers/audio_renderer_impl.cc oxide-qt-1.7.9/third_party/chromium/src/media/renderers/audio_renderer_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/media/renderers/audio_renderer_impl.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/media/renderers/audio_renderer_impl.cc 2015-06-23 12:14:29.000000000 +0000 @@ -135,6 +135,7 @@ base::AutoUnlock auto_unlock(lock_); sink_->Pause(); + stop_rendering_time_ = last_render_time_; } void AudioRendererImpl::SetMediaTime(base::TimeDelta time) { @@ -147,7 +148,7 @@ start_timestamp_ = time; ended_timestamp_ = kInfiniteDuration(); - last_render_ticks_ = base::TimeTicks(); + last_render_time_ = stop_rendering_time_ = base::TimeTicks(); first_packet_timestamp_ = kNoTimestamp(); audio_clock_.reset(new AudioClock(time, audio_parameters_.sample_rate())); } @@ -168,8 +169,11 @@ base::TimeTicks AudioRendererImpl::GetWallClockTime(base::TimeDelta time) { base::AutoLock auto_lock(lock_); - if (last_render_ticks_.is_null() || playback_rate_ == 0.0) + if (last_render_time_.is_null() || !stop_rendering_time_.is_null() || + !playback_rate_ || buffering_state_ != BUFFERING_HAVE_ENOUGH || + !sink_playing_) { return base::TimeTicks(); + } base::TimeDelta base_time; if (time < audio_clock_->front_timestamp()) { @@ -179,12 +183,12 @@ base_time = audio_clock_->back_timestamp(); } else { // No need to estimate time, so return the actual wallclock time. - return last_render_ticks_ + audio_clock_->TimeUntilPlayback(time); + return last_render_time_ + audio_clock_->TimeUntilPlayback(time); } // In practice, most calls will be estimates given the relatively small window // in which clients can get the actual time. - return last_render_ticks_ + audio_clock_->TimeUntilPlayback(base_time) + + return last_render_time_ + audio_clock_->TimeUntilPlayback(base_time) + base::TimeDelta::FromMicroseconds((time - base_time).InMicroseconds() / playback_rate_); } @@ -580,7 +584,12 @@ int frames_written = 0; { base::AutoLock auto_lock(lock_); - last_render_ticks_ = base::TimeTicks::Now(); + last_render_time_ = base::TimeTicks::Now(); + + if (!stop_rendering_time_.is_null()) { + // TODO(dalecurtis): Use |stop_rendering_time_| to advance the AudioClock. + stop_rendering_time_ = base::TimeTicks(); + } // Ensure Stop() hasn't destroyed our |algorithm_| on the pipeline thread. if (!algorithm_) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/media/renderers/audio_renderer_impl.h oxide-qt-1.7.9/third_party/chromium/src/media/renderers/audio_renderer_impl.h --- oxide-qt-1.7.8/third_party/chromium/src/media/renderers/audio_renderer_impl.h 2015-04-24 01:55:50.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/media/renderers/audio_renderer_impl.h 2015-06-23 12:14:29.000000000 +0000 @@ -256,7 +256,11 @@ // Set every Render() and used to provide an interpolated time value to // CurrentMediaTimeForSyncingVideo(). - base::TimeTicks last_render_ticks_; + base::TimeTicks last_render_time_; + + // Set to the value of |last_render_time_| when StopRendering_Locked() is + // called for any reason. Cleared by the next successful Render() call. + base::TimeTicks stop_rendering_time_; // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). // Used to determine how long to delay playback. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/media/renderers/renderer_impl.cc oxide-qt-1.7.9/third_party/chromium/src/media/renderers/renderer_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/media/renderers/renderer_impl.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/media/renderers/renderer_impl.cc 2015-06-23 12:14:29.000000000 +0000 @@ -393,6 +393,10 @@ DCHECK_EQ(state_, STATE_FLUSHING); DCHECK(!flush_cb_.is_null()); + // If we had a deferred video renderer underflow prior to the flush, it should + // have been cleared by the audio renderer changing to BUFFERING_HAVE_NOTHING. + DCHECK(deferred_underflow_cb_.IsCancelled()); + DCHECK_EQ(audio_buffering_state_, BUFFERING_HAVE_NOTHING); audio_ended_ = false; FlushVideoRenderer(); @@ -445,10 +449,12 @@ bool was_waiting_for_enough_data = WaitingForEnoughData(); - // When audio is present, defer underflow callbacks for some time to avoid - // unnecessary glitches in audio; see http://crbug.com/144683#c53. + // When audio is present and has enough data, defer video underflow callbacks + // for some time to avoid unnecessary glitches in audio; see + // http://crbug.com/144683#c53. if (audio_renderer_ && !is_audio && state_ == STATE_PLAYING) { if (video_buffering_state_ == BUFFERING_HAVE_ENOUGH && + audio_buffering_state_ == BUFFERING_HAVE_ENOUGH && new_buffering_state == BUFFERING_HAVE_NOTHING && deferred_underflow_cb_.IsCancelled()) { deferred_underflow_cb_.Reset(base::Bind( diff -Nru oxide-qt-1.7.8/third_party/chromium/src/media/renderers/renderer_impl_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/media/renderers/renderer_impl_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/media/renderers/renderer_impl_unittest.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/media/renderers/renderer_impl_unittest.cc 2015-06-23 12:14:29.000000000 +0000 @@ -532,4 +532,42 @@ base::RunLoop().RunUntilIdle(); } +TEST_F(RendererImplTest, VideoUnderflowWithAudioFlush) { + InitializeWithAudioAndVideo(); + Play(); + + // Set a massive threshold such that it shouldn't fire within this test. + renderer_impl_->set_video_underflow_threshold_for_testing( + base::TimeDelta::FromSeconds(100)); + + // Simulate the cases where audio underflows and then video underflows. + EXPECT_CALL(time_source_, StopTicking()); + audio_buffering_state_cb_.Run(BUFFERING_HAVE_NOTHING); + video_buffering_state_cb_.Run(BUFFERING_HAVE_NOTHING); + Mock::VerifyAndClearExpectations(&time_source_); + + // Flush the audio and video renderers, both think they're in an underflow + // state, but if the video renderer underflow was deferred, RendererImpl would + // think it still has enough data. + EXPECT_CALL(*audio_renderer_, Flush(_)).WillOnce(RunClosure<0>()); + EXPECT_CALL(*video_renderer_, Flush(_)).WillOnce(RunClosure<0>()); + EXPECT_CALL(callbacks_, OnFlushed()); + renderer_impl_->Flush( + base::Bind(&CallbackHelper::OnFlushed, base::Unretained(&callbacks_))); + base::RunLoop().RunUntilIdle(); + + // Start playback after the flush, but never return BUFFERING_HAVE_ENOUGH from + // the video renderer (which simulates spool up time for the video renderer). + const base::TimeDelta kStartTime; + EXPECT_CALL(time_source_, SetMediaTime(kStartTime)); + EXPECT_CALL(*audio_renderer_, StartPlaying()) + .WillOnce( + SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH)); + EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); + renderer_impl_->StartPlayingFrom(kStartTime); + + // Nothing else should primed on the message loop. + base::RunLoop().RunUntilIdle(); +} + } // namespace media Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/native_client/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/native_client/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/net/dns/host_resolver_impl.cc oxide-qt-1.7.9/third_party/chromium/src/net/dns/host_resolver_impl.cc --- oxide-qt-1.7.8/third_party/chromium/src/net/dns/host_resolver_impl.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/net/dns/host_resolver_impl.cc 2015-06-23 12:14:29.000000000 +0000 @@ -74,6 +74,15 @@ const char kLocalhost[] = "localhost."; +// Time between IPv6 probes, i.e. for how long results of each IPv6 probe are +// cached. +const int kIPv6ProbePeriodMs = 1000; + +// Google DNS address used for IPv6 probes. +const uint8_t kIPv6ProbeAddress[] = + { 0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88 }; + // We use a separate histogram name for each platform to facilitate the // display of error codes by their symbolic name (since each platform has // different mappings). @@ -381,6 +390,15 @@ return config->ToValue(); } +base::Value* NetLogIPv6AvailableCallback(bool ipv6_available, + bool cached, + NetLog::LogLevel /* log_level */) { + base::DictionaryValue* dict = new base::DictionaryValue(); + dict->SetBoolean("ipv6_available", ipv6_available); + dict->SetBoolean("cached", cached); + return dict; +} + // The logging routines are defined here because some requests are resolved // without a Request object. @@ -1840,6 +1858,7 @@ num_dns_failures_(0), probe_ipv6_support_(true), use_local_ipv6_(false), + last_ipv6_probe_result_(true), resolved_known_ipv6_hostname_(false), additional_resolver_flags_(0), fallback_to_proctask_(true), @@ -2179,7 +2198,7 @@ } HostResolverImpl::Key HostResolverImpl::GetEffectiveKeyForRequest( - const RequestInfo& info, const BoundNetLog& net_log) const { + const RequestInfo& info, const BoundNetLog& net_log) { HostResolverFlags effective_flags = info.host_resolver_flags() | additional_resolver_flags_; AddressFamily effective_address_family = info.address_family(); @@ -2192,21 +2211,7 @@ // Don't bother IPv6 probing when resolving IPv4 literals. url::IPv4AddressToNumber(info.hostname().c_str(), host_comp, ip_number, &num_components) != url::CanonHostInfo::IPV4) { - // Google DNS address. - const uint8 kIPv6Address[] = - { 0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88 }; - IPAddressNumber address(kIPv6Address, - kIPv6Address + arraysize(kIPv6Address)); - BoundNetLog probe_net_log = BoundNetLog::Make( - net_log.net_log(), NetLog::SOURCE_IPV6_REACHABILITY_CHECK); - probe_net_log.BeginEvent(NetLog::TYPE_IPV6_REACHABILITY_CHECK, - net_log.source().ToEventParametersCallback()); - bool rv6 = IsGloballyReachable(address, probe_net_log); - probe_net_log.EndEvent(NetLog::TYPE_IPV6_REACHABILITY_CHECK); - if (rv6) { - net_log.AddEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_IPV6_SUPPORTED); - } else { + if (!IsIPv6Reachable(net_log)) { effective_address_family = ADDRESS_FAMILY_IPV4; effective_flags |= HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6; } @@ -2224,6 +2229,22 @@ return Key(hostname, effective_address_family, effective_flags); } +bool HostResolverImpl::IsIPv6Reachable(const BoundNetLog& net_log) { + base::TimeTicks now = base::TimeTicks::Now(); + bool cached = true; + if ((now - last_ipv6_probe_time_).InMilliseconds() > kIPv6ProbePeriodMs) { + IPAddressNumber address(kIPv6ProbeAddress, + kIPv6ProbeAddress + arraysize(kIPv6ProbeAddress)); + last_ipv6_probe_result_ = IsGloballyReachable(address, net_log); + last_ipv6_probe_time_ = now; + cached = false; + } + net_log.AddEvent(NetLog::TYPE_IPV6_REACHABILITY_CHECK, + base::Bind(&NetLogIPv6AvailableCallback, + last_ipv6_probe_result_, cached)); + return last_ipv6_probe_result_; +} + void HostResolverImpl::AbortAllInProgressJobs() { // In Abort, a Request callback could spawn new Jobs with matching keys, so // first collect and remove all running jobs from |jobs_|. @@ -2293,6 +2314,7 @@ void HostResolverImpl::OnIPAddressChanged() { resolved_known_ipv6_hostname_ = false; + last_ipv6_probe_time_ = base::TimeTicks(); // Abandon all ProbeJobs. probe_weak_ptr_factory_.InvalidateWeakPtrs(); if (cache_.get()) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/net/dns/host_resolver_impl.h oxide-qt-1.7.9/third_party/chromium/src/net/dns/host_resolver_impl.h --- oxide-qt-1.7.8/third_party/chromium/src/net/dns/host_resolver_impl.h 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/net/dns/host_resolver_impl.h 2015-06-23 12:14:29.000000000 +0000 @@ -196,7 +196,12 @@ // "effective" address family by inheriting the resolver's default address // family when the request leaves it unspecified. Key GetEffectiveKeyForRequest(const RequestInfo& info, - const BoundNetLog& net_log) const; + const BoundNetLog& net_log); + + // Probes IPv6 support and returns true if IPv6 support is enabled. + // Results are cached, i.e. when called repeatedly this method returns result + // from the first probe for some time before probing again. + bool IsIPv6Reachable(const BoundNetLog& net_log); // Records the result in cache if cache is present. void CacheResult(const Key& key, @@ -277,6 +282,9 @@ // local IPv6 connectivity. Disables probing. bool use_local_ipv6_; + base::TimeTicks last_ipv6_probe_time_; + bool last_ipv6_probe_result_; + // True iff ProcTask has successfully resolved a hostname known to have IPv6 // addresses using ADDRESS_FAMILY_UNSPECIFIED. Reset on IP address change. bool resolved_known_ipv6_hostname_; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state.cc oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state.cc --- oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state.cc 2015-06-23 12:14:29.000000000 +0000 @@ -45,6 +45,8 @@ namespace { +#include "net/http/transport_security_state_static.h" + std::string HashesToBase64String(const HashValueVector& hashes) { std::string str; for (size_t i = 0; i != hashes.size(); ++i) { @@ -82,223 +84,13 @@ return true; } -} // namespace - -TransportSecurityState::TransportSecurityState() - : delegate_(NULL), enable_static_pins_(true) { -// Static pinning is only enabled for official builds to make sure that -// others don't end up with pins that cannot be easily updated. -#if !defined(OFFICIAL_BUILD) || defined(OS_ANDROID) || defined(OS_IOS) - enable_static_pins_ = false; -#endif - DCHECK(CalledOnValidThread()); -} - -TransportSecurityState::Iterator::Iterator(const TransportSecurityState& state) - : iterator_(state.enabled_hosts_.begin()), - end_(state.enabled_hosts_.end()) { -} - -TransportSecurityState::Iterator::~Iterator() {} - -bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { - DomainState state; - if (GetStaticDomainState(host, &state)) - return true; - return GetDynamicDomainState(host, &state); -} - -bool TransportSecurityState::ShouldUpgradeToSSL(const std::string& host) { - DomainState dynamic_state; - if (GetDynamicDomainState(host, &dynamic_state)) - return dynamic_state.ShouldUpgradeToSSL(); - - DomainState static_state; - if (GetStaticDomainState(host, &static_state) && - static_state.ShouldUpgradeToSSL()) { - return true; - } - - return false; -} - -bool TransportSecurityState::CheckPublicKeyPins( - const std::string& host, - bool is_issued_by_known_root, - const HashValueVector& public_key_hashes, - std::string* pinning_failure_log) { - // Perform pin validation if, and only if, all these conditions obtain: - // - // * the server's certificate chain chains up to a known root (i.e. not a - // user-installed trust anchor); and - // * the server actually has public key pins. - if (!is_issued_by_known_root || !HasPublicKeyPins(host)) { - return true; - } - - bool pins_are_valid = CheckPublicKeyPinsImpl( - host, public_key_hashes, pinning_failure_log); - if (!pins_are_valid) { - LOG(ERROR) << *pinning_failure_log; - ReportUMAOnPinFailure(host); - } - - UMA_HISTOGRAM_BOOLEAN("Net.PublicKeyPinSuccess", pins_are_valid); - return pins_are_valid; -} - -bool TransportSecurityState::HasPublicKeyPins(const std::string& host) { - DomainState dynamic_state; - if (GetDynamicDomainState(host, &dynamic_state)) - return dynamic_state.HasPublicKeyPins(); - - DomainState static_state; - if (GetStaticDomainState(host, &static_state)) { - if (static_state.HasPublicKeyPins()) - return true; - } - - return false; -} - -void TransportSecurityState::SetDelegate( - TransportSecurityState::Delegate* delegate) { - DCHECK(CalledOnValidThread()); - delegate_ = delegate; -} - -void TransportSecurityState::AddHSTSInternal( - const std::string& host, - TransportSecurityState::DomainState::UpgradeMode upgrade_mode, - const base::Time& expiry, - bool include_subdomains) { - DCHECK(CalledOnValidThread()); - - // Copy-and-modify the existing DomainState for this host (if any). - DomainState domain_state; - const std::string canonicalized_host = CanonicalizeHost(host); - const std::string hashed_host = HashHost(canonicalized_host); - DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); - if (i != enabled_hosts_.end()) - domain_state = i->second; - - domain_state.sts.last_observed = base::Time::Now(); - domain_state.sts.include_subdomains = include_subdomains; - domain_state.sts.expiry = expiry; - domain_state.sts.upgrade_mode = upgrade_mode; - EnableHost(host, domain_state); -} - -void TransportSecurityState::AddHPKPInternal(const std::string& host, - const base::Time& last_observed, - const base::Time& expiry, - bool include_subdomains, - const HashValueVector& hashes) { - DCHECK(CalledOnValidThread()); - - // Copy-and-modify the existing DomainState for this host (if any). - DomainState domain_state; - const std::string canonicalized_host = CanonicalizeHost(host); - const std::string hashed_host = HashHost(canonicalized_host); - DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); - if (i != enabled_hosts_.end()) - domain_state = i->second; - - domain_state.pkp.last_observed = last_observed; - domain_state.pkp.expiry = expiry; - domain_state.pkp.include_subdomains = include_subdomains; - domain_state.pkp.spki_hashes = hashes; - EnableHost(host, domain_state); -} - -void TransportSecurityState::EnableHost(const std::string& host, - const DomainState& state) { - DCHECK(CalledOnValidThread()); - - const std::string canonicalized_host = CanonicalizeHost(host); - if (canonicalized_host.empty()) - return; - - DomainState state_copy(state); - // No need to store this value since it is redundant. (|canonicalized_host| - // is the map key.) - state_copy.sts.domain.clear(); - state_copy.pkp.domain.clear(); - - enabled_hosts_[HashHost(canonicalized_host)] = state_copy; - DirtyNotify(); -} - -bool TransportSecurityState::DeleteDynamicDataForHost(const std::string& host) { - DCHECK(CalledOnValidThread()); - - const std::string canonicalized_host = CanonicalizeHost(host); - if (canonicalized_host.empty()) - return false; - - DomainStateMap::iterator i = enabled_hosts_.find( - HashHost(canonicalized_host)); - if (i != enabled_hosts_.end()) { - enabled_hosts_.erase(i); - DirtyNotify(); - return true; - } - return false; -} - -void TransportSecurityState::ClearDynamicData() { - DCHECK(CalledOnValidThread()); - enabled_hosts_.clear(); -} - -void TransportSecurityState::DeleteAllDynamicDataSince(const base::Time& time) { - DCHECK(CalledOnValidThread()); - - bool dirtied = false; - DomainStateMap::iterator i = enabled_hosts_.begin(); - while (i != enabled_hosts_.end()) { - // Clear STS and PKP state independently. - if (i->second.sts.last_observed >= time) { - dirtied = true; - i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT; - } - if (i->second.pkp.last_observed >= time) { - dirtied = true; - i->second.pkp.spki_hashes.clear(); - i->second.pkp.expiry = base::Time(); - } - - // If both are now invalid, drop the entry altogether. - if (!i->second.ShouldUpgradeToSSL() && !i->second.HasPublicKeyPins()) { - dirtied = true; - enabled_hosts_.erase(i++); - continue; - } - - ++i; - } - - if (dirtied) - DirtyNotify(); -} - -TransportSecurityState::~TransportSecurityState() { - DCHECK(CalledOnValidThread()); -} - -void TransportSecurityState::DirtyNotify() { - DCHECK(CalledOnValidThread()); - - if (delegate_) - delegate_->StateIsDirty(this); -} - -// static -std::string TransportSecurityState::CanonicalizeHost(const std::string& host) { +// Converts |hostname| from dotted form ("www.google.com") to the form +// used in DNS: "\x03www\x06google\x03com", lowercases that, and returns +// the result. +std::string CanonicalizeHost(const std::string& host) { // We cannot perform the operations as detailed in the spec here as |host| // has already undergone IDN processing before it reached us. Thus, we check // that there are no invalid characters in the host and lowercase the result. - std::string new_host; if (!DNSDomainFromDot(host, &new_host)) { // DNSDomainFromDot can fail if any label is > 63 bytes or if the whole @@ -454,8 +246,6 @@ const size_t tree_bytes_; }; -#include "net/http/transport_security_state_static.h" - // PreloadResult is the result of resolving a specific name in the preloaded // data. struct PreloadResult { @@ -495,7 +285,7 @@ // // Dispatch tables are always given in order, but the "end of string" (zero) // value always comes before an entry for '.'. -bool DecodeHSTSPreloadRaw(const std::string& hostname, +bool DecodeHSTSPreloadRaw(const std::string& search_hostname, bool* out_found, PreloadResult* out) { HuffmanDecoder huffman(kHSTSHuffmanTree, sizeof(kHSTSHuffmanTree)); @@ -506,9 +296,30 @@ *out_found = false; + // Ensure that |search_hostname| is a valid hostname before + // processing. + if (CanonicalizeHost(search_hostname).empty()) { + return true; + } + + // Normalize any trailing '.' used for DNS suffix searches. + std::string hostname = search_hostname; + size_t found = hostname.find_last_not_of('.'); + if (found != std::string::npos) { + hostname.erase(found + 1); + } else { + hostname.clear(); + } + + // |hostname| has already undergone IDN conversion, so should be + // entirely A-Labels. The preload data is entirely normalized to + // lower case. + base::StringToLowerASCII(&hostname); + if (hostname.empty()) { return true; } + // hostname_offset contains one more than the index of the current character // in the hostname that is being considered. It's one greater so that we can // represent the position just before the beginning (with zero). @@ -663,6 +474,218 @@ return found; } +} // namespace + +TransportSecurityState::TransportSecurityState() + : delegate_(NULL), enable_static_pins_(true) { +// Static pinning is only enabled for official builds to make sure that +// others don't end up with pins that cannot be easily updated. +#if !defined(OFFICIAL_BUILD) || defined(OS_ANDROID) || defined(OS_IOS) + enable_static_pins_ = false; +#endif + DCHECK(CalledOnValidThread()); +} + +TransportSecurityState::Iterator::Iterator(const TransportSecurityState& state) + : iterator_(state.enabled_hosts_.begin()), + end_(state.enabled_hosts_.end()) { +} + +TransportSecurityState::Iterator::~Iterator() { +} + +bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { + DomainState state; + if (GetStaticDomainState(host, &state)) + return true; + return GetDynamicDomainState(host, &state); +} + +bool TransportSecurityState::ShouldUpgradeToSSL(const std::string& host) { + DomainState dynamic_state; + if (GetDynamicDomainState(host, &dynamic_state)) + return dynamic_state.ShouldUpgradeToSSL(); + + DomainState static_state; + if (GetStaticDomainState(host, &static_state) && + static_state.ShouldUpgradeToSSL()) { + return true; + } + + return false; +} + +bool TransportSecurityState::CheckPublicKeyPins( + const std::string& host, + bool is_issued_by_known_root, + const HashValueVector& public_key_hashes, + std::string* pinning_failure_log) { + // Perform pin validation if, and only if, all these conditions obtain: + // + // * the server's certificate chain chains up to a known root (i.e. not a + // user-installed trust anchor); and + // * the server actually has public key pins. + if (!is_issued_by_known_root || !HasPublicKeyPins(host)) { + return true; + } + + bool pins_are_valid = + CheckPublicKeyPinsImpl(host, public_key_hashes, pinning_failure_log); + if (!pins_are_valid) { + LOG(ERROR) << *pinning_failure_log; + ReportUMAOnPinFailure(host); + } + + UMA_HISTOGRAM_BOOLEAN("Net.PublicKeyPinSuccess", pins_are_valid); + return pins_are_valid; +} + +bool TransportSecurityState::HasPublicKeyPins(const std::string& host) { + DomainState dynamic_state; + if (GetDynamicDomainState(host, &dynamic_state)) + return dynamic_state.HasPublicKeyPins(); + + DomainState static_state; + if (GetStaticDomainState(host, &static_state)) { + if (static_state.HasPublicKeyPins()) + return true; + } + + return false; +} + +void TransportSecurityState::SetDelegate( + TransportSecurityState::Delegate* delegate) { + DCHECK(CalledOnValidThread()); + delegate_ = delegate; +} + +void TransportSecurityState::AddHSTSInternal( + const std::string& host, + TransportSecurityState::DomainState::UpgradeMode upgrade_mode, + const base::Time& expiry, + bool include_subdomains) { + DCHECK(CalledOnValidThread()); + + // Copy-and-modify the existing DomainState for this host (if any). + DomainState domain_state; + const std::string canonicalized_host = CanonicalizeHost(host); + const std::string hashed_host = HashHost(canonicalized_host); + DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); + if (i != enabled_hosts_.end()) + domain_state = i->second; + + domain_state.sts.last_observed = base::Time::Now(); + domain_state.sts.include_subdomains = include_subdomains; + domain_state.sts.expiry = expiry; + domain_state.sts.upgrade_mode = upgrade_mode; + EnableHost(host, domain_state); +} + +void TransportSecurityState::AddHPKPInternal(const std::string& host, + const base::Time& last_observed, + const base::Time& expiry, + bool include_subdomains, + const HashValueVector& hashes) { + DCHECK(CalledOnValidThread()); + + // Copy-and-modify the existing DomainState for this host (if any). + DomainState domain_state; + const std::string canonicalized_host = CanonicalizeHost(host); + const std::string hashed_host = HashHost(canonicalized_host); + DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); + if (i != enabled_hosts_.end()) + domain_state = i->second; + + domain_state.pkp.last_observed = last_observed; + domain_state.pkp.expiry = expiry; + domain_state.pkp.include_subdomains = include_subdomains; + domain_state.pkp.spki_hashes = hashes; + EnableHost(host, domain_state); +} + +void TransportSecurityState::EnableHost(const std::string& host, + const DomainState& state) { + DCHECK(CalledOnValidThread()); + + const std::string canonicalized_host = CanonicalizeHost(host); + if (canonicalized_host.empty()) + return; + + DomainState state_copy(state); + // No need to store this value since it is redundant. (|canonicalized_host| + // is the map key.) + state_copy.sts.domain.clear(); + state_copy.pkp.domain.clear(); + + enabled_hosts_[HashHost(canonicalized_host)] = state_copy; + DirtyNotify(); +} + +bool TransportSecurityState::DeleteDynamicDataForHost(const std::string& host) { + DCHECK(CalledOnValidThread()); + + const std::string canonicalized_host = CanonicalizeHost(host); + if (canonicalized_host.empty()) + return false; + + DomainStateMap::iterator i = + enabled_hosts_.find(HashHost(canonicalized_host)); + if (i != enabled_hosts_.end()) { + enabled_hosts_.erase(i); + DirtyNotify(); + return true; + } + return false; +} + +void TransportSecurityState::ClearDynamicData() { + DCHECK(CalledOnValidThread()); + enabled_hosts_.clear(); +} + +void TransportSecurityState::DeleteAllDynamicDataSince(const base::Time& time) { + DCHECK(CalledOnValidThread()); + + bool dirtied = false; + DomainStateMap::iterator i = enabled_hosts_.begin(); + while (i != enabled_hosts_.end()) { + // Clear STS and PKP state independently. + if (i->second.sts.last_observed >= time) { + dirtied = true; + i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT; + } + if (i->second.pkp.last_observed >= time) { + dirtied = true; + i->second.pkp.spki_hashes.clear(); + i->second.pkp.expiry = base::Time(); + } + + // If both are now invalid, drop the entry altogether. + if (!i->second.ShouldUpgradeToSSL() && !i->second.HasPublicKeyPins()) { + dirtied = true; + enabled_hosts_.erase(i++); + continue; + } + + ++i; + } + + if (dirtied) + DirtyNotify(); +} + +TransportSecurityState::~TransportSecurityState() { + DCHECK(CalledOnValidThread()); +} + +void TransportSecurityState::DirtyNotify() { + DCHECK(CalledOnValidThread()); + + if (delegate_) + delegate_->StateIsDirty(this); +} + bool TransportSecurityState::AddHSTSHeader(const std::string& host, const std::string& value) { DCHECK(CalledOnValidThread()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state.h oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state.h --- oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state.h 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state.h 2015-06-23 12:14:29.000000000 +0000 @@ -193,8 +193,7 @@ void ClearDynamicData(); // Inserts |state| into |enabled_hosts_| under the key |hashed_host|. - // |hashed_host| is already in the internal representation - // HashHost(CanonicalizeHost(host)). + // |hashed_host| is already in the internal representation. // Note: This is only used for serializing/deserializing the // TransportSecurityState. void AddOrUpdateEnabledHosts(const std::string& hashed_host, @@ -319,11 +318,6 @@ // The new state for |host| is persisted using the Delegate (if any). void EnableHost(const std::string& host, const DomainState& state); - // Converts |hostname| from dotted form ("www.google.com") to the form - // used in DNS: "\x03www\x06google\x03com", lowercases that, and returns - // the result. - static std::string CanonicalizeHost(const std::string& hostname); - // The set of hosts that have enabled TransportSecurity. |sts.domain| and // |pkp.domain| will always be empty for a DomainState in this map; the domain // comes from the map key instead. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/net/http/transport_security_state_unittest.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/net/http/transport_security_state_unittest.cc 2015-06-23 12:14:29.000000000 +0000 @@ -71,6 +71,64 @@ } }; +TEST_F(TransportSecurityStateTest, DomainNameOddities) { + TransportSecurityState state; + const base::Time current_time(base::Time::Now()); + const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000); + + // DNS suffix search tests. Some DNS resolvers allow a terminal "." to + // indicate not perform DNS suffix searching. Ensure that regardless + // of how this is treated at the resolver layer, or at the URL/origin + // layer (that is, whether they are treated as equivalent or distinct), + // ensure that for policy matching, something lacking a terminal "." + // is equivalent to something with a terminal "." + EXPECT_FALSE(state.ShouldUpgradeToSSL("example.com")); + + state.AddHSTS("example.com", expiry, true /* include_subdomains */); + EXPECT_TRUE(state.ShouldUpgradeToSSL("example.com")); + // Trailing '.' should be equivalent; it's just a resolver hint + EXPECT_TRUE(state.ShouldUpgradeToSSL("example.com.")); + // Leading '.' should be invalid + EXPECT_FALSE(state.ShouldUpgradeToSSL(".example.com")); + // Subdomains should work regardless + EXPECT_TRUE(state.ShouldUpgradeToSSL("sub.example.com")); + EXPECT_TRUE(state.ShouldUpgradeToSSL("sub.example.com.")); + // But invalid subdomains should be rejected + EXPECT_FALSE(state.ShouldUpgradeToSSL("sub..example.com")); + EXPECT_FALSE(state.ShouldUpgradeToSSL("sub..example.com.")); + + // Now try the inverse form + TransportSecurityState state2; + state2.AddHSTS("example.net.", expiry, true /* include_subdomains */); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("example.net.")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("example.net")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("sub.example.net.")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("sub.example.net")); + + // Finally, test weird things + TransportSecurityState state3; + state3.AddHSTS("", expiry, true /* include_subdomains */); + EXPECT_FALSE(state3.ShouldUpgradeToSSL("")); + EXPECT_FALSE(state3.ShouldUpgradeToSSL(".")); + EXPECT_FALSE(state3.ShouldUpgradeToSSL("...")); + // Make sure it didn't somehow apply HSTS to the world + EXPECT_FALSE(state3.ShouldUpgradeToSSL("example.org")); + + TransportSecurityState state4; + state4.AddHSTS(".", expiry, true /* include_subdomains */); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL(".")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("...")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("example.org")); + + // Now do the same for preloaded entries + TransportSecurityState state5; + EXPECT_TRUE(state5.ShouldUpgradeToSSL("accounts.google.com")); + EXPECT_TRUE(state5.ShouldUpgradeToSSL("accounts.google.com.")); + EXPECT_FALSE(state5.ShouldUpgradeToSSL("accounts..google.com")); + EXPECT_FALSE(state5.ShouldUpgradeToSSL("accounts..google.com.")); +} + TEST_F(TransportSecurityStateTest, SimpleMatches) { TransportSecurityState state; const base::Time current_time(base::Time::Now()); @@ -123,10 +181,15 @@ const base::Time current_time(base::Time::Now()); const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000); + // Check dynamic entries EXPECT_FALSE(state.ShouldUpgradeToSSL("YAhoo.coM")); bool include_subdomains = false; state.AddHSTS("yahoo.com", expiry, include_subdomains); EXPECT_TRUE(state.ShouldUpgradeToSSL("YAhoo.coM")); + + // Check static entries + EXPECT_TRUE(state.ShouldUpgradeToSSL("AccounTs.GooGle.com")); + EXPECT_TRUE(state.ShouldUpgradeToSSL("mail.google.COM")); } TEST_F(TransportSecurityStateTest, SubdomainMatches) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.cc oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.cc --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.cc 2015-06-23 12:13:19.000000000 +0000 @@ -32,6 +32,14 @@ return found->second; } +void PluginResourceTracker::AbandonResource(PP_Resource res) { + DCHECK(GetResource(res)); + bool inserted = abandoned_resources_.insert(res).second; + DCHECK(inserted); + + ReleaseResource(res); +} + PP_Resource PluginResourceTracker::AddResource(Resource* object) { // If there's a HostResource, it must not be added twice. DCHECK(!object->host_resource().host_resource() || @@ -56,9 +64,16 @@ host_resource_map_.end()); host_resource_map_.erase(object->host_resource()); + bool abandoned = false; + auto it = abandoned_resources_.find(object->pp_resource()); + if (it != abandoned_resources_.end()) { + abandoned = true; + abandoned_resources_.erase(it); + } + PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(object->pp_instance()); - if (dispatcher) { + if (dispatcher && !abandoned) { // The dispatcher can be NULL if the plugin held on to a resource after // the instance was destroyed. In that case the browser-side resource has // already been freed correctly on the browser side. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.h oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.h --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.h 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/plugin_resource_tracker.h 2015-06-23 12:14:29.000000000 +0000 @@ -9,6 +9,7 @@ #include #include "base/compiler_specific.h" +#include "base/containers/hash_tables.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" @@ -34,6 +35,19 @@ PP_Resource PluginResourceForHostResource( const HostResource& resource) const; + // "Abandons" a PP_Resource on the plugin side. This releases a reference to + // the resource and allows the plugin side of the resource (the proxy + // resource) to be destroyed without sending a message to the renderer + // notifing it that the plugin has released the resource. This is useful when + // the plugin sends a resource to the renderer in reply to a sync IPC. The + // plugin would want to release its reference to the reply resource straight + // away but doing so can sometimes cause the resource to be deleted in the + // renderer before the sync IPC reply has been received giving the renderer a + // chance to add a ref to it. (see e.g. crbug.com/490611). Instead the + // renderer assumes responsibility for the ref that the plugin created and + // this function can be called. + void AbandonResource(PP_Resource res); + protected: // ResourceTracker overrides. virtual PP_Resource AddResource(Resource* object) override; @@ -44,6 +58,8 @@ typedef std::map HostResourceMap; HostResourceMap host_resource_map_; + base::hash_set abandoned_resources_; + DISALLOW_COPY_AND_ASSIGN(PluginResourceTracker); }; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/ppp_printing_proxy.cc oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/ppp_printing_proxy.cc --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/proxy/ppp_printing_proxy.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/proxy/ppp_printing_proxy.cc 2015-06-23 12:13:19.000000000 +0000 @@ -10,6 +10,7 @@ #include "ppapi/c/dev/ppp_printing_dev.h" #include "ppapi/proxy/host_dispatcher.h" #include "ppapi/proxy/plugin_dispatcher.h" +#include "ppapi/proxy/plugin_resource_tracker.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/ppapi_globals.h" #include "ppapi/shared_impl/proxy_lock.h" @@ -67,15 +68,11 @@ new PpapiMsg_PPPPrinting_PrintPages(API_ID_PPP_PRINTING, instance, pages, &result)); - // How refcounting works when returning a resource: - // - // The plugin in the plugin process makes a resource that it returns to the - // browser. The plugin proxy code returns that ref to us and asynchronously - // releases it. Before any release message associated with that operation - // comes, we'll get this reply. We need to add one ref since our caller - // expects us to add one ref for it to consume. - PpapiGlobals::Get()->GetResourceTracker()->AddRefResource( - result.host_resource()); + // Explicilty don't add a reference to the received resource here. The plugin + // adds a ref during creation of the resource and it will "abandon" the + // resource to release it, which ensures that the initial ref won't be + // decremented. See the comment below in OnPluginMsgPrintPages. + return result.host_resource(); } @@ -189,8 +186,17 @@ *result = resource_object->host_resource(); - // See PrintPages above for how refcounting works. - resource_tracker->ReleaseResourceSoon(plugin_resource); + // Abandon the resource on the plugin side. This releases a reference to the + // resource and allows the plugin side of the resource (the proxy resource) to + // be destroyed without sending a message to the renderer notifing it that the + // plugin has released the resource. This used to call + // ResourceTracker::ReleaseResource directly which would trigger an IPC to be + // sent to the renderer to remove a ref to the resource. However due to + // arbitrary ordering of received sync/async IPCs in the renderer, this + // sometimes resulted in the resource being destroyed in the renderer before + // the renderer had a chance to add a reference to it. See crbug.com/490611. + static_cast(resource_tracker) + ->AbandonResource(plugin_resource); } void PPP_Printing_Proxy::OnPluginMsgEnd(PP_Instance instance) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/ppb_gamepad_shared.cc oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/ppb_gamepad_shared.cc --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/ppb_gamepad_shared.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/ppb_gamepad_shared.cc 2015-06-23 12:13:19.000000000 +0000 @@ -4,14 +4,20 @@ #include "ppapi/shared_impl/ppb_gamepad_shared.h" +#include + #include "base/basictypes.h" namespace ppapi { +const size_t WebKitGamepads::kItemsLengthCap; + void ConvertWebKitGamepadData(const WebKitGamepads& webkit_data, PP_GamepadsSampleData* output_data) { - output_data->length = webkit_data.length; - for (unsigned i = 0; i < webkit_data.length; ++i) { + size_t length = std::min(WebKitGamepads::kItemsLengthCap, + static_cast(webkit_data.length)); + output_data->length = static_cast(length); + for (unsigned i = 0; i < length; ++i) { PP_GamepadSampleData& output_pad = output_data->items[i]; const WebKitGamepad& webkit_pad = webkit_data.items[i]; output_pad.connected = webkit_pad.connected ? PP_TRUE : PP_FALSE; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/resource_tracker.cc oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/resource_tracker.cc --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/resource_tracker.cc 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/resource_tracker.cc 2015-06-23 12:13:19.000000000 +0000 @@ -89,14 +89,6 @@ } } -void ResourceTracker::ReleaseResourceSoon(PP_Resource res) { - PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostNonNestableTask( - FROM_HERE, - RunWhileLocked(base::Bind(&ResourceTracker::ReleaseResource, - weak_ptr_factory_.GetWeakPtr(), - res))); -} - void ResourceTracker::DidCreateInstance(PP_Instance instance) { CheckThreadingPreconditions(); // Due to the infrastructure of some tests, the instance is registered diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/resource_tracker.h oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/resource_tracker.h --- oxide-qt-1.7.8/third_party/chromium/src/ppapi/shared_impl/resource_tracker.h 2015-04-21 09:27:01.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ppapi/shared_impl/resource_tracker.h 2015-06-23 12:13:19.000000000 +0000 @@ -46,9 +46,6 @@ // ResourceHost. void ReleaseResource(PP_Resource res); - // Releases a reference on the given resource once the message loop returns. - void ReleaseResourceSoon(PP_Resource res); - // Notifies the tracker that a new instance has been created. This must be // called before creating any resources associated with the instance. void DidCreateInstance(PP_Instance instance); Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/sdch/open-vcdiff/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/sdch/open-vcdiff/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/testing/gmock/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/testing/gmock/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/testing/gtest/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/testing/gtest/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/testing/xvfb.py oxide-qt-1.7.9/third_party/chromium/src/testing/xvfb.py --- oxide-qt-1.7.8/third_party/chromium/src/testing/xvfb.py 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/testing/xvfb.py 2015-06-23 12:14:31.000000000 +0000 @@ -50,7 +50,7 @@ xvfb_path: Path to Xvfb. """ cmd = [xvfb_path, display, '-screen', '0', '1024x768x24', '-ac', - '-nolisten', 'tcp', '-dpi', '96'] + '-nolisten', 'tcp'] try: proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/angle/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/angle/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/bidichecker/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/bidichecker/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/boringssl/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/boringssl/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/cacheinvalidation/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/cacheinvalidation/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/chromite/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/chromite/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/cld_2/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/cld_2/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/colorama/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/colorama/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/crashpad/crashpad/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/crashpad/crashpad/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/cros_system_api/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/cros_system_api/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/dom_distiller_js/dist/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/dom_distiller_js/dist/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/ffmpeg/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/ffmpeg/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/flac/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/flac/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/fontconfig/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/fontconfig/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/freetype2/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/freetype2/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/hunspell/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/hunspell/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/icu/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/icu/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/jsoncpp/source/include/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/jsoncpp/source/include/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/jsoncpp/source/src/lib_json/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/jsoncpp/source/src/lib_json/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/leveldatabase/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/leveldatabase/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libaddressinput/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libaddressinput/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libexif/sources/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libexif/sources/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libjingle/source/talk/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libjingle/source/talk/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libjpeg_turbo/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libjpeg_turbo/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/liblouis/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/liblouis/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libphonenumber/src/phonenumbers/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libphonenumber/src/phonenumbers/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libphonenumber/src/resources/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libphonenumber/src/resources/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libphonenumber/src/test/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libphonenumber/src/test/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libsrtp/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libsrtp/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libvpx/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libvpx/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/libyuv/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/libyuv/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/lss/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/lss/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/mesa/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/mesa/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/openmax_dl/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/openmax_dl/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/opus/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/opus/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/pdfium/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/pdfium/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/pyelftools/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/pyelftools/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/pyftpdlib/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/pyftpdlib/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/py_trace_event/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/py_trace_event/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/pywebsocket/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/pywebsocket/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/safe_browsing/testing/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/safe_browsing/testing/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/scons-2.0.1/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/scons-2.0.1/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/sfntly/cpp/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/sfntly/cpp/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/include/core/SkDevice.h oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/include/core/SkDevice.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/include/core/SkDevice.h 2015-04-21 09:28:21.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/include/core/SkDevice.h 2015-06-23 12:14:52.000000000 +0000 @@ -330,15 +330,19 @@ static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkPixelGeometry); // The constructor may change the pixel geometry based on other parameters. - CreateInfo(const SkImageInfo& info, TileUsage tileUsage, SkPixelGeometry geo) + CreateInfo(const SkImageInfo& info, + TileUsage tileUsage, + SkPixelGeometry geo, + bool forImageFilter = false) : fInfo(info) , fTileUsage(tileUsage) , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) - {} + , fForImageFilter(forImageFilter) {} const SkImageInfo fInfo; const TileUsage fTileUsage; const SkPixelGeometry fPixelGeometry; + const bool fForImageFilter; }; /** diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/platform_tools/android/bin/adb_wait_for_device oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/platform_tools/android/bin/adb_wait_for_device --- oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/platform_tools/android/bin/adb_wait_for_device 1970-01-01 00:00:00.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/platform_tools/android/bin/adb_wait_for_device 2015-06-23 12:14:52.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Wait for the device to be both attached and booted. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/android_setup.sh +source $SCRIPT_DIR/utils/setup_adb.sh + +set -e +set -x + +$ADB $DEVICE_SERIAL wait-for-device + +while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do + sleep 5 +done diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/src/core/SkDeviceImageFilterProxy.h oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/src/core/SkDeviceImageFilterProxy.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/src/core/SkDeviceImageFilterProxy.h 2015-04-21 09:28:25.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/src/core/SkDeviceImageFilterProxy.h 2015-06-23 12:14:52.000000000 +0000 @@ -22,7 +22,8 @@ SkBaseDevice* createDevice(int w, int h) override { SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h), SkBaseDevice::kPossible_TileUsage, - kUnknown_SkPixelGeometry); + kUnknown_SkPixelGeometry, + true /*forImageFilter*/); return fDevice->onCreateDevice(cinfo, NULL); } bool canHandleImageFilter(const SkImageFilter* filter) override { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/src/pdf/SkPDFDevice.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/src/pdf/SkPDFDevice.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/skia/src/pdf/SkPDFDevice.cpp 2015-04-21 09:28:31.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/skia/src/pdf/SkPDFDevice.cpp 2015-06-23 12:14:53.000000000 +0000 @@ -577,7 +577,8 @@ } SkBaseDevice* SkPDFDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint* layerPaint) { - if (layerPaint && not_supported_for_layers(*layerPaint)) { + if (cinfo.fForImageFilter || + (layerPaint && not_supported_for_layers(*layerPaint))) { return SkBitmapDevice::Create(cinfo.fInfo); } SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height()); Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/smhasher/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/smhasher/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/snappy/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/snappy/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/stp/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/stp/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/swig/Lib/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/swig/Lib/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/swig/linux/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/swig/linux/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/trace-viewer/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/trace-viewer/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/undoview/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/undoview/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/usrsctp/usrsctplib/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/usrsctp/usrsctplib/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/webdriver/pylib/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/webdriver/pylib/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/webgl/src/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/webgl/src/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/public/web/WebRuntimeFeatures.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/public/web/WebRuntimeFeatures.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015-04-21 09:29:29.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015-06-23 12:16:46.000000000 +0000 @@ -105,6 +105,8 @@ BLINK_EXPORT static void enablePeerConnection(bool); + BLINK_EXPORT static void enablePermissionsAPI(bool); + BLINK_EXPORT static void enableRequestAutocomplete(bool); BLINK_EXPORT static void enableScreenOrientation(bool); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8Binding.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8Binding.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8Binding.h 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/core/v8/V8Binding.h 2015-06-23 12:16:43.000000000 +0000 @@ -191,7 +191,7 @@ } template -inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl) +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl, v8::Local creationContext) { if (UNLIKELY(!impl)) { v8SetReturnValueNull(callbackInfo); @@ -199,11 +199,17 @@ } if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl)) return; - v8::Handle wrapper = impl->wrap(callbackInfo.Holder(), callbackInfo.GetIsolate()); + v8::Handle wrapper = impl->wrap(creationContext, callbackInfo.GetIsolate()); v8SetReturnValue(callbackInfo, wrapper); } template +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl) +{ + v8SetReturnValue(callbackInfo, impl, callbackInfo.Holder()); +} + +template inline void v8SetReturnValue(const CallbackInfo& callbackInfo, Node* impl) { if (UNLIKELY(!impl)) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_attributes.py oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_attributes.py --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_attributes.py 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_attributes.py 2015-06-23 12:16:44.000000000 +0000 @@ -213,7 +213,7 @@ return 'v8SetReturnValue(info, v8Value)' return idl_type.v8_set_return_value( cpp_value, extended_attributes=extended_attributes, script_wrappable='impl', - release=release, for_main_world=for_main_world) + release=release, for_main_world=for_main_world, is_static=attribute.is_static) context.update({ 'cpp_value': cpp_value, @@ -519,7 +519,7 @@ # These attributes must not be accessors on prototype chains. if (attribute.is_static or - 'Unforgeable' in attribute.extended_attributes or + is_unforgeable(interface, attribute) or 'OverrideBuiltins' in interface.extended_attributes): return False diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_methods.py oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_methods.py --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_methods.py 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_methods.py 2015-06-23 12:16:44.000000000 +0000 @@ -352,7 +352,7 @@ release = idl_type.release script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else '' - return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world) + return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world, is_static=method.is_static) def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise): diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_types.py oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_types.py --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_types.py 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_types.py 2015-06-23 12:16:44.000000000 +0000 @@ -795,20 +795,30 @@ 'DOMWrapperForMainWorld': 'v8SetReturnValueForMainWorld(info, WTF::getPtr({cpp_value}))', 'DOMWrapperFast': 'v8SetReturnValueFast(info, WTF::getPtr({cpp_value}), {script_wrappable})', 'DOMWrapperDefault': 'v8SetReturnValue(info, {cpp_value})', + # Note that static attributes and operations do not check whether |this| is + # an instance of the interface nor |this|'s creation context is the same as + # the current context. So we must always use the current context as the + # creation context of the DOM wrapper for the return value. + 'DOMWrapperStatic': 'v8SetReturnValue(info, {cpp_value}, info.GetIsolate()->GetCurrentContext()->Global())', # Generic dictionary type 'Dictionary': 'v8SetReturnValue(info, {cpp_value})', + 'DictionaryStatic': '#error not implemented yet', # Nullable dictionaries 'NullableDictionary': 'v8SetReturnValue(info, result.get())', + 'NullableDictionaryStatic': '#error not implemented yet', # Union types or dictionaries 'DictionaryOrUnion': 'v8SetReturnValue(info, result)', + 'DictionaryOrUnionStatic': '#error not implemented yet', } -def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False): +def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False, is_static=False): """Returns a statement that converts a C++ value to a V8 value and sets it as a return value. """ def dom_wrapper_conversion_type(): + if is_static: + return 'DOMWrapperStatic' if not script_wrappable: return 'DOMWrapperDefault' if for_main_world: @@ -823,6 +833,8 @@ cpp_value = idl_type.cpp_value_to_v8_value(cpp_value, extended_attributes=extended_attributes) if this_v8_conversion_type == 'DOMWrapper': this_v8_conversion_type = dom_wrapper_conversion_type() + if is_static and this_v8_conversion_type in ('Dictionary', 'NullableDictionary', 'DictionaryOrUnion'): + this_v8_conversion_type += 'Static' format_string = V8_SET_RETURN_VALUE[this_v8_conversion_type] # FIXME: oilpan: Remove .release() once we remove all RefPtrs from generated code. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_utilities.py oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_utilities.py --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_utilities.py 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/scripts/v8_utilities.py 2015-06-23 12:16:44.000000000 +0000 @@ -400,8 +400,9 @@ # [Unforgeable] def is_unforgeable(interface, member): - return ('Unforgeable' in interface.extended_attributes or - 'Unforgeable' in member.extended_attributes) + return (('Unforgeable' in interface.extended_attributes or + 'Unforgeable' in member.extended_attributes) and + not member.is_static) # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking] diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl 2015-06-23 12:16:44.000000000 +0000 @@ -61,6 +61,7 @@ attribute TestEnum testEnumAttribute; attribute DOMStringOrDouble stringOrDoubleAttribute; static attribute DOMString staticStringAttribute; + static attribute TestInterface staticReturnDOMWrapperAttribute; [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTypeCheckingAttribute; void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); @@ -90,6 +91,7 @@ static void alwaysExposedStaticMethod(); [Exposed=Worker] static void workerExposedStaticMethod(); [Exposed=Window] static void windowExposedStaticMethod(); + static TestInterface staticReturnDOMWrapperMethod(); attribute long alwaysExposedAttribute; [Exposed=Worker] attribute long workerExposedAttribute; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -363,6 +363,38 @@ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } +static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::PropertyCallbackInfo& info) +{ + v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperAttribute(), info.GetIsolate()->GetCurrentContext()->Global()); +} + +static void staticReturnDOMWrapperAttributeAttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetter(info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + +static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local v8Value, const v8::PropertyCallbackInfo& info) +{ + v8::Local holder = info.Holder(); + ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDOMWrapperAttribute", "TestInterface", holder, info.GetIsolate()); + TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); + if (!cppValue) { + exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); + exceptionState.throwIfNeeded(); + return; + } + TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(WTF::getPtr(cppValue)); +} + +static void staticReturnDOMWrapperAttributeAttributeSetterCallback(v8::Local, v8::Local v8Value, const v8::PropertyCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetter(v8Value, info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); @@ -1312,6 +1344,18 @@ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } +static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo& info) +{ + v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMethod(), info.GetIsolate()->GetCurrentContext()->Global()); +} + +static void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo& info) { TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); @@ -2279,6 +2323,10 @@ }; V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local(), v8::None, windowExposedStaticMethodMethodConfiguration); } + const V8DOMConfiguration::MethodConfiguration staticReturnDOMWrapperMethodMethodConfiguration = { + "staticReturnDOMWrapperMethod", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, + }; + V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local(), v8::None, staticReturnDOMWrapperMethodMethodConfiguration); const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMethodMethodConfiguration = { "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, }; @@ -2362,6 +2410,7 @@ }; V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignature, static_cast(v8::DontDelete | v8::DontEnum), toStringMethodConfiguration); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); + functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticReturnDOMWrapperAttribute"), TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -30,21 +30,21 @@ namespace TestInterfaceWillBeGarbageCollectedV8Internal { -static void attr1AttributeGetter(const v8::FunctionCallbackInfo& info) +static void attr1AttributeGetter(const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toImpl(holder); v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); } -static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo& info) +static void attr1AttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } -static void attr1AttributeSetter(v8::Local v8Value, const v8::FunctionCallbackInfo& info) +static void attr1AttributeSetter(v8::Local v8Value, const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toImpl(holder); @@ -52,9 +52,8 @@ impl->setAttr1(WTF::getPtr(cppValue)); } -static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo& info) +static void attr1AttributeSetterCallback(v8::Local, v8::Local v8Value, const v8::PropertyCallbackInfo& info) { - v8::Local v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); @@ -101,8 +100,8 @@ } // namespace TestInterfaceWillBeGarbageCollectedV8Internal -static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceWillBeGarbageCollectedAccessors[] = { - {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, 0, static_cast(v8::PROHIBITS_OVERWRITING), static_cast(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts}, +static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGarbageCollectedAttributes[] = { + {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, 0, static_cast(v8::PROHIBITS_OVERWRITING), static_cast(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, }; const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructor::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledProperties, "TestInterfaceWillBeGarbageCollected", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; @@ -174,8 +173,8 @@ v8::Local defaultSignature; defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate(isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, + V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceWillBeGarbageCollectedAttributes), 0, 0, - V8TestInterfaceWillBeGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceWillBeGarbageCollectedAccessors), 0, 0); functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::constructorCallback); functionTemplate->SetLength(1); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -343,15 +343,6 @@ player->update(TimingUpdateOnDemand); } - for (const auto& entry : update->animationsWithUpdates()) { - Animation* animation = toAnimation(entry.player->source()); - - animation->setEffect(entry.animation->effect()); - animation->updateSpecifiedTiming(entry.animation->specifiedTiming()); - - m_animations.find(entry.name)->value->update(entry); - } - for (const auto& styleUpdate : update->animationsWithStyleUpdates()) { styleUpdate.effect->forEachInterpolation([](Interpolation& interpolation) { if (interpolation.isStyleInterpolation() && toStyleInterpolation(interpolation).isDeferredLegacyStyleInterpolation()) @@ -371,6 +362,15 @@ } } + for (const auto& entry : update->animationsWithUpdates()) { + Animation* animation = toAnimation(entry.player->source()); + + animation->setEffect(entry.animation->effect()); + animation->updateSpecifiedTiming(entry.animation->specifiedTiming()); + + m_animations.find(entry.name)->value->update(entry); + } + for (const auto& entry : update->newAnimations()) { const InertAnimation* inertAnimation = entry.animation.get(); OwnPtrWillBeRawPtr eventDelegate = adoptPtrWillBeNoop(new AnimationEventDelegate(element, entry.name)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/core.gypi oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/core.gypi --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/core.gypi 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/core.gypi 2015-06-23 12:16:44.000000000 +0000 @@ -3807,6 +3807,7 @@ 'loader/MixedContentCheckerTest.cpp', 'page/ContextMenuControllerTest.cpp', 'page/NetworkStateNotifierTest.cpp', + 'page/PagePopupClientTest.cpp', 'page/PrintContextTest.cpp', 'page/scrolling/ScrollStateTest.cpp', 'paint/DisplayItemListPaintTest.cpp', diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/dom/AXObjectCache.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/dom/AXObjectCache.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/dom/AXObjectCache.h 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/dom/AXObjectCache.h 2015-06-23 12:16:44.000000000 +0000 @@ -107,12 +107,9 @@ virtual void handleTextFormControlChanged(Node*) = 0; virtual void handleValueChanged(Node*) = 0; virtual void handleUpdateActiveMenuOption(LayoutMenuList*, int optionIndex) = 0; - virtual void didShowMenuListPopup(LayoutMenuList*) = 0; - virtual void didHideMenuListPopup(LayoutMenuList*) = 0; virtual void handleLoadComplete(Document*) = 0; virtual void handleLayoutComplete(Document*) = 0; - virtual void setCanvasObjectBounds(Element*, const LayoutRect&) = 0; virtual void clearWeakMembers(Visitor*) = 0; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/frame/Location.idl oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/frame/Location.idl --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/frame/Location.idl 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/frame/Location.idl 2015-06-23 12:16:44.000000000 +0000 @@ -28,6 +28,7 @@ [ CheckSecurity=Frame, + Unforgeable, WillBeGarbageCollected, ] interface Location { // |assign|, |replace|, and *writing* |href| do not require a security @@ -35,11 +36,11 @@ // property of an *existing* document at a different origin. // However, *reading* |href|, or accessing any component, is a security // problem, since that allows tracking navigation. - [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter, Unforgeable] attribute DOMString href; + [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter] attribute DOMString href; - [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable] void assign(DOMString url); - [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable] void replace(DOMString url); - [CallWith=ActiveWindow, Unforgeable] void reload(); + [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void assign(DOMString url); + [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void replace(DOMString url); + [CallWith=ActiveWindow] void reload(); // URI decomposition attributes [SetterCallWith=(ActiveWindow,FirstWindow), RaisesException=Setter] attribute DOMString protocol; @@ -52,8 +53,8 @@ readonly attribute DOMString origin; - [Unforgeable] readonly attribute DOMStringList ancestorOrigins; + readonly attribute DOMStringList ancestorOrigins; - [NotEnumerable, Unforgeable, ImplementedAs=href] DOMString toString(); - [NotEnumerable, CallWith=ThisValue, Unforgeable] any valueOf(); + [NotEnumerable, ImplementedAs=href] DOMString toString(); + [NotEnumerable, CallWith=ThisValue] any valueOf(); }; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp 2015-05-08 14:35:26.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -872,6 +872,7 @@ m_loadState = WaitingForSource; setShouldDelayLoadEvent(false); m_networkState = NETWORK_EMPTY; + updateDisplayState(); WTF_LOG(Media, "HTMLMediaElement::selectMediaResource(%p), nothing to load", this); return; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -632,13 +632,6 @@ return true; } -void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& source) -{ - const HTMLTextAreaElement& sourceElement = static_cast(source); - m_value = sourceElement.m_value; - HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); -} - const AtomicString& HTMLTextAreaElement::defaultAutocapitalize() const { DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences", AtomicString::ConstructFromLiteral)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h 2015-06-23 12:16:44.000000000 +0000 @@ -129,7 +129,6 @@ virtual bool matchesReadOnlyPseudoClass() const override; virtual bool matchesReadWritePseudoClass() const override; - virtual void copyNonAttributePropertiesFromElement(const Element&) override final; // If the String* argument is 0, apply this->value(). bool valueMissing(const String*) const; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -1003,11 +1003,4 @@ return endOfInnerText(textFormControl); } -void HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(const Element& source) -{ - const HTMLTextFormControlElement& sourceElement = static_cast(source); - m_lastChangeWasUserEdit = sourceElement.m_lastChangeWasUserEdit; - HTMLFormControlElement::copyNonAttributePropertiesFromElement(source); -} - } // namespace blink diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h 2015-06-23 12:16:44.000000000 +0000 @@ -134,7 +134,6 @@ String valueWithHardLineBreaks() const; virtual bool shouldDispatchFormControlChangeEvent(String&, String&); - virtual void copyNonAttributePropertiesFromElement(const Element&) override; private: int computeSelectionStart() const; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp 2015-06-23 12:16:44.000000000 +0000 @@ -115,10 +115,14 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == posterAttr) { - // Force a poster recalc by setting m_displayMode to Unknown directly before calling updateDisplayState. - HTMLMediaElement::setDisplayMode(Unknown); - updateDisplayState(); - if (shouldDisplayPosterImage()) { + // In case the poster attribute is set after playback, don't update the + // display state, post playback the correct state will be picked up. + if (displayMode() < Video || !hasAvailableVideoFrame()) { + // Force a poster recalc by setting m_displayMode to Unknown directly before calling updateDisplayState. + HTMLMediaElement::setDisplayMode(Unknown); + updateDisplayState(); + } + if (!posterImageURL().isEmpty()) { if (!m_imageLoader) m_imageLoader = HTMLImageLoader::create(this); m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp 2015-06-23 12:16:45.000000000 +0000 @@ -388,6 +388,14 @@ return parentClipRect != LayoutRect::infiniteIntRect(); } +DeprecatedPaintLayer* CompositedDeprecatedPaintLayerMapping::scrollParent() +{ + DeprecatedPaintLayer* scrollParent = m_owningLayer.scrollParent(); + if (scrollParent && !scrollParent->needsCompositedScrolling()) + return nullptr; + return scrollParent; +} + bool CompositedDeprecatedPaintLayerMapping::updateGraphicsLayerConfiguration() { ASSERT(m_owningLayer.compositor()->lifecycle().state() == DocumentLifecycle::InCompositingUpdate); @@ -420,7 +428,7 @@ if (m_owningLayer.needsCompositedScrolling()) needsDescendantsClippingLayer = false; - DeprecatedPaintLayer* scrollParent = compositor->preferCompositingToLCDTextEnabled() ? m_owningLayer.scrollParent() : 0; + DeprecatedPaintLayer* scrollParent = this->scrollParent(); // This is required because compositing layers are parented // according to the z-order hierarchy, yet clipping goes down the renderer hierarchy. @@ -731,7 +739,7 @@ updateRenderingContext(); updateShouldFlattenTransform(); updateChildrenTransform(); - updateScrollParent(compositor()->preferCompositingToLCDTextEnabled() ? m_owningLayer.scrollParent() : 0); + updateScrollParent(scrollParent()); registerScrollingLayers(); updateScrollBlocksOn(layoutObject()->styleRef()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h 2015-06-23 12:16:45.000000000 +0000 @@ -295,6 +295,8 @@ // clipping container for |m_owningLayer|. bool owningLayerClippedByLayerNotAboveCompositedAncestor(); + DeprecatedPaintLayer* scrollParent(); + DeprecatedPaintLayer& m_owningLayer; // The hierarchy of layers that is maintained by the CompositedDeprecatedPaintLayerMapping looks like this: diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp 2015-06-23 12:16:45.000000000 +0000 @@ -129,6 +129,7 @@ , m_subtreeIsCompositing(false) , m_hasUnisolatedCompositedBlendingDescendant(false) , m_testingOverlap(true) + , m_hasCompositedScrollingAncestor(false) { } @@ -136,6 +137,7 @@ bool m_subtreeIsCompositing; bool m_hasUnisolatedCompositedBlendingDescendant; bool m_testingOverlap; + bool m_hasCompositedScrollingAncestor; }; static bool requiresCompositingOrSquashing(CompositingReasons reasons) @@ -245,12 +247,15 @@ } } + if (reasonsToComposite & CompositingReasonOverflowScrollingTouch) + currentRecursionData.m_hasCompositedScrollingAncestor = true; + // Next, accumulate reasons related to overlap. // If overlap testing is used, this reason will be overridden. If overlap testing is not // used, we must assume we overlap if there is anything composited behind us in paint-order. CompositingReasons overlapCompositingReason = currentRecursionData.m_subtreeIsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone; - if (m_layoutView.compositor()->preferCompositingToLCDTextEnabled()) { + if (currentRecursionData.m_hasCompositedScrollingAncestor) { Vector unclippedDescendantsToRemove; for (size_t i = 0; i < unclippedDescendants.size(); i++) { DeprecatedPaintLayer* unclippedDescendant = unclippedDescendants.at(i); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp 2015-04-29 21:37:09.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp 2015-06-23 12:16:45.000000000 +0000 @@ -363,9 +363,6 @@ IntSize size = pixelSnappedIntRect(frameRect()).size(); HTMLSelectElement* select = selectElement(); m_popup->show(quad, size, select->optionToListIndex(select->selectedIndex())); - if (AXObjectCache* cache = document().existingAXObjectCache()) - cache->didShowMenuListPopup(this); - } void LayoutMenuList::hidePopup() @@ -591,8 +588,6 @@ void LayoutMenuList::popupDidHide() { m_popupIsVisible = false; - if (AXObjectCache* cache = document().existingAXObjectCache()) - cache->didHideMenuListPopup(this); } void LayoutMenuList::popupDidCancel() diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/page/EventHandler.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/page/EventHandler.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/page/EventHandler.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/page/EventHandler.cpp 2015-06-23 12:16:45.000000000 +0000 @@ -1531,11 +1531,10 @@ return true; swallowEvent = !dispatchMouseEvent(EventTypeNames::mousemove, mev.innerNode(), 0, mouseEvent, true); + if (!swallowEvent) + swallowEvent = handleMouseDraggedEvent(mev); - // http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mousemove - // Since there is no default action for the mousemove event issue a - // mouse dragged event irrespective of whether the event is cancelled. - return handleMouseDraggedEvent(mev); + return swallowEvent; } void EventHandler::invalidateClick() @@ -1925,13 +1924,11 @@ { ASSERT(exitedNode != enteredNode); - // First, dispatch mouseout and mouseover events (which bubble to ancestors) + // First, dispatch mouseout event (which bubbles to ancestors) if (exitedNode) exitedNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseout, 0, enteredNode); - if (enteredNode) - enteredNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseover, 0, exitedNode); - // Then dispatch mouseenter and mouseleave events. These are non-bubbling events, and they are dispatched if there + // A note on mouseenter and mouseleave: These are non-bubbling events, and they are dispatched if there // is a capturing event handler on an ancestor or a normal event handler on the element itself. This special // handling is necessary to avoid O(n^2) capturing event handler checks. // @@ -1986,6 +1983,10 @@ exitedAncestors[j]->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseleave, 0, enteredNode); } + // Dispatch mouseover event (which bubbles to ancestors) after the mouseleave events are sent. + if (enteredNode) + enteredNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseover, 0, exitedNode); + // Determine if there is a capturing mouseenter listener in an ancestor. This must be done /after/ dispatching the // mouseleave events because the handler for mouseleave might set a capturing mouseenter handler. bool enteredNodeHasCapturingAncestor = false; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/page/PagePopupClient.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/page/PagePopupClient.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/core/page/PagePopupClient.cpp 2015-04-21 09:29:27.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/core/page/PagePopupClient.cpp 2015-06-23 12:16:45.000000000 +0000 @@ -32,6 +32,7 @@ #include "core/page/PagePopupClient.h" #include "wtf/text/StringBuilder.h" +#include "wtf/unicode/CharacterNames.h" namespace blink { @@ -50,6 +51,12 @@ } else if (str[i] == '\\' || str[i] == '"') { builder.append('\\'); builder.append(str[i]); + } else if (str[i] == '<') { + // Need to avoid to add "" because the resultant string is + // typically embedded in \t\f\v\xE2\x80\xA8\xE2\x80\xA9"), buffer.get()); + EXPECT_EQ("\"abc\\r\\n'\\\"\\x3C/script>\\u0009\\u000C\\u000B\\u2028\\u2029\"", std::string(buffer->data(), buffer->size())); +} + +} // namespace blink + diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkOverview.js oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkOverview.js --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkOverview.js 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkOverview.js 2015-06-23 12:16:46.000000000 +0000 @@ -183,6 +183,7 @@ var width = this._overviewContainer.offsetWidth; var height = this._overviewContainer.offsetHeight; this._resetCanvas(width, height); + this._update(); }, /** diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js 2015-06-23 12:16:46.000000000 +0000 @@ -317,6 +317,7 @@ _onShowOverviewButtonClicked: function(event) { this._toggleShowOverviewButton(!WebInspector.settings.networkLogShowOverview.get()); + this.doResize(); }, /** diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js 2015-06-23 12:16:46.000000000 +0000 @@ -91,6 +91,14 @@ */ WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback) { + var parsedURL = new WebInspector.ParsedURL(sourceMapURL); + if (parsedURL.isDataURL()) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", sourceMapURL, false); + xhr.send(null); + contentLoaded(xhr.status, {}, xhr.responseText); + return; + } WebInspector.NetworkManager.loadResourceForFrontend(sourceMapURL, null, contentLoaded); /** diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js 2015-06-23 12:16:46.000000000 +0000 @@ -858,7 +858,7 @@ { if (!anchor._tasksInfo) return; - popover.showForAnchor(WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent(this._model, anchor._tasksInfo), anchor, null, null, WebInspector.Popover.Orientation.Bottom); + popover.showForAnchor(WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent(this._model, anchor._tasksInfo), anchor); }, _closeRecordDetails: function() diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp 2015-04-29 21:37:09.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -63,18 +63,6 @@ return true; } -void AXMenuList::clearChildren() -{ - if (m_children.isEmpty()) - return; - - // There's no reason to clear our AXMenuListPopup child. If we get a - // call to clearChildren, it's because the options might have changed, - // so call it on our popup. - ASSERT(m_children.size() == 1); - m_children[0]->clearChildren(); -} - void AXMenuList::addChildren() { m_haveChildren = true; @@ -133,6 +121,9 @@ void AXMenuList::didUpdateActiveOption(int optionIndex) { + RefPtrWillBeRawPtr document(m_layoutObject->document()); + AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); + const auto& childObjects = children(); if (!childObjects.isEmpty()) { ASSERT(childObjects.size() == 1); @@ -144,28 +135,7 @@ } } - axObjectCache()->postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged); -} - -void AXMenuList::didShowPopup() -{ - if (children().size() != 1) - return; - - AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); - popup->didShow(); -} - -void AXMenuList::didHidePopup() -{ - if (children().size() != 1) - return; - - AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); - popup->didHide(); - - if (node() && node()->focused()) - axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged); + cache->postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged); } } // namespace blink diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.h 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuList.h 2015-06-23 12:16:46.000000000 +0000 @@ -40,11 +40,8 @@ virtual bool isCollapsed() const override; virtual AccessibilityExpanded isExpanded() const override final; virtual bool press() const override; - virtual void clearChildren() override; void didUpdateActiveOption(int optionIndex); - void didShowPopup(); - void didHidePopup(); private: AXMenuList(LayoutMenuList*, AXObjectCacheImpl*); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -27,7 +27,6 @@ #include "modules/accessibility/AXMenuListOption.h" #include "core/html/HTMLOptionElement.h" -#include "modules/accessibility/AXMenuListPopup.h" #include "modules/accessibility/AXObjectCacheImpl.h" namespace blink { @@ -75,9 +74,6 @@ bool AXMenuListOption::isSelected() const { - AXMenuListPopup* parent = static_cast(parentObject()); - if (parent && !parent->isOffScreen()) - return parent->activeChild() == this; return toHTMLOptionElement(m_element)->selected(); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp 2015-04-29 21:37:09.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -41,7 +41,7 @@ bool AXMenuListPopup::isVisible() const { - return !isOffScreen(); + return false; } bool AXMenuListPopup::isOffScreen() const @@ -80,16 +80,6 @@ return option; } -int AXMenuListPopup::getSelectedIndex() const -{ - Node* parentNode = m_parent->node(); - if (!isHTMLSelectElement(parentNode)) - return -1; - - HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); - return htmlSelectElement->selectedIndex(); -} - bool AXMenuListPopup::press() const { if (!m_parent) @@ -108,10 +98,10 @@ if (!isHTMLSelectElement(parentNode)) return; - HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); m_haveChildren = true; - m_activeIndex = getSelectedIndex(); + HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); + m_activeIndex = htmlSelectElement->selectedIndex(); const WillBeHeapVector>& listItems = htmlSelectElement->listItems(); unsigned length = listItems.size(); for (unsigned i = 0; i < length; i++) { @@ -153,7 +143,7 @@ ASSERT_ARG(optionIndex, optionIndex < static_cast(m_children.size())); AXObjectCacheImpl* cache = axObjectCache(); - if (m_activeIndex != optionIndex && m_activeIndex >= 0 && m_activeIndex < static_cast(m_children.size())) { + if (m_activeIndex >= 0 && m_activeIndex < static_cast(m_children.size())) { RefPtr previousChild = m_children[m_activeIndex].get(); cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuListItemUnselected); } @@ -164,34 +154,4 @@ m_activeIndex = optionIndex; } -void AXMenuListPopup::didHide() -{ - AXObjectCacheImpl* cache = axObjectCache(); - cache->postNotification(this, AXObjectCacheImpl::AXHide); - if (activeChild()) - cache->postNotification(activeChild(), AXObjectCacheImpl::AXMenuListItemUnselected); -} - -void AXMenuListPopup::didShow() -{ - if (!m_haveChildren) - addChildren(); - - AXObjectCacheImpl* cache = axObjectCache(); - cache->postNotification(this, AXObjectCacheImpl::AXShow); - int selectedIndex = getSelectedIndex(); - if (selectedIndex >= 0 && selectedIndex < static_cast(m_children.size())) - didUpdateActiveOption(selectedIndex); - else - cache->postNotification(m_parent, AXObjectCacheImpl::AXFocusedUIElementChanged); -} - -AXObject* AXMenuListPopup::activeChild() -{ - if (m_activeIndex < 0 || m_activeIndex >= static_cast(children().size())) - return nullptr; - - return m_children[m_activeIndex].get(); -} - } // namespace blink diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h 2015-06-23 12:16:46.000000000 +0000 @@ -42,9 +42,6 @@ virtual bool isOffScreen() const override; void didUpdateActiveOption(int optionIndex); - void didShow(); - void didHide(); - AXObject* activeChild(); private: explicit AXMenuListPopup(AXObjectCacheImpl*); @@ -61,7 +58,6 @@ virtual bool computeAccessibilityIsIgnored() const override; AXMenuListOption* menuListOptionAXObject(HTMLElement*) const; - int getSelectedIndex() const; // Note that this may be -1 if nothing is selected. int m_activeIndex; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp 2015-04-29 21:37:09.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -1038,24 +1038,6 @@ toAXMenuList(obj)->didUpdateActiveOption(optionIndex); } -void AXObjectCacheImpl::didShowMenuListPopup(LayoutMenuList* menuList) -{ - AXObject* obj = get(menuList); - if (!obj || !obj->isMenuList()) - return; - - toAXMenuList(obj)->didShowPopup(); -} - -void AXObjectCacheImpl::didHideMenuListPopup(LayoutMenuList* menuList) -{ - AXObject* obj = get(menuList); - if (!obj || !obj->isMenuList()) - return; - - toAXMenuList(obj)->didHidePopup(); -} - void AXObjectCacheImpl::handleLoadComplete(Document* document) { postNotification(getOrCreate(document), AXObjectCache::AXLoadComplete); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h 2015-06-23 12:16:46.000000000 +0000 @@ -89,8 +89,6 @@ virtual void handleEditableTextContentChanged(Node*) override; virtual void handleValueChanged(Node*) override; virtual void handleUpdateActiveMenuOption(LayoutMenuList*, int optionIndex) override; - virtual void didShowMenuListPopup(LayoutMenuList*) override; - virtual void didHideMenuListPopup(LayoutMenuList*) override; virtual void handleLoadComplete(Document*) override; virtual void handleLayoutComplete(Document*) override; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObject.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObject.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObject.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/accessibility/AXObject.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -926,13 +926,19 @@ break; scrollParent = scrollParent->parentObject(); } - if (!scrollableArea) + if (!scrollParent || !scrollableArea) return; IntRect objectRect = pixelSnappedIntRect(elementRect()); IntPoint scrollPosition = scrollableArea->scrollPosition(); IntRect scrollVisibleRect = scrollableArea->visibleContentRect(); + // Convert the object rect into local coordinates. + if (!scrollParent->isAXScrollView()) { + objectRect.moveBy(scrollPosition); + objectRect.moveBy(-pixelSnappedIntRect(scrollParent->elementRect()).location()); + } + int desiredX = computeBestScrollOffset( scrollPosition.x(), objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(), diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/Permissions.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/Permissions.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/Permissions.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/Permissions.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -62,9 +62,9 @@ type = WebPermissionTypeNotifications; } else if (name == "push") { PushPermissionDescriptor pushPermission = NativeValueTraits::nativeValue(scriptState->isolate(), rawPermission.v8Value(), exceptionState); - // Only "userVisible" push is supported for now. - if (!pushPermission.userVisible()) { - resolver->resolve(PermissionStatus::create(scriptState->executionContext(), WebPermissionStatusDenied, WebPermissionTypePush)); + // Only "userVisibleOnly" push is supported for now. + if (!pushPermission.userVisibleOnly()) { + resolver->reject(DOMException::create(NotSupportedError, "Push Permission without userVisibleOnly:true isn't supported yet.")); return promise; } type = WebPermissionTypePushNotifications; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/PushPermissionDescriptor.idl oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/PushPermissionDescriptor.idl --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/PushPermissionDescriptor.idl 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/permissions/PushPermissionDescriptor.idl 2015-06-23 12:16:46.000000000 +0000 @@ -4,5 +4,5 @@ dictionary PushPermissionDescriptor : PermissionDescriptor { // See https://w3c.github.io/push-api/. - boolean userVisible = false; + boolean userVisibleOnly = false; }; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/webaudio/AudioContext.idl oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/webaudio/AudioContext.idl --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/modules/webaudio/AudioContext.idl 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/modules/webaudio/AudioContext.idl 2015-06-23 12:16:46.000000000 +0000 @@ -76,7 +76,7 @@ [RaisesException, MeasureAs=AudioContextCreateDynamicsCompressor] DynamicsCompressorNode createDynamicsCompressor(); [RaisesException, MeasureAs=AudioContextCreateAnalyser] AnalyserNode createAnalyser(); [RaisesException, MeasureAs=AudioContextCreateScriptProcessor, RaisesException] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels); - [RaisesException, MeasureAs=AudioContextCreatePanner] StereoPannerNode createStereoPanner(); + [RaisesException, MeasureAs=AudioContextCreateStereoPanner] StereoPannerNode createStereoPanner(); [RaisesException, MeasureAs=AudioContextCreateOscillator] OscillatorNode createOscillator(); [RaisesException, MeasureAs=AudioContextCreatePeriodicWave, RaisesException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -299,21 +299,6 @@ return YUV_UNKNOWN; } -bool validateSubsampling(const jpeg_decompress_struct* cinfo) -{ - ASSERT(cinfo->num_components); - - jpeg_component_info* component = cinfo->comp_info; - for (int c = 0; c < cinfo->num_components; ++c, ++component) { - if (component->h_samp_factor == 3) - component->h_samp_factor = 1; - if (component->v_samp_factor == 3) - component->v_samp_factor = 1; - } - - return true; -} - class JPEGImageReader { WTF_MAKE_FAST_ALLOCATED(JPEGImageReader); public: @@ -411,7 +396,6 @@ return m_decoder->setFailed(); J_COLOR_SPACE overrideColorSpace = JCS_UNKNOWN; - switch (m_state) { case JPEG_HEADER: // Read file parameters with jpeg_read_header(). @@ -448,9 +432,6 @@ return m_decoder->setFailed(); } - if (!validateSubsampling(&m_info)) - return m_decoder->setFailed(); - m_state = JPEG_START_DECOMPRESS; // We can fill in the size now that the header is available. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -35,11 +35,13 @@ namespace blink { -v8::Local WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!buffer) return v8::Local(); - return toV8(PassRefPtr(*buffer), creationContext, isolate); + return toV8(PassRefPtr(*buffer), isolate->GetCurrentContext()->Global(), isolate); } WebArrayBuffer* WebArrayBufferConverter::createFromV8Value(v8::Local value, v8::Isolate* isolate) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebBlob.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebBlob.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebBlob.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebBlob.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -79,11 +79,13 @@ return m_private->uuid(); } -v8::Local WebBlob::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebBlob::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } WebBlob::WebBlob(Blob* blob) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMError.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMError.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMError.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMError.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -67,11 +67,13 @@ return m_private->message(); } -v8::Local WebDOMError::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebDOMError::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } WebDOMError::WebDOMError(DOMError* error) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMFileSystem.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMFileSystem.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMFileSystem.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebDOMFileSystem.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -116,11 +116,13 @@ return m_private->rootURL(); } -v8::Local WebDOMFileSystem::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebDOMFileSystem::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } v8::Local WebDOMFileSystem::createV8Entry( @@ -132,9 +134,9 @@ if (!m_private.get()) return v8::Local(); if (entryType == EntryTypeDirectory) - return toV8(DirectoryEntry::create(m_private.get(), path), creationContext, isolate); + return toV8(DirectoryEntry::create(m_private.get(), path), isolate->GetCurrentContext()->Global(), isolate); ASSERT(entryType == EntryTypeFile); - return toV8(FileEntry::create(m_private.get(), path), creationContext, isolate); + return toV8(FileEntry::create(m_private.get(), path), isolate->GetCurrentContext()->Global(), isolate); } WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015-04-21 09:29:28.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015-06-23 12:16:46.000000000 +0000 @@ -203,6 +203,11 @@ RuntimeEnabledFeatures::setPeerConnectionEnabled(enable); } +void WebRuntimeFeatures::enablePermissionsAPI(bool enable) +{ + RuntimeEnabledFeatures::setPermissionsEnabled(enable); +} + void WebRuntimeFeatures::enableRequestAutocomplete(bool enable) { RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/wtf/unicode/CharacterNames.h oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/wtf/unicode/CharacterNames.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/WebKit/Source/wtf/unicode/CharacterNames.h 2015-04-21 09:29:29.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/WebKit/Source/wtf/unicode/CharacterNames.h 2015-06-23 12:16:46.000000000 +0000 @@ -69,12 +69,14 @@ const UChar leftToRightIsolate = 0x2066; const UChar leftToRightMark = 0x200E; const UChar leftToRightOverride = 0x202D; +const UChar lineSeparator = 0x2028; const UChar minusSign = 0x2212; const UChar newlineCharacter = 0x000A; const UChar nationalDigitShapes = 0x206E; const UChar nominalDigitShapes = 0x206F; const UChar noBreakSpace = 0x00A0; const UChar objectReplacementCharacter = 0xFFFC; +const UChar paragraphSeparator = 0x2029; const UChar popDirectionalFormatting = 0x202C; const UChar popDirectionalIsolate = 0x2069; const UChar replacementCharacter = 0xFFFD; @@ -137,12 +139,14 @@ using WTF::Unicode::leftToRightIsolate; using WTF::Unicode::leftToRightMark; using WTF::Unicode::leftToRightOverride; +using WTF::Unicode::lineSeparator; using WTF::Unicode::minusSign; using WTF::Unicode::newlineCharacter; using WTF::Unicode::nationalDigitShapes; using WTF::Unicode::nominalDigitShapes; using WTF::Unicode::noBreakSpace; using WTF::Unicode::objectReplacementCharacter; +using WTF::Unicode::paragraphSeparator; using WTF::Unicode::popDirectionalFormatting; using WTF::Unicode::popDirectionalIsolate; using WTF::Unicode::replacementCharacter; Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/webpagereplay/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/webpagereplay/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/webrtc/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/webrtc/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.cc oxide-qt-1.7.9/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.cc --- oxide-qt-1.7.8/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.cc 2015-04-21 09:28:34.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.cc 2015-06-23 12:14:59.000000000 +0000 @@ -195,6 +195,7 @@ DCHECK(channel_map_.empty()); DCHECK(!remb_->InUse()); DCHECK(vie_encoder_map_.empty()); + DCHECK(send_encoders_.empty()); } bool ChannelGroup::CreateSendChannel(int channel_id, @@ -273,6 +274,8 @@ { CriticalSectionScoped lock(encoder_map_cs_.get()); vie_encoder_map_[channel_id] = vie_encoder; + if (sender) + send_encoders_[channel_id] = vie_encoder; } return true; @@ -368,10 +371,14 @@ ViEEncoder* ChannelGroup::PopEncoder(int channel_id) { CriticalSectionScoped lock(encoder_map_cs_.get()); - EncoderMap::iterator e_it = vie_encoder_map_.find(channel_id); - DCHECK(e_it != vie_encoder_map_.end()); - ViEEncoder* encoder = e_it->second; - vie_encoder_map_.erase(e_it); + auto it = vie_encoder_map_.find(channel_id); + DCHECK(it != vie_encoder_map_.end()); + ViEEncoder* encoder = it->second; + vie_encoder_map_.erase(it); + + it = send_encoders_.find(channel_id); + if (it != send_encoders_.end()) + send_encoders_.erase(it); return encoder; } @@ -473,7 +480,7 @@ int pad_up_to_bitrate_bps = 0; { CriticalSectionScoped lock(encoder_map_cs_.get()); - for (const auto& encoder : vie_encoder_map_) { + for (const auto& encoder : send_encoders_) { pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps(target_bitrate_bps); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.h oxide-qt-1.7.9/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.h --- oxide-qt-1.7.8/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.h 2015-04-21 09:28:34.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/third_party/webrtc/video_engine/vie_channel_group.h 2015-06-23 12:14:59.000000000 +0000 @@ -105,6 +105,7 @@ ChannelMap channel_map_; // Maps Channel id -> ViEEncoder. EncoderMap vie_encoder_map_; + EncoderMap send_encoders_; rtc::scoped_ptr encoder_map_cs_; const Config* config_; Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/xdg-utils/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/xdg-utils/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/third_party/yasm/source/patched-yasm/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/third_party/yasm/source/patched-yasm/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/tools/deps2git/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/tools/deps2git/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/tools/grit/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/tools/grit/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/tools/gyp/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/tools/gyp/.git/index differ Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/tools/page_cycler/acid3/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/tools/page_cycler/acid3/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/tools/perf/metrics/startup_metric.py oxide-qt-1.7.9/third_party/chromium/src/tools/perf/metrics/startup_metric.py --- oxide-qt-1.7.8/third_party/chromium/src/tools/perf/metrics/startup_metric.py 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/tools/perf/metrics/startup_metric.py 2015-06-23 12:14:31.000000000 +0000 @@ -15,6 +15,9 @@ class StartupMetric(Metric): "A metric for browser startup time." + # Seconds to wait for page loading complete. + DEFAULT_LOADING_TIMEOUT = 90 + HISTOGRAMS_TO_RECORD = { 'messageloop_start_time' : 'Startup.BrowserMessageLoopStartTimeFromMainEntry', @@ -46,36 +49,34 @@ def _RecordTabLoadTimes(self, tab, browser_main_entry_time_ms, results): """Records the tab load times for the browser. """ - tab_load_times = [] TabLoadTime = collections.namedtuple( 'TabLoadTime', - ['load_start_ms', 'load_duration_ms', 'request_start_ms']) + ['request_start_ms', 'load_end_ms']) + + def RecordOneTab(t): + def EvaluateInt(exp): + val = t.EvaluateJavaScript(exp) + if not val: + logging.warn('%s undefined' % exp) + return 0 + return int(val) - def RecordTabLoadTime(t): try: - t.WaitForDocumentReadyStateToBeComplete() + t.WaitForJavaScriptExpression( + 'window.performance.timing["loadEventEnd"] > 0', + self.DEFAULT_LOADING_TIMEOUT) + + # EvaluateJavaScript(window.performance.timing) doesn't guarantee to + # return the desired javascript object (crbug/472603). It may return an + # empty object. However getting individual field works. + # The behavior depends on Webkit implementation on different platforms. + load_event_end = EvaluateInt( + 'window.performance.timing["loadEventEnd"]') + request_start = EvaluateInt( + 'window.performance.timing["requestStart"]') + + return TabLoadTime(request_start, load_event_end) - result = t.EvaluateJavaScript( - 'statsCollectionController.tabLoadTiming()') - result = json.loads(result) - - if 'load_start_ms' not in result or 'load_duration_ms' not in result: - raise Exception("Outdated Chrome version, " - "statsCollectionController.tabLoadTiming() not present") - if result['load_duration_ms'] is None: - tab_title = t.EvaluateJavaScript('document.title') - print "Page: ", tab_title, " didn't finish loading." - return - - perf_timing = t.EvaluateJavaScript('window.performance.timing') - if 'requestStart' not in perf_timing: - perf_timing['requestStart'] = 0 # Exclude from benchmark results - print 'requestStart is not supported by this browser' - - tab_load_times.append(TabLoadTime( - int(result['load_start_ms']), - int(result['load_duration_ms']), - int(perf_timing['requestStart']))) except exceptions.TimeoutException: # Low memory Android devices may not be able to load more than # one tab at a time, so may timeout when the test attempts to @@ -87,19 +88,18 @@ # when the user switches to them, rather than during startup. In view of # this, to get the same measures on all platform, we only measure the # foreground tab on all platforms. + foreground_tab_stats = RecordOneTab(tab.browser.foreground_tab) - RecordTabLoadTime(tab.browser.foreground_tab) - - foreground_tab_stats = tab_load_times[0] - foreground_tab_load_complete = ((foreground_tab_stats.load_start_ms + - foreground_tab_stats.load_duration_ms) - browser_main_entry_time_ms) - results.AddValue(scalar.ScalarValue( - results.current_page, 'foreground_tab_load_complete', 'ms', - foreground_tab_load_complete)) - if (foreground_tab_stats.request_start_ms > 0): + if foreground_tab_stats: + foreground_tab_load_complete = ( + foreground_tab_stats.load_end_ms - browser_main_entry_time_ms) results.AddValue(scalar.ScalarValue( - results.current_page, 'foreground_tab_request_start', 'ms', - foreground_tab_stats.request_start_ms - browser_main_entry_time_ms)) + results.current_page, 'foreground_tab_load_complete', 'ms', + foreground_tab_load_complete)) + if (foreground_tab_stats.request_start_ms > 0): + results.AddValue(scalar.ScalarValue( + results.current_page, 'foreground_tab_request_start', 'ms', + foreground_tab_stats.request_start_ms - browser_main_entry_time_ms)) def AddResults(self, tab, results): get_histogram_js = 'statsCollectionController.getBrowserHistogram("%s")' Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/tools/swarming_client/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/tools/swarming_client/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java oxide-qt-1.7.9/third_party/chromium/src/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java --- oxide-qt-1.7.8/third_party/chromium/src/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java 2015-04-29 21:36:56.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java 2015-06-23 12:14:31.000000000 +0000 @@ -7,15 +7,18 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.annotation.SuppressLint; +import android.annotation.TargetApi; import android.app.Activity; import android.app.PendingIntent; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.util.Log; import android.util.SparseArray; import android.view.View; +import android.view.accessibility.AccessibilityManager; import android.widget.Toast; import org.chromium.base.CalledByNative; @@ -33,6 +36,29 @@ public class WindowAndroid { private static final String TAG = "WindowAndroid"; + @TargetApi(Build.VERSION_CODES.KITKAT) + private class TouchExplorationMonitor { + // Listener that tells us when touch exploration is enabled or disabled. + private AccessibilityManager.TouchExplorationStateChangeListener mTouchExplorationListener; + + TouchExplorationMonitor() { + mTouchExplorationListener = + new AccessibilityManager.TouchExplorationStateChangeListener() { + public void onTouchExplorationStateChanged(boolean enabled) { + mIsTouchExplorationEnabled = + mAccessibilityManager.isTouchExplorationEnabled(); + refreshWillNotDraw(); + } + }; + mAccessibilityManager.addTouchExplorationStateChangeListener(mTouchExplorationListener); + } + + void destroy() { + mAccessibilityManager.removeTouchExplorationStateChangeListener( + mTouchExplorationListener); + } + } + // Native pointer to the c++ WindowAndroid object. private long mNativeWindowAndroid = 0; private final VSyncMonitor mVSyncMonitor; @@ -55,6 +81,15 @@ private HashSet mAnimationsOverContent = new HashSet(); private View mAnimationPlaceholderView; + // System accessibility service. + private final AccessibilityManager mAccessibilityManager; + + // Whether touch exploration is enabled. + private boolean mIsTouchExplorationEnabled; + + // On KitKat and higher, a class that monitors the touch exploration state. + private TouchExplorationMonitor mTouchExplorationMonitor; + private final VSyncMonitor.Listener mVSyncListener = new VSyncMonitor.Listener() { @Override public void onVSync(VSyncMonitor monitor, long vsyncTimeMicros) { @@ -84,6 +119,8 @@ mOutstandingIntents = new SparseArray(); mIntentErrors = new HashMap(); mVSyncMonitor = new VSyncMonitor(context, mVSyncListener); + mAccessibilityManager = (AccessibilityManager) + context.getSystemService(Context.ACCESSIBILITY_SERVICE); } /** @@ -284,6 +321,10 @@ nativeDestroy(mNativeWindowAndroid); mNativeWindowAndroid = 0; } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (mTouchExplorationMonitor != null) mTouchExplorationMonitor.destroy(); + } } /** @@ -305,6 +346,14 @@ */ public void setAnimationPlaceholderView(View view) { mAnimationPlaceholderView = view; + + // The accessibility focus ring also gets clipped by the SurfaceView 'hole', so + // make sure the animation placeholder view is in place if touch exploration is on. + mIsTouchExplorationEnabled = mAccessibilityManager.isTouchExplorationEnabled(); + refreshWillNotDraw(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + mTouchExplorationMonitor = new TouchExplorationMonitor(); + } } /** @@ -329,9 +378,7 @@ animation.start(); // When the first animation starts, make the placeholder 'draw' itself. - if (mAnimationPlaceholderView.willNotDraw()) { - mAnimationPlaceholderView.setWillNotDraw(false); - } + refreshWillNotDraw(); // When the last animation ends, remove the placeholder view, // returning to the default optimized state. @@ -340,13 +387,24 @@ public void onAnimationEnd(Animator animation) { animation.removeListener(this); mAnimationsOverContent.remove(animation); - if (mAnimationsOverContent.isEmpty()) { - mAnimationPlaceholderView.setWillNotDraw(true); - } + refreshWillNotDraw(); } }); } + /** + * Update whether the placeholder is 'drawn' based on whether an animation is running + * or touch exploration is enabled - if either of those are true, we call + * setWillNotDraw(false) to ensure that the animation is drawn over the SurfaceView, + * and otherwise we call setWillNotDraw(true). + */ + private void refreshWillNotDraw() { + boolean willNotDraw = !mIsTouchExplorationEnabled && mAnimationsOverContent.isEmpty(); + if (mAnimationPlaceholderView.willNotDraw() != willNotDraw) { + mAnimationPlaceholderView.setWillNotDraw(willNotDraw); + } + } + private native long nativeInit(); private native void nativeOnVSync(long nativeWindowAndroid, long vsyncTimeMicros, diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ui/compositor/layer_owner.cc oxide-qt-1.7.9/third_party/chromium/src/ui/compositor/layer_owner.cc --- oxide-qt-1.7.8/third_party/chromium/src/ui/compositor/layer_owner.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ui/compositor/layer_owner.cc 2015-06-23 12:13:25.000000000 +0000 @@ -52,10 +52,14 @@ if (alpha_shape) new_layer->SetAlphaShape(make_scoped_ptr(new SkRegion(*alpha_shape))); - // Install new layer as a sibling of the old layer, stacked below it. if (old_layer->parent()) { + // Install new layer as a sibling of the old layer, stacked below it. old_layer->parent()->Add(new_layer); old_layer->parent()->StackBelow(new_layer, old_layer.get()); + } else if (old_layer->GetCompositor()) { + // If old_layer was the layer tree root then we need to move the Compositor + // over to the new root. + old_layer->GetCompositor()->SetRootLayer(new_layer); } // Migrate all the child layers over to the new layer. Copy the list because @@ -68,12 +72,6 @@ new_layer->Add(child); } - // If old_layer was the layer tree root then we need to move the Compositor - // over to the new root. - const bool is_root = !old_layer->parent(); - if (is_root && old_layer->GetCompositor()) - old_layer->GetCompositor()->SetRootLayer(new_layer); - // Install the delegate last so that the delegate isn't notified as we copy // state to the new layer. new_layer->set_delegate(old_delegate); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ui/compositor/layer_owner_unittest.cc oxide-qt-1.7.9/third_party/chromium/src/ui/compositor/layer_owner_unittest.cc --- oxide-qt-1.7.8/third_party/chromium/src/ui/compositor/layer_owner_unittest.cc 2015-05-08 14:35:20.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ui/compositor/layer_owner_unittest.cc 2015-06-23 12:14:31.000000000 +0000 @@ -8,7 +8,9 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/compositor/compositor.h" #include "ui/compositor/layer.h" +#include "ui/compositor/layer_animation_observer.h" #include "ui/compositor/layer_animator.h" +#include "ui/compositor/scoped_animation_duration_scale_mode.h" #include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/compositor/test/context_factories_for_test.h" #include "ui/gfx/native_widget_types.h" @@ -16,6 +18,24 @@ namespace ui { namespace { +// An animation observer that confirms upon animation completion, that the +// compositor is not null. +class TestLayerAnimationObserver : public ImplicitAnimationObserver { + public: + TestLayerAnimationObserver(Layer* layer) : layer_(layer) {} + ~TestLayerAnimationObserver() override {} + + // ImplicitAnimationObserver: + void OnImplicitAnimationsCompleted() override { + EXPECT_NE(nullptr, layer_->GetCompositor()); + } + + private: + Layer* layer_; + + DISALLOW_COPY_AND_ASSIGN(TestLayerAnimationObserver); +}; + // Test fixture for LayerOwner tests that require a ui::Compositor. class LayerOwnerTestWithCompositor : public testing::Test { public: @@ -106,4 +126,71 @@ EXPECT_EQ(nullptr, layer_copy->GetCompositor()); } +// Tests that recreating the root layer, while one of its children is animating, +// properly updates the compositor. So that compositor is not null for observers +// of animations being cancelled. +TEST_F(LayerOwnerTestWithCompositor, RecreateRootLayerDuringAnimation) { + LayerOwner owner; + Layer* layer = new Layer; + owner.SetLayer(layer); + compositor()->SetRootLayer(layer); + + scoped_ptr child(new Layer); + child->SetBounds(gfx::Rect(0, 0, 100, 100)); + layer->Add(child.get()); + + // This observer checks that the compositor of |child| is not null upon + // animation completion. + scoped_ptr observer( + new TestLayerAnimationObserver(child.get())); + scoped_ptr long_duration_animation( + new ui::ScopedAnimationDurationScaleMode( + ui::ScopedAnimationDurationScaleMode::SLOW_DURATION)); + { + ui::ScopedLayerAnimationSettings animation(child->GetAnimator()); + animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(1000)); + animation.AddObserver(observer.get()); + gfx::Transform transform; + transform.Scale(0.5f, 0.5f); + child->SetTransform(transform); + } + + scoped_ptr layer_copy = owner.RecreateLayer(); +} + +// Tests that recreating a non-root layer, while one of its children is +// animating, properly updates the compositor. So that compositor is not null +// for observers of animations being cancelled. +TEST_F(LayerOwnerTestWithCompositor, RecreateNonRootLayerDuringAnimation) { + scoped_ptr root_layer(new Layer); + compositor()->SetRootLayer(root_layer.get()); + + LayerOwner owner; + Layer* layer = new Layer; + owner.SetLayer(layer); + root_layer->Add(layer); + + scoped_ptr child(new Layer); + child->SetBounds(gfx::Rect(0, 0, 100, 100)); + layer->Add(child.get()); + + // This observer checks that the compositor of |child| is not null upon + // animation completion. + scoped_ptr observer( + new TestLayerAnimationObserver(child.get())); + scoped_ptr long_duration_animation( + new ui::ScopedAnimationDurationScaleMode( + ui::ScopedAnimationDurationScaleMode::SLOW_DURATION)); + { + ui::ScopedLayerAnimationSettings animation(child->GetAnimator()); + animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(1000)); + animation.AddObserver(observer.get()); + gfx::Transform transform; + transform.Scale(0.5f, 0.5f); + child->SetTransform(transform); + } + + scoped_ptr layer_copy = owner.RecreateLayer(); +} + } // namespace ui diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js oxide-qt-1.7.9/third_party/chromium/src/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js --- oxide-qt-1.7.8/third_party/chromium/src/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js 2015-04-21 09:27:03.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js 2015-06-23 12:14:31.000000000 +0000 @@ -145,13 +145,31 @@ * @override */ ShareDialog.prototype.onResized = function(width, height, callback) { - if (width && height) { - this.webViewWrapper_.style.width = width + 'px'; - this.webViewWrapper_.style.height = height + 'px'; - this.webView_.style.width = width + 'px'; - this.webView_.style.height = height + 'px'; - } - setTimeout(callback, 0); + if (!width || !height) + return; + + this.webViewWrapper_.style.width = width + 'px'; + this.webViewWrapper_.style.height = height + 'px'; + this.webView_.style.width = width + 'px'; + this.webView_.style.height = height + 'px'; + + // Wait sending 'resizeComplete' event until the latest size can be obtained + // in the WebView. + var checkSize = function() { + this.webView_.executeScript({ + code: "[document.documentElement.clientWidth," + + " document.documentElement.clientHeight];" + }, function(results) { + if (results[0][0] === parseInt(this.webView_.style.width, 10) && + results[0][1] === parseInt(this.webView_.style.height, 10)) { + callback(); + } else { + setTimeout(checkSize, 50); + } + }.bind(this)); + }.bind(this); + + setTimeout(checkSize, 0); }; /** diff -Nru oxide-qt-1.7.8/third_party/chromium/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc oxide-qt-1.7.9/third_party/chromium/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc --- oxide-qt-1.7.8/third_party/chromium/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc 2015-04-21 09:28:07.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc 2015-06-23 12:14:31.000000000 +0000 @@ -793,9 +793,7 @@ if (app_icon.HasRepresentation(1.0f)) SerializeImageRepresentation(app_icon.GetRepresentation(1.0f), &data); - if (data.empty()) - XDeleteProperty(xdisplay_, xwindow_, atom_cache_.GetAtom("_NET_WM_ICON")); - else + if (!data.empty()) ui::SetAtomArrayProperty(xwindow_, "_NET_WM_ICON", "CARDINAL", data); } Binary files /tmp/TRpMxq_wvD/oxide-qt-1.7.8/third_party/chromium/src/v8/.git/index and /tmp/uLE4ts2XXv/oxide-qt-1.7.9/third_party/chromium/src/v8/.git/index differ diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/include/v8-version.h oxide-qt-1.7.9/third_party/chromium/src/v8/include/v8-version.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/include/v8-version.h 2015-05-14 15:35:19.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/include/v8-version.h 2015-06-23 12:15:01.000000000 +0000 @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 4 #define V8_MINOR_VERSION 3 #define V8_BUILD_NUMBER 61 -#define V8_PATCH_LEVEL 21 +#define V8_PATCH_LEVEL 30 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/api.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/api.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/api.cc 2015-05-08 14:35:29.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/api.cc 2015-06-23 12:15:01.000000000 +0000 @@ -369,7 +369,7 @@ i::SnapshotByteSink context_sink; i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); context_ser.Serialize(&raw_context); - ser.SerializeWeakReferences(); + ser.SerializeWeakReferencesAndDeferred(); result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); } @@ -4008,10 +4008,10 @@ auto proto = i::PrototypeIterator::GetCurrent(iter); i::LookupIterator it(self, key_obj, i::Handle::cast(proto), i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return MaybeLocal(); Local result; has_pending_exception = !ToLocal(i::Object::GetProperty(&it), &result); RETURN_ON_FAILED_EXECUTION(Value); + if (!it.IsFound()) return MaybeLocal(); RETURN_ESCAPED(result); } @@ -4037,9 +4037,9 @@ auto proto = i::PrototypeIterator::GetCurrent(iter); i::LookupIterator it(self, key_obj, i::Handle::cast(proto), i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return Nothing(); auto result = i::JSReceiver::GetPropertyAttributes(&it); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute); + if (!it.IsFound()) return Nothing(); if (result.FromJust() == ABSENT) { return Just(static_cast(NONE)); } @@ -4057,16 +4057,15 @@ MaybeLocal v8::Object::GetRealNamedProperty(Local context, Local key) { - PREPARE_FOR_EXECUTION( - context, "v8::Object::GetRealNamedPropertyInPrototypeChain()", Value); + PREPARE_FOR_EXECUTION(context, "v8::Object::GetRealNamedProperty()", Value); auto self = Utils::OpenHandle(this); auto key_obj = Utils::OpenHandle(*key); i::LookupIterator it(self, key_obj, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return MaybeLocal(); Local result; has_pending_exception = !ToLocal(i::Object::GetProperty(&it), &result); RETURN_ON_FAILED_EXECUTION(Value); + if (!it.IsFound()) return MaybeLocal(); RETURN_ESCAPED(result); } @@ -4086,9 +4085,9 @@ auto key_obj = Utils::OpenHandle(*key); i::LookupIterator it(self, key_obj, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return Nothing(); auto result = i::JSReceiver::GetPropertyAttributes(&it); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute); + if (!it.IsFound()) return Nothing(); if (result.FromJust() == ABSENT) { return Just(static_cast(NONE)); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/arm/full-codegen-arm.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/arm/full-codegen-arm.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/arm/full-codegen-arm.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/arm/full-codegen-arm.cc 2015-06-23 12:15:01.000000000 +0000 @@ -1698,21 +1698,13 @@ __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); __ mov(r1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ mov(r0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(r3, r2, r1, r0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1904,17 +1896,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); Handle constant_elements_values( FixedArrayBase::cast(constant_elements->get(1))); @@ -1929,8 +1914,8 @@ __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); __ mov(r1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ mov(r0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(r3, r2, r1, r0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1940,6 +1925,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1956,7 +1943,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ ldr(r6, MemOperand(sp, kPointerSize)); // Copy of array literal. __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/arm64/full-codegen-arm64.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/arm64/full-codegen-arm64.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/arm64/full-codegen-arm64.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/arm64/full-codegen-arm64.cc 2015-06-23 12:15:01.000000000 +0000 @@ -1677,23 +1677,13 @@ __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset)); __ Mov(x2, Smi::FromInt(expr->literal_index())); __ Mov(x1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ Mov(x0, Smi::FromInt(flags)); - int properties_count = constant_properties->length() / 2; - const int max_cloned_properties = - FastCloneShallowObjectStub::kMaximumClonedProperties; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > max_cloned_properties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(x3, x2, x1, x0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1885,18 +1875,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = (expr->depth() == 1) ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1909,8 +1890,8 @@ __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset)); __ Mov(x2, Smi::FromInt(expr->literal_index())); __ Mov(x1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ Mov(x0, Smi::FromInt(flags)); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); __ Push(x3, x2, x1, x0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1920,6 +1901,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1936,7 +1919,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ Peek(x6, kPointerSize); // Copy of array literal. __ Ldr(x1, FieldMemOperand(x6, JSObject::kElementsOffset)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/ast.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/ast.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/ast.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/ast.cc 2015-06-23 12:15:01.000000000 +0000 @@ -368,6 +368,7 @@ constant_properties_ = constant_properties; fast_elements_ = (max_element_index <= 32) || ((2 * elements) >= max_element_index); + has_elements_ = elements > 0; set_is_simple(is_simple); set_depth(depth_acc); } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/ast.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/ast.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/ast.h 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/ast.h 2015-06-23 12:15:01.000000000 +0000 @@ -1482,10 +1482,12 @@ Handle constant_properties() const { return constant_properties_; } + int properties_count() const { return constant_properties_->length() / 2; } ZoneList* properties() const { return properties_; } bool fast_elements() const { return fast_elements_; } bool may_store_doubles() const { return may_store_doubles_; } bool has_function() const { return has_function_; } + bool has_elements() const { return has_elements_; } // Decide if a property should be in the object boilerplate. static bool IsBoilerplateProperty(Property* property); @@ -1499,16 +1501,20 @@ void CalculateEmitStore(Zone* zone); // Assemble bitfield of flags for the CreateObjectLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = fast_elements() ? kFastElements : kNoFlags; flags |= has_function() ? kHasFunction : kNoFlags; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } enum Flags { kNoFlags = 0, kFastElements = 1, - kHasFunction = 1 << 1 + kHasFunction = 1 << 1, + kDisableMementos = 1 << 2 }; struct Accessors: public ZoneObject { @@ -1533,6 +1539,7 @@ properties_(properties), boilerplate_properties_(boilerplate_properties), fast_elements_(false), + has_elements_(false), may_store_doubles_(false), has_function_(has_function) {} static int parent_num_ids() { return MaterializedLiteral::num_ids(); } @@ -1543,6 +1550,7 @@ ZoneList* properties_; int boilerplate_properties_; bool fast_elements_; + bool has_elements_; bool may_store_doubles_; bool has_function_; }; @@ -1578,6 +1586,12 @@ DECLARE_NODE_TYPE(ArrayLiteral) Handle constant_elements() const { return constant_elements_; } + ElementsKind constant_elements_kind() const { + DCHECK_EQ(2, constant_elements_->length()); + return static_cast( + Smi::cast(constant_elements_->get(0))->value()); + } + ZoneList* values() const { return values_; } BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); } @@ -1593,9 +1607,11 @@ void BuildConstantElements(Isolate* isolate); // Assemble bitfield of flags for the CreateArrayLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = depth() == 1 ? kShallowElements : kNoFlags; - flags |= ArrayLiteral::kDisableMementos; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/bootstrapper.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/bootstrapper.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/bootstrapper.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/bootstrapper.cc 2015-06-23 12:15:01.000000000 +0000 @@ -2766,6 +2766,7 @@ if (value->IsPropertyCell()) { value = handle(PropertyCell::cast(*value)->value(), isolate()); } + if (value->IsTheHole()) continue; PropertyDetails details = properties->DetailsAt(i); DCHECK_EQ(kData, details.kind()); JSObject::AddProperty(to, key, value, details.attributes()); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/compiler/ast-graph-builder.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/compiler/ast-graph-builder.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/compiler/ast-graph-builder.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/compiler/ast-graph-builder.cc 2015-06-23 12:15:01.000000000 +0000 @@ -1627,7 +1627,7 @@ BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); Node* literal_index = jsgraph()->Constant(expr->literal_index()); Node* constants = jsgraph()->Constant(expr->constant_properties()); - Node* flags = jsgraph()->Constant(expr->ComputeFlags()); + Node* flags = jsgraph()->Constant(expr->ComputeFlags(true)); const Operator* op = javascript()->CallRuntime(Runtime::kCreateObjectLiteral, 4); Node* literal = NewNode(op, literals_array, literal_index, constants, flags); @@ -1819,7 +1819,7 @@ BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); Node* literal_index = jsgraph()->Constant(expr->literal_index()); Node* constants = jsgraph()->Constant(expr->constant_elements()); - Node* flags = jsgraph()->Constant(expr->ComputeFlags()); + Node* flags = jsgraph()->Constant(expr->ComputeFlags(true)); const Operator* op = javascript()->CallRuntime(Runtime::kCreateArrayLiteral, 4); Node* literal = NewNode(op, literals_array, literal_index, constants, flags); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/flag-definitions.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/flag-definitions.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/flag-definitions.h 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/flag-definitions.h 2015-06-23 12:15:01.000000000 +0000 @@ -844,6 +844,8 @@ DEFINE_BOOL(heap_stats, false, "report heap statistics before and after GC") DEFINE_BOOL(code_stats, false, "report code statistics after GC") DEFINE_BOOL(print_handles, false, "report handles after GC") +DEFINE_BOOL(check_handle_count, false, + "Check that there are not too many handles at GC") DEFINE_BOOL(print_global_handles, false, "report global handles after GC") // TurboFan debug-only flags. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/full-codegen.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/full-codegen.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/full-codegen.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/full-codegen.cc 2015-06-23 12:15:01.000000000 +0000 @@ -415,6 +415,27 @@ } +bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( + ObjectLiteral* expr) const { + // FastCloneShallowObjectStub doesn't copy elements, and object literals don't + // support copy-on-write (COW) elements for now. + // TODO(mvstanton): make object literals support COW elements. + return expr->may_store_doubles() || expr->depth() > 1 || + masm()->serializer_enabled() || + expr->ComputeFlags() != ObjectLiteral::kFastElements || + expr->has_elements() || + expr->properties_count() > + FastCloneShallowObjectStub::kMaximumClonedProperties; +} + + +bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( + ArrayLiteral* expr) const { + return expr->depth() > 1 || + expr->values()->length() > JSObject::kInitialMaxFastElementArray; +} + + void FullCodeGenerator::Initialize() { InitializeAstVisitor(info_->isolate(), info_->zone()); // The generation of debug code must match between the snapshot code and the diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/full-codegen.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/full-codegen.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/full-codegen.h 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/full-codegen.h 2015-06-23 12:15:01.000000000 +0000 @@ -715,7 +715,7 @@ loop_depth_--; } - MacroAssembler* masm() { return masm_; } + MacroAssembler* masm() const { return masm_; } class ExpressionContext; const ExpressionContext* context() { return context_; } @@ -759,6 +759,9 @@ void PopulateDeoptimizationData(Handle code); void PopulateTypeFeedbackInfo(Handle code); + bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const; + bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const; + Handle handler_table() { return handler_table_; } struct BailoutEntry { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/heap/heap.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/heap/heap.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/heap/heap.cc 2015-05-14 15:35:19.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/heap/heap.cc 2015-06-23 12:15:01.000000000 +0000 @@ -620,6 +620,7 @@ if (FLAG_gc_verbose) Print(); if (FLAG_code_stats) ReportCodeStatistics("After GC"); #endif + if (FLAG_check_handle_count) CheckHandleCount(); if (FLAG_deopt_every_n_garbage_collections > 0) { // TODO(jkummerow/ulan/jarin): This is not safe! We can't assume that // the topmost optimized frame can be deoptimized safely, because it @@ -1023,7 +1024,7 @@ } else { if (counter > 1) { CollectAllGarbage( - kReduceMemoryFootprintMask, + kReduceMemoryFootprintMask | kAbortIncrementalMarkingMask, "failed to reserve space in paged or large " "object space, trying to reduce memory footprint"); } else { @@ -5698,6 +5699,24 @@ #endif +class CheckHandleCountVisitor : public ObjectVisitor { + public: + CheckHandleCountVisitor() : handle_count_(0) {} + ~CheckHandleCountVisitor() { CHECK(handle_count_ < 2000); } + void VisitPointers(Object** start, Object** end) { + handle_count_ += end - start; + } + + private: + ptrdiff_t handle_count_; +}; + + +void Heap::CheckHandleCount() { + CheckHandleCountVisitor v; + isolate_->handle_scope_implementer()->Iterate(&v); +} + Space* AllSpaces::next() { switch (counter_++) { diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/heap/heap.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/heap/heap.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/heap/heap.h 2015-04-29 21:37:14.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/heap/heap.h 2015-06-23 12:15:01.000000000 +0000 @@ -987,6 +987,7 @@ } static bool RootIsImmortalImmovable(int root_index); + void CheckHandleCount(); #ifdef VERIFY_HEAP // Verify the heap is in its normal state before or after a GC. diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/hydrogen.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/hydrogen.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/hydrogen.cc 2015-04-29 21:37:14.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/hydrogen.cc 2015-06-23 12:15:01.000000000 +0000 @@ -5554,19 +5554,13 @@ Handle closure_literals(closure->literals(), isolate()); Handle constant_properties = expr->constant_properties(); int literal_index = expr->literal_index(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(true); Add(Add(closure_literals), Add(literal_index), Add(constant_properties), Add(flags)); - // TODO(mvstanton): Add a flag to turn off creation of any - // AllocationMementos for this call: we are in crankshaft and should have - // learned enough about transition behavior to stop emitting mementos. Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral; literal = Add(isolate()->factory()->empty_string(), Runtime::FunctionForId(function_id), @@ -5725,10 +5719,7 @@ // pass an empty fixed array to the runtime function instead. Handle constants = isolate()->factory()->empty_fixed_array(); int literal_index = expr->literal_index(); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - flags |= ArrayLiteral::kDisableMementos; + int flags = expr->ComputeFlags(true); Add(Add(literals), Add(literal_index), diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/ia32/full-codegen-ia32.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/ia32/full-codegen-ia32.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/ia32/full-codegen-ia32.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/ia32/full-codegen-ia32.cc 2015-06-23 12:15:01.000000000 +0000 @@ -1622,17 +1622,10 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || - flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + // If any of the keys would store to the elements array, then we shouldn't + // allow it. + if (MustCreateObjectLiteralWithRuntime(expr)) { __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); @@ -1645,7 +1638,7 @@ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_properties)); __ mov(edx, Immediate(Smi::FromInt(flags))); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1824,20 +1817,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1846,12 +1828,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_elements)); - __ push(Immediate(Smi::FromInt(flags))); + __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1864,6 +1846,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1880,7 +1864,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/json-parser.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/json-parser.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/json-parser.h 2015-05-14 15:35:19.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/json-parser.h 2015-06-23 12:15:01.000000000 +0000 @@ -16,6 +16,9 @@ namespace v8 { namespace internal { +enum ParseElementResult { kElementFound, kElementNotFound, kNullHandle }; + + // A simple json parser. template class JsonParser BASE_EMBEDDED { @@ -155,6 +158,10 @@ // JavaScript array. Handle ParseJsonObject(); + // Helper for ParseJsonObject. Parses the form "123": obj, which is recorded + // as an element, not a property. + ParseElementResult ParseElement(Handle json_object); + // Parses a JSON array literal (grammar production JSONArray). An array // literal is a square-bracketed and comma separated sequence (possibly empty) // of JSON values. @@ -299,6 +306,41 @@ } +template +ParseElementResult JsonParser::ParseElement( + Handle json_object) { + uint32_t index = 0; + // Maybe an array index, try to parse it. + if (c0_ == '0') { + // With a leading zero, the string has to be "0" only to be an index. + Advance(); + } else { + do { + int d = c0_ - '0'; + if (index > 429496729U - ((d > 5) ? 1 : 0)) break; + index = (index * 10) + d; + Advance(); + } while (IsDecimalDigit(c0_)); + } + + if (c0_ == '"') { + // Successfully parsed index, parse and store element. + AdvanceSkipWhitespace(); + + if (c0_ == ':') { + AdvanceSkipWhitespace(); + Handle value = ParseJsonValue(); + if (!value.is_null()) { + JSObject::SetOwnElement(json_object, index, value, SLOPPY).Assert(); + return kElementFound; + } else { + return kNullHandle; + } + } + } + return kElementNotFound; +} + // Parse a JSON object. Position must be right at '{'. template Handle JsonParser::ParseJsonObject() { @@ -320,35 +362,12 @@ int start_position = position_; Advance(); - uint32_t index = 0; if (IsDecimalDigit(c0_)) { - // Maybe an array index, try to parse it. - if (c0_ == '0') { - // With a leading zero, the string has to be "0" only to be an index. - Advance(); - } else { - do { - int d = c0_ - '0'; - if (index > 429496729U - ((d > 5) ? 1 : 0)) break; - index = (index * 10) + d; - Advance(); - } while (IsDecimalDigit(c0_)); - } - - if (c0_ == '"') { - // Successfully parsed index, parse and store element. - AdvanceSkipWhitespace(); - - if (c0_ != ':') return ReportUnexpectedCharacter(); - AdvanceSkipWhitespace(); - Handle value = ParseJsonValue(); - if (value.is_null()) return ReportUnexpectedCharacter(); - - JSObject::SetOwnElement(json_object, index, value, SLOPPY).Assert(); - continue; - } - // Not an index, fallback to the slow path. + ParseElementResult element_result = ParseElement(json_object); + if (element_result == kNullHandle) return Handle::null(); + if (element_result == kElementFound) continue; } + // Not an index, fallback to the slow path. position_ = start_position; #ifdef DEBUG @@ -360,81 +379,109 @@ // Try to follow existing transitions as long as possible. Once we stop // transitioning, no transition can be found anymore. + DCHECK(transitioning); + // First check whether there is a single expected transition. If so, try + // to parse it first. + bool follow_expected = false; + Handle target; + if (seq_one_byte) { + key = TransitionArray::ExpectedTransitionKey(map); + follow_expected = !key.is_null() && ParseJsonString(key); + } + // If the expected transition hits, follow it. + if (follow_expected) { + target = TransitionArray::ExpectedTransitionTarget(map); + } else { + // If the expected transition failed, parse an internalized string and + // try to find a matching transition. + key = ParseJsonInternalizedString(); + if (key.is_null()) return ReportUnexpectedCharacter(); + + target = TransitionArray::FindTransitionToField(map, key); + // If a transition was found, follow it and continue. + transitioning = !target.is_null(); + } + if (c0_ != ':') return ReportUnexpectedCharacter(); + + AdvanceSkipWhitespace(); + value = ParseJsonValue(); + if (value.is_null()) return ReportUnexpectedCharacter(); + if (transitioning) { - // First check whether there is a single expected transition. If so, try - // to parse it first. - bool follow_expected = false; - Handle target; - if (seq_one_byte) { - key = TransitionArray::ExpectedTransitionKey(map); - follow_expected = !key.is_null() && ParseJsonString(key); - } - // If the expected transition hits, follow it. - if (follow_expected) { - target = TransitionArray::ExpectedTransitionTarget(map); + PropertyDetails details = + target->instance_descriptors()->GetDetails(descriptor); + Representation expected_representation = details.representation(); + + if (value->FitsRepresentation(expected_representation)) { + if (expected_representation.IsHeapObject() && + !target->instance_descriptors() + ->GetFieldType(descriptor) + ->NowContains(value)) { + Handle value_type( + value->OptimalType(isolate(), expected_representation)); + Map::GeneralizeFieldType(target, descriptor, + expected_representation, value_type); + } + DCHECK(target->instance_descriptors() + ->GetFieldType(descriptor) + ->NowContains(value)); + properties.Add(value, zone()); + map = target; + descriptor++; + continue; } else { - // If the expected transition failed, parse an internalized string and - // try to find a matching transition. - key = ParseJsonInternalizedString(); - if (key.is_null()) return ReportUnexpectedCharacter(); - - target = TransitionArray::FindTransitionToField(map, key); - // If a transition was found, follow it and continue. - transitioning = !target.is_null(); + transitioning = false; } - if (c0_ != ':') return ReportUnexpectedCharacter(); + } - AdvanceSkipWhitespace(); - value = ParseJsonValue(); - if (value.is_null()) return ReportUnexpectedCharacter(); + DCHECK(!transitioning); - if (transitioning) { - PropertyDetails details = - target->instance_descriptors()->GetDetails(descriptor); - Representation expected_representation = details.representation(); - - if (value->FitsRepresentation(expected_representation)) { - if (expected_representation.IsHeapObject() && - !target->instance_descriptors() - ->GetFieldType(descriptor) - ->NowContains(value)) { - Handle value_type(value->OptimalType( - isolate(), expected_representation)); - Map::GeneralizeFieldType(target, descriptor, - expected_representation, value_type); - } - DCHECK(target->instance_descriptors()->GetFieldType( - descriptor)->NowContains(value)); - properties.Add(value, zone()); - map = target; - descriptor++; - continue; - } else { - transitioning = false; - } + // Commit the intermediate state to the object and stop transitioning. + CommitStateToJsonObject(json_object, map, &properties); + + Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); + } while (transitioning && MatchSkipWhiteSpace(',')); + + // If we transitioned until the very end, transition the map now. + if (transitioning) { + CommitStateToJsonObject(json_object, map, &properties); + } else { + while (MatchSkipWhiteSpace(',')) { + HandleScope local_scope(isolate()); + if (c0_ != '"') return ReportUnexpectedCharacter(); + + int start_position = position_; + Advance(); + + if (IsDecimalDigit(c0_)) { + ParseElementResult element_result = ParseElement(json_object); + if (element_result == kNullHandle) return Handle::null(); + if (element_result == kElementFound) continue; } + // Not an index, fallback to the slow path. + + position_ = start_position; +#ifdef DEBUG + c0_ = '"'; +#endif + + Handle key; + Handle value; - // Commit the intermediate state to the object and stop transitioning. - CommitStateToJsonObject(json_object, map, &properties); - } else { key = ParseJsonInternalizedString(); if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter(); AdvanceSkipWhitespace(); value = ParseJsonValue(); if (value.is_null()) return ReportUnexpectedCharacter(); + + Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); } + } - Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); - } while (MatchSkipWhiteSpace(',')); if (c0_ != '}') { return ReportUnexpectedCharacter(); } - - // If we transitioned until the very end, transition the map now. - if (transitioning) { - CommitStateToJsonObject(json_object, map, &properties); - } } AdvanceSkipWhitespace(); return scope.CloseAndEscape(json_object); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/mips/full-codegen-mips.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/mips/full-codegen-mips.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/mips/full-codegen-mips.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/mips/full-codegen-mips.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1684,21 +1684,12 @@ __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - __ li(a0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1890,21 +1881,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1918,8 +1898,8 @@ __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ li(a0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1929,6 +1909,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1946,7 +1928,7 @@ VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ lw(t2, MemOperand(sp, kPointerSize)); // Copy of array literal. __ lw(a1, FieldMemOperand(t2, JSObject::kElementsOffset)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/mips64/full-codegen-mips64.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/mips64/full-codegen-mips64.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/mips64/full-codegen-mips64.cc 2015-04-21 09:28:37.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/mips64/full-codegen-mips64.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1682,21 +1682,12 @@ __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - __ li(a0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1888,21 +1879,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1916,8 +1896,8 @@ __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ li(a0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1927,6 +1907,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1944,7 +1926,7 @@ VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ ld(a6, MemOperand(sp, kPointerSize)); // Copy of array literal. __ ld(a1, FieldMemOperand(a6, JSObject::kElementsOffset)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/objects.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/objects.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/objects.cc 2015-04-24 01:56:18.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/objects.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1387,7 +1387,8 @@ } switch (map()->instance_type()) { case MAP_TYPE: - os << "elements_kind() << ")>"; + os << "elements_kind()) + << ")>"; break; case FIXED_ARRAY_TYPE: os << "length() << "]>"; @@ -2503,7 +2504,7 @@ ElementsKind from_kind = root_map->elements_kind(); ElementsKind to_kind = old_map->elements_kind(); - if (from_kind != to_kind && + if (from_kind != to_kind && to_kind != DICTIONARY_ELEMENTS && !(IsTransitionableFastElementsKind(from_kind) && IsMoreGeneralElementsKindTransition(from_kind, to_kind))) { return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode, @@ -2891,6 +2892,13 @@ split_kind, old_descriptors->GetKey(split_nof), split_attributes, *new_descriptors, *new_layout_descriptor); + if (from_kind != to_kind) { + // There was an elements kind change in the middle of transition tree and + // we reconstructed the tree so that all elements kind transitions are + // done at the beginning, therefore the |old_map| is no longer stable. + old_map->NotifyLeafMapLayoutChange(); + } + // If |transition_target_deprecated| is true then the transition array // already contains entry for given descriptor. This means that the transition // could be inserted regardless of whether transitions array is full or not. @@ -2960,6 +2968,15 @@ // Check the state of the root map. Map* root_map = old_map->FindRootMap(); if (!old_map->EquivalentToForTransition(root_map)) return MaybeHandle(); + + ElementsKind from_kind = root_map->elements_kind(); + ElementsKind to_kind = old_map->elements_kind(); + if (from_kind != to_kind) { + // Try to follow existing elements kind transitions. + root_map = root_map->LookupElementsTransitionMap(to_kind); + if (root_map == NULL) return MaybeHandle(); + // From here on, use the map with correct elements kind as root map. + } int root_nof = root_map->NumberOfOwnDescriptors(); int old_nof = old_map->NumberOfOwnDescriptors(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/ppc/full-codegen-ppc.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/ppc/full-codegen-ppc.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/ppc/full-codegen-ppc.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/ppc/full-codegen-ppc.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1651,19 +1651,13 @@ __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset)); __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); __ mov(r4, Operand(constant_properties)); - int flags = expr->fast_elements() ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ LoadSmiLiteral(r3, Smi::FromInt(flags)); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(r6, r5, r4, r3); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1853,16 +1847,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); Handle constant_elements_values( FixedArrayBase::cast(constant_elements->get(1))); @@ -1877,8 +1864,8 @@ __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset)); __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); __ mov(r4, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ LoadSmiLiteral(r3, Smi::FromInt(flags)); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags())); __ Push(r6, r5, r4, r3); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1888,6 +1875,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1904,7 +1893,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ LoadP(r8, MemOperand(sp, kPointerSize)); // Copy of array literal. __ LoadP(r4, FieldMemOperand(r8, JSObject::kElementsOffset)); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/runtime/runtime-literals.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/runtime/runtime-literals.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/runtime/runtime-literals.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/runtime/runtime-literals.cc 2015-06-23 12:15:02.000000000 +0000 @@ -237,6 +237,7 @@ CONVERT_SMI_ARG_CHECKED(flags, 3); bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0; bool has_function_literal = (flags & ObjectLiteral::kHasFunction) != 0; + bool enable_mementos = (flags & ObjectLiteral::kDisableMementos) == 0; RUNTIME_ASSERT(literals_index >= 0 && literals_index < literals->length()); @@ -267,7 +268,7 @@ Handle(JSObject::cast(site->transition_info()), isolate); } - AllocationSiteUsageContext usage_context(isolate, site, true); + AllocationSiteUsageContext usage_context(isolate, site, enable_mementos); usage_context.EnterNewScope(); MaybeHandle maybe_copy = JSObject::DeepCopy(boilerplate, &usage_context); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/scanner.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/scanner.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/scanner.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/scanner.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1007,7 +1007,7 @@ if (next_.literal_chars->one_byte_literal().length() <= 10 && value <= Smi::kMaxValue && c0_ != '.' && c0_ != 'e' && c0_ != 'E') { - smi_value_ = static_cast(value); + next_.smi_value_ = static_cast(value); literal.Complete(); HandleLeadSurrogate(); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/scanner.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/scanner.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/scanner.h 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/scanner.h 2015-06-23 12:15:02.000000000 +0000 @@ -436,7 +436,7 @@ void clear_octal_position() { octal_pos_ = Location::invalid(); } // Returns the value of the last smi that was scanned. - int smi_value() const { return smi_value_; } + int smi_value() const { return current_.smi_value_; } // Seek forward to the given position. This operation does not // work in general, for instance when there are pushed back @@ -497,6 +497,7 @@ Location location; LiteralBuffer* literal_chars; LiteralBuffer* raw_literal_chars; + int smi_value_; }; static const int kCharacterLookaheadBufferSize = 1; @@ -724,9 +725,6 @@ // Start position of the octal literal last scanned. Location octal_pos_; - // Value of the last smi that was scanned. - int smi_value_; - // One Unicode character look-ahead; c0_ < 0 at the end of the input. uc32 c0_; diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/snapshot/serialize.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/snapshot/serialize.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/snapshot/serialize.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/snapshot/serialize.cc 2015-06-23 12:15:02.000000000 +0000 @@ -569,6 +569,7 @@ isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); isolate_->heap()->RepairFreeListsAfterDeserialization(); isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); + DeserializeDeferredObjects(); isolate_->heap()->set_native_contexts_list( isolate_->heap()->undefined_value()); @@ -622,6 +623,7 @@ Object* outdated_contexts; VisitPointer(&root); VisitPointer(&outdated_contexts); + DeserializeDeferredObjects(); // There's no code deserialized here. If this assert fires // then that's changed and logging should be added to notify @@ -644,6 +646,7 @@ DisallowHeapAllocation no_gc; Object* root; VisitPointer(&root); + DeserializeDeferredObjects(); return Handle(SharedFunctionInfo::cast(root)); } } @@ -665,13 +668,22 @@ } -void Deserializer::RelinkAllocationSite(AllocationSite* site) { - if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { - site->set_weak_next(isolate_->heap()->undefined_value()); - } else { - site->set_weak_next(isolate_->heap()->allocation_sites_list()); +void Deserializer::DeserializeDeferredObjects() { + for (int code = source_.Get(); code != kSynchronize; code = source_.Get()) { + int space = code & kSpaceMask; + DCHECK(space <= kNumberOfSpaces); + DCHECK(code - space == kNewObject); + HeapObject* object = GetBackReferencedObject(space); + int size = source_.GetInt() << kPointerSizeLog2; + Address obj_address = object->address(); + Object** start = reinterpret_cast(obj_address + kPointerSize); + Object** end = reinterpret_cast(obj_address + size); + bool filled = ReadData(start, end, space, obj_address); + CHECK(filled); + if (object->IsAllocationSite()) { + RelinkAllocationSite(AllocationSite::cast(object)); + } } - isolate_->heap()->set_allocation_sites_list(site); } @@ -707,7 +719,8 @@ }; -HeapObject* Deserializer::ProcessNewObjectFromSerializedCode(HeapObject* obj) { +HeapObject* Deserializer::PostProcessNewObject(HeapObject* obj) { + DCHECK(deserializing_user_code()); if (obj->IsString()) { String* string = String::cast(obj); // Uninitialize hash field as the hash seed may have changed. @@ -722,11 +735,30 @@ } } else if (obj->IsScript()) { Script::cast(obj)->set_id(isolate_->heap()->NextScriptId()); + } else { + DCHECK(CanBeDeferred(obj)); } return obj; } +void Deserializer::RelinkAllocationSite(AllocationSite* obj) { + DCHECK(obj->IsAllocationSite()); + // Allocation sites are present in the snapshot, and must be linked into + // a list at deserialization time. + AllocationSite* site = AllocationSite::cast(obj); + // TODO(mvstanton): consider treating the heap()->allocation_sites_list() + // as a (weak) root. If this root is relocated correctly, + // RelinkAllocationSite() isn't necessary. + if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { + site->set_weak_next(isolate_->heap()->undefined_value()); + } else { + site->set_weak_next(isolate_->heap()->allocation_sites_list()); + } + isolate_->heap()->set_allocation_sites_list(site); +} + + HeapObject* Deserializer::GetBackReferencedObject(int space) { HeapObject* obj; BackReference back_reference(source_.GetInt()); @@ -782,24 +814,21 @@ if (FLAG_log_snapshot_positions) { LOG(isolate_, SnapshotPositionEvent(address, source_.position())); } - ReadData(current, limit, space_number, address); - // TODO(mvstanton): consider treating the heap()->allocation_sites_list() - // as a (weak) root. If this root is relocated correctly, - // RelinkAllocationSite() isn't necessary. - if (obj->IsAllocationSite()) RelinkAllocationSite(AllocationSite::cast(obj)); + if (ReadData(current, limit, space_number, address)) { + // Only post process if object content has not been deferred. + if (obj->IsAllocationSite()) { + RelinkAllocationSite(AllocationSite::cast(obj)); + } - // Fix up strings from serialized user code. - if (deserializing_user_code()) obj = ProcessNewObjectFromSerializedCode(obj); + if (deserializing_user_code()) obj = PostProcessNewObject(obj); + } Object* write_back_obj = obj; UnalignedCopy(write_back, &write_back_obj); #ifdef DEBUG if (obj->IsCode()) { DCHECK(space_number == CODE_SPACE || space_number == LO_SPACE); -#ifdef VERIFY_HEAP - obj->ObjectVerify(); -#endif // VERIFY_HEAP } else { DCHECK(space_number != CODE_SPACE); } @@ -843,7 +872,7 @@ } -void Deserializer::ReadData(Object** current, Object** limit, int source_space, +bool Deserializer::ReadData(Object** current, Object** limit, int source_space, Address current_object_address) { Isolate* const isolate = isolate_; // Write barrier support costs around 1% in startup time. In fact there @@ -1103,6 +1132,18 @@ break; } + case kDeferred: { + // Deferred can only occur right after the heap object header. + DCHECK(current == reinterpret_cast(current_object_address + + kPointerSize)); + HeapObject* obj = HeapObject::FromAddress(current_object_address); + // If the deferred object is a map, its instance type may be used + // during deserialization. Initialize it with a temporary value. + if (obj->IsMap()) Map::cast(obj)->set_instance_type(FILLER_TYPE); + current = limit; + return false; + } + case kSynchronize: // If we get here then that indicates that you have a mismatch between // the number of GC roots when serializing and deserializing. @@ -1209,6 +1250,7 @@ } } CHECK_EQ(limit, current); + return true; } @@ -1217,6 +1259,7 @@ sink_(sink), external_reference_encoder_(isolate), root_index_map_(isolate), + recursion_depth_(0), code_address_map_(NULL), large_objects_total_size_(0), seen_large_objects_index_(0) { @@ -1235,6 +1278,16 @@ } +void Serializer::SerializeDeferredObjects() { + while (deferred_objects_.length() > 0) { + HeapObject* obj = deferred_objects_.RemoveLast(); + ObjectSerializer obj_serializer(this, obj, sink_, kPlain, kStartOfObject); + obj_serializer.SerializeDeferred(); + } + sink_->Put(kSynchronize, "Finished with deferred objects"); +} + + void StartupSerializer::SerializeStrongReferences() { Isolate* isolate = this->isolate(); // No active threads. @@ -1279,6 +1332,7 @@ } VisitPointer(o); SerializeOutdatedContextsAsFixedArray(); + SerializeDeferredObjects(); Pad(); } @@ -1302,10 +1356,10 @@ sink_->Put(reinterpret_cast(&length_smi)[i], "Byte"); } for (int i = 0; i < length; i++) { - BackReference back_ref = outdated_contexts_[i]; - DCHECK(BackReferenceIsAlreadyAllocated(back_ref)); - sink_->Put(kBackref + back_ref.space(), "BackRef"); - sink_->PutInt(back_ref.reference(), "BackRefValue"); + Context* context = outdated_contexts_[i]; + BackReference back_reference = back_reference_map_.Lookup(context); + sink_->Put(kBackref + back_reference.space(), "BackRef"); + PutBackReference(context, back_reference); } } } @@ -1468,10 +1522,7 @@ "BackRefWithSkip"); sink_->PutInt(skip, "BackRefSkipDistance"); } - DCHECK(BackReferenceIsAlreadyAllocated(back_reference)); - sink_->PutInt(back_reference.reference(), "BackRefValue"); - - hot_objects_.Add(obj); + PutBackReference(obj, back_reference); } return true; } @@ -1507,7 +1558,7 @@ } -void StartupSerializer::SerializeWeakReferences() { +void StartupSerializer::SerializeWeakReferencesAndDeferred() { // This phase comes right after the serialization (of the snapshot). // After we have done the partial serialization the partial snapshot cache // will contain some references needed to decode the partial snapshot. We @@ -1516,6 +1567,7 @@ Object* undefined = isolate()->heap()->undefined_value(); VisitPointer(&undefined); isolate()->heap()->IterateWeakRoots(this, VISIT_ALL); + SerializeDeferredObjects(); Pad(); } @@ -1548,6 +1600,13 @@ } +void Serializer::PutBackReference(HeapObject* object, BackReference reference) { + DCHECK(BackReferenceIsAlreadyAllocated(reference)); + sink_->PutInt(reference.reference(), "BackRefValue"); + hot_objects_.Add(object); +} + + void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, WhereToPoint where_to_point, int skip) { if (obj->IsMap()) { @@ -1595,9 +1654,7 @@ Context::cast(obj)->global_object() == global_object_) { // Context refers to the current global object. This reference will // become outdated after deserialization. - BackReference back_reference = back_reference_map_.Lookup(obj); - DCHECK(back_reference.is_valid()); - outdated_contexts_.Add(back_reference); + outdated_contexts_.Add(Context::cast(obj)); } } @@ -1721,6 +1778,9 @@ // We cannot serialize typed array objects correctly. DCHECK(!object_->IsJSTypedArray()); + // We don't expect fillers. + DCHECK(!object_->IsFiller()); + if (object_->IsScript()) { // Clear cached line ends. Object* undefined = serializer_->isolate()->heap()->undefined_value(); @@ -1751,6 +1811,39 @@ CHECK_EQ(0, bytes_processed_so_far_); bytes_processed_so_far_ = kPointerSize; + RecursionScope recursion(serializer_); + // Objects that are immediately post processed during deserialization + // cannot be deferred, since post processing requires the object content. + if (recursion.ExceedsMaximum() && CanBeDeferred(object_)) { + serializer_->QueueDeferredObject(object_); + sink_->Put(kDeferred, "Deferring object content"); + return; + } + + object_->IterateBody(map->instance_type(), size, this); + OutputRawData(object_->address() + size); +} + + +void Serializer::ObjectSerializer::SerializeDeferred() { + if (FLAG_trace_serializer) { + PrintF(" Encoding deferred heap object: "); + object_->ShortPrint(); + PrintF("\n"); + } + + int size = object_->Size(); + Map* map = object_->map(); + BackReference reference = serializer_->back_reference_map()->Lookup(object_); + + // Serialize the rest of the object. + CHECK_EQ(0, bytes_processed_so_far_); + bytes_processed_so_far_ = kPointerSize; + + sink_->Put(kNewObject + reference.space(), "deferred object"); + serializer_->PutBackReference(object_, reference); + sink_->PutInt(size >> kPointerSizeLog2, "deferred object size"); + object_->IterateBody(map->instance_type(), size, this); OutputRawData(object_->address() + size); } @@ -2075,6 +2168,7 @@ DisallowHeapAllocation no_gc; Object** location = Handle::cast(info).location(); cs.VisitPointer(location); + cs.SerializeDeferredObjects(); cs.Pad(); SerializedCodeData data(sink.data(), cs); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/snapshot/serialize.h oxide-qt-1.7.9/third_party/chromium/src/v8/src/snapshot/serialize.h --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/snapshot/serialize.h 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/snapshot/serialize.h 2015-06-23 12:15:02.000000000 +0000 @@ -303,6 +303,10 @@ static const int kNumberOfSpaces = LAST_SPACE + 1; protected: + static bool CanBeDeferred(HeapObject* o) { + return !o->IsString() && !o->IsScript(); + } + // ---------- byte code range 0x00..0x7f ---------- // Byte codes in this range represent Where, HowToCode and WhereToPoint. // Where the pointed-to object can be found: @@ -366,6 +370,8 @@ static const int kNop = 0x3d; // Move to next reserved chunk. static const int kNextChunk = 0x3e; + // Deferring object content. + static const int kDeferred = 0x3f; // A tag emitted at strategic points in the snapshot to delineate sections. // If the deserializer does not find these at the expected moments then it // is an indication that the snapshot and the VM do not fit together. @@ -546,22 +552,22 @@ memcpy(dest, src, sizeof(*src)); } - // Allocation sites are present in the snapshot, and must be linked into - // a list at deserialization time. - void RelinkAllocationSite(AllocationSite* site); + void DeserializeDeferredObjects(); // Fills in some heap data in an area from start to end (non-inclusive). The // space id is used for the write barrier. The object_address is the address // of the object we are writing into, or NULL if we are not writing into an // object, i.e. if we are writing a series of tagged values that are not on - // the heap. - void ReadData(Object** start, Object** end, int space, + // the heap. Return false if the object content has been deferred. + bool ReadData(Object** start, Object** end, int space, Address object_address); void ReadObject(int space_number, Object** write_back); Address Allocate(int space_index, int size); // Special handling for serialized code like hooking up internalized strings. - HeapObject* ProcessNewObjectFromSerializedCode(HeapObject* obj); + HeapObject* PostProcessNewObject(HeapObject* obj); + + void RelinkAllocationSite(AllocationSite* obj); // This returns the address of an object that has been described in the // snapshot by chunk index and offset. @@ -605,6 +611,8 @@ void EncodeReservations(List* out) const; + void SerializeDeferredObjects(); + Isolate* isolate() const { return isolate_; } BackReferenceMap* back_reference_map() { return &back_reference_map_; } @@ -623,6 +631,7 @@ is_code_object_(o->IsCode()), code_has_been_output_(false) {} void Serialize(); + void SerializeDeferred(); void VisitPointers(Object** start, Object** end); void VisitEmbeddedPointer(RelocInfo* target); void VisitExternalReference(Address* p); @@ -664,12 +673,29 @@ bool code_has_been_output_; }; + class RecursionScope { + public: + explicit RecursionScope(Serializer* serializer) : serializer_(serializer) { + serializer_->recursion_depth_++; + } + ~RecursionScope() { serializer_->recursion_depth_--; } + bool ExceedsMaximum() { + return serializer_->recursion_depth_ >= kMaxRecursionDepth; + } + + private: + static const int kMaxRecursionDepth = 32; + Serializer* serializer_; + }; + virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, WhereToPoint where_to_point, int skip) = 0; void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where, int skip); + void PutBackReference(HeapObject* object, BackReference reference); + // Returns true if the object was successfully serialized. bool SerializeKnownObject(HeapObject* obj, HowToCode how_to_code, WhereToPoint where_to_point, int skip); @@ -711,6 +737,11 @@ SnapshotByteSink* sink() const { return sink_; } + void QueueDeferredObject(HeapObject* obj) { + DCHECK(back_reference_map_.Lookup(obj).is_valid()); + deferred_objects_.Add(obj); + } + Isolate* isolate_; SnapshotByteSink* sink_; @@ -719,8 +750,11 @@ BackReferenceMap back_reference_map_; RootIndexMap root_index_map_; + int recursion_depth_; + friend class Deserializer; friend class ObjectSerializer; + friend class RecursionScope; friend class SnapshotData; private: @@ -739,6 +773,9 @@ List code_buffer_; + // To handle stack overflow. + List deferred_objects_; + DISALLOW_COPY_AND_ASSIGN(Serializer); }; @@ -777,7 +814,7 @@ void SerializeOutdatedContextsAsFixedArray(); Serializer* startup_serializer_; - List outdated_contexts_; + List outdated_contexts_; Object* global_object_; PartialCacheIndexMap partial_cache_index_map_; DISALLOW_COPY_AND_ASSIGN(PartialSerializer); @@ -807,11 +844,10 @@ virtual void SerializeStrongReferences(); virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, WhereToPoint where_to_point, int skip) OVERRIDE; - void SerializeWeakReferences(); + void SerializeWeakReferencesAndDeferred(); void Serialize() { SerializeStrongReferences(); - SerializeWeakReferences(); - Pad(); + SerializeWeakReferencesAndDeferred(); } private: diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/x64/full-codegen-x64.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/x64/full-codegen-x64.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/x64/full-codegen-x64.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/x64/full-codegen-x64.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1657,16 +1657,8 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); __ Push(Smi::FromInt(expr->literal_index())); @@ -1679,7 +1671,7 @@ __ Move(rbx, Smi::FromInt(expr->literal_index())); __ Move(rcx, constant_properties); __ Move(rdx, Smi::FromInt(flags)); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1858,20 +1850,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1880,12 +1861,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); __ Push(Smi::FromInt(expr->literal_index())); __ Push(constant_elements); - __ Push(Smi::FromInt(flags)); + __ Push(Smi::FromInt(expr->ComputeFlags())); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1898,6 +1879,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1914,7 +1897,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/src/x87/full-codegen-x87.cc oxide-qt-1.7.9/third_party/chromium/src/v8/src/x87/full-codegen-x87.cc --- oxide-qt-1.7.8/third_party/chromium/src/v8/src/x87/full-codegen-x87.cc 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/src/x87/full-codegen-x87.cc 2015-06-23 12:15:02.000000000 +0000 @@ -1611,17 +1611,10 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || - flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + // If any of the keys would store to the elements array, then we shouldn't + // allow it. + if (MustCreateObjectLiteralWithRuntime(expr)) { __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); @@ -1634,7 +1627,7 @@ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_properties)); __ mov(edx, Immediate(Smi::FromInt(flags))); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1813,20 +1806,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1835,12 +1817,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_elements)); - __ push(Immediate(Smi::FromInt(flags))); + __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1853,6 +1835,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1869,7 +1853,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/tools/run-tests.py oxide-qt-1.7.9/third_party/chromium/src/v8/tools/run-tests.py --- oxide-qt-1.7.8/third_party/chromium/src/v8/tools/run-tests.py 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/tools/run-tests.py 2015-06-23 12:15:03.000000000 +0000 @@ -584,10 +584,6 @@ if options.report: verbose.PrintReport(all_tests) - if num_tests == 0: - print "No tests to run." - return 0 - # Run the tests, either locally or distributed on the network. start_time = time.time() progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() diff -Nru oxide-qt-1.7.8/third_party/chromium/src/v8/tools/testrunner/local/progress.py oxide-qt-1.7.9/third_party/chromium/src/v8/tools/testrunner/local/progress.py --- oxide-qt-1.7.8/third_party/chromium/src/v8/tools/testrunner/local/progress.py 2015-04-21 09:28:38.000000000 +0000 +++ oxide-qt-1.7.9/third_party/chromium/src/v8/tools/testrunner/local/progress.py 2015-06-23 12:15:03.000000000 +0000 @@ -192,10 +192,12 @@ def PrintProgress(self, name): self.ClearLine(self.last_status_length) elapsed = time.time() - self.start_time + progress = 0 if not self.runner.total else ( + ((self.runner.total - self.runner.remaining) * 100) // + self.runner.total) status = self.templates['status_line'] % { 'passed': self.runner.succeeded, - 'remaining': (((self.runner.total - self.runner.remaining) * 100) // - self.runner.total), + 'progress': progress, 'failed': len(self.runner.failed), 'test': name, 'mins': int(elapsed) / 60, @@ -212,7 +214,7 @@ def __init__(self): templates = { 'status_line': ("[%(mins)02i:%(secs)02i|" - "\033[34m%%%(remaining) 4d\033[0m|" + "\033[34m%%%(progress) 4d\033[0m|" "\033[32m+%(passed) 4d\033[0m|" "\033[31m-%(failed) 4d\033[0m]: %(test)s"), 'stdout': "\033[1m%s\033[0m", @@ -228,7 +230,7 @@ def __init__(self): templates = { - 'status_line': ("[%(mins)02i:%(secs)02i|%%%(remaining) 4d|" + 'status_line': ("[%(mins)02i:%(secs)02i|%%%(progress) 4d|" "+%(passed) 4d|-%(failed) 4d]: %(test)s"), 'stdout': '%s', 'stderr': '%s',