From 5123ed88c9e1d75a928cdca550bf0b4d2760a9c0 Mon Sep 17 00:00:00 2001 From: Kyle Machulis Date: Wed, 13 Jan 2016 20:42:25 -0800 Subject: [PATCH 001/156] Bug 1237963 - Add documents to embed element capabilities; r=bz --- dom/html/HTMLSharedObjectElement.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dom/html/HTMLSharedObjectElement.cpp b/dom/html/HTMLSharedObjectElement.cpp index 4d6a29a3cfbf..bb2df743db14 100644 --- a/dom/html/HTMLSharedObjectElement.cpp +++ b/dom/html/HTMLSharedObjectElement.cpp @@ -343,12 +343,7 @@ HTMLSharedObjectElement::GetCapabilities() const { uint32_t capabilities = eSupportPlugins | eAllowPluginSkipChannel; if (mNodeInfo->Equals(nsGkAtoms::embed)) { - capabilities |= eSupportSVG | eSupportImages; - } - // If this is a rewritten youtube flash embed, add documents to capabilities - // so that we can render HTML5 if possible. - if (mRewrittenYoutubeEmbed) { - capabilities |= eSupportDocuments; + capabilities |= eSupportSVG | eSupportImages | eSupportDocuments; } return capabilities; From 5dd80e81047c597d5f1255477111fe2724e1d4cf Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 13 Jan 2016 22:59:14 -0800 Subject: [PATCH 002/156] Bug 1239153: Accept unitless '0' for angle values in CSS -webkit-linear-gradient() expressions. r=heycam --- layout/style/nsCSSParser.cpp | 12 +++++++++--- layout/style/test/property_database.js | 11 +++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 8b669d949071..4a28223ae63f 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -9896,10 +9896,16 @@ CSSParserImpl::ParseLinearGradient(nsCSSValue& aValue, if (haveGradientLine) { // Parse a cssGradient->mIsLegacySyntax = true; - bool haveAngle = - ParseSingleTokenVariant(cssGradient->mAngle, VARIANT_ANGLE, nullptr); + // In -webkit-linear-gradient expressions (handled below), we need to accept + // unitless 0 for angles, to match WebKit/Blink. + int32_t angleFlags = (aFlags & eGradient_WebkitLegacy) ? + VARIANT_ANGLE | VARIANT_ZERO_ANGLE : + VARIANT_ANGLE; - // if we got an angle, we might now have a comma, ending the gradient-line + bool haveAngle = + ParseSingleTokenVariant(cssGradient->mAngle, angleFlags, nullptr); + + // If we got an angle, we might now have a comma, ending the gradient-line. bool haveAngleComma = haveAngle && ExpectSymbol(',', true); // If we're webkit-prefixed & didn't get an angle, diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index bdb44682eb83..cec79fca1140 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -162,6 +162,8 @@ var validGradientAndElementValues = [ "-moz-linear-gradient(10% 10em, red, blue)", "-moz-linear-gradient(44px top, red, blue)", + "-moz-linear-gradient(0px, red, blue)", + "-moz-linear-gradient(0, red, blue)", "-moz-linear-gradient(top left 45deg, red, blue)", "-moz-linear-gradient(20% bottom -300deg, red, blue)", "-moz-linear-gradient(center 20% 1.95929rad, red, blue)", @@ -386,6 +388,10 @@ var invalidGradientAndElementValues = [ "-moz-linear-gradient(10 10px -45deg, red, blue) repeat", "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", "linear-gradient(red -99, yellow, green, blue 120%)", + /* Unitless 0 is invalid as an */ + "-moz-linear-gradient(top left 0, red, blue)", + "-moz-linear-gradient(5px 5px 0, red, blue)", + "linear-gradient(0, red, blue)", /* Invalid color, calc() or -moz-image-rect() function */ "linear-gradient(red, rgb(0, rubbish, 0) 50%, red)", "linear-gradient(red, red calc(50% + rubbish), red)", @@ -703,6 +709,11 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { "-webkit-linear-gradient(135deg, red, blue)", "-webkit-linear-gradient(280deg, red 60%, blue)", + // Linear-gradient with unitless-0 (normally invalid for + // but accepted here for better webkit emulation): + "-webkit-linear-gradient(0, red, blue)", + "-webkit-linear-gradient(0 red, blue)", + // Basic radial-gradient syntax (valid when prefixed or unprefixed): "-webkit-radial-gradient(circle, white, black)", "-webkit-radial-gradient(circle, white, black)", From f2eebc5e164a0b1acf6177e816ef9ffa417acdb1 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 14 Jan 2016 02:06:44 -0500 Subject: [PATCH 003/156] Bug 1237224: Check sending framesize is set before calculating max fps when max-mbps is negotiated r=pkerr --- .../signaling/src/media-conduit/VideoConduit.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp index d7b2d695397f..03d4f09b9f90 100755 --- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp +++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp @@ -1306,14 +1306,16 @@ WebrtcVideoConduit::SelectSendFrameRate(unsigned int framerate) const mb_height = (mSendingHeight + 15) >> 4; cur_fs = mb_width * mb_height; - max_fps = mCurSendCodecConfig->mEncodingConstraints.maxMbps/cur_fs; - if (max_fps < mSendingFramerate) { - new_framerate = max_fps; - } + if (cur_fs > 0) { // in case no frames have been sent + max_fps = mCurSendCodecConfig->mEncodingConstraints.maxMbps/cur_fs; + if (max_fps < mSendingFramerate) { + new_framerate = max_fps; + } - if (mCurSendCodecConfig->mEncodingConstraints.maxFps != 0 && - mCurSendCodecConfig->mEncodingConstraints.maxFps < mSendingFramerate) { - new_framerate = mCurSendCodecConfig->mEncodingConstraints.maxFps; + if (mCurSendCodecConfig->mEncodingConstraints.maxFps != 0 && + mCurSendCodecConfig->mEncodingConstraints.maxFps < mSendingFramerate) { + new_framerate = mCurSendCodecConfig->mEncodingConstraints.maxFps; + } } } return new_framerate; From 6036210fe2bd8824954bf2f647be255ed0179003 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 14 Jan 2016 02:08:46 -0500 Subject: [PATCH 004/156] Bug 1218217: avoid buffersize overflow even if codec is unbounded in dimensions r=pkerr --- .../webrtc/common_video/libyuv/webrtc_libyuv.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc b/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc index 6788550e0777..4018056b1759 100644 --- a/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc +++ b/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc @@ -12,6 +12,7 @@ #include #include +#include // NOTE(ajm): Path provided by gyp. #include "libyuv.h" // NOLINT @@ -69,6 +70,16 @@ void Calc16ByteAlignedStride(int width, int* stride_y, int* stride_uv) { size_t CalcBufferSize(VideoType type, int width, int height) { assert(width >= 0); assert(height >= 0); + // Verify we won't overflow; max is width*height*4 + // 0x7FFF * 0x7FFF * 4 = < 0x100000000 + assert(width <= 0x7FFF); // guarantees no overflow and cheaper than multiply + assert(height <= 0x7FFF); + static_assert(std::numeric_limits::max() >= 0xFFFFFFFF, "size_t max too small!"); + // assert() is debug only + if (width > 0x7FFF || height > 0x7FFF) { + return SIZE_MAX; // very likely forces OOM + } + size_t buffer_size = 0; switch (type) { case kI420: @@ -97,6 +108,7 @@ size_t CalcBufferSize(VideoType type, int width, int height) { break; default: assert(false); + buffer_size = SIZE_MAX; break; } return buffer_size; From 1bcfcee64a8da91a71fe5246874f953e7355e208 Mon Sep 17 00:00:00 2001 From: John Daggett Date: Thu, 14 Jan 2016 16:11:47 +0900 Subject: [PATCH 005/156] Bug 1235186 - fix small userfont logging nit. r=m_kato --- layout/style/FontFaceSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index 2d4e546fc340..1e8165088bb5 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -793,10 +793,10 @@ FontFaceSet::UpdateRules(const nsTArray& aRules) mUserFontSet->mLocalRulesUsed = false; if (LOG_ENABLED() && !mRuleFaces.IsEmpty()) { - LOG(("userfonts (%p) userfont rules update (%s) rule count: %" PRIuSIZE, + LOG(("userfonts (%p) userfont rules update (%s) rule count: %d", mUserFontSet.get(), (modified ? "modified" : "not modified"), - mRuleFaces.Length())); + (int)(mRuleFaces.Length()))); } return modified; From d7077c329c166c72d6a0a7b20fd37f264c56b3d7 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 14 Jan 2016 02:35:45 -0500 Subject: [PATCH 006/156] Bug 1218217: bustage fix for static assert r=bustage on a CLOSED TREE --- media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc b/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc index 4018056b1759..b05d1315e275 100644 --- a/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc +++ b/media/webrtc/trunk/webrtc/common_video/libyuv/webrtc_libyuv.cc @@ -74,7 +74,7 @@ size_t CalcBufferSize(VideoType type, int width, int height) { // 0x7FFF * 0x7FFF * 4 = < 0x100000000 assert(width <= 0x7FFF); // guarantees no overflow and cheaper than multiply assert(height <= 0x7FFF); - static_assert(std::numeric_limits::max() >= 0xFFFFFFFF, "size_t max too small!"); + assert(std::numeric_limits::max() >= 0xFFFFFFFF); // assert() is debug only if (width > 0x7FFF || height > 0x7FFF) { return SIZE_MAX; // very likely forces OOM From b88bc4f2a4de5f8bb89d4a62221ff50118b234de Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Thu, 14 Jan 2016 08:03:50 +0000 Subject: [PATCH 007/156] Bug 1199466 - part 1 - Expose originAttributes in nsICookie, r=jduell --- netwerk/cookie/nsCookie.cpp | 18 +++++++++++++++--- netwerk/cookie/nsCookie.h | 11 +++++++++-- netwerk/cookie/nsCookieService.cpp | 25 ++++++++++++++++--------- netwerk/cookie/nsCookieService.h | 3 ++- netwerk/cookie/nsICookie.idl | 8 ++++++-- 5 files changed, 48 insertions(+), 17 deletions(-) diff --git a/netwerk/cookie/nsCookie.cpp b/netwerk/cookie/nsCookie.cpp index d3b2383a32b7..f864d9e8649f 100644 --- a/netwerk/cookie/nsCookie.cpp +++ b/netwerk/cookie/nsCookie.cpp @@ -3,10 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "mozilla/dom/ToJSValue.h" +#include "nsAutoPtr.h" #include "nsCookie.h" #include "nsUTF8ConverterService.h" #include -#include "nsAutoPtr.h" static const int64_t kCookieStaleThreshold = 60 * PR_USEC_PER_SEC; // 1 minute in microseconds @@ -79,7 +80,8 @@ nsCookie::Create(const nsACString &aName, int64_t aCreationTime, bool aIsSession, bool aIsSecure, - bool aIsHttpOnly) + bool aIsHttpOnly, + const OriginAttributes& aOriginAttributes) { // Ensure mValue contains a valid UTF-8 sequence. Otherwise XPConnect will // truncate the string after the first invalid octet. @@ -111,7 +113,8 @@ nsCookie::Create(const nsACString &aName, // construct the cookie. placement new, oh yeah! return new (place) nsCookie(name, value, host, path, end, aExpiry, aLastAccessed, aCreationTime, - aIsSession, aIsSecure, aIsHttpOnly); + aIsSession, aIsSecure, aIsHttpOnly, + aOriginAttributes); } size_t @@ -151,6 +154,15 @@ NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) { *aPolicy = 0; NS_IMETHODIMP nsCookie::GetCreationTime(int64_t *aCreation){ *aCreation = CreationTime(); return NS_OK; } NS_IMETHODIMP nsCookie::GetLastAccessed(int64_t *aTime) { *aTime = LastAccessed(); return NS_OK; } +NS_IMETHODIMP +nsCookie::GetOriginAttributes(JSContext *aCx, JS::MutableHandle aVal) +{ + if (NS_WARN_IF(!ToJSValue(aCx, mOriginAttributes, aVal))) { + return NS_ERROR_FAILURE; + } + return NS_OK; +} + // compatibility method, for use with the legacy nsICookie interface. // here, expires == 0 denotes a session cookie. NS_IMETHODIMP diff --git a/netwerk/cookie/nsCookie.h b/netwerk/cookie/nsCookie.h index 6e47357fca1d..3c06df5d6a0a 100644 --- a/netwerk/cookie/nsCookie.h +++ b/netwerk/cookie/nsCookie.h @@ -11,6 +11,9 @@ #include "nsString.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/BasePrincipal.h" + +using mozilla::OriginAttributes; /** * The nsCookie class is the main cookie storage medium for use within cookie @@ -43,7 +46,8 @@ class nsCookie : public nsICookie2 int64_t aCreationTime, bool aIsSession, bool aIsSecure, - bool aIsHttpOnly) + bool aIsHttpOnly, + const OriginAttributes& aOriginAttributes) : mName(aName) , mValue(aValue) , mHost(aHost) @@ -55,6 +59,7 @@ class nsCookie : public nsICookie2 , mIsSession(aIsSession != false) , mIsSecure(aIsSecure != false) , mIsHttpOnly(aIsHttpOnly != false) + , mOriginAttributes(aOriginAttributes) { } @@ -74,7 +79,8 @@ class nsCookie : public nsICookie2 int64_t aCreationTime, bool aIsSession, bool aIsSecure, - bool aIsHttpOnly); + bool aIsHttpOnly, + const OriginAttributes& aOriginAttributes); size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; @@ -123,6 +129,7 @@ class nsCookie : public nsICookie2 bool mIsSession; bool mIsSecure; bool mIsHttpOnly; + mozilla::OriginAttributes mOriginAttributes; }; #endif // nsCookie_h__ diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 8292f528d231..50a3798ff8ab 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -491,7 +491,8 @@ public: row->GetUTF8String(IDX_ORIGIN_ATTRIBUTES, suffix); tuple->key.mOriginAttributes.PopulateFromSuffix(suffix); - tuple->cookie = gCookieService->GetCookieFromRow(row); + tuple->cookie = + gCookieService->GetCookieFromRow(row, tuple->key.mOriginAttributes); } return NS_OK; @@ -2288,6 +2289,7 @@ nsCookieService::Add(const nsACString &aHost, NS_ENSURE_SUCCESS(rv, rv); int64_t currentTimeInUsec = PR_Now(); + nsCookieKey key = DEFAULT_APP_KEY(baseDomain); RefPtr cookie = nsCookie::Create(aName, aValue, host, aPath, @@ -2296,12 +2298,13 @@ nsCookieService::Add(const nsACString &aHost, nsCookie::GenerateUniqueCreationTime(currentTimeInUsec), aIsSession, aIsSecure, - aIsHttpOnly); + aIsHttpOnly, + key.mOriginAttributes); if (!cookie) { return NS_ERROR_OUT_OF_MEMORY; } - AddInternal(DEFAULT_APP_KEY(baseDomain), cookie, currentTimeInUsec, nullptr, nullptr, true); + AddInternal(key, cookie, currentTimeInUsec, nullptr, nullptr, true); return NS_OK; } @@ -2436,7 +2439,7 @@ nsCookieService::Read() // Extract data from a single result row and create an nsCookie. // This is templated since 'T' is different for sync vs async results. template nsCookie* -nsCookieService::GetCookieFromRow(T &aRow) +nsCookieService::GetCookieFromRow(T &aRow, const OriginAttributes& aOriginAttributes) { // Skip reading 'baseDomain' -- up to the caller. nsCString name, value, host, path; @@ -2462,7 +2465,8 @@ nsCookieService::GetCookieFromRow(T &aRow) creationTime, false, isSecure, - isHttpOnly); + isHttpOnly, + aOriginAttributes); } void @@ -2609,7 +2613,8 @@ nsCookieService::EnsureReadDomain(const nsCookieKey &aKey) if (!hasResult) break; - array.AppendElement(GetCookieFromRow(mDefaultDBState->stmtReadDomain)); + array.AppendElement(GetCookieFromRow(mDefaultDBState->stmtReadDomain, + aKey.mOriginAttributes)); } // Add the cookies to the table in a single operation. This makes sure that @@ -2699,7 +2704,7 @@ nsCookieService::EnsureReadComplete() CookieDomainTuple* tuple = array.AppendElement(); tuple->key = key; - tuple->cookie = GetCookieFromRow(stmt); + tuple->cookie = GetCookieFromRow(stmt, attrs); } // Add the cookies to the table in a single operation. This makes sure that @@ -2853,7 +2858,8 @@ nsCookieService::ImportCookies(nsIFile *aCookieFile) nsCookie::GenerateUniqueCreationTime(currentTimeInUsec), false, Substring(buffer, secureIndex, expiresIndex - secureIndex - 1).EqualsLiteral(kTrue), - isHttpOnly); + isHttpOnly, + key.mOriginAttributes); if (!newCookie) { return NS_ERROR_OUT_OF_MEMORY; } @@ -3232,7 +3238,8 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI, nsCookie::GenerateUniqueCreationTime(currentTimeInUsec), cookieAttributes.isSession, cookieAttributes.isSecure, - cookieAttributes.isHttpOnly); + cookieAttributes.isHttpOnly, + aKey.mOriginAttributes); if (!cookie) return newCookie; diff --git a/netwerk/cookie/nsCookieService.h b/netwerk/cookie/nsCookieService.h index 7973fbbc22e7..485d473f3282 100644 --- a/netwerk/cookie/nsCookieService.h +++ b/netwerk/cookie/nsCookieService.h @@ -33,6 +33,7 @@ #include "mozilla/MemoryReporting.h" using mozilla::NeckoOriginAttributes; +using mozilla::OriginAttributes; class nsICookiePermission; class nsIEffectiveTLDService; @@ -283,7 +284,7 @@ class nsCookieService final : public nsICookieService void HandleCorruptDB(DBState* aDBState); void RebuildCorruptDB(DBState* aDBState); OpenDBResult Read(); - template nsCookie* GetCookieFromRow(T &aRow); + template nsCookie* GetCookieFromRow(T &aRow, const OriginAttributes& aOriginAttributes); void AsyncReadComplete(); void CancelAsyncRead(bool aPurgeReadSet); void EnsureReadDomain(const nsCookieKey &aKey); diff --git a/netwerk/cookie/nsICookie.idl b/netwerk/cookie/nsICookie.idl index 20fa9cf124ac..e8dadb9491ec 100644 --- a/netwerk/cookie/nsICookie.idl +++ b/netwerk/cookie/nsICookie.idl @@ -14,8 +14,7 @@ typedef long nsCookieStatus; typedef long nsCookiePolicy; -[scriptable, uuid(8684966b-1877-4f0f-8155-be4490b96bf7)] - +[scriptable, uuid(adf0db5e-211e-45a3-be14-4486ac430a58)] interface nsICookie : nsISupports { /** @@ -78,4 +77,9 @@ interface nsICookie : nsISupports { const nsCookiePolicy POLICY_NO_II=5; readonly attribute nsCookiePolicy policy; + /** + * The origin attributes for this cookie + */ + [implicit_jscontext] + readonly attribute jsval originAttributes; }; From 8d1fe3d9e0550b230127031074941d30dfe9bdb6 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Thu, 14 Jan 2016 08:05:08 +0000 Subject: [PATCH 008/156] Bug 1199466 - part 2 - Cookie manager in FF preferences should show the userContextId, r=paolo --- browser/components/preferences/cookies.js | 57 ++++++++++++++----- browser/components/preferences/cookies.xul | 7 +++ .../chrome/browser/preferences/cookies.dtd | 1 + 3 files changed, 50 insertions(+), 15 deletions(-) diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js index d70faf332577..c8d144d68d6a 100644 --- a/browser/components/preferences/cookies.js +++ b/browser/components/preferences/cookies.js @@ -6,6 +6,7 @@ const nsICookie = Components.interfaces.nsICookie; Components.utils.import("resource://gre/modules/PluralForm.jsm"); +Components.utils.import("resource://gre/modules/Services.jsm") var gCookiesWindow = { _cm : Components.classes["@mozilla.org/cookiemanager;1"] @@ -16,6 +17,7 @@ var gCookiesWindow = { _hostOrder : [], _tree : null, _bundle : null, + _bundleBrowser : null, init: function () { var os = Components.classes["@mozilla.org/observer-service;1"] @@ -24,11 +26,16 @@ var gCookiesWindow = { os.addObserver(this, "perm-changed", false); this._bundle = document.getElementById("bundlePreferences"); + this._bundleBrowser = document.getElementById("bundleBrowser"); this._tree = document.getElementById("cookiesList"); this._populateList(true); document.getElementById("filter").focus(); + + if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) { + document.getElementById("userContextRow").hidden = true; + } }, uninit: function () { @@ -453,16 +460,17 @@ var gCookiesWindow = { _makeCookieObject: function (aStrippedHost, aCookie) { var host = aCookie.host; var formattedHost = host.charAt(0) == "." ? host.substring(1, host.length) : host; - var c = { name : aCookie.name, - value : aCookie.value, - isDomain : aCookie.isDomain, - host : aCookie.host, - rawHost : aStrippedHost, - path : aCookie.path, - isSecure : aCookie.isSecure, - expires : aCookie.expires, - level : 1, - container : false }; + var c = { name : aCookie.name, + value : aCookie.value, + isDomain : aCookie.isDomain, + host : aCookie.host, + rawHost : aStrippedHost, + path : aCookie.path, + isSecure : aCookie.isSecure, + expires : aCookie.expires, + level : 1, + container : false, + originAttributes: aCookie.originAttributes }; return c; }, @@ -500,7 +508,7 @@ var gCookiesWindow = { _updateCookieData: function (aItem) { var seln = this._view.selection; - var ids = ["name", "value", "host", "path", "isSecure", "expires"]; + var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"]; var properties; if (aItem && !aItem.container && seln.count > 0) { @@ -509,22 +517,41 @@ var gCookiesWindow = { isDomain: aItem.isDomain ? this._bundle.getString("domainColon") : this._bundle.getString("hostColon"), isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly") - : this._bundle.getString("forAnyConnection") }; - for (var i = 0; i < ids.length; ++i) + : this._bundle.getString("forAnyConnection"), + userContext: this._convertUserContextIdToContainerName(aItem.originAttributes.userContextId) }; + for (var i = 0; i < ids.length; ++i) { document.getElementById(ids[i]).disabled = false; + } } else { var noneSelected = this._bundle.getString("noCookieSelected"); properties = { name: noneSelected, value: noneSelected, host: noneSelected, path: noneSelected, expires: noneSelected, - isSecure: noneSelected }; - for (i = 0; i < ids.length; ++i) + isSecure: noneSelected, userContext: noneSelected }; + for (i = 0; i < ids.length; ++i) { document.getElementById(ids[i]).disabled = true; + } } for (var property in properties) document.getElementById(property).value = properties[property]; }, + _convertUserContextIdToContainerName: function(aUserContextId) { + // TODO: this code should be moved in a separate module - bug 1239606 + switch (aUserContextId) { + // No UserContext: + case 0: return ""; + + case 1: return this._bundleBrowser.getString("usercontext.personal.label"); + case 2: return this._bundleBrowser.getString("usercontext.work.label"); + case 3: return this._bundleBrowser.getString("usercontext.shopping.label"); + case 4: return this._bundleBrowser.getString("usercontext.banking.label"); + + // This should not happen. + default: return "Context " + aUserContextId; + } + }, + onCookieSelected: function () { var item; var seln = this._tree.view.selection; diff --git a/browser/components/preferences/cookies.xul b/browser/components/preferences/cookies.xul index 89a05918aae1..af67e6a17bee 100644 --- a/browser/components/preferences/cookies.xul +++ b/browser/components/preferences/cookies.xul @@ -24,6 +24,9 @@ + + @@ -85,6 +88,10 @@ + + + + diff --git a/browser/locales/en-US/chrome/browser/preferences/cookies.dtd b/browser/locales/en-US/chrome/browser/preferences/cookies.dtd index 6dc08d567f70..9dfafffa53f0 100644 --- a/browser/locales/en-US/chrome/browser/preferences/cookies.dtd +++ b/browser/locales/en-US/chrome/browser/preferences/cookies.dtd @@ -21,6 +21,7 @@ + From b8ba404554ba0ee0e8b71a099c129a58e3ca9bfe Mon Sep 17 00:00:00 2001 From: Gabor Krizsanits Date: Thu, 14 Jan 2016 09:42:52 +0100 Subject: [PATCH 009/156] Bug 1236926 - Remove _showE10sActivatedNotice. r=felipc --- browser/components/nsBrowserGlue.js | 48 +------------------ .../en-US/chrome/browser/browser.properties | 6 --- testing/profiles/prefs_general.js | 1 - 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index e34f426d61ef..ca5915f858d7 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -2974,9 +2974,6 @@ var DefaultBrowserCheck = { #ifdef E10S_TESTING_ONLY var E10SUINotification = { - // Increase this number each time we want to roll out an - // e10s testing period to Nightly users. - CURRENT_NOTICE_COUNT: 4, CURRENT_PROMPT_PREF: "browser.displayedE10SPrompt.1", PREVIOUS_PROMPT_PREF: "browser.displayedE10SPrompt", @@ -3007,20 +3004,7 @@ var E10SUINotification = { return; } - if (Services.appinfo.browserTabsRemoteAutostart) { - if (this.forcedOn) { - return; - } - let notice = 0; - try { - notice = Services.prefs.getIntPref("browser.displayedE10SNotice"); - } catch(e) {} - let activationNoticeShown = notice >= this.CURRENT_NOTICE_COUNT; - - if (!activationNoticeShown) { - this._showE10sActivatedNotice(); - } - } else { + if (!Services.appinfo.browserTabsRemoteAutostart) { let displayFeedbackRequest = false; try { displayFeedbackRequest = Services.prefs.getBoolPref("browser.requestE10sFeedback"); @@ -3032,10 +3016,6 @@ var E10SUINotification = { return; } - // The user has just voluntarily disabled e10s. Subtract one from displayedE10SNotice - // so that the next time e10s is activated (either by the user or forced by us), they - // can see the notice again. - Services.prefs.setIntPref("browser.displayedE10SNotice", this.CURRENT_NOTICE_COUNT - 1); Services.prefs.clearUserPref("browser.requestE10sFeedback"); let url = Services.urlFormatter.formatURLPref("app.feedback.baseURL"); @@ -3084,32 +3064,6 @@ var E10SUINotification = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), - _showE10sActivatedNotice: function() { - let win = RecentWindow.getMostRecentBrowserWindow(); - if (!win) - return; - - Services.prefs.setIntPref("browser.displayedE10SNotice", this.CURRENT_NOTICE_COUNT); - - let nb = win.document.getElementById("high-priority-global-notificationbox"); - let message = win.gNavigatorBundle.getFormattedString( - "e10s.postActivationInfobar.message", - [gBrandBundle.GetStringFromName("brandShortName")] - ); - let buttons = [ - { - label: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.label"), - accessKey: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.accesskey"), - callback: function () { - win.openUILinkIn("https://wiki.mozilla.org/Electrolysis", "tab"); - } - } - ]; - nb.appendNotification(message, "e10s-activated-noticed", - null, nb.PRIORITY_WARNING_MEDIUM, buttons); - - }, - _showE10SPrompt: function BG__showE10SPrompt() { let win = RecentWindow.getMostRecentBrowserWindow(); if (!win) diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index 41f1c89f8dae..429765d927c5 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -746,9 +746,6 @@ appMenuRemoteTabs.mobilePromo.ios = Firefox for iOS # e10s.offerPopup.enableAndRestart.accesskey # e10s.offerPopup.noThanks.label # e10s.offerPopup.noThanks.accesskey -# e10s.postActivationInfobar.message -# e10s.postActivationInfobar.learnMore.label -# e10s.postActivationInfobar.learnMore.accesskey # e10s.accessibilityNotice.mainMessage # e10s.accessibilityNotice.enableAndRestart.label # e10s.accessibilityNotice.enableAndRestart.accesskey @@ -763,9 +760,6 @@ e10s.offerPopup.enableAndRestart.label = Enable and Restart e10s.offerPopup.enableAndRestart.accesskey = E e10s.offerPopup.noThanks.label = No, thanks e10s.offerPopup.noThanks.accesskey = N -e10s.postActivationInfobar.message = You're now helping to test multi-process in %S! Please report problems you find. -e10s.postActivationInfobar.learnMore.label = Learn More -e10s.postActivationInfobar.learnMore.accesskey = L e10s.accessibilityNotice.mainMessage2 = Accessibility support is partially disabled due to compatibility issues with new %S features. e10s.accessibilityNotice.acceptButton.label = OK e10s.accessibilityNotice.acceptButton.accesskey = O diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js index 6ac5153196e0..c877d712b49f 100644 --- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -310,7 +310,6 @@ user_pref("media.decoder.heuristic.dormant.timeout", 0); #endif // Don't prompt about e10s -user_pref("browser.displayedE10SNotice", 5); user_pref("browser.displayedE10SPrompt.1", 5); // Don't use auto-enabled e10s user_pref("browser.tabs.remote.autostart.1", false); From 44cb5bee0a3e76b83e21e8beb6337a1a66f7701f Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Sun, 10 Jan 2016 18:41:00 +0100 Subject: [PATCH 010/156] Bug 1214536 - Part 1: Use unrestricted double for iterations. r=birtles We want to store the original value from KeyframeEffectOptions whose iterations is unrestricted double. Therefore, we can get the original value of iterations by AnimationEffectTimingReadOnly. By the way, replace mIterationCount with mIterations. --HG-- extra : rebase_source : da2953056031079c41273ed977545dc926e1b83c --- dom/animation/KeyframeEffect.cpp | 37 +++++++++---------- dom/animation/KeyframeEffect.h | 10 +++-- .../composite/AsyncCompositionManager.cpp | 2 +- layout/base/nsDisplayList.cpp | 4 +- layout/style/nsAnimationManager.cpp | 2 +- layout/style/nsTransitionManager.cpp | 2 +- 6 files changed, 30 insertions(+), 27 deletions(-) diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 74bc81220235..147bfc7b71f7 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -48,7 +48,7 @@ GetComputedTimingDictionary(const ComputedTiming& aComputedTiming, // AnimationEffectTimingProperties aRetVal.mDelay = aTiming.mDelay.ToMilliseconds(); aRetVal.mFill = aTiming.mFillMode; - aRetVal.mIterations = aTiming.mIterationCount; + aRetVal.mIterations = aComputedTiming.mIterations; aRetVal.mDuration.SetAsUnrestrictedDouble() = aTiming.mIterationDuration.ToMilliseconds(); aRetVal.mDirection = aTiming.mDirection; @@ -229,7 +229,10 @@ KeyframeEffectReadOnly::GetComputedTimingAt( // Always return the same object to benefit from return-value optimization. ComputedTiming result; - result.mActiveDuration = ActiveDuration(aTiming); + result.mIterations = IsNaN(aTiming.mIterations) || aTiming.mIterations < 0.0f ? + 1.0f : + aTiming.mIterations; + result.mActiveDuration = ActiveDuration(aTiming, result.mIterations); // The default constructor for ComputedTiming sets all other members to // values consistent with an animation that has not been sampled. @@ -255,9 +258,8 @@ KeyframeEffectReadOnly::GetComputedTimingAt( activeTime = result.mActiveDuration; // Note that infinity == floor(infinity) so this will also be true when we // have finished an infinitely repeating animation of zero duration. - isEndOfFinalIteration = - aTiming.mIterationCount != 0.0 && - aTiming.mIterationCount == floor(aTiming.mIterationCount); + isEndOfFinalIteration = result.mIterations != 0.0 && + result.mIterations == floor(result.mIterations); } else if (localTime < aTiming.mDelay) { result.mPhase = ComputedTiming::AnimationPhase::Before; if (!aTiming.FillsBackwards()) { @@ -284,10 +286,10 @@ KeyframeEffectReadOnly::GetComputedTimingAt( // Determine the 0-based index of the current iteration. if (isEndOfFinalIteration) { result.mCurrentIteration = - aTiming.mIterationCount == NS_IEEEPositiveInfinity() + IsInfinite(result.mIterations) // Positive Infinity? ? UINT64_MAX // In GetComputedTimingDictionary(), we will convert this // into Infinity. - : static_cast(aTiming.mIterationCount) - 1; + : static_cast(result.mIterations) - 1; } else if (activeTime == zeroDuration) { // If the active time is zero we're either in the first iteration // (including filling backwards) or we have finished an animation with an @@ -295,7 +297,7 @@ KeyframeEffectReadOnly::GetComputedTimingAt( // the exact end of an iteration since we deal with that above). result.mCurrentIteration = result.mPhase == ComputedTiming::AnimationPhase::After - ? static_cast(aTiming.mIterationCount) // floor + ? static_cast(result.mIterations) // floor : 0; } else { result.mCurrentIteration = @@ -308,7 +310,7 @@ KeyframeEffectReadOnly::GetComputedTimingAt( } else if (result.mPhase == ComputedTiming::AnimationPhase::After) { double progress = isEndOfFinalIteration ? 1.0 - : fmod(aTiming.mIterationCount, 1.0f); + : fmod(result.mIterations, 1.0); result.mProgress.SetValue(progress); } else { // We are in the active phase so the iteration duration can't be zero. @@ -345,9 +347,10 @@ KeyframeEffectReadOnly::GetComputedTimingAt( } StickyTimeDuration -KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming) +KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming, + double aComputedIterations) { - if (aTiming.mIterationCount == mozilla::PositiveInfinity()) { + if (IsInfinite(aComputedIterations)) { // An animation that repeats forever has an infinite active duration // unless its iteration duration is zero, in which case it has a zero // active duration. @@ -357,7 +360,7 @@ KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming) : StickyTimeDuration::Forever(); } return StickyTimeDuration( - aTiming.mIterationDuration.MultDouble(aTiming.mIterationCount)); + aTiming.mIterationDuration.MultDouble(aComputedIterations)); } // https://w3c.github.io/web-animations/#in-play @@ -668,13 +671,7 @@ KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( animationTiming.mIterationDuration = GetIterationDuration(opt.mDuration); animationTiming.mDelay = TimeDuration::FromMilliseconds(opt.mDelay); - // FIXME: Covert mIterationCount to a valid value. - // Bug 1214536 should revise this and keep the original value, so - // AnimationTimingEffectReadOnly can get the original iterations. - animationTiming.mIterationCount = (IsNaN(opt.mIterations) || - opt.mIterations < 0.0f) ? - 1.0f : - opt.mIterations; + animationTiming.mIterations = opt.mIterations; animationTiming.mDirection = opt.mDirection; // FIXME: We should store original value. animationTiming.mFillMode = (opt.mFill == FillMode::Auto) ? @@ -683,7 +680,7 @@ KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( } else { animationTiming.mIterationDuration = GetIterationDuration(aOptions); animationTiming.mDelay = TimeDuration(0); - animationTiming.mIterationCount = 1.0f; + animationTiming.mIterations = 1.0f; animationTiming.mDirection = PlaybackDirection::Normal; animationTiming.mFillMode = FillMode::None; } diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index c2978ee5f9ba..813ca214e9e8 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -53,7 +53,7 @@ struct AnimationTiming { TimeDuration mIterationDuration; TimeDuration mDelay; - float mIterationCount; // mozilla::PositiveInfinity() means infinite + double mIterations; // Can be NaN, negative, +/-Infinity dom::PlaybackDirection mDirection; dom::FillMode mFillMode; @@ -62,7 +62,7 @@ struct AnimationTiming bool operator==(const AnimationTiming& aOther) const { return mIterationDuration == aOther.mIterationDuration && mDelay == aOther.mDelay && - mIterationCount == aOther.mIterationCount && + mIterations == aOther.mIterations && mDirection == aOther.mDirection && mFillMode == aOther.mFillMode; } @@ -88,6 +88,9 @@ struct ComputedTiming Nullable mProgress; // Zero-based iteration index (meaningless if mProgress is null). uint64_t mCurrentIteration = 0; + // Unlike AnimationTiming::mIterations, this value is guaranteed to be in the + // range [0, Infinity]. + double mIterations = 1.0; enum class AnimationPhase { Null, // Not sampled (null sample time) @@ -261,7 +264,8 @@ public: // Return the duration of the active interval for the given timing parameters. static StickyTimeDuration - ActiveDuration(const AnimationTiming& aTiming); + ActiveDuration(const AnimationTiming& aTiming, + double aComputedIterations); bool IsInPlay() const; bool IsCurrent() const; diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index ff3e0b130e24..59f5a66726bf 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -586,7 +586,7 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint) // Currently animations run on the compositor have their delay factored // into their start time, hence the delay is effectively zero. timing.mDelay = TimeDuration(0); - timing.mIterationCount = animation.iterationCount(); + timing.mIterations = animation.iterationCount(); timing.mDirection = static_cast(animation.direction()); // Animations typically only run on the compositor during their active // interval but if we end up sampling them outside that range (for diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 22aeed4e72a5..53ccb9afafad 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -382,6 +382,8 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty, aLayer->AddAnimation(); const AnimationTiming& timing = aAnimation->GetEffect()->Timing(); + const ComputedTiming computedTiming = + aAnimation->GetEffect()->GetComputedTiming(); Nullable startTime = aAnimation->GetCurrentOrPendingStartTime(); animation->startTime() = startTime.IsNull() ? TimeStamp() @@ -390,7 +392,7 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty, animation->initialCurrentTime() = aAnimation->GetCurrentTime().Value() - timing.mDelay; animation->duration() = timing.mIterationDuration; - animation->iterationCount() = timing.mIterationCount; + animation->iterationCount() = computedTiming.mIterations; animation->direction() = static_cast(timing.mDirection); animation->property() = aProperty.mProperty; animation->playbackRate() = aAnimation->PlaybackRate(); diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index a81e42d4974a..8f9e80ce2bf0 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -629,7 +629,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext, timing.mIterationDuration = TimeDuration::FromMilliseconds(src.GetDuration()); timing.mDelay = TimeDuration::FromMilliseconds(src.GetDelay()); - timing.mIterationCount = src.GetIterationCount(); + timing.mIterations = src.GetIterationCount(); timing.mDirection = src.GetDirection(); timing.mFillMode = src.GetFillMode(); diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 482df091c0a5..b0ef5f9afcf0 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -655,7 +655,7 @@ nsTransitionManager::ConsiderStartingTransition( AnimationTiming timing; timing.mIterationDuration = TimeDuration::FromMilliseconds(duration); timing.mDelay = TimeDuration::FromMilliseconds(delay); - timing.mIterationCount = 1; + timing.mIterations = 1.0; timing.mDirection = dom::PlaybackDirection::Normal; timing.mFillMode = dom::FillMode::Backwards; From b0c41b12ec1c284f0e5c70392971aeb249a695bb Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Sun, 27 Dec 2015 18:51:00 +0100 Subject: [PATCH 011/156] Bug 1214536 - Part 2: Replace mIterationCount in layers::Animation. r=birtles Replace mIterationCount with mIterations. --HG-- extra : rebase_source : 2aa326be768d3326d56e689d6c45ca9d6439c3bc --- gfx/layers/composite/AsyncCompositionManager.cpp | 2 +- gfx/layers/ipc/LayersMessages.ipdlh | 2 +- layout/base/nsDisplayList.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index 59f5a66726bf..b8e7bee44900 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -586,7 +586,7 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint) // Currently animations run on the compositor have their delay factored // into their start time, hence the delay is effectively zero. timing.mDelay = TimeDuration(0); - timing.mIterations = animation.iterationCount(); + timing.mIterations = animation.iterations(); timing.mDirection = static_cast(animation.direction()); // Animations typically only run on the compositor during their active // interval but if we end up sampling them outside that range (for diff --git a/gfx/layers/ipc/LayersMessages.ipdlh b/gfx/layers/ipc/LayersMessages.ipdlh index 6eb1d98c3b48..d341a7e586ca 100644 --- a/gfx/layers/ipc/LayersMessages.ipdlh +++ b/gfx/layers/ipc/LayersMessages.ipdlh @@ -193,7 +193,7 @@ struct Animation { // Number of times to repeat the animation, including positive infinity. // Values <= 0 mean the animation will not play (although events are still // dispatched on the main thread). - float iterationCount; + float iterations; // This uses the NS_STYLE_ANIMATION_DIRECTION_* constants. int32_t direction; nsCSSProperty property; diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 53ccb9afafad..3c638f383699 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -392,7 +392,7 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty, animation->initialCurrentTime() = aAnimation->GetCurrentTime().Value() - timing.mDelay; animation->duration() = timing.mIterationDuration; - animation->iterationCount() = computedTiming.mIterations; + animation->iterations() = computedTiming.mIterations; animation->direction() = static_cast(timing.mDirection); animation->property() = aProperty.mProperty; animation->playbackRate() = aAnimation->PlaybackRate(); From 76f7e5a44e074d3f7a5684a0b5b49906503ee8fb Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:36:00 +0100 Subject: [PATCH 012/156] Bug 1214536 - Part 3: Store the original value of fill. r=birtles FillMode could be 'auto', and we should treat it as 'none' in the timing model. However, AnimationEffectTimingReadOnly should get its original value. By the way, replace mFillMode with mFill. --HG-- extra : rebase_source : 5a397dd7fbb22ac76fe96003d82d097e398852c7 --- dom/animation/KeyframeEffect.cpp | 31 +++++-------------- dom/animation/KeyframeEffect.h | 28 ++++++++++++++--- .../composite/AsyncCompositionManager.cpp | 2 +- layout/style/nsAnimationManager.cpp | 2 +- layout/style/nsTransitionManager.cpp | 4 +-- 5 files changed, 35 insertions(+), 32 deletions(-) diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 147bfc7b71f7..d717cd71be30 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -6,7 +6,6 @@ #include "mozilla/dom/KeyframeEffect.h" -#include "mozilla/dom/AnimationEffectReadOnlyBinding.h" #include "mozilla/dom/KeyframeEffectBinding.h" #include "mozilla/dom/PropertyIndexedKeyframesBinding.h" #include "mozilla/AnimationUtils.h" @@ -24,20 +23,6 @@ namespace mozilla { -bool -AnimationTiming::FillsForwards() const -{ - return mFillMode == dom::FillMode::Both || - mFillMode == dom::FillMode::Forwards; -} - -bool -AnimationTiming::FillsBackwards() const -{ - return mFillMode == dom::FillMode::Both || - mFillMode == dom::FillMode::Backwards; -} - // Helper functions for generating a ComputedTimingProperties dictionary static void GetComputedTimingDictionary(const ComputedTiming& aComputedTiming, @@ -47,7 +32,7 @@ GetComputedTimingDictionary(const ComputedTiming& aComputedTiming, { // AnimationEffectTimingProperties aRetVal.mDelay = aTiming.mDelay.ToMilliseconds(); - aRetVal.mFill = aTiming.mFillMode; + aRetVal.mFill = aComputedTiming.mFill; aRetVal.mIterations = aComputedTiming.mIterations; aRetVal.mDuration.SetAsUnrestrictedDouble() = aTiming.mIterationDuration.ToMilliseconds(); aRetVal.mDirection = aTiming.mDirection; @@ -233,6 +218,9 @@ KeyframeEffectReadOnly::GetComputedTimingAt( 1.0f : aTiming.mIterations; result.mActiveDuration = ActiveDuration(aTiming, result.mIterations); + result.mFill = aTiming.mFill == dom::FillMode::Auto ? + dom::FillMode::None : + aTiming.mFill; // The default constructor for ComputedTiming sets all other members to // values consistent with an animation that has not been sampled. @@ -250,7 +238,7 @@ KeyframeEffectReadOnly::GetComputedTimingAt( StickyTimeDuration activeTime; if (localTime >= aTiming.mDelay + result.mActiveDuration) { result.mPhase = ComputedTiming::AnimationPhase::After; - if (!aTiming.FillsForwards()) { + if (!result.FillsForwards()) { // The animation isn't active or filling at this time. result.mProgress.SetNull(); return result; @@ -262,7 +250,7 @@ KeyframeEffectReadOnly::GetComputedTimingAt( result.mIterations == floor(result.mIterations); } else if (localTime < aTiming.mDelay) { result.mPhase = ComputedTiming::AnimationPhase::Before; - if (!aTiming.FillsBackwards()) { + if (!result.FillsBackwards()) { // The animation isn't active or filling at this time. result.mProgress.SetNull(); return result; @@ -673,16 +661,13 @@ KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( animationTiming.mDelay = TimeDuration::FromMilliseconds(opt.mDelay); animationTiming.mIterations = opt.mIterations; animationTiming.mDirection = opt.mDirection; - // FIXME: We should store original value. - animationTiming.mFillMode = (opt.mFill == FillMode::Auto) ? - FillMode::None : - opt.mFill; + animationTiming.mFill = opt.mFill; } else { animationTiming.mIterationDuration = GetIterationDuration(aOptions); animationTiming.mDelay = TimeDuration(0); animationTiming.mIterations = 1.0f; animationTiming.mDirection = PlaybackDirection::Normal; - animationTiming.mFillMode = FillMode::None; + animationTiming.mFill = FillMode::None; } return animationTiming; } diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 813ca214e9e8..d28facd084ad 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -23,6 +23,12 @@ #include "mozilla/dom/KeyframeBinding.h" #include "mozilla/dom/Nullable.h" +// Fix X11 header brain damage that conflicts with dom::FillMode::None +#ifdef None +#undef None +#endif +#include "mozilla/dom/AnimationEffectReadOnlyBinding.h" + struct JSContext; class nsCSSPropertySet; class nsIContent; @@ -36,7 +42,6 @@ struct AnimationCollection; class AnimValuesStyleRule; namespace dom { -struct ComputedTimingProperties; class UnrestrictedDoubleOrKeyframeEffectOptions; enum class IterationCompositeOperation : uint32_t; enum class CompositeOperation : uint32_t; @@ -55,16 +60,14 @@ struct AnimationTiming TimeDuration mDelay; double mIterations; // Can be NaN, negative, +/-Infinity dom::PlaybackDirection mDirection; - dom::FillMode mFillMode; + dom::FillMode mFill; - bool FillsForwards() const; - bool FillsBackwards() const; bool operator==(const AnimationTiming& aOther) const { return mIterationDuration == aOther.mIterationDuration && mDelay == aOther.mDelay && mIterations == aOther.mIterations && mDirection == aOther.mDirection && - mFillMode == aOther.mFillMode; + mFill == aOther.mFill; } bool operator!=(const AnimationTiming& aOther) const { return !(*this == aOther); @@ -92,6 +95,21 @@ struct ComputedTiming // range [0, Infinity]. double mIterations = 1.0; + // This is the computed fill mode so it is never auto + dom::FillMode mFill = dom::FillMode::None; + bool FillsForwards() const { + MOZ_ASSERT(mFill != dom::FillMode::Auto, + "mFill should not be Auto in ComputedTiming."); + return mFill == dom::FillMode::Both || + mFill == dom::FillMode::Forwards; + } + bool FillsBackwards() const { + MOZ_ASSERT(mFill != dom::FillMode::Auto, + "mFill should not be Auto in ComputedTiming."); + return mFill == dom::FillMode::Both || + mFill == dom::FillMode::Backwards; + } + enum class AnimationPhase { Null, // Not sampled (null sample time) Before, // Sampled prior to the start of the active interval diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index b8e7bee44900..4920a1725b1e 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -592,7 +592,7 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint) // interval but if we end up sampling them outside that range (for // example, while they are waiting to be removed) we currently just // assume that we should fill. - timing.mFillMode = dom::FillMode::Both; + timing.mFill = dom::FillMode::Both; ComputedTiming computedTiming = dom::KeyframeEffectReadOnly::GetComputedTimingAt( diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index 8f9e80ce2bf0..5774150f8a74 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -631,7 +631,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext, timing.mDelay = TimeDuration::FromMilliseconds(src.GetDelay()); timing.mIterations = src.GetIterationCount(); timing.mDirection = src.GetDirection(); - timing.mFillMode = src.GetFillMode(); + timing.mFill = src.GetFillMode(); RefPtr destEffect = new KeyframeEffectReadOnly(mPresContext->Document(), aTarget, diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index b0ef5f9afcf0..e7423012a5a3 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -56,7 +56,7 @@ ElementPropertyTransition::CurrentValuePortion() const // case, we override the fill mode to 'both' to ensure the progress // is never null. AnimationTiming timingToUse = mTiming; - timingToUse.mFillMode = dom::FillMode::Both; + timingToUse.mFill = dom::FillMode::Both; ComputedTiming computedTiming = GetComputedTiming(&timingToUse); MOZ_ASSERT(!computedTiming.mProgress.IsNull(), @@ -657,7 +657,7 @@ nsTransitionManager::ConsiderStartingTransition( timing.mDelay = TimeDuration::FromMilliseconds(delay); timing.mIterations = 1.0; timing.mDirection = dom::PlaybackDirection::Normal; - timing.mFillMode = dom::FillMode::Backwards; + timing.mFill = dom::FillMode::Backwards; RefPtr pt = new ElementPropertyTransition(aElement->OwnerDoc(), aElement, From 71cff999e040aa95d7164fe7447d50f9e6774edc Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:36:00 +0100 Subject: [PATCH 013/156] Bug 1214536 - Part 4: Use OwingUnrestrictedDoubleOrString for duration. r=birtles We store the original value of duration in AnimationTiming, and add computed duration in ComputedTiming, so both the Timing model and AnimationEffectTimingReadOnly can get what they want. By the way, replace mIterationDuration with mDuration. --HG-- extra : rebase_source : f8e1fd648572e6d7b1cbecc2ac1888a2f74bbc7e --- dom/animation/KeyframeEffect.cpp | 73 ++++++++----------- dom/animation/KeyframeEffect.h | 27 +++++-- .../composite/AsyncCompositionManager.cpp | 2 +- layout/base/nsDisplayList.cpp | 2 +- layout/style/nsAnimationManager.cpp | 10 +-- layout/style/nsTransitionManager.cpp | 5 +- layout/style/nsTransitionManager.h | 2 +- 7 files changed, 61 insertions(+), 60 deletions(-) diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index d717cd71be30..7d1338bf8dc8 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -34,7 +34,8 @@ GetComputedTimingDictionary(const ComputedTiming& aComputedTiming, aRetVal.mDelay = aTiming.mDelay.ToMilliseconds(); aRetVal.mFill = aComputedTiming.mFill; aRetVal.mIterations = aComputedTiming.mIterations; - aRetVal.mDuration.SetAsUnrestrictedDouble() = aTiming.mIterationDuration.ToMilliseconds(); + aRetVal.mDuration.SetAsUnrestrictedDouble() = + aComputedTiming.mDuration.ToMilliseconds(); aRetVal.mDirection = aTiming.mDirection; // ComputedTimingProperties @@ -201,23 +202,21 @@ KeyframeEffectReadOnly::GetComputedTimingAt( const Nullable& aLocalTime, const AnimationTiming& aTiming) { - const TimeDuration zeroDuration; - - // Currently we expect negative durations to be picked up during CSS - // parsing but when we start receiving timing parameters from other sources - // we will need to clamp negative durations here. - // For now, if we're hitting this it probably means we're overflowing - // integer arithmetic in mozilla::TimeStamp. - MOZ_ASSERT(aTiming.mIterationDuration >= zeroDuration, - "Expecting iteration duration >= 0"); + const StickyTimeDuration zeroDuration; // Always return the same object to benefit from return-value optimization. ComputedTiming result; + if (aTiming.mDuration.IsUnrestrictedDouble()) { + double durationMs = aTiming.mDuration.GetAsUnrestrictedDouble(); + if (!IsNaN(durationMs) && durationMs >= 0.0f) { + result.mDuration = StickyTimeDuration::FromMilliseconds(durationMs); + } + } result.mIterations = IsNaN(aTiming.mIterations) || aTiming.mIterations < 0.0f ? 1.0f : aTiming.mIterations; - result.mActiveDuration = ActiveDuration(aTiming, result.mIterations); + result.mActiveDuration = ActiveDuration(result.mDuration, result.mIterations); result.mFill = aTiming.mFill == dom::FillMode::Auto ? dom::FillMode::None : aTiming.mFill; @@ -265,10 +264,10 @@ KeyframeEffectReadOnly::GetComputedTimingAt( // Get the position within the current iteration. StickyTimeDuration iterationTime; - if (aTiming.mIterationDuration != zeroDuration) { + if (result.mDuration != zeroDuration) { iterationTime = isEndOfFinalIteration - ? StickyTimeDuration(aTiming.mIterationDuration) - : activeTime % aTiming.mIterationDuration; + ? result.mDuration + : activeTime % result.mDuration; } /* else, iterationTime is zero */ // Determine the 0-based index of the current iteration. @@ -289,7 +288,7 @@ KeyframeEffectReadOnly::GetComputedTimingAt( : 0; } else { result.mCurrentIteration = - static_cast(activeTime / aTiming.mIterationDuration); // floor + static_cast(activeTime / result.mDuration); // floor } // Normalize the iteration time into a fraction of the iteration duration. @@ -302,11 +301,11 @@ KeyframeEffectReadOnly::GetComputedTimingAt( result.mProgress.SetValue(progress); } else { // We are in the active phase so the iteration duration can't be zero. - MOZ_ASSERT(aTiming.mIterationDuration != zeroDuration, + MOZ_ASSERT(result.mDuration != zeroDuration, "In the active phase of a zero-duration animation?"); - double progress = aTiming.mIterationDuration == TimeDuration::Forever() + double progress = result.mDuration == StickyTimeDuration::Forever() ? 0.0 - : iterationTime / aTiming.mIterationDuration; + : iterationTime / result.mDuration; result.mProgress.SetValue(progress); } @@ -335,20 +334,19 @@ KeyframeEffectReadOnly::GetComputedTimingAt( } StickyTimeDuration -KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming, - double aComputedIterations) +KeyframeEffectReadOnly::ActiveDuration(const StickyTimeDuration& aIterationDuration, + double aIterationCount) { - if (IsInfinite(aComputedIterations)) { + if (IsInfinite(aIterationCount)) { // An animation that repeats forever has an infinite active duration // unless its iteration duration is zero, in which case it has a zero // active duration. const StickyTimeDuration zeroDuration; - return aTiming.mIterationDuration == zeroDuration - ? zeroDuration - : StickyTimeDuration::Forever(); + return aIterationDuration == zeroDuration ? + zeroDuration : + StickyTimeDuration::Forever(); } - return StickyTimeDuration( - aTiming.mIterationDuration.MultDouble(aComputedIterations)); + return aIterationDuration.MultDouble(aIterationCount); } // https://w3c.github.io/web-animations/#in-play @@ -632,22 +630,6 @@ DumpAnimationProperties(nsTArray& aAnimationProperties) } #endif -// Extract an iteration duration from an UnrestrictedDoubleOrXXX object. -template -static TimeDuration -GetIterationDuration(const T& aDuration) { - // Always return the same object to benefit from return-value optimization. - TimeDuration result; - if (aDuration.IsUnrestrictedDouble()) { - double durationMs = aDuration.GetAsUnrestrictedDouble(); - if (!IsNaN(durationMs) && durationMs >= 0.0f) { - result = TimeDuration::FromMilliseconds(durationMs); - } - } - // else, aDuration should be zero - return result; -} - /* static */ AnimationTiming KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions) @@ -657,13 +639,16 @@ KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( if (aOptions.IsKeyframeEffectOptions()) { const KeyframeEffectOptions& opt = aOptions.GetAsKeyframeEffectOptions(); - animationTiming.mIterationDuration = GetIterationDuration(opt.mDuration); + animationTiming.mDuration = opt.mDuration; animationTiming.mDelay = TimeDuration::FromMilliseconds(opt.mDelay); animationTiming.mIterations = opt.mIterations; animationTiming.mDirection = opt.mDirection; animationTiming.mFill = opt.mFill; } else { - animationTiming.mIterationDuration = GetIterationDuration(aOptions); + double dur = aOptions.IsUnrestrictedDouble() ? + aOptions.GetAsUnrestrictedDouble() : + 0.0f; + animationTiming.mDuration.SetAsUnrestrictedDouble() = dur; animationTiming.mDelay = TimeDuration(0); animationTiming.mIterations = 1.0f; animationTiming.mDirection = PlaybackDirection::Normal; diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index d28facd084ad..39c8ca309e81 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -22,6 +22,7 @@ #include "mozilla/dom/Element.h" #include "mozilla/dom/KeyframeBinding.h" #include "mozilla/dom/Nullable.h" +#include "mozilla/dom/UnionTypes.h" // Fix X11 header brain damage that conflicts with dom::FillMode::None #ifdef None @@ -56,14 +57,28 @@ enum class CompositeOperation : uint32_t; */ struct AnimationTiming { - TimeDuration mIterationDuration; + dom::OwningUnrestrictedDoubleOrString mDuration; TimeDuration mDelay; double mIterations; // Can be NaN, negative, +/-Infinity dom::PlaybackDirection mDirection; dom::FillMode mFill; bool operator==(const AnimationTiming& aOther) const { - return mIterationDuration == aOther.mIterationDuration && + bool durationEqual; + if (mDuration.IsUnrestrictedDouble()) { + durationEqual = aOther.mDuration.IsUnrestrictedDouble() && + (mDuration.GetAsUnrestrictedDouble() == + aOther.mDuration.GetAsUnrestrictedDouble()); + } else if (mDuration.IsString()) { + durationEqual = aOther.mDuration.IsString() && + (mDuration.GetAsString() == + aOther.mDuration.GetAsString()); + } else { + // Check if both are uninitialized + durationEqual = !aOther.mDuration.IsUnrestrictedDouble() && + !aOther.mDuration.IsString(); + } + return durationEqual && mDelay == aOther.mDelay && mIterations == aOther.mIterations && mDirection == aOther.mDirection && @@ -94,6 +109,7 @@ struct ComputedTiming // Unlike AnimationTiming::mIterations, this value is guaranteed to be in the // range [0, Infinity]. double mIterations = 1.0; + StickyTimeDuration mDuration; // This is the computed fill mode so it is never auto dom::FillMode mFill = dom::FillMode::None; @@ -280,10 +296,11 @@ public: void GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const override; - // Return the duration of the active interval for the given timing parameters. + // Return the duration of the active interval for the given duration and + // iteration count. static StickyTimeDuration - ActiveDuration(const AnimationTiming& aTiming, - double aComputedIterations); + ActiveDuration(const StickyTimeDuration& aIterationDuration, + double aIterationCount); bool IsInPlay() const; bool IsCurrent() const; diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index 4920a1725b1e..bab27c7c07fd 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -582,7 +582,7 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint) } AnimationTiming timing; - timing.mIterationDuration = animation.duration(); + timing.mDuration.SetAsUnrestrictedDouble() = animation.duration().ToMilliseconds(); // Currently animations run on the compositor have their delay factored // into their start time, hence the delay is effectively zero. timing.mDelay = TimeDuration(0); diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 3c638f383699..8033d59249be 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -391,7 +391,7 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty, StickyTimeDuration(timing.mDelay)); animation->initialCurrentTime() = aAnimation->GetCurrentTime().Value() - timing.mDelay; - animation->duration() = timing.mIterationDuration; + animation->duration() = computedTiming.mDuration; animation->iterations() = computedTiming.mIterations; animation->direction() = static_cast(timing.mDirection); animation->property() = aProperty.mProperty; diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index 5774150f8a74..2abef5eeac5d 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -243,10 +243,9 @@ CSSAnimation::QueueEvents() StickyTimeDuration elapsedTime; if (message == eAnimationStart || message == eAnimationIteration) { - TimeDuration iterationStart = mEffect->Timing().mIterationDuration * - computedTiming.mCurrentIteration; - elapsedTime = StickyTimeDuration(std::max(iterationStart, - InitialAdvance())); + StickyTimeDuration iterationStart = computedTiming.mDuration * + computedTiming.mCurrentIteration; + elapsedTime = std::max(iterationStart, StickyTimeDuration(InitialAdvance())); } else { MOZ_ASSERT(message == eAnimationEnd); elapsedTime = computedTiming.mActiveDuration; @@ -626,8 +625,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext, aAnimations.AppendElement(dest); AnimationTiming timing; - timing.mIterationDuration = - TimeDuration::FromMilliseconds(src.GetDuration()); + timing.mDuration.SetAsUnrestrictedDouble() = src.GetDuration(); timing.mDelay = TimeDuration::FromMilliseconds(src.GetDelay()); timing.mIterations = src.GetIterationCount(); timing.mDirection = src.GetDirection(); diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index e7423012a5a3..5f70790bc003 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -150,7 +150,8 @@ CSSTransition::QueueEvents() nsTransitionManager* manager = presContext->TransitionManager(); manager->QueueEvent(TransitionEventInfo(owningElement, owningPseudoType, property, - mEffect->Timing().mIterationDuration, + mEffect->GetComputedTiming() + .mDuration, AnimationTimeToTimeStamp(EffectEnd()), this)); } @@ -653,7 +654,7 @@ nsTransitionManager::ConsiderStartingTransition( } AnimationTiming timing; - timing.mIterationDuration = TimeDuration::FromMilliseconds(duration); + timing.mDuration.SetAsUnrestrictedDouble() = duration; timing.mDelay = TimeDuration::FromMilliseconds(delay); timing.mIterations = 1.0; timing.mDirection = dom::PlaybackDirection::Normal; diff --git a/layout/style/nsTransitionManager.h b/layout/style/nsTransitionManager.h index 73d28fba84b1..4eb360359c65 100644 --- a/layout/style/nsTransitionManager.h +++ b/layout/style/nsTransitionManager.h @@ -214,7 +214,7 @@ struct TransitionEventInfo { TransitionEventInfo(dom::Element* aElement, nsCSSPseudoElements::Type aPseudoType, nsCSSProperty aProperty, - TimeDuration aDuration, + StickyTimeDuration aDuration, const TimeStamp& aTimeStamp, dom::Animation* aAnimation) : mElement(aElement) From fa79443f12a519d2ffb8904cd795b0544db5eaa7 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:37:00 +0100 Subject: [PATCH 014/156] Bug 1214536 - Part 5: Add AnimationEffectTimingReadOnly interface. r=birtles, r=smaug 1. Add AnimationEffectTimingReadOnly.webidl. 2. Add AnimationEffectTimingReadOnly cpp files. 3. Use AnimationEffectTimingReadOnly as KeyframeEffectReadOnly::mTiming. --HG-- extra : rebase_source : 0e9c112b70ae56f2bcdf162374388857518fc124 extra : amend_source : 0aebf0e9daac77542d913e4ad6a07c75e21a93b5 --- dom/animation/AnimationEffectReadOnly.h | 3 + .../AnimationEffectTimingReadOnly.cpp | 50 +++++++++++ dom/animation/AnimationEffectTimingReadOnly.h | 87 +++++++++++++++++++ dom/animation/ComputedTimingFunction.h | 2 +- dom/animation/KeyframeEffect.cpp | 18 ++-- dom/animation/KeyframeEffect.h | 57 ++---------- dom/animation/moz.build | 2 + .../mochitest/general/test_interfaces.html | 2 + dom/webidl/AnimationEffectReadOnly.webidl | 5 +- .../AnimationEffectTimingReadOnly.webidl | 23 +++++ dom/webidl/moz.build | 1 + layout/style/nsAnimationManager.h | 2 +- layout/style/nsTransitionManager.cpp | 2 +- 13 files changed, 192 insertions(+), 62 deletions(-) create mode 100644 dom/animation/AnimationEffectTimingReadOnly.cpp create mode 100644 dom/animation/AnimationEffectTimingReadOnly.h create mode 100644 dom/webidl/AnimationEffectTimingReadOnly.webidl diff --git a/dom/animation/AnimationEffectReadOnly.h b/dom/animation/AnimationEffectReadOnly.h index 7c38ca8bc39c..92c7186d6769 100644 --- a/dom/animation/AnimationEffectReadOnly.h +++ b/dom/animation/AnimationEffectReadOnly.h @@ -14,6 +14,7 @@ namespace mozilla { namespace dom { +class AnimationEffectTimingReadOnly; struct ComputedTimingProperties; class AnimationEffectReadOnly : public nsISupports, @@ -30,6 +31,8 @@ public: nsISupports* GetParentObject() const { return mParent; } + virtual already_AddRefed TimingAsObject() const = 0; + virtual void GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const { } diff --git a/dom/animation/AnimationEffectTimingReadOnly.cpp b/dom/animation/AnimationEffectTimingReadOnly.cpp new file mode 100644 index 000000000000..245088a875e5 --- /dev/null +++ b/dom/animation/AnimationEffectTimingReadOnly.cpp @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/dom/AnimationEffectTimingReadOnly.h" +#include "mozilla/dom/AnimationEffectTimingReadOnlyBinding.h" + +namespace mozilla { + +bool +AnimationTiming::operator==(const AnimationTiming& aOther) const +{ + bool durationEqual; + if (mDuration.IsUnrestrictedDouble()) { + durationEqual = aOther.mDuration.IsUnrestrictedDouble() && + (mDuration.GetAsUnrestrictedDouble() == + aOther.mDuration.GetAsUnrestrictedDouble()); + } else if (mDuration.IsString()) { + durationEqual = aOther.mDuration.IsString() && + (mDuration.GetAsString() == + aOther.mDuration.GetAsString()); + } else { + // Check if both are uninitialized + durationEqual = !aOther.mDuration.IsUnrestrictedDouble() && + !aOther.mDuration.IsString(); + } + return durationEqual && + mDelay == aOther.mDelay && + mIterations == aOther.mIterations && + mDirection == aOther.mDirection && + mFill == aOther.mFill; +} + +namespace dom { + +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectTimingReadOnly, mParent) + +NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationEffectTimingReadOnly, AddRef) +NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationEffectTimingReadOnly, Release) + +JSObject* +AnimationEffectTimingReadOnly::WrapObject(JSContext* aCx, JS::Handle aGivenProto) +{ + return AnimationEffectTimingReadOnlyBinding::Wrap(aCx, this, aGivenProto); +} + +} // namespace dom +} // namespace mozilla diff --git a/dom/animation/AnimationEffectTimingReadOnly.h b/dom/animation/AnimationEffectTimingReadOnly.h new file mode 100644 index 000000000000..7f1e6c5e6193 --- /dev/null +++ b/dom/animation/AnimationEffectTimingReadOnly.h @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_dom_AnimationEffectTimingReadOnly_h +#define mozilla_dom_AnimationEffectTimingReadOnly_h + +#include "js/TypeDecls.h" +#include "mozilla/Attributes.h" +#include "mozilla/ErrorResult.h" +#include "mozilla/dom/BindingDeclarations.h" +#include "mozilla/dom/UnionTypes.h" +#include "nsCycleCollectionParticipant.h" +#include "nsWrapperCache.h" + +// X11 has a #define for None +#ifdef None +#undef None +#endif +#include "mozilla/dom/AnimationEffectReadOnlyBinding.h" // for FillMode + // and PlaybackDirection + +namespace mozilla { + +struct AnimationTiming +{ + // The unitialized state of mDuration represents "auto". + // Bug 1237173: We will replace this with Maybe. + dom::OwningUnrestrictedDoubleOrString mDuration; + TimeDuration mDelay; // Initializes to zero + double mIterations = 1.0; // Can be NaN, negative, +/-Infinity + dom::PlaybackDirection mDirection = dom::PlaybackDirection::Normal; + dom::FillMode mFill = dom::FillMode::Auto; + + bool operator==(const AnimationTiming& aOther) const; + bool operator!=(const AnimationTiming& aOther) const + { + return !(*this == aOther); + } +}; + + +namespace dom { + +class AnimationEffectTimingReadOnly : public nsWrapperCache +{ +public: + AnimationEffectTimingReadOnly() = default; + explicit AnimationEffectTimingReadOnly(const AnimationTiming& aTiming) + : mTiming(aTiming) { } + + NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffectTimingReadOnly) + NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffectTimingReadOnly) + +protected: + virtual ~AnimationEffectTimingReadOnly() = default; + +public: + nsISupports* GetParentObject() const { return mParent; } + JSObject* WrapObject(JSContext* aCx, JS::Handle aGivenProto) override; + + double Delay() const { return mTiming.mDelay.ToMilliseconds(); } + double EndDelay() const { return 0.0; } + FillMode Fill() const { return mTiming.mFill; } + double IterationStart() const { return 0.0; } + double Iterations() const { return mTiming.mIterations; } + void GetDuration(OwningUnrestrictedDoubleOrString& aRetVal) const + { + aRetVal = mTiming.mDuration; + } + PlaybackDirection Direction() const { return mTiming.mDirection; } + void GetEasing(nsString& aRetVal) const { aRetVal.AssignLiteral("linear"); } + + const AnimationTiming& Timing() const { return mTiming; } + void SetTiming(const AnimationTiming& aTiming) { mTiming = aTiming; } + +protected: + nsCOMPtr mParent; + AnimationTiming mTiming; +}; + +} // namespace dom +} // namespace mozilla + +#endif // mozilla_dom_AnimationEffectTimingReadOnly_h diff --git a/dom/animation/ComputedTimingFunction.h b/dom/animation/ComputedTimingFunction.h index fa1b335b3a77..6831d65b594e 100644 --- a/dom/animation/ComputedTimingFunction.h +++ b/dom/animation/ComputedTimingFunction.h @@ -50,4 +50,4 @@ private: } // namespace mozilla -#endif // mozilla_dom_AnimationEffectReadOnly_h +#endif // mozilla_ComputedTimingFunction_h diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 7d1338bf8dc8..7ffe43330779 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -78,11 +78,12 @@ KeyframeEffectReadOnly::KeyframeEffectReadOnly( const AnimationTiming& aTiming) : AnimationEffectReadOnly(aDocument) , mTarget(aTarget) - , mTiming(aTiming) , mPseudoType(aPseudoType) , mInEffectOnLastAnimationTimingUpdate(false) { MOZ_ASSERT(aTarget, "null animation target is not yet supported"); + + mTiming = new AnimationEffectTimingReadOnly(aTiming); } JSObject* @@ -104,13 +105,20 @@ KeyframeEffectReadOnly::Composite() const return CompositeOperation::Replace; } +already_AddRefed +KeyframeEffectReadOnly::TimingAsObject() const +{ + RefPtr temp(mTiming); + return temp.forget(); +} + void KeyframeEffectReadOnly::SetTiming(const AnimationTiming& aTiming) { - if (mTiming == aTiming) { + if (mTiming->Timing() == aTiming) { return; } - mTiming = aTiming; + mTiming->SetTiming(aTiming); if (mAnimation) { mAnimation->NotifyEffectTimingUpdated(); } @@ -191,9 +199,9 @@ void KeyframeEffectReadOnly::GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const { const Nullable currentTime = GetLocalTime(); - GetComputedTimingDictionary(GetComputedTimingAt(currentTime, mTiming), + GetComputedTimingDictionary(GetComputedTimingAt(currentTime, Timing()), currentTime, - mTiming, + Timing(), aRetVal); } diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 39c8ca309e81..8196bec4fd85 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -15,20 +15,16 @@ #include "mozilla/Attributes.h" #include "mozilla/ComputedTimingFunction.h" // ComputedTimingFunction #include "mozilla/LayerAnimationInfo.h" // LayerAnimations::kRecords +#include "mozilla/OwningNonNull.h" // OwningNonNull<...> #include "mozilla/StickyTimeDuration.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/TimeStamp.h" #include "mozilla/dom/AnimationEffectReadOnly.h" +#include "mozilla/dom/AnimationEffectTimingReadOnly.h" // AnimationTiming #include "mozilla/dom/Element.h" #include "mozilla/dom/KeyframeBinding.h" #include "mozilla/dom/Nullable.h" -#include "mozilla/dom/UnionTypes.h" -// Fix X11 header brain damage that conflicts with dom::FillMode::None -#ifdef None -#undef None -#endif -#include "mozilla/dom/AnimationEffectReadOnlyBinding.h" struct JSContext; class nsCSSPropertySet; @@ -48,47 +44,6 @@ enum class IterationCompositeOperation : uint32_t; enum class CompositeOperation : uint32_t; } -/** - * Input timing parameters. - * - * Eventually this will represent all the input timing parameters specified - * by content but for now it encapsulates just the subset of those - * parameters passed to GetPositionInIteration. - */ -struct AnimationTiming -{ - dom::OwningUnrestrictedDoubleOrString mDuration; - TimeDuration mDelay; - double mIterations; // Can be NaN, negative, +/-Infinity - dom::PlaybackDirection mDirection; - dom::FillMode mFill; - - bool operator==(const AnimationTiming& aOther) const { - bool durationEqual; - if (mDuration.IsUnrestrictedDouble()) { - durationEqual = aOther.mDuration.IsUnrestrictedDouble() && - (mDuration.GetAsUnrestrictedDouble() == - aOther.mDuration.GetAsUnrestrictedDouble()); - } else if (mDuration.IsString()) { - durationEqual = aOther.mDuration.IsString() && - (mDuration.GetAsString() == - aOther.mDuration.GetAsString()); - } else { - // Check if both are uninitialized - durationEqual = !aOther.mDuration.IsUnrestrictedDouble() && - !aOther.mDuration.IsString(); - } - return durationEqual && - mDelay == aOther.mDelay && - mIterations == aOther.mIterations && - mDirection == aOther.mDirection && - mFill == aOther.mFill; - } - bool operator!=(const AnimationTiming& aOther) const { - return !(*this == aOther); - } -}; - /** * Stores the results of calculating the timing properties of an animation * at a given sample time. @@ -264,9 +219,9 @@ public: aRetVal.AssignLiteral("distribute"); } - const AnimationTiming& Timing() const { return mTiming; } - AnimationTiming& Timing() { return mTiming; } + const AnimationTiming& Timing() const { return mTiming->Timing(); } void SetTiming(const AnimationTiming& aTiming); + already_AddRefed TimingAsObject() const override; void NotifyAnimationTimingUpdated(); Nullable GetLocalTime() const; @@ -290,7 +245,7 @@ public: ComputedTiming GetComputedTiming(const AnimationTiming* aTiming = nullptr) const { - return GetComputedTimingAt(GetLocalTime(), aTiming ? *aTiming : mTiming); + return GetComputedTimingAt(GetLocalTime(), aTiming ? *aTiming : Timing()); } void @@ -386,7 +341,7 @@ protected: nsCOMPtr mTarget; RefPtr mAnimation; - AnimationTiming mTiming; + OwningNonNull mTiming; nsCSSPseudoElements::Type mPseudoType; InfallibleTArray mProperties; diff --git a/dom/animation/moz.build b/dom/animation/moz.build index e42a975d5b4c..1127b7a76580 100644 --- a/dom/animation/moz.build +++ b/dom/animation/moz.build @@ -10,6 +10,7 @@ MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] EXPORTS.mozilla.dom += [ 'Animation.h', 'AnimationEffectReadOnly.h', + 'AnimationEffectTimingReadOnly.h', 'AnimationTimeline.h', 'DocumentTimeline.h', 'KeyframeEffect.h', @@ -29,6 +30,7 @@ EXPORTS.mozilla += [ UNIFIED_SOURCES += [ 'Animation.cpp', 'AnimationEffectReadOnly.cpp', + 'AnimationEffectTimingReadOnly.cpp', 'AnimationTimeline.cpp', 'AnimationUtils.cpp', 'AnimValuesStyleRule.cpp', diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index 65f48e645ae1..bb4f098db51b 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -128,6 +128,8 @@ var interfaceNamesInGlobalScope = {name: "Animation", release: false}, // IMPORTANT: Do not change this list without review from a DOM peer! {name: "AnimationEffectReadOnly", release: false}, +// IMPORTANT: Do not change this list without review from a DOM peer! + {name: "AnimationEffectTimingReadOnly", release: false}, // IMPORTANT: Do not change this list without review from a DOM peer! "AnimationEvent", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/webidl/AnimationEffectReadOnly.webidl b/dom/webidl/AnimationEffectReadOnly.webidl index a71bb6c3544d..941748e87b13 100644 --- a/dom/webidl/AnimationEffectReadOnly.webidl +++ b/dom/webidl/AnimationEffectReadOnly.webidl @@ -46,9 +46,8 @@ dictionary ComputedTimingProperties : AnimationEffectTimingProperties { [Func="nsDocument::IsWebAnimationsEnabled"] interface AnimationEffectReadOnly { - // Not yet implemented: - // readonly attribute AnimationEffectTimingReadOnly timing; - + [Cached, Constant, BinaryName="timingAsObject"] + readonly attribute AnimationEffectTimingReadOnly timing; [BinaryName="getComputedTimingAsDict"] ComputedTimingProperties getComputedTiming(); }; diff --git a/dom/webidl/AnimationEffectTimingReadOnly.webidl b/dom/webidl/AnimationEffectTimingReadOnly.webidl new file mode 100644 index 000000000000..4aff51e01176 --- /dev/null +++ b/dom/webidl/AnimationEffectTimingReadOnly.webidl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * https://w3c.github.io/web-animations/#animationeffecttimingreadonly + * + * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +[Func="nsDocument::IsWebAnimationsEnabled"] +interface AnimationEffectTimingReadOnly { + readonly attribute double delay; + readonly attribute double endDelay; + readonly attribute FillMode fill; + readonly attribute double iterationStart; + readonly attribute unrestricted double iterations; + readonly attribute (unrestricted double or DOMString) duration; + readonly attribute PlaybackDirection direction; + readonly attribute DOMString easing; +}; diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index be1b282922e0..281ddc271f5b 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -24,6 +24,7 @@ WEBIDL_FILES = [ 'Animatable.webidl', 'Animation.webidl', 'AnimationEffectReadOnly.webidl', + 'AnimationEffectTimingReadOnly.webidl', 'AnimationEvent.webidl', 'AnimationTimeline.webidl', 'AnonymousContent.webidl', diff --git a/layout/style/nsAnimationManager.h b/layout/style/nsAnimationManager.h index 6711595092a3..b0b554aee9ea 100644 --- a/layout/style/nsAnimationManager.h +++ b/layout/style/nsAnimationManager.h @@ -169,7 +169,7 @@ protected: // Returns the duration from the start of the animation's source effect's // active interval to the point where the animation actually begins playback. // This is zero unless the animation's source effect has a negative delay in - // which // case it is the absolute value of that delay. + // which case it is the absolute value of that delay. // This is used for setting the elapsedTime member of CSS AnimationEvents. TimeDuration InitialAdvance() const { return mEffect ? diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 5f70790bc003..071c4c943dae 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -55,7 +55,7 @@ ElementPropertyTransition::CurrentValuePortion() const // causing us to get called *after* the animation interval. So, just in // case, we override the fill mode to 'both' to ensure the progress // is never null. - AnimationTiming timingToUse = mTiming; + AnimationTiming timingToUse = Timing(); timingToUse.mFill = dom::FillMode::Both; ComputedTiming computedTiming = GetComputedTiming(&timingToUse); From d03ac9c993d2f978845c0dd6a0e4dc22d0351c96 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:38:00 +0100 Subject: [PATCH 015/156] Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles --- dom/animation/AnimationEffectTimingReadOnly.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dom/animation/AnimationEffectTimingReadOnly.cpp b/dom/animation/AnimationEffectTimingReadOnly.cpp index 245088a875e5..146ea1947707 100644 --- a/dom/animation/AnimationEffectTimingReadOnly.cpp +++ b/dom/animation/AnimationEffectTimingReadOnly.cpp @@ -17,14 +17,11 @@ AnimationTiming::operator==(const AnimationTiming& aOther) const durationEqual = aOther.mDuration.IsUnrestrictedDouble() && (mDuration.GetAsUnrestrictedDouble() == aOther.mDuration.GetAsUnrestrictedDouble()); - } else if (mDuration.IsString()) { - durationEqual = aOther.mDuration.IsString() && - (mDuration.GetAsString() == - aOther.mDuration.GetAsString()); } else { - // Check if both are uninitialized - durationEqual = !aOther.mDuration.IsUnrestrictedDouble() && - !aOther.mDuration.IsString(); + // We consider all string values and uninitialized values as meaning "auto". + // Since mDuration is either a string or uninitialized, we consider it equal + // if aOther.mDuration is also either a string or uninitialized. + durationEqual = !aOther.mDuration.IsUnrestrictedDouble(); } return durationEqual && mDelay == aOther.mDelay && From deee95a0d8ff141dd0fc6e75eef9f8b498d14c5d Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:41:00 +0100 Subject: [PATCH 016/156] Bug 1214536 - Part 7: Rename AnimationTiming as TimingParams. r=birtles, r=smaug 1. struct AnimationTiming -> struct TimingParams 2. AnimationEffectReadOnly::TimingAsObject() -> AnimationEffectReadOnly::Timing() 3. KeyframeEffectReadOnly::Timing() -> KeyframeEffectReadOnly::SpecifiedTiming() --- dom/animation/Animation.cpp | 2 +- dom/animation/AnimationEffectReadOnly.h | 6 ++--- .../AnimationEffectTimingReadOnly.cpp | 2 +- dom/animation/AnimationEffectTimingReadOnly.h | 14 +++++----- dom/animation/KeyframeEffect.cpp | 25 ++++++++--------- dom/animation/KeyframeEffect.h | 27 +++++++++++-------- dom/webidl/AnimationEffectReadOnly.webidl | 2 +- .../composite/AsyncCompositionManager.cpp | 8 +++--- layout/base/nsDisplayList.cpp | 2 +- layout/style/nsAnimationManager.cpp | 9 ++++--- layout/style/nsAnimationManager.h | 2 +- layout/style/nsTransitionManager.cpp | 4 +-- layout/style/nsTransitionManager.h | 2 +- 13 files changed, 56 insertions(+), 49 deletions(-) diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp index 68eae81c175f..379e26a58240 100644 --- a/dom/animation/Animation.cpp +++ b/dom/animation/Animation.cpp @@ -1187,7 +1187,7 @@ Animation::EffectEnd() const return StickyTimeDuration(0); } - return mEffect->Timing().mDelay + return mEffect->SpecifiedTiming().mDelay + mEffect->GetComputedTiming().mActiveDuration; } diff --git a/dom/animation/AnimationEffectReadOnly.h b/dom/animation/AnimationEffectReadOnly.h index 92c7186d6769..016e4d979ecc 100644 --- a/dom/animation/AnimationEffectReadOnly.h +++ b/dom/animation/AnimationEffectReadOnly.h @@ -31,11 +31,9 @@ public: nsISupports* GetParentObject() const { return mParent; } - virtual already_AddRefed TimingAsObject() const = 0; + virtual already_AddRefed Timing() const = 0; - virtual void GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const - { - } + virtual void GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const = 0; protected: virtual ~AnimationEffectReadOnly() = default; diff --git a/dom/animation/AnimationEffectTimingReadOnly.cpp b/dom/animation/AnimationEffectTimingReadOnly.cpp index 146ea1947707..41b0b4e620f7 100644 --- a/dom/animation/AnimationEffectTimingReadOnly.cpp +++ b/dom/animation/AnimationEffectTimingReadOnly.cpp @@ -10,7 +10,7 @@ namespace mozilla { bool -AnimationTiming::operator==(const AnimationTiming& aOther) const +TimingParams::operator==(const TimingParams& aOther) const { bool durationEqual; if (mDuration.IsUnrestrictedDouble()) { diff --git a/dom/animation/AnimationEffectTimingReadOnly.h b/dom/animation/AnimationEffectTimingReadOnly.h index 7f1e6c5e6193..8e6f5e76d84f 100644 --- a/dom/animation/AnimationEffectTimingReadOnly.h +++ b/dom/animation/AnimationEffectTimingReadOnly.h @@ -24,7 +24,7 @@ namespace mozilla { -struct AnimationTiming +struct TimingParams { // The unitialized state of mDuration represents "auto". // Bug 1237173: We will replace this with Maybe. @@ -34,8 +34,8 @@ struct AnimationTiming dom::PlaybackDirection mDirection = dom::PlaybackDirection::Normal; dom::FillMode mFill = dom::FillMode::Auto; - bool operator==(const AnimationTiming& aOther) const; - bool operator!=(const AnimationTiming& aOther) const + bool operator==(const TimingParams& aOther) const; + bool operator!=(const TimingParams& aOther) const { return !(*this == aOther); } @@ -48,7 +48,7 @@ class AnimationEffectTimingReadOnly : public nsWrapperCache { public: AnimationEffectTimingReadOnly() = default; - explicit AnimationEffectTimingReadOnly(const AnimationTiming& aTiming) + explicit AnimationEffectTimingReadOnly(const TimingParams& aTiming) : mTiming(aTiming) { } NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffectTimingReadOnly) @@ -73,12 +73,12 @@ public: PlaybackDirection Direction() const { return mTiming.mDirection; } void GetEasing(nsString& aRetVal) const { aRetVal.AssignLiteral("linear"); } - const AnimationTiming& Timing() const { return mTiming; } - void SetTiming(const AnimationTiming& aTiming) { mTiming = aTiming; } + const TimingParams& AsTimingParams() const { return mTiming; } + void SetTimingParams(const TimingParams& aTiming) { mTiming = aTiming; } protected: nsCOMPtr mParent; - AnimationTiming mTiming; + TimingParams mTiming; }; } // namespace dom diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 7ffe43330779..c430446dbb09 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -27,7 +27,7 @@ namespace mozilla { static void GetComputedTimingDictionary(const ComputedTiming& aComputedTiming, const Nullable& aLocalTime, - const AnimationTiming& aTiming, + const TimingParams& aTiming, dom::ComputedTimingProperties& aRetVal) { // AnimationEffectTimingProperties @@ -75,7 +75,7 @@ KeyframeEffectReadOnly::KeyframeEffectReadOnly( nsIDocument* aDocument, Element* aTarget, nsCSSPseudoElements::Type aPseudoType, - const AnimationTiming& aTiming) + const TimingParams& aTiming) : AnimationEffectReadOnly(aDocument) , mTarget(aTarget) , mPseudoType(aPseudoType) @@ -106,19 +106,19 @@ KeyframeEffectReadOnly::Composite() const } already_AddRefed -KeyframeEffectReadOnly::TimingAsObject() const +KeyframeEffectReadOnly::Timing() const { RefPtr temp(mTiming); return temp.forget(); } void -KeyframeEffectReadOnly::SetTiming(const AnimationTiming& aTiming) +KeyframeEffectReadOnly::SetSpecifiedTiming(const TimingParams& aTiming) { - if (mTiming->Timing() == aTiming) { + if (mTiming->AsTimingParams() == aTiming) { return; } - mTiming->SetTiming(aTiming); + mTiming->SetTimingParams(aTiming); if (mAnimation) { mAnimation->NotifyEffectTimingUpdated(); } @@ -199,16 +199,17 @@ void KeyframeEffectReadOnly::GetComputedTimingAsDict(ComputedTimingProperties& aRetVal) const { const Nullable currentTime = GetLocalTime(); - GetComputedTimingDictionary(GetComputedTimingAt(currentTime, Timing()), + GetComputedTimingDictionary(GetComputedTimingAt(currentTime, + SpecifiedTiming()), currentTime, - Timing(), + SpecifiedTiming(), aRetVal); } ComputedTiming KeyframeEffectReadOnly::GetComputedTimingAt( const Nullable& aLocalTime, - const AnimationTiming& aTiming) + const TimingParams& aTiming) { const StickyTimeDuration zeroDuration; @@ -638,11 +639,11 @@ DumpAnimationProperties(nsTArray& aAnimationProperties) } #endif -/* static */ AnimationTiming +/* static */ TimingParams KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions) { - AnimationTiming animationTiming; + TimingParams animationTiming; if (aOptions.IsKeyframeEffectOptions()) { const KeyframeEffectOptions& opt = aOptions.GetAsKeyframeEffectOptions(); @@ -1698,7 +1699,7 @@ KeyframeEffectReadOnly::Constructor( return nullptr; } - AnimationTiming timing = ConvertKeyframeEffectOptions(aOptions); + TimingParams timing = ConvertKeyframeEffectOptions(aOptions); InfallibleTArray animationProperties; BuildAnimationPropertyList(aGlobal.Context(), aTarget, aFrames, diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 8196bec4fd85..1d3bf646ed50 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -20,7 +20,7 @@ #include "mozilla/StyleAnimationValue.h" #include "mozilla/TimeStamp.h" #include "mozilla/dom/AnimationEffectReadOnly.h" -#include "mozilla/dom/AnimationEffectTimingReadOnly.h" // AnimationTiming +#include "mozilla/dom/AnimationEffectTimingReadOnly.h" // TimingParams #include "mozilla/dom/Element.h" #include "mozilla/dom/KeyframeBinding.h" #include "mozilla/dom/Nullable.h" @@ -61,8 +61,8 @@ struct ComputedTiming Nullable mProgress; // Zero-based iteration index (meaningless if mProgress is null). uint64_t mCurrentIteration = 0; - // Unlike AnimationTiming::mIterations, this value is guaranteed to be in the - // range [0, Infinity]. + // Unlike TimingParams::mIterations, this value is + // guaranteed to be in the range [0, Infinity]. double mIterations = 1.0; StickyTimeDuration mDuration; @@ -170,7 +170,7 @@ public: KeyframeEffectReadOnly(nsIDocument* aDocument, Element* aTarget, nsCSSPseudoElements::Type aPseudoType, - const AnimationTiming& aTiming); + const TimingParams& aTiming); NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(KeyframeEffectReadOnly, @@ -219,9 +219,13 @@ public: aRetVal.AssignLiteral("distribute"); } - const AnimationTiming& Timing() const { return mTiming->Timing(); } - void SetTiming(const AnimationTiming& aTiming); - already_AddRefed TimingAsObject() const override; + already_AddRefed Timing() const override; + + const TimingParams& SpecifiedTiming() const + { + return mTiming->AsTimingParams(); + } + void SetSpecifiedTiming(const TimingParams& aTiming); void NotifyAnimationTimingUpdated(); Nullable GetLocalTime() const; @@ -238,14 +242,15 @@ public: // (because it is not currently active and is not filling at this time). static ComputedTiming GetComputedTimingAt(const Nullable& aLocalTime, - const AnimationTiming& aTiming); + const TimingParams& aTiming); // Shortcut for that gets the computed timing using the current local time as // calculated from the timeline time. ComputedTiming - GetComputedTiming(const AnimationTiming* aTiming = nullptr) const + GetComputedTiming(const TimingParams* aTiming = nullptr) const { - return GetComputedTimingAt(GetLocalTime(), aTiming ? *aTiming : Timing()); + return GetComputedTimingAt(GetLocalTime(), + aTiming ? *aTiming : SpecifiedTiming()); } void @@ -328,7 +333,7 @@ protected: // owning Animation's timing. void UpdateTargetRegistration(); - static AnimationTiming ConvertKeyframeEffectOptions( + static TimingParams ConvertKeyframeEffectOptions( const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions); static void BuildAnimationPropertyList( diff --git a/dom/webidl/AnimationEffectReadOnly.webidl b/dom/webidl/AnimationEffectReadOnly.webidl index 941748e87b13..8922f1afd21f 100644 --- a/dom/webidl/AnimationEffectReadOnly.webidl +++ b/dom/webidl/AnimationEffectReadOnly.webidl @@ -46,7 +46,7 @@ dictionary ComputedTimingProperties : AnimationEffectTimingProperties { [Func="nsDocument::IsWebAnimationsEnabled"] interface AnimationEffectReadOnly { - [Cached, Constant, BinaryName="timingAsObject"] + [Cached, Constant] readonly attribute AnimationEffectTimingReadOnly timing; [BinaryName="getComputedTimingAsDict"] ComputedTimingProperties getComputedTiming(); diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index bab27c7c07fd..3ebf7bee7c78 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -581,13 +581,15 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint) continue; } - AnimationTiming timing; - timing.mDuration.SetAsUnrestrictedDouble() = animation.duration().ToMilliseconds(); + TimingParams timing; + timing.mDuration.SetAsUnrestrictedDouble() = + animation.duration().ToMilliseconds(); // Currently animations run on the compositor have their delay factored // into their start time, hence the delay is effectively zero. timing.mDelay = TimeDuration(0); timing.mIterations = animation.iterations(); - timing.mDirection = static_cast(animation.direction()); + timing.mDirection = + static_cast(animation.direction()); // Animations typically only run on the compositor during their active // interval but if we end up sampling them outside that range (for // example, while they are waiting to be removed) we currently just diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 8033d59249be..e17dc7e0e3fc 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -381,7 +381,7 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty, aLayer->AddAnimationForNextTransaction() : aLayer->AddAnimation(); - const AnimationTiming& timing = aAnimation->GetEffect()->Timing(); + const TimingParams& timing = aAnimation->GetEffect()->SpecifiedTiming(); const ComputedTiming computedTiming = aAnimation->GetEffect()->GetComputedTiming(); Nullable startTime = aAnimation->GetCurrentOrPendingStartTime(); diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index 2abef5eeac5d..c94c271f0316 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -289,7 +289,8 @@ CSSAnimation::ElapsedTimeToTimeStamp(const StickyTimeDuration& return result; } - result = AnimationTimeToTimeStamp(aElapsedTime + mEffect->Timing().mDelay); + result = AnimationTimeToTimeStamp(aElapsedTime + + mEffect->SpecifiedTiming().mDelay); return result; } @@ -422,9 +423,9 @@ nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext, KeyframeEffectReadOnly* oldEffect = oldAnim->GetEffect(); KeyframeEffectReadOnly* newEffect = newAnim->GetEffect(); animationChanged = - oldEffect->Timing() != newEffect->Timing() || + oldEffect->SpecifiedTiming() != newEffect->SpecifiedTiming() || oldEffect->Properties() != newEffect->Properties(); - oldEffect->SetTiming(newEffect->Timing()); + oldEffect->SetSpecifiedTiming(newEffect->SpecifiedTiming()); oldEffect->CopyPropertiesFrom(*newEffect); } @@ -624,7 +625,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext, dest->SetAnimationIndex(static_cast(animIdx)); aAnimations.AppendElement(dest); - AnimationTiming timing; + TimingParams timing; timing.mDuration.SetAsUnrestrictedDouble() = src.GetDuration(); timing.mDelay = TimeDuration::FromMilliseconds(src.GetDelay()); timing.mIterations = src.GetIterationCount(); diff --git a/layout/style/nsAnimationManager.h b/layout/style/nsAnimationManager.h index b0b554aee9ea..856b23c5e5c7 100644 --- a/layout/style/nsAnimationManager.h +++ b/layout/style/nsAnimationManager.h @@ -173,7 +173,7 @@ protected: // This is used for setting the elapsedTime member of CSS AnimationEvents. TimeDuration InitialAdvance() const { return mEffect ? - std::max(TimeDuration(), mEffect->Timing().mDelay * -1) : + std::max(TimeDuration(), mEffect->SpecifiedTiming().mDelay * -1) : TimeDuration(); } // Converts an AnimationEvent's elapsedTime value to an equivalent TimeStamp diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 071c4c943dae..7ae9a10ad42f 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -55,7 +55,7 @@ ElementPropertyTransition::CurrentValuePortion() const // causing us to get called *after* the animation interval. So, just in // case, we override the fill mode to 'both' to ensure the progress // is never null. - AnimationTiming timingToUse = Timing(); + TimingParams timingToUse = SpecifiedTiming(); timingToUse.mFill = dom::FillMode::Both; ComputedTiming computedTiming = GetComputedTiming(&timingToUse); @@ -653,7 +653,7 @@ nsTransitionManager::ConsiderStartingTransition( reversePortion = valuePortion; } - AnimationTiming timing; + TimingParams timing; timing.mDuration.SetAsUnrestrictedDouble() = duration; timing.mDelay = TimeDuration::FromMilliseconds(delay); timing.mIterations = 1.0; diff --git a/layout/style/nsTransitionManager.h b/layout/style/nsTransitionManager.h index 4eb360359c65..77d06a15e3fd 100644 --- a/layout/style/nsTransitionManager.h +++ b/layout/style/nsTransitionManager.h @@ -38,7 +38,7 @@ struct ElementPropertyTransition : public dom::KeyframeEffectReadOnly ElementPropertyTransition(nsIDocument* aDocument, dom::Element* aTarget, nsCSSPseudoElements::Type aPseudoType, - const AnimationTiming &aTiming) + const TimingParams &aTiming) : dom::KeyframeEffectReadOnly(aDocument, aTarget, aPseudoType, aTiming) { } From 86a80f42286357b53336b627d7e01996b2cd1c79 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Wed, 13 Jan 2016 18:42:00 +0100 Subject: [PATCH 017/156] Bug 1214536 - Part 8: Add an operator=() for TimingParams. r=birtles Overload TimingParams::operator=() for AnimationEffectTimingProperties objects, so we can assign an AnimationEffectTimingProperties/KeyframeEffectOption object to a TimingParams object. We also keep the uninitialized state of KeyframeEffectOptions::mDuration while converting a KeyframeEffectOptions object into a TimingParams object. --- .../AnimationEffectTimingReadOnly.cpp | 12 ++++++++++ dom/animation/AnimationEffectTimingReadOnly.h | 2 ++ dom/animation/KeyframeEffect.cpp | 22 +++++-------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dom/animation/AnimationEffectTimingReadOnly.cpp b/dom/animation/AnimationEffectTimingReadOnly.cpp index 41b0b4e620f7..bfd4f93f232d 100644 --- a/dom/animation/AnimationEffectTimingReadOnly.cpp +++ b/dom/animation/AnimationEffectTimingReadOnly.cpp @@ -9,6 +9,18 @@ namespace mozilla { +TimingParams& +TimingParams::operator=(const dom::AnimationEffectTimingProperties& aRhs) +{ + mDuration = aRhs.mDuration; + mDelay = TimeDuration::FromMilliseconds(aRhs.mDelay); + mIterations = aRhs.mIterations; + mDirection = aRhs.mDirection; + mFill = aRhs.mFill; + + return *this; +} + bool TimingParams::operator==(const TimingParams& aOther) const { diff --git a/dom/animation/AnimationEffectTimingReadOnly.h b/dom/animation/AnimationEffectTimingReadOnly.h index 8e6f5e76d84f..05eace4768d2 100644 --- a/dom/animation/AnimationEffectTimingReadOnly.h +++ b/dom/animation/AnimationEffectTimingReadOnly.h @@ -34,6 +34,8 @@ struct TimingParams dom::PlaybackDirection mDirection = dom::PlaybackDirection::Normal; dom::FillMode mFill = dom::FillMode::Auto; + TimingParams& operator=(const dom::AnimationEffectTimingProperties& aRhs); + bool operator==(const TimingParams& aOther) const; bool operator!=(const TimingParams& aOther) const { diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index c430446dbb09..e306bb26d9ce 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -643,27 +643,15 @@ DumpAnimationProperties(nsTArray& aAnimationProperties) KeyframeEffectReadOnly::ConvertKeyframeEffectOptions( const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions) { - TimingParams animationTiming; + TimingParams timing; if (aOptions.IsKeyframeEffectOptions()) { - const KeyframeEffectOptions& opt = aOptions.GetAsKeyframeEffectOptions(); - - animationTiming.mDuration = opt.mDuration; - animationTiming.mDelay = TimeDuration::FromMilliseconds(opt.mDelay); - animationTiming.mIterations = opt.mIterations; - animationTiming.mDirection = opt.mDirection; - animationTiming.mFill = opt.mFill; + timing = aOptions.GetAsKeyframeEffectOptions(); } else { - double dur = aOptions.IsUnrestrictedDouble() ? - aOptions.GetAsUnrestrictedDouble() : - 0.0f; - animationTiming.mDuration.SetAsUnrestrictedDouble() = dur; - animationTiming.mDelay = TimeDuration(0); - animationTiming.mIterations = 1.0f; - animationTiming.mDirection = PlaybackDirection::Normal; - animationTiming.mFill = FillMode::None; + timing.mDuration.SetAsUnrestrictedDouble() = + aOptions.GetAsUnrestrictedDouble(); } - return animationTiming; + return timing; } /** From 2f2ea45d9fd2c49e5be08ca5b4d677f72fc6b266 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Fri, 8 Jan 2016 00:04:00 +0100 Subject: [PATCH 018/156] Bug 1214536 - Part 9: Test. r=birtles --- testing/web-platform/meta/MANIFEST.json | 4 + .../keyframe-effect/constructor.html | 115 ++++++----- .../keyframe-effect/getComputedTiming.html | 195 ++++++++++++++++++ 3 files changed, 259 insertions(+), 55 deletions(-) create mode 100644 testing/web-platform/tests/web-animations/keyframe-effect/getComputedTiming.html diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 1d897bb07e7c..9dbcc89be0a0 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -26623,6 +26623,10 @@ "path": "web-animations/keyframe-effect/constructor.html", "url": "/web-animations/keyframe-effect/constructor.html" }, + { + "path": "web-animations/keyframe-effect/getComputedTiming.html", + "url": "/web-animations/keyframe-effect/getComputedTiming.html" + }, { "path": "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html", "url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html" diff --git a/testing/web-platform/tests/web-animations/keyframe-effect/constructor.html b/testing/web-platform/tests/web-animations/keyframe-effect/constructor.html index 3b786b508501..edc5f4552b5c 100644 --- a/testing/web-platform/tests/web-animations/keyframe-effect/constructor.html +++ b/testing/web-platform/tests/web-animations/keyframe-effect/constructor.html @@ -450,17 +450,19 @@ gKeyframeSequenceTests.forEach(function(subtest) { }); -// KeyframeEffectOptions test(function(t) { - var effect = new KeyframeEffectReadOnly( - target, {left: ["10px", "20px"]}); + var effect = new KeyframeEffectReadOnly(target, + {left: ["10px", "20px"]}); - var ct = effect.getComputedTiming(); - assert_equals(ct.delay, 0, "default delay"); - assert_equals(ct.fill, "none", "default fill"); - assert_equals(ct.iterations, 1.0, "default iterations"); - assert_equals(ct.duration, 0, "default duration"); - assert_equals(ct.direction, "normal", "default direction"); + var timing = effect.timing; + assert_equals(timing.delay, 0, "default delay"); + assert_equals(timing.endDelay, 0, "default endDelay"); + assert_equals(timing.fill, "auto", "default fill"); + assert_equals(timing.iterations, 1.0, "default iterations"); + assert_equals(timing.iterationStart, 0.0, "default iterationStart"); + assert_equals(timing.duration, "auto", "default duration"); + assert_equals(timing.direction, "normal", "default direction"); + assert_equals(timing.easing, "linear", "default easing"); assert_equals(effect.composite, "replace", "default composite"); assert_equals(effect.iterationComposite, "replace", @@ -474,9 +476,9 @@ var gKeyframeEffectOptionTests = [ { desc: "an empty KeyframeEffectOption", input: {}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: "auto", direction: "normal"} }, { desc: "a normal KeyframeEffectOption", input: {delay: 1000, @@ -485,142 +487,145 @@ var gKeyframeEffectOptionTests = [ duration: "auto", direction: "alternate"}, expected: {delay: 1000, - fill: "none", + fill: "auto", iterations: 5.5, - duration: 0, + duration: "auto", direction: "alternate"} }, { desc: "a double value", input: 3000, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, duration: 3000, direction: "normal"} }, { desc: "+Infinity", input: Infinity, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, duration: Infinity, direction: "normal"} }, { desc: "-Infinity", input: -Infinity, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: -Infinity, direction: "normal"} }, { desc: "NaN", input: NaN, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: NaN, direction: "normal"} }, { desc: "a negative value", input: -1, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: -1, direction: "normal"} }, { desc: "an Infinity duration", input: {duration: Infinity}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, duration: Infinity, direction: "normal"} }, { desc: "a negative Infinity duration", input: {duration: -Infinity}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: -Infinity, direction: "normal"} }, { desc: "a NaN duration", input: {duration: NaN}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: NaN, direction: "normal"} }, { desc: "a negative duration", input: {duration: -1}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: -1, direction: "normal"} }, { desc: "a string duration", - input: {duration: "cabbage"}, + input: {duration: "merrychristmas"}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: "merrychristmas", direction: "normal"} }, { desc: "an auto duration", input: {duration: "auto"}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: "auto", direction: "normal"} }, { desc: "an Infinity iterations", input: {iterations: Infinity}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: Infinity, - duration: 0, + duration: "auto", direction: "normal"} }, { desc: "a negative Infinity iterations", input: {iterations: -Infinity}, expected: {delay: 0, - fill: "none", - iterations: 1, - duration: 0, + fill: "auto", + iterations: -Infinity, + duration: "auto", direction: "normal"} }, { desc: "a NaN iterations", input: {iterations: NaN}, expected: {delay: 0, - fill: "none", - iterations: 1, - duration: 0, + fill: "auto", + iterations: NaN, + duration: "auto", direction: "normal"} }, { desc: "a negative iterations", input: {iterations: -1}, expected: {delay: 0, - fill: "none", - iterations: 1, - duration: 0, + fill: "auto", + iterations: -1, + duration: "auto", direction: "normal"} }, { desc: "an auto fill", input: {fill: "auto"}, expected: {delay: 0, - fill: "none", + fill: "auto", iterations: 1, - duration: 0, + duration: "auto", direction: "normal"} }, { desc: "a forwards fill", input: {fill: "forwards"}, expected: {delay: 0, fill: "forwards", iterations: 1, - duration: 0, + duration: "auto", direction: "normal"} } ]; gKeyframeEffectOptionTests.forEach(function(stest) { test(function(t) { - var effect = new KeyframeEffectReadOnly( - target, {left: ["10px", "20px"]}, stest.input); + var effect = new KeyframeEffectReadOnly(target, + {left: ["10px", "20px"]}, + stest.input); - var ct = effect.getComputedTiming(); - assert_equals(ct.delay, stest.expected.delay, "initial delay"); - assert_equals(ct.fill, stest.expected.fill, "initial fill"); - assert_equals(ct.iterations, stest.expected.iterations, "initial iterations"); - assert_equals(ct.duration, stest.expected.duration, "initial duration"); - assert_equals(ct.direction, stest.expected.direction, "initial direction"); + var timing = effect.timing; + assert_equals(timing.delay, stest.expected.delay, "timing delay"); + assert_equals(timing.fill, stest.expected.fill, "timing fill"); + assert_equals(timing.iterations, stest.expected.iterations, + "timing iterations"); + assert_equals(timing.duration, stest.expected.duration, "timing duration"); + assert_equals(timing.direction, stest.expected.direction, + "timing direction"); }, "a KeyframeEffectReadOnly constructed by " + stest.desc); }); diff --git a/testing/web-platform/tests/web-animations/keyframe-effect/getComputedTiming.html b/testing/web-platform/tests/web-animations/keyframe-effect/getComputedTiming.html new file mode 100644 index 000000000000..320cd781411f --- /dev/null +++ b/testing/web-platform/tests/web-animations/keyframe-effect/getComputedTiming.html @@ -0,0 +1,195 @@ + + +KeyframeEffectReadOnly getComputedTiming() tests + + + + + + + +
+
+ + From 52768dab8f9de20dc253ee59a2ff154b8afb17d8 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Wed, 13 Jan 2016 07:51:00 +0100 Subject: [PATCH 019/156] Bug 1225911 - Properly check if LOCATION_CHANGE_SAME_DOCUMENT is in aFlags. r=dao --- browser/base/content/tabbrowser.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 08f2a1c28e31..0d55ba30a9d2 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -758,7 +758,7 @@ if (this.mBrowser.userTypedClear > 0 || ((aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) && aLocation.spec != "about:blank") || - aFlags && Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) { + aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) { this.mBrowser.userTypedValue = null; } From 194c256e8454d9cd71be8fc84042fba638adbf22 Mon Sep 17 00:00:00 2001 From: Alfredo Yang Date: Wed, 13 Jan 2016 18:53:00 +0100 Subject: [PATCH 020/156] Bug 1229363 - support sw video codec. r=sotaro --- .../platforms/omx/GonkOmxPlatformLayer.cpp | 53 ++- dom/media/platforms/omx/OmxDataDecoder.cpp | 329 +++++++++++++----- dom/media/platforms/omx/OmxDataDecoder.h | 19 +- dom/media/platforms/omx/OmxDecoderModule.cpp | 5 + dom/media/platforms/omx/OmxPromiseLayer.cpp | 2 +- 5 files changed, 287 insertions(+), 121 deletions(-) diff --git a/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp b/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp index e342a84255bd..6213cb0be11c 100644 --- a/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp +++ b/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp @@ -17,6 +17,7 @@ #include #include #include +#include extern mozilla::LogModule* GetPDMLog(); @@ -43,6 +44,13 @@ bool IsSoftwareCodec(const char* aComponentName) { return (str.Find(NS_LITERAL_CSTRING("OMX.google.")) == -1 ? false : true); } +bool IsInEmulator() +{ + char propQemu[PROPERTY_VALUE_MAX]; + property_get("ro.kernel.qemu", propQemu, ""); + return !strncmp(propQemu, "1", 1); +} + class GonkOmxObserver : public BnOMXObserver { public: void onMessage(const omx_message& aMsg) @@ -289,7 +297,10 @@ GonkBufferData::GetPlatformMediaData() return nullptr; } - MOZ_RELEASE_ASSERT(mTextureClientRecycleHandler); + if (!mTextureClientRecycleHandler) { + // There is no GraphicBuffer, it should fallback to normal YUV420 VideoData. + return nullptr; + } VideoInfo info; info.mDisplay = mGonkPlatformLayer->GetTrackInfo()->GetAsVideoInfo()->mDisplay; @@ -520,35 +531,39 @@ GonkOmxPlatformLayer::InitOmxToStateLoaded(const TrackInfo* aInfo) return OMX_ErrorUndefined; } + bool useHardwareCodecOnly = false; + + // H264 and H263 has different profiles, software codec doesn't support high profile. + // So we use hardware codec only. + if (!IsInEmulator() && + (mInfo->mMimeType.EqualsLiteral("video/avc") || + mInfo->mMimeType.EqualsLiteral("video/mp4") || + mInfo->mMimeType.EqualsLiteral("video/mp4v-es") || + mInfo->mMimeType.EqualsLiteral("video/3gp"))) { + useHardwareCodecOnly = true; + } + + LOG("find componenet for mime type %s", mInfo->mMimeType.Data()); // In Gonk, the software component name has prefix "OMX.google". It needs to // have a way to use hardware codec first. android::Vector matchingCodecs; - const char* swcomponent = nullptr; + nsTArray components; OMXCodec::findMatchingCodecs(mInfo->mMimeType.Data(), 0, nullptr, 0, &matchingCodecs); for (uint32_t i = 0; i < matchingCodecs.size(); i++) { - const char* componentName = matchingCodecs.itemAt(i).mName.string(); - if (IsSoftwareCodec(componentName)) { - swcomponent = componentName; - } else { - // Try to use hardware codec first. - if (LoadComponent(componentName)) { - mUsingHardwareCodec = true; - return OMX_ErrorNone; - } - LOG("failed to load component %s", componentName); - } + components.AppendElement(matchingCodecs.itemAt(i).mName.string()); } - // TODO: in android ICS, the software codec is allocated in mediaserver by - // default, it may be necessary to allocate it in local process. - // - // fallback to sw codec - if (swcomponent && LoadComponent(swcomponent)) { - return OMX_ErrorNone; + for (auto name : components) { + if (IsSoftwareCodec(name) && useHardwareCodecOnly) { + continue; + } + if (LoadComponent(name)) { + return OMX_ErrorNone; + } } LOG("no component is loaded"); diff --git a/dom/media/platforms/omx/OmxDataDecoder.cpp b/dom/media/platforms/omx/OmxDataDecoder.cpp index afed985ef6d4..fb568d5aa811 100644 --- a/dom/media/platforms/omx/OmxDataDecoder.cpp +++ b/dom/media/platforms/omx/OmxDataDecoder.cpp @@ -23,6 +23,8 @@ extern mozilla::LogModule* GetPDMLog(); return; \ } \ +// There should be a better way to calculate it. +#define MIN_VIDEO_INPUT_BUFFER_SIZE 64 * 1024 namespace mozilla { @@ -60,11 +62,52 @@ void GetPortIndex(nsTArray& aPortIndex) { aPortIndex.AppendElement(1); } +template void +InitOmxParameter(T* aParam) +{ + PodZero(aParam); + aParam->nSize = sizeof(T); + aParam->nVersion.s.nVersionMajor = 1; +} + +// A helper class to retrieve AudioData or VideoData. +class MediaDataHelper { +protected: + virtual ~MediaDataHelper() {} + +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaDataHelper) + + MediaDataHelper(const TrackInfo* aTrackInfo, + layers::ImageContainer* aImageContainer, + OmxPromiseLayer* aOmxLayer); + + already_AddRefed GetMediaData(BufferData* aBufferData, bool& aPlatformDepenentData); + +protected: + already_AddRefed CreateAudioData(BufferData* aBufferData); + + already_AddRefed CreateYUV420VideoData(BufferData* aBufferData); + + const TrackInfo* mTrackInfo; + + OMX_PARAM_PORTDEFINITIONTYPE mOutputPortDef; + + // audio output + MediaQueue mAudioQueue; + + AudioCompactor mAudioCompactor; + + // video output + RefPtr mImageContainer; +}; + OmxDataDecoder::OmxDataDecoder(const TrackInfo& aTrackInfo, MediaDataDecoderCallback* aCallback, layers::ImageContainer* aImageContainer) : mMonitor("OmxDataDecoder") , mOmxTaskQueue(CreateMediaDecodeTaskQueue()) + , mImageContainer(aImageContainer) , mWatchManager(this, mOmxTaskQueue) , mOmxState(OMX_STATETYPE::OMX_StateInvalid, "OmxDataDecoder::mOmxState") , mTrackInfo(aTrackInfo.Clone()) @@ -72,7 +115,6 @@ OmxDataDecoder::OmxDataDecoder(const TrackInfo& aTrackInfo, , mShuttingDown(false) , mCheckingInputExhausted(false) , mPortSettingsChanged(-1, "OmxDataDecoder::mPortSettingsChanged") - , mAudioCompactor(mAudioQueue) , mCallback(aCallback) { LOG("(%p)", this); @@ -272,6 +314,7 @@ OmxDataDecoder::DoAsyncShutdown() self->mOmxLayer->Shutdown(); self->mWatchManager.Shutdown(); self->mOmxLayer = nullptr; + self->mMediaDataHelper = nullptr; MonitorAutoLock lock(self->mMonitor); self->mShuttingDown = false; @@ -281,6 +324,7 @@ OmxDataDecoder::DoAsyncShutdown() self->mOmxLayer->Shutdown(); self->mWatchManager.Shutdown(); self->mOmxLayer = nullptr; + self->mMediaDataHelper = nullptr; MonitorAutoLock lock(self->mMonitor); self->mShuttingDown = false; @@ -288,80 +332,6 @@ OmxDataDecoder::DoAsyncShutdown() }); } -void -OmxDataDecoder::OutputAudio(BufferData* aBufferData) -{ - // TODO: it'd be better to move these code to BufferData::GetPlatformMediaData() or - // some kind of abstract layer. - MOZ_ASSERT(mOmxTaskQueue->IsCurrentThreadIn()); - OMX_BUFFERHEADERTYPE* buf = aBufferData->mBuffer; - AudioInfo* info = mTrackInfo->GetAsAudioInfo(); - if (buf->nFilledLen) { - uint64_t offset = 0; - uint32_t frames = buf->nFilledLen / (2 * info->mChannels); - if (aBufferData->mRawData) { - offset = aBufferData->mRawData->mOffset; - } - typedef AudioCompactor::NativeCopy OmxCopy; - mAudioCompactor.Push(offset, - buf->nTimeStamp, - info->mRate, - frames, - info->mChannels, - OmxCopy(buf->pBuffer + buf->nOffset, - buf->nFilledLen, - info->mChannels)); - RefPtr audio = mAudioQueue.PopFront(); - mCallback->Output(audio); - } - aBufferData->mStatus = BufferData::BufferStatus::FREE; -} - -void -OmxDataDecoder::OutputVideo(BufferData* aBufferData) -{ - MOZ_ASSERT(mOmxTaskQueue->IsCurrentThreadIn()); - - RefPtr data = aBufferData->GetPlatformMediaData(); - MOZ_RELEASE_ASSERT(data); - - VideoData* video(data->As()); - if (aBufferData->mRawData) { - video->mTime = aBufferData->mRawData->mTime; - video->mTimecode = aBufferData->mRawData->mTimecode; - video->mOffset = aBufferData->mRawData->mOffset; - video->mDuration = aBufferData->mRawData->mDuration; - video->mKeyframe = aBufferData->mRawData->mKeyframe; - } - - aBufferData->mStatus = BufferData::BufferStatus::OMX_CLIENT_OUTPUT; - - // TextureClient's recycle callback is called when reference count of - // TextureClient becomes 1. In most cases, the last reference count is held - // by ITextureClientRecycleAllocator. - // And then promise will be resolved in the callback. - // TODO: - // Because it is gonk specific behaviour, it needs to find a way to - // proper abstracting it. - MOZ_RELEASE_ASSERT(aBufferData->mPromise.IsEmpty()); - RefPtr p = aBufferData->mPromise.Ensure(__func__); - - RefPtr self = this; - RefPtr buffer = aBufferData; - p->Then(mOmxTaskQueue, __func__, - [self, buffer] () { - MOZ_RELEASE_ASSERT(buffer->mStatus == BufferData::BufferStatus::OMX_CLIENT_OUTPUT); - buffer->mStatus = BufferData::BufferStatus::FREE; - self->FillAndEmptyBuffers(); - }, - [buffer] () { - MOZ_RELEASE_ASSERT(buffer->mStatus == BufferData::BufferStatus::OMX_CLIENT_OUTPUT); - buffer->mStatus = BufferData::BufferStatus::FREE; - }); - - mCallback->Output(video); -} - void OmxDataDecoder::FillBufferDone(BufferData* aData) { @@ -383,17 +353,53 @@ OmxDataDecoder::FillBufferDone(BufferData* aData) EndOfStream(); aData->mStatus = BufferData::BufferStatus::FREE; } else { - if (mTrackInfo->IsAudio()) { - OutputAudio(aData); - } else if (mTrackInfo->IsVideo()) { - OutputVideo(aData); - } else { - MOZ_ASSERT(0); - } + Output(aData); FillAndEmptyBuffers(); } } +void +OmxDataDecoder::Output(BufferData* aData) +{ + if (!mMediaDataHelper) { + mMediaDataHelper = new MediaDataHelper(mTrackInfo.get(), mImageContainer, mOmxLayer); + } + + bool isPlatformData = false; + RefPtr data = mMediaDataHelper->GetMediaData(aData, isPlatformData); + if (!data) { + aData->mStatus = BufferData::BufferStatus::FREE; + return; + } + + if (isPlatformData) { + // If the MediaData is platform dependnet data, it's mostly a kind of + // limited resource, for example, GraphicBuffer on Gonk. So we use promise + // to notify when the resource is free. + aData->mStatus = BufferData::BufferStatus::OMX_CLIENT_OUTPUT; + + MOZ_RELEASE_ASSERT(aData->mPromise.IsEmpty()); + RefPtr p = aData->mPromise.Ensure(__func__); + + RefPtr self = this; + RefPtr buffer = aData; + p->Then(mOmxTaskQueue, __func__, + [self, buffer] () { + MOZ_RELEASE_ASSERT(buffer->mStatus == BufferData::BufferStatus::OMX_CLIENT_OUTPUT); + buffer->mStatus = BufferData::BufferStatus::FREE; + self->FillAndEmptyBuffers(); + }, + [buffer] () { + MOZ_RELEASE_ASSERT(buffer->mStatus == BufferData::BufferStatus::OMX_CLIENT_OUTPUT); + buffer->mStatus = BufferData::BufferStatus::FREE; + }); + } else { + aData->mStatus = BufferData::BufferStatus::FREE; + } + + mCallback->Output(data); +} + void OmxDataDecoder::FillBufferFailure(OmxBufferFailureHolder aFailureHolder) { @@ -515,6 +521,7 @@ OmxDataDecoder::FindAvailableBuffer(OMX_DIRTYPE aType) if (buf->mStatus == BufferData::BufferStatus::FREE) { return buf; } + LOG("buffer is owned by %d, type %d", buf->mStatus, aType); } return nullptr; @@ -689,6 +696,10 @@ OmxDataDecoder::ConfigVideoCodec() if (def.eDir == OMX_DirInput) { def.format.video.eCompressionFormat = codetype; def.format.video.eColorFormat = OMX_COLOR_FormatUnused; + if (def.nBufferSize < MIN_VIDEO_INPUT_BUFFER_SIZE) { + def.nBufferSize = videoInfo->mImage.width * videoInfo->mImage.height; + LOG("Change input buffer size to %d", def.nBufferSize); + } } else { def.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused; } @@ -772,14 +783,6 @@ OmxDataDecoder::Event(OMX_EVENTTYPE aEvent, OMX_U32 aData1, OMX_U32 aData2) return true; } -template void -OmxDataDecoder::InitOmxParameter(T* aParam) -{ - PodZero(aParam); - aParam->nSize = sizeof(T); - aParam->nVersion.s.nVersionMajor = 1; -} - bool OmxDataDecoder::BuffersCanBeReleased(OMX_DIRTYPE aType) { @@ -975,4 +978,150 @@ void OmxDataDecoder::FlushFailure(OmxCommandFailureHolder aFailureHolder) mMonitor.Notify(); } +MediaDataHelper::MediaDataHelper(const TrackInfo* aTrackInfo, + layers::ImageContainer* aImageContainer, + OmxPromiseLayer* aOmxLayer) + : mTrackInfo(aTrackInfo) + , mAudioCompactor(mAudioQueue) + , mImageContainer(aImageContainer) +{ + // Get latest port definition. + nsTArray ports; + GetPortIndex(ports); + for (auto idx : ports) { + InitOmxParameter(&mOutputPortDef); + mOutputPortDef.nPortIndex = idx; + aOmxLayer->GetParameter(OMX_IndexParamPortDefinition, &mOutputPortDef, sizeof(mOutputPortDef)); + if (mOutputPortDef.eDir == OMX_DirOutput) { + break; + } + } +} + +already_AddRefed +MediaDataHelper::GetMediaData(BufferData* aBufferData, bool& aPlatformDepenentData) +{ + aPlatformDepenentData = false; + RefPtr data; + + if (mTrackInfo->IsAudio()) { + if (!aBufferData->mBuffer->nFilledLen) { + return nullptr; + } + data = CreateAudioData(aBufferData); + } else if (mTrackInfo->IsVideo()) { + data = aBufferData->GetPlatformMediaData(); + if (data) { + aPlatformDepenentData = true; + } else { + if (!aBufferData->mBuffer->nFilledLen) { + return nullptr; + } + // Get YUV VideoData, it uses more CPU, in most cases, on software codec. + data = CreateYUV420VideoData(aBufferData); + } + + // Update video time code, duration... from the raw data. + VideoData* video(data->As()); + if (aBufferData->mRawData) { + video->mTime = aBufferData->mRawData->mTime; + video->mTimecode = aBufferData->mRawData->mTimecode; + video->mOffset = aBufferData->mRawData->mOffset; + video->mDuration = aBufferData->mRawData->mDuration; + video->mKeyframe = aBufferData->mRawData->mKeyframe; + } + } + + return data.forget(); +} + +already_AddRefed +MediaDataHelper::CreateAudioData(BufferData* aBufferData) +{ + RefPtr audio; + OMX_BUFFERHEADERTYPE* buf = aBufferData->mBuffer; + const AudioInfo* info = mTrackInfo->GetAsAudioInfo(); + if (buf->nFilledLen) { + uint64_t offset = 0; + uint32_t frames = buf->nFilledLen / (2 * info->mChannels); + if (aBufferData->mRawData) { + offset = aBufferData->mRawData->mOffset; + } + typedef AudioCompactor::NativeCopy OmxCopy; + mAudioCompactor.Push(offset, + buf->nTimeStamp, + info->mRate, + frames, + info->mChannels, + OmxCopy(buf->pBuffer + buf->nOffset, + buf->nFilledLen, + info->mChannels)); + audio = mAudioQueue.PopFront(); + } + + return audio.forget(); +} + +already_AddRefed +MediaDataHelper::CreateYUV420VideoData(BufferData* aBufferData) +{ + uint8_t *yuv420p_buffer = (uint8_t *)aBufferData->mBuffer->pBuffer; + int32_t stride = mOutputPortDef.format.video.nStride; + int32_t slice_height = mOutputPortDef.format.video.nSliceHeight; + int32_t width = mTrackInfo->GetAsVideoInfo()->mImage.width; + int32_t height = mTrackInfo->GetAsVideoInfo()->mImage.height; + + // TODO: convert other formats to YUV420. + if (mOutputPortDef.format.video.eColorFormat != OMX_COLOR_FormatYUV420Planar) { + return nullptr; + } + + size_t yuv420p_y_size = stride * slice_height; + size_t yuv420p_u_size = ((stride + 1) / 2) * ((slice_height + 1) / 2); + uint8_t *yuv420p_y = yuv420p_buffer; + uint8_t *yuv420p_u = yuv420p_y + yuv420p_y_size; + uint8_t *yuv420p_v = yuv420p_u + yuv420p_u_size; + + VideoData::YCbCrBuffer b; + b.mPlanes[0].mData = yuv420p_y; + b.mPlanes[0].mWidth = width; + b.mPlanes[0].mHeight = height; + b.mPlanes[0].mStride = stride; + b.mPlanes[0].mOffset = 0; + b.mPlanes[0].mSkip = 0; + + b.mPlanes[1].mData = yuv420p_u; + b.mPlanes[1].mWidth = (width + 1) / 2; + b.mPlanes[1].mHeight = (height + 1) / 2; + b.mPlanes[1].mStride = (stride + 1) / 2; + b.mPlanes[1].mOffset = 0; + b.mPlanes[1].mSkip = 0; + + b.mPlanes[2].mData = yuv420p_v; + b.mPlanes[2].mWidth =(width + 1) / 2; + b.mPlanes[2].mHeight = (height + 1) / 2; + b.mPlanes[2].mStride = (stride + 1) / 2; + b.mPlanes[2].mOffset = 0; + b.mPlanes[2].mSkip = 0; + + VideoInfo info; + info.mDisplay = mTrackInfo->GetAsVideoInfo()->mDisplay; + info.mImage = mTrackInfo->GetAsVideoInfo()->mImage; + RefPtr data = VideoData::Create(info, + mImageContainer, + 0, // Filled later by caller. + 0, // Filled later by caller. + 1, // We don't know the duration. + b, + 0, // Filled later by caller. + -1, + info.mImage); + + LOG("YUV420 VideoData: disp width %d, height %d, pic width %d, height %d, time %ld", + info.mDisplay.width, info.mDisplay.height, info.mImage.width, + info.mImage.height, aBufferData->mBuffer->nTimeStamp); + + return data.forget(); +} + } diff --git a/dom/media/platforms/omx/OmxDataDecoder.h b/dom/media/platforms/omx/OmxDataDecoder.h index 62d50b48abc5..8e834f5be62d 100644 --- a/dom/media/platforms/omx/OmxDataDecoder.h +++ b/dom/media/platforms/omx/OmxDataDecoder.h @@ -12,9 +12,13 @@ #include "OmxPromiseLayer.h" #include "MediaInfo.h" #include "AudioCompactor.h" +#include "OMX_Component.h" +#include "ImageContainer.h" namespace mozilla { +class MediaDataHelper; + typedef OmxPromiseLayer::OmxCommandPromise OmxCommandPromise; typedef OmxPromiseLayer::OmxBufferPromise OmxBufferPromise; typedef OmxPromiseLayer::OmxBufferFailureHolder OmxBufferFailureHolder; @@ -110,9 +114,7 @@ protected: // the port format is changed due to different codec specific. void PortSettingsChanged(); - void OutputAudio(BufferData* aBufferData); - - void OutputVideo(BufferData* aBufferData); + void Output(BufferData* aData); // Buffer can be released if its status is not OMX_COMPONENT or // OMX_CLIENT_OUTPUT. @@ -136,8 +138,6 @@ protected: BufferData* FindAvailableBuffer(OMX_DIRTYPE aType); - template void InitOmxParameter(T* aParam); - // aType could be OMX_DirMax for all types. RefPtr CollectBufferPromises(OMX_DIRTYPE aType); @@ -149,6 +149,8 @@ protected: RefPtr mReaderTaskQueue; + RefPtr mImageContainer; + WatchManager mWatchManager; // It is accessed in omx TaskQueue. @@ -185,12 +187,7 @@ protected: BUFFERLIST mOutPortBuffers; - // For audio output. - // TODO: because this class is for both video and audio decoding, so there - // should be some kind of abstract things to these members. - MediaQueue mAudioQueue; - - AudioCompactor mAudioCompactor; + RefPtr mMediaDataHelper; MediaDataDecoderCallback* mCallback; }; diff --git a/dom/media/platforms/omx/OmxDecoderModule.cpp b/dom/media/platforms/omx/OmxDecoderModule.cpp index 7b8dca2756f1..4f9b4b49b77d 100644 --- a/dom/media/platforms/omx/OmxDecoderModule.cpp +++ b/dom/media/platforms/omx/OmxDecoderModule.cpp @@ -44,7 +44,12 @@ OmxDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const bool OmxDecoderModule::SupportsMimeType(const nsACString& aMimeType) const { + // TODO: it could be better to query the support mine types from OMX instead + // of hard coding. return aMimeType.EqualsLiteral("audio/mp4a-latm") || + aMimeType.EqualsLiteral("video/mp4v-es") || + aMimeType.EqualsLiteral("video/mp4") || + aMimeType.EqualsLiteral("video/3gp") || aMimeType.EqualsLiteral("video/avc"); } diff --git a/dom/media/platforms/omx/OmxPromiseLayer.cpp b/dom/media/platforms/omx/OmxPromiseLayer.cpp index d2e0b4465889..9dd406ee0d53 100644 --- a/dom/media/platforms/omx/OmxPromiseLayer.cpp +++ b/dom/media/platforms/omx/OmxPromiseLayer.cpp @@ -119,7 +119,7 @@ already_AddRefed OmxPromiseLayer::FindAndRemoveRawData(OMX_TICKS aTimecode) { for (auto raw : mRawDatas) { - if (raw->mTimecode == aTimecode) { + if (raw->mTime == aTimecode) { mRawDatas.RemoveElement(raw); return raw.forget(); } From e6606278c0ff3dbadafc430868caa15052ed3a5f Mon Sep 17 00:00:00 2001 From: Aidin Gharibnavaz Date: Tue, 12 Jan 2016 07:49:08 +0330 Subject: [PATCH 021/156] Bug 1230216 - Changing nsIDOM*Event interfaces so that they don't inherit nsIDOMEvent. r=smaug All the event interfaces changed except for nsIDOMUIEvent and its inheritors. --HG-- extra : transplant_source : %A5U%3F%80%2B%DD%01%F4%D8%21%F2%E9z%C1%D6%AA%CC%D4%EC%F8 --- dom/base/TextInputProcessor.cpp | 6 +-- dom/base/nsContentUtils.cpp | 4 +- dom/events/IMEStateManager.cpp | 6 +-- dom/events/UIEvent.cpp | 6 +++ .../events/nsIDOMAnimationEvent.idl | 7 +-- .../events/nsIDOMBeforeUnloadEvent.idl | 6 +-- .../events/nsIDOMClipboardEvent.idl | 6 +-- dom/interfaces/events/nsIDOMCommandEvent.idl | 6 +-- .../events/nsIDOMDataContainerEvent.idl | 6 +-- dom/interfaces/events/nsIDOMMessageEvent.idl | 7 +-- dom/interfaces/events/nsIDOMMutationEvent.idl | 7 +-- .../events/nsIDOMNotifyPaintEvent.idl | 8 ++-- .../events/nsIDOMTransitionEvent.idl | 6 +-- dom/interfaces/events/nsIDOMUIEvent.idl | 19 ++++++-- dom/plugins/base/nsPluginInstanceOwner.cpp | 1 + dom/xbl/nsXBLEventHandler.cpp | 6 +-- dom/xbl/nsXBLPrototypeHandler.cpp | 2 +- dom/xbl/nsXBLWindowKeyHandler.cpp | 22 +++++----- dom/xul/nsXULPopupListener.cpp | 4 +- editor/libeditor/nsEditor.cpp | 11 ++--- editor/libeditor/nsEditorEventListener.cpp | 40 ++++++++--------- editor/libeditor/nsHTMLEditor.cpp | 10 ++--- .../libeditor/nsHTMLEditorEventListener.cpp | 12 ++--- editor/libeditor/nsPlaintextEditor.cpp | 9 ++-- .../spellcheck/src/mozInlineSpellChecker.cpp | 1 + layout/base/ZoomConstraintsClient.cpp | 1 + layout/base/nsRefreshDriver.cpp | 1 + layout/xul/nsMenuBarFrame.cpp | 3 +- layout/xul/nsMenuBarListener.cpp | 2 +- layout/xul/nsMenuPopupFrame.cpp | 2 +- layout/xul/nsSplitterFrame.cpp | 3 +- layout/xul/nsXULPopupManager.cpp | 44 ++++++++++--------- 32 files changed, 154 insertions(+), 120 deletions(-) diff --git a/dom/base/TextInputProcessor.cpp b/dom/base/TextInputProcessor.cpp index 06fbda65d8ac..48e9a0b853f9 100644 --- a/dom/base/TextInputProcessor.cpp +++ b/dom/base/TextInputProcessor.cpp @@ -344,7 +344,7 @@ TextInputProcessor::PrepareKeyboardEventForComposition( aKeyboardEvent = aOptionalArgc && aDOMKeyEvent ? - aDOMKeyEvent->GetInternalNSEvent()->AsKeyboardEvent() : nullptr; + aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent() : nullptr; if (!aKeyboardEvent || aOptionalArgc < 2) { aKeyFlags = 0; } @@ -769,7 +769,7 @@ TextInputProcessor::Keydown(nsIDOMKeyEvent* aDOMKeyEvent, return NS_ERROR_INVALID_ARG; } WidgetKeyboardEvent* originalKeyEvent = - aDOMKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (NS_WARN_IF(!originalKeyEvent)) { return NS_ERROR_INVALID_ARG; } @@ -875,7 +875,7 @@ TextInputProcessor::Keyup(nsIDOMKeyEvent* aDOMKeyEvent, return NS_ERROR_INVALID_ARG; } WidgetKeyboardEvent* originalKeyEvent = - aDOMKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (NS_WARN_IF(!originalKeyEvent)) { return NS_ERROR_INVALID_ARG; } diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 5578ff6f045e..fd5b8177e0a8 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -4955,13 +4955,13 @@ nsContentUtils::GetAccelKeyCandidates(nsIDOMKeyEvent* aDOMKeyEvent, NS_PRECONDITION(aCandidates.IsEmpty(), "aCandidates must be empty"); nsAutoString eventType; - aDOMKeyEvent->GetType(eventType); + aDOMKeyEvent->AsEvent()->GetType(eventType); // Don't process if aDOMKeyEvent is not a keypress event. if (!eventType.EqualsLiteral("keypress")) return; WidgetKeyboardEvent* nativeKeyEvent = - aDOMKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aDOMKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (nativeKeyEvent) { NS_ASSERTION(nativeKeyEvent->mClass == eKeyboardEventClass, "wrong type of native event"); diff --git a/dom/events/IMEStateManager.cpp b/dom/events/IMEStateManager.cpp index 1c9a0902de16..e782eb352a1c 100644 --- a/dom/events/IMEStateManager.cpp +++ b/dom/events/IMEStateManager.cpp @@ -584,7 +584,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext, } WidgetMouseEvent* internalEvent = - aMouseEvent->GetInternalNSEvent()->AsMouseEvent(); + aMouseEvent->AsEvent()->GetInternalNSEvent()->AsMouseEvent(); if (NS_WARN_IF(!internalEvent)) { MOZ_LOG(sISMLog, LogLevel::Debug, ("ISM: IMEStateManager::OnMouseButtonEventInEditor(), " @@ -597,7 +597,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext, if (MOZ_LOG_TEST(sISMLog, LogLevel::Info)) { nsAutoString eventType; - aMouseEvent->GetType(eventType); + aMouseEvent->AsEvent()->GetType(eventType); MOZ_LOG(sISMLog, LogLevel::Info, ("ISM: IMEStateManager::OnMouseButtonEventInEditor(), " "mouse event (type=%s, button=%d) is %s", @@ -630,7 +630,7 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext, NS_ENSURE_TRUE_VOID(widget); bool isTrusted; - nsresult rv = aMouseEvent->GetIsTrusted(&isTrusted); + nsresult rv = aMouseEvent->AsEvent()->GetIsTrusted(&isTrusted); NS_ENSURE_SUCCESS_VOID(rv); if (!isTrusted) { MOZ_LOG(sISMLog, LogLevel::Debug, diff --git a/dom/events/UIEvent.cpp b/dom/events/UIEvent.cpp index 864c06141588..e6ae6015afe3 100644 --- a/dom/events/UIEvent.cpp +++ b/dom/events/UIEvent.cpp @@ -346,6 +346,12 @@ UIEvent::IsChar() const return keyEvent ? keyEvent->isChar : false; } +mozilla::dom::Event* +UIEvent::AsEvent(void) +{ + return this; +} + NS_IMETHODIMP UIEvent::DuplicatePrivateData() { diff --git a/dom/interfaces/events/nsIDOMAnimationEvent.idl b/dom/interfaces/events/nsIDOMAnimationEvent.idl index f75aaa3b9394..2f4e527dbc02 100644 --- a/dom/interfaces/events/nsIDOMAnimationEvent.idl +++ b/dom/interfaces/events/nsIDOMAnimationEvent.idl @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" /** * Animation events are defined in: @@ -11,8 +11,9 @@ * http://dev.w3.org/csswg/css3-animations/#animation-events- */ -[builtinclass, uuid(772c7069-3f7d-42cf-97ab-b32f1c0b83da)] -interface nsIDOMAnimationEvent : nsIDOMEvent { +[builtinclass, uuid(ce6d1db3-53b8-4ade-9baa-70f4947200a2)] +interface nsIDOMAnimationEvent : nsISupports +{ readonly attribute DOMString animationName; readonly attribute float elapsedTime; readonly attribute DOMString pseudoElement; diff --git a/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl b/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl index f3032322bf59..3fe0451db204 100644 --- a/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl +++ b/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" /** * The nsIDOMBeforeUnloadEvent interface is the interface for events @@ -15,8 +15,8 @@ * */ -[builtinclass, uuid(96abf41b-32a8-4ff6-a0d6-4ade4ddebf89)] -interface nsIDOMBeforeUnloadEvent : nsIDOMEvent +[builtinclass, uuid(26c83933-a5a4-455e-8c46-69fa24dfa991)] +interface nsIDOMBeforeUnloadEvent : nsISupports { /** * Attribute used to pass back a return value from a beforeunload diff --git a/dom/interfaces/events/nsIDOMClipboardEvent.idl b/dom/interfaces/events/nsIDOMClipboardEvent.idl index 82f36cbb2831..a92093a13d7d 100644 --- a/dom/interfaces/events/nsIDOMClipboardEvent.idl +++ b/dom/interfaces/events/nsIDOMClipboardEvent.idl @@ -4,12 +4,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "domstubs.idl" -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" interface nsIDOMDataTransfer; -[builtinclass, uuid(4ef84980-52c2-425c-b41a-2ee75ec5d497)] -interface nsIDOMClipboardEvent : nsIDOMEvent +[builtinclass, uuid(b54d6144-3980-4895-83c7-82f158bc1cf5)] +interface nsIDOMClipboardEvent : nsISupports { readonly attribute nsIDOMDataTransfer clipboardData; diff --git a/dom/interfaces/events/nsIDOMCommandEvent.idl b/dom/interfaces/events/nsIDOMCommandEvent.idl index 63592b10f898..3d1b8adc7f57 100644 --- a/dom/interfaces/events/nsIDOMCommandEvent.idl +++ b/dom/interfaces/events/nsIDOMCommandEvent.idl @@ -3,10 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" -[builtinclass, uuid(7efbe68a-811a-4159-801c-226948cfd08f)] -interface nsIDOMCommandEvent : nsIDOMEvent +[builtinclass, uuid(73a50e55-3eaa-4a38-a588-9b68a6d65032)] +interface nsIDOMCommandEvent : nsISupports { readonly attribute DOMString command; diff --git a/dom/interfaces/events/nsIDOMDataContainerEvent.idl b/dom/interfaces/events/nsIDOMDataContainerEvent.idl index 420c8c4faa55..fce27fc12758 100644 --- a/dom/interfaces/events/nsIDOMDataContainerEvent.idl +++ b/dom/interfaces/events/nsIDOMDataContainerEvent.idl @@ -3,11 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" #include "nsIVariant.idl" -[builtinclass, uuid(31ceb43e-5f49-43bf-9a18-3b60a535c814)] -interface nsIDOMDataContainerEvent : nsIDOMEvent +[builtinclass, uuid(a9f1f528-d106-4fea-8663-2d7f64b627a9)] +interface nsIDOMDataContainerEvent : nsISupports { /** * Return the data associated with the given key. diff --git a/dom/interfaces/events/nsIDOMMessageEvent.idl b/dom/interfaces/events/nsIDOMMessageEvent.idl index adff35d8e5eb..4dd741019a14 100644 --- a/dom/interfaces/events/nsIDOMMessageEvent.idl +++ b/dom/interfaces/events/nsIDOMMessageEvent.idl @@ -3,7 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" +#include "nsIDOMWindow.idl" /** * The nsIDOMMessageEvent interface is used for server-sent events and for @@ -12,8 +13,8 @@ * For more information on this interface, please see * http://www.whatwg.org/specs/web-apps/current-work/#messageevent */ -[builtinclass, uuid(4408a2f5-614f-40a3-8786-e16bd3f74e32)] -interface nsIDOMMessageEvent : nsIDOMEvent +[builtinclass, uuid(5d57bc56-30cf-4839-9e98-17f940120ec0)] +interface nsIDOMMessageEvent : nsISupports { /** * Custom string data associated with this event. diff --git a/dom/interfaces/events/nsIDOMMutationEvent.idl b/dom/interfaces/events/nsIDOMMutationEvent.idl index bd207b6e1af1..6b1b136f37dc 100644 --- a/dom/interfaces/events/nsIDOMMutationEvent.idl +++ b/dom/interfaces/events/nsIDOMMutationEvent.idl @@ -3,10 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" +#include "nsIDOMNode.idl" -[builtinclass, uuid(df7e4cd9-e41f-4c8e-a764-2e3191d2f463)] -interface nsIDOMMutationEvent : nsIDOMEvent +[builtinclass, uuid(30c9997f-bc4c-4890-b890-febb6ae3051b)] +interface nsIDOMMutationEvent : nsISupports { const unsigned short MODIFICATION = 1; const unsigned short ADDITION = 2; diff --git a/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl b/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl index 76dccd2f2ee7..905876df594a 100644 --- a/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl +++ b/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl @@ -3,7 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" +#include "nsIDOMClientRectList.idl" +#include "nsIDOMClientRect.idl" interface nsIDOMPaintRequestList; @@ -12,8 +14,8 @@ interface nsIDOMPaintRequestList; * event, which fires at a window when painting has happened in * that window. */ -[builtinclass, uuid(550f660c-65a5-4e17-b828-3dbec7c44304)] -interface nsIDOMNotifyPaintEvent : nsIDOMEvent +[builtinclass, uuid(63f573a0-3e4e-474b-a0c2-bb4ca93febaa)] +interface nsIDOMNotifyPaintEvent : nsISupports { /** * Get a list of rectangles which are affected. The rectangles are in CSS pixels diff --git a/dom/interfaces/events/nsIDOMTransitionEvent.idl b/dom/interfaces/events/nsIDOMTransitionEvent.idl index 234a5debbd50..5809d1427904 100644 --- a/dom/interfaces/events/nsIDOMTransitionEvent.idl +++ b/dom/interfaces/events/nsIDOMTransitionEvent.idl @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" /** * Transition events are defined in: @@ -11,8 +11,8 @@ * http://dev.w3.org/csswg/css3-transitions/#transition-events- */ -[builtinclass, uuid(acb69403-0dcb-4db0-9ffc-8a22cc56c4eb)] -interface nsIDOMTransitionEvent : nsIDOMEvent { +[builtinclass, uuid(ee3499bf-0f14-4bb6-829c-19ad24fd4a85)] +interface nsIDOMTransitionEvent : nsISupports { readonly attribute DOMString propertyName; readonly attribute float elapsedTime; readonly attribute DOMString pseudoElement; diff --git a/dom/interfaces/events/nsIDOMUIEvent.idl b/dom/interfaces/events/nsIDOMUIEvent.idl index f4ca02b06ffa..904a526d2126 100644 --- a/dom/interfaces/events/nsIDOMUIEvent.idl +++ b/dom/interfaces/events/nsIDOMUIEvent.idl @@ -3,7 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsIDOMEvent.idl" +#include "nsISupports.idl" +#include "nsIDOMWindow.idl" /** * The nsIDOMUIEvent interface is the datatype for all UI events in the @@ -13,8 +14,18 @@ * http://www.w3.org/TR/DOM-Level-2-Events/ */ -[builtinclass, uuid(db058d10-1db9-4cf9-bb4c-483c304a137f)] -interface nsIDOMUIEvent : nsIDOMEvent +%{C++ +namespace mozilla { +namespace dom { +class Event; +} +} +%} + +[ptr] native EventPtr(mozilla::dom::Event); + +[builtinclass, uuid(75996b57-51f0-4c9c-aaaa-e35eaf347b66)] +interface nsIDOMUIEvent : nsISupports { readonly attribute nsIDOMWindow view; readonly attribute long detail; @@ -38,4 +49,6 @@ interface nsIDOMUIEvent : nsIDOMEvent attribute boolean cancelBubble; readonly attribute boolean isChar; + + [notxpcom, nostdcall] EventPtr AsEvent(); }; diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 5d07b429e76b..31446ad28119 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -55,6 +55,7 @@ using mozilla::DefaultXDisplay; #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/HTMLObjectElementBinding.h" #include "mozilla/dom/TabChild.h" #include "nsFrameSelection.h" diff --git a/dom/xbl/nsXBLEventHandler.cpp b/dom/xbl/nsXBLEventHandler.cpp index 9833519266a4..790ee374b13e 100644 --- a/dom/xbl/nsXBLEventHandler.cpp +++ b/dom/xbl/nsXBLEventHandler.cpp @@ -90,8 +90,8 @@ nsXBLKeyEventHandler::ExecuteMatchedHandlers( uint32_t aCharCode, const IgnoreModifierState& aIgnoreModifierState) { - WidgetEvent* event = aKeyEvent->GetInternalNSEvent(); - nsCOMPtr target = aKeyEvent->InternalDOMEvent()->GetCurrentTarget(); + WidgetEvent* event = aKeyEvent->AsEvent()->GetInternalNSEvent(); + nsCOMPtr target = aKeyEvent->AsEvent()->InternalDOMEvent()->GetCurrentTarget(); bool executed = false; for (uint32_t i = 0; i < mProtoHandlers.Length(); ++i) { @@ -101,7 +101,7 @@ nsXBLKeyEventHandler::ExecuteMatchedHandlers( (hasAllowUntrustedAttr && handler->AllowUntrustedEvents()) || (!hasAllowUntrustedAttr && !mIsBoundToChrome && !mUsingContentXBLScope)) && handler->KeyEventMatched(aKeyEvent, aCharCode, aIgnoreModifierState)) { - handler->ExecuteHandler(target, aKeyEvent); + handler->ExecuteHandler(target, aKeyEvent->AsEvent()); executed = true; } } diff --git a/dom/xbl/nsXBLPrototypeHandler.cpp b/dom/xbl/nsXBLPrototypeHandler.cpp index 153f60003b65..d51472ff2f93 100644 --- a/dom/xbl/nsXBLPrototypeHandler.cpp +++ b/dom/xbl/nsXBLPrototypeHandler.cpp @@ -909,7 +909,7 @@ nsXBLPrototypeHandler::ModifiersMatchMask( nsIDOMUIEvent* aEvent, const IgnoreModifierState& aIgnoreModifierState) { - WidgetInputEvent* inputEvent = aEvent->GetInternalNSEvent()->AsInputEvent(); + WidgetInputEvent* inputEvent = aEvent->AsEvent()->GetInternalNSEvent()->AsInputEvent(); NS_ENSURE_TRUE(inputEvent, false); if (mKeyMask & cMetaMask) { diff --git a/dom/xbl/nsXBLWindowKeyHandler.cpp b/dom/xbl/nsXBLWindowKeyHandler.cpp index d97e9265e488..59385c40ecc6 100644 --- a/dom/xbl/nsXBLWindowKeyHandler.cpp +++ b/dom/xbl/nsXBLWindowKeyHandler.cpp @@ -262,13 +262,13 @@ nsresult nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent* aKeyEvent, nsIAtom* aEventType) { bool prevent; - aKeyEvent->GetDefaultPrevented(&prevent); + aKeyEvent->AsEvent()->GetDefaultPrevented(&prevent); if (prevent) return NS_OK; bool trustedEvent = false; // Don't process the event if it was not dispatched from a trusted source - aKeyEvent->GetIsTrusted(&trustedEvent); + aKeyEvent->AsEvent()->GetIsTrusted(&trustedEvent); if (!trustedEvent) return NS_OK; @@ -281,7 +281,7 @@ nsXBLWindowKeyHandler::WalkHandlers(nsIDOMKeyEvent* aKeyEvent, nsIAtom* aEventTy if (!el) { if (mUserHandler) { WalkHandlersInternal(aKeyEvent, aEventType, mUserHandler, true); - aKeyEvent->GetDefaultPrevented(&prevent); + aKeyEvent->AsEvent()->GetDefaultPrevented(&prevent); if (prevent) return NS_OK; // Handled by the user bindings. Our work here is done. } @@ -322,14 +322,14 @@ void nsXBLWindowKeyHandler::HandleEventOnCapture(nsIDOMKeyEvent* aEvent) { WidgetKeyboardEvent* widgetEvent = - aEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (widgetEvent->mFlags.mNoCrossProcessBoundaryForwarding) { return; } nsCOMPtr originalTarget = - do_QueryInterface(aEvent->GetInternalNSEvent()->originalTarget); + do_QueryInterface(aEvent->AsEvent()->GetInternalNSEvent()->originalTarget); if (!EventStateManager::IsRemoteTarget(originalTarget)) { return; } @@ -353,7 +353,7 @@ nsXBLWindowKeyHandler::HandleEventOnCapture(nsIDOMKeyEvent* aEvent) // yet, it means it wasn't processed by content. We'll not call any // of the handlers at this moment, and will wait for the event to be // redispatched with mNoCrossProcessBoundaryForwarding = 1 to process it. - aEvent->StopPropagation(); + aEvent->AsEvent()->StopPropagation(); } } @@ -478,7 +478,7 @@ nsXBLWindowKeyHandler::WalkHandlersAndExecute( // Try all of the handlers until we find one that matches the event. for (nsXBLPrototypeHandler *currHandler = aHandler; currHandler; currHandler = currHandler->GetNextHandler()) { - bool stopped = aKeyEvent->IsDispatchStopped(); + bool stopped = aKeyEvent->AsEvent()->IsDispatchStopped(); if (stopped) { // The event is finished, don't execute any more handlers return false; @@ -552,7 +552,7 @@ nsXBLWindowKeyHandler::WalkHandlersAndExecute( return true; } - rv = currHandler->ExecuteHandler(piTarget, aKeyEvent); + rv = currHandler->ExecuteHandler(piTarget, aKeyEvent->AsEvent()); if (NS_SUCCEEDED(rv)) { return true; } @@ -565,7 +565,7 @@ nsXBLWindowKeyHandler::WalkHandlersAndExecute( // retry to look for a shortcut key without the Windows-Logo key press. if (!aIgnoreModifierState.mOS) { WidgetKeyboardEvent* keyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (keyEvent && keyEvent->IsOS()) { IgnoreModifierState ignoreModifierState(aIgnoreModifierState); ignoreModifierState.mOS = true; @@ -582,7 +582,7 @@ bool nsXBLWindowKeyHandler::HasHandlerForEvent(nsIDOMKeyEvent* aEvent, bool* aOutReservedForChrome) { - if (!aEvent->InternalDOMEvent()->IsTrusted()) { + if (!aEvent->AsEvent()->InternalDOMEvent()->IsTrusted()) { return false; } @@ -596,7 +596,7 @@ nsXBLWindowKeyHandler::HasHandlerForEvent(nsIDOMKeyEvent* aEvent, } nsAutoString eventType; - aEvent->GetType(eventType); + aEvent->AsEvent()->GetType(eventType); nsCOMPtr eventTypeAtom = do_GetAtom(eventType); NS_ENSURE_TRUE(eventTypeAtom, false); diff --git a/dom/xul/nsXULPopupListener.cpp b/dom/xul/nsXULPopupListener.cpp index 0718c07df9ae..9a8c11cc1809 100644 --- a/dom/xul/nsXULPopupListener.cpp +++ b/dom/xul/nsXULPopupListener.cpp @@ -115,7 +115,7 @@ nsXULPopupListener::HandleEvent(nsIDOMEvent* aEvent) } // Get the node that was clicked on. - EventTarget* target = mouseEvent->InternalDOMEvent()->GetTarget(); + EventTarget* target = mouseEvent->AsEvent()->InternalDOMEvent()->GetTarget(); nsCOMPtr targetNode = do_QueryInterface(target); if (!targetNode && mIsContext) { @@ -144,7 +144,7 @@ nsXULPopupListener::HandleEvent(nsIDOMEvent* aEvent) } bool preventDefault; - mouseEvent->GetDefaultPrevented(&preventDefault); + mouseEvent->AsEvent()->GetDefaultPrevented(&preventDefault); if (preventDefault && targetNode && mIsContext) { // Someone called preventDefault on a context menu. // Let's make sure they are allowed to do so. diff --git a/editor/libeditor/nsEditor.cpp b/editor/libeditor/nsEditor.cpp index 65c40df0fbc2..84ad127adf69 100644 --- a/editor/libeditor/nsEditor.cpp +++ b/editor/libeditor/nsEditor.cpp @@ -34,6 +34,7 @@ #include "mozilla/TextEvents.h" #include "mozilla/dom/Element.h" // for Element, nsINode::AsElement #include "mozilla/dom/Text.h" +#include "mozilla/dom/Event.h" #include "mozilla/mozalloc.h" // for operator new, etc #include "nsAString.h" // for nsAString_internal::Length, etc #include "nsCCUncollectableMarker.h" // for nsCCUncollectableMarker @@ -4615,7 +4616,7 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) // HandleKeyPressEvent()'s switch statement. WidgetKeyboardEvent* nativeKeyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED); NS_ASSERTION(nativeKeyEvent->mMessage == eKeyPress, "HandleKeyPressEvent gets non-keypress event"); @@ -4625,7 +4626,7 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) // consume backspace for disabled and readonly textfields, to prevent // back in history, which could be confusing to users if (nativeKeyEvent->keyCode == nsIDOMKeyEvent::DOM_VK_BACK_SPACE) { - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); } return NS_OK; } @@ -4636,7 +4637,7 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) case nsIDOMKeyEvent::DOM_VK_SHIFT: case nsIDOMKeyEvent::DOM_VK_CONTROL: case nsIDOMKeyEvent::DOM_VK_ALT: - aKeyEvent->PreventDefault(); // consumed + aKeyEvent->AsEvent()->PreventDefault(); // consumed return NS_OK; case nsIDOMKeyEvent::DOM_VK_BACK_SPACE: if (nativeKeyEvent->IsControl() || nativeKeyEvent->IsAlt() || @@ -4644,7 +4645,7 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) return NS_OK; } DeleteSelection(nsIEditor::ePrevious, nsIEditor::eStrip); - aKeyEvent->PreventDefault(); // consumed + aKeyEvent->AsEvent()->PreventDefault(); // consumed return NS_OK; case nsIDOMKeyEvent::DOM_VK_DELETE: // on certain platforms (such as windows) the shift key @@ -4656,7 +4657,7 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) return NS_OK; } DeleteSelection(nsIEditor::eNext, nsIEditor::eStrip); - aKeyEvent->PreventDefault(); // consumed + aKeyEvent->AsEvent()->PreventDefault(); // consumed return NS_OK; } return NS_OK; diff --git a/editor/libeditor/nsEditorEventListener.cpp b/editor/libeditor/nsEditorEventListener.cpp index a05f8c96e37b..cf2d920f72c4 100644 --- a/editor/libeditor/nsEditorEventListener.cpp +++ b/editor/libeditor/nsEditorEventListener.cpp @@ -448,7 +448,7 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent) // editor shouldn't handle this click event. if (mMouseDownOrUpConsumedByIME) { mMouseDownOrUpConsumedByIME = false; - mouseEvent->PreventDefault(); + mouseEvent->AsEvent()->PreventDefault(); return NS_OK; } return MouseClick(mouseEvent); @@ -611,7 +611,7 @@ nsEditorEventListener::KeyPress(nsIDOMKeyEvent* aKeyEvent) { NS_ENSURE_TRUE(aKeyEvent, NS_OK); - if (!mEditor->IsAcceptableInputEvent(aKeyEvent)) { + if (!mEditor->IsAcceptableInputEvent(aKeyEvent->AsEvent())) { return NS_OK; } @@ -622,7 +622,7 @@ nsEditorEventListener::KeyPress(nsIDOMKeyEvent* aKeyEvent) // below. bool defaultPrevented; - aKeyEvent->GetDefaultPrevented(&defaultPrevented); + aKeyEvent->AsEvent()->GetDefaultPrevented(&defaultPrevented); if (defaultPrevented) { return NS_OK; } @@ -630,7 +630,7 @@ nsEditorEventListener::KeyPress(nsIDOMKeyEvent* aKeyEvent) nsresult rv = mEditor->HandleKeyPressEvent(aKeyEvent); NS_ENSURE_SUCCESS(rv, rv); - aKeyEvent->GetDefaultPrevented(&defaultPrevented); + aKeyEvent->AsEvent()->GetDefaultPrevented(&defaultPrevented); if (defaultPrevented) { return NS_OK; } @@ -641,7 +641,7 @@ nsEditorEventListener::KeyPress(nsIDOMKeyEvent* aKeyEvent) // Now, ask the native key bindings to handle the event. WidgetKeyboardEvent* keyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); MOZ_ASSERT(keyEvent, "DOM key event's internal event must be WidgetKeyboardEvent"); nsIWidget* widget = keyEvent->widget; @@ -658,7 +658,7 @@ nsEditorEventListener::KeyPress(nsIDOMKeyEvent* aKeyEvent) nsIWidget::NativeKeyBindingsForRichTextEditor, *keyEvent, DoCommandCallback, doc); if (handled) { - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); } return NS_OK; } @@ -668,7 +668,7 @@ nsEditorEventListener::MouseClick(nsIDOMMouseEvent* aMouseEvent) { // nothing to do if editor isn't editable or clicked on out of the editor. if (mEditor->IsReadonly() || mEditor->IsDisabled() || - !mEditor->IsAcceptableInputEvent(aMouseEvent)) { + !mEditor->IsAcceptableInputEvent(aMouseEvent->AsEvent())) { return NS_OK; } @@ -683,7 +683,7 @@ nsEditorEventListener::MouseClick(nsIDOMMouseEvent* aMouseEvent) } bool preventDefault; - nsresult rv = aMouseEvent->GetDefaultPrevented(&preventDefault); + nsresult rv = aMouseEvent->AsEvent()->GetDefaultPrevented(&preventDefault); if (NS_FAILED(rv) || preventDefault) { // We're done if 'preventdefault' is true (see for example bug 70698). return rv; @@ -754,8 +754,8 @@ nsEditorEventListener::HandleMiddleClickPaste(nsIDOMMouseEvent* aMouseEvent) // Prevent the event from propagating up to be possibly handled // again by the containing window: - aMouseEvent->StopPropagation(); - aMouseEvent->PreventDefault(); + aMouseEvent->AsEvent()->StopPropagation(); + aMouseEvent->AsEvent()->PreventDefault(); // We processed the event, whether drop/paste succeeded or not return NS_OK; @@ -770,7 +770,7 @@ nsEditorEventListener::NotifyIMEOfMouseButtonEvent( } bool defaultPrevented; - nsresult rv = aMouseEvent->GetDefaultPrevented(&defaultPrevented); + nsresult rv = aMouseEvent->AsEvent()->GetDefaultPrevented(&defaultPrevented); NS_ENSURE_SUCCESS(rv, false); if (defaultPrevented) { return false; @@ -840,7 +840,7 @@ nsEditorEventListener::DragOver(nsIDOMDragEvent* aDragEvent) nsCOMPtr parent; bool defaultPrevented; - aDragEvent->GetDefaultPrevented(&defaultPrevented); + aDragEvent->AsEvent()->GetDefaultPrevented(&defaultPrevented); if (defaultPrevented) { return NS_OK; } @@ -850,7 +850,7 @@ nsEditorEventListener::DragOver(nsIDOMDragEvent* aDragEvent) NS_ENSURE_TRUE(dropParent, NS_ERROR_FAILURE); if (dropParent->IsEditable() && CanDrop(aDragEvent)) { - aDragEvent->PreventDefault(); // consumed + aDragEvent->AsEvent()->PreventDefault(); // consumed if (!mCaret) { return NS_OK; @@ -869,7 +869,7 @@ nsEditorEventListener::DragOver(nsIDOMDragEvent* aDragEvent) if (!IsFileControlTextBox()) { // This is needed when dropping on an input, to prevent the editor for // the editable parent from receiving the event. - aDragEvent->StopPropagation(); + aDragEvent->AsEvent()->StopPropagation(); } if (mCaret) { @@ -914,7 +914,7 @@ nsEditorEventListener::Drop(nsIDOMDragEvent* aDragEvent) CleanupDragDropCaret(); bool defaultPrevented; - aDragEvent->GetDefaultPrevented(&defaultPrevented); + aDragEvent->AsEvent()->GetDefaultPrevented(&defaultPrevented); if (defaultPrevented) { return NS_OK; } @@ -932,14 +932,14 @@ nsEditorEventListener::Drop(nsIDOMDragEvent* aDragEvent) // since someone else handling it might be unintentional and the // user could probably re-drag to be not over the disabled/readonly // editfields if that is what is desired. - return aDragEvent->StopPropagation(); + return aDragEvent->AsEvent()->StopPropagation(); } return NS_OK; } - aDragEvent->StopPropagation(); - aDragEvent->PreventDefault(); - return mEditor->InsertFromDrop(aDragEvent); + aDragEvent->AsEvent()->StopPropagation(); + aDragEvent->AsEvent()->PreventDefault(); + return mEditor->InsertFromDrop(aDragEvent->AsEvent()); } bool @@ -1183,7 +1183,7 @@ nsEditorEventListener::ShouldHandleNativeKeyBindings(nsIDOMKeyEvent* aKeyEvent) // mouse events. nsCOMPtr target; - aKeyEvent->GetTarget(getter_AddRefs(target)); + aKeyEvent->AsEvent()->GetTarget(getter_AddRefs(target)); nsCOMPtr targetContent = do_QueryInterface(target); if (!targetContent) { return false; diff --git a/editor/libeditor/nsHTMLEditor.cpp b/editor/libeditor/nsHTMLEditor.cpp index 661773922d9e..dcbe2cf79a81 100644 --- a/editor/libeditor/nsHTMLEditor.cpp +++ b/editor/libeditor/nsHTMLEditor.cpp @@ -617,7 +617,7 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) } WidgetKeyboardEvent* nativeKeyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED); NS_ASSERTION(nativeKeyEvent->mMessage == eKeyPress, "HandleKeyPressEvent gets non-keypress event"); @@ -676,12 +676,12 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) } NS_ENSURE_SUCCESS(rv, rv); if (handled) { - return aKeyEvent->PreventDefault(); // consumed + return aKeyEvent->AsEvent()->PreventDefault(); // consumed } if (nativeKeyEvent->IsShift()) { return NS_OK; // don't type text for shift tabs } - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); return TypedText(NS_LITERAL_STRING("\t"), eTypedText); } case nsIDOMKeyEvent::DOM_VK_RETURN: @@ -689,7 +689,7 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) nativeKeyEvent->IsMeta() || nativeKeyEvent->IsOS()) { return NS_OK; } - aKeyEvent->PreventDefault(); // consumed + aKeyEvent->AsEvent()->PreventDefault(); // consumed if (nativeKeyEvent->IsShift() && !IsPlaintextEditor()) { // only inserts a br node return TypedText(EmptyString(), eTypedBR); @@ -706,7 +706,7 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) // we don't PreventDefault() here or keybindings like control-x won't work return NS_OK; } - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); nsAutoString str(nativeKeyEvent->charCode); return TypedText(str, eTypedText); } diff --git a/editor/libeditor/nsHTMLEditorEventListener.cpp b/editor/libeditor/nsHTMLEditorEventListener.cpp index d543be0eef68..ba2fc533f989 100644 --- a/editor/libeditor/nsHTMLEditorEventListener.cpp +++ b/editor/libeditor/nsHTMLEditorEventListener.cpp @@ -61,7 +61,7 @@ nsHTMLEditorEventListener::MouseUp(nsIDOMMouseEvent* aMouseEvent) nsHTMLEditor* htmlEditor = GetHTMLEditor(); nsCOMPtr target; - nsresult rv = aMouseEvent->GetTarget(getter_AddRefs(target)); + nsresult rv = aMouseEvent->AsEvent()->GetTarget(getter_AddRefs(target)); NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(target, NS_ERROR_NULL_POINTER); nsCOMPtr element = do_QueryInterface(target); @@ -80,7 +80,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMMouseEvent* aMouseEvent) nsHTMLEditor* htmlEditor = GetHTMLEditor(); // Contenteditable should disregard mousedowns outside it. // IsAcceptableInputEvent() checks it for a mouse event. - if (!htmlEditor->IsAcceptableInputEvent(aMouseEvent)) { + if (!htmlEditor->IsAcceptableInputEvent(aMouseEvent->AsEvent())) { // If it's not acceptable mousedown event (including when mousedown event // is fired outside of the active editing host), we need to commit // composition because it will be change the selection to the clicked @@ -103,7 +103,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMMouseEvent* aMouseEvent) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr target; - rv = aMouseEvent->GetExplicitOriginalTarget(getter_AddRefs(target)); + rv = aMouseEvent->AsEvent()->GetExplicitOriginalTarget(getter_AddRefs(target)); NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(target, NS_ERROR_NULL_POINTER); nsCOMPtr element = do_QueryInterface(target); @@ -190,7 +190,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMMouseEvent* aMouseEvent) // Prevent bubbling if we changed selection or // for all context clicks if (element || isContextClick) { - aMouseEvent->PreventDefault(); + aMouseEvent->AsEvent()->PreventDefault(); return NS_OK; } } else if (!isContextClick && buttonNumber == 0 && clickCount == 1) { @@ -198,7 +198,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMMouseEvent* aMouseEvent) int32_t clientX, clientY; aMouseEvent->GetClientX(&clientX); aMouseEvent->GetClientY(&clientY); - htmlEditor->MouseDown(clientX, clientY, element, aMouseEvent); + htmlEditor->MouseDown(clientX, clientY, element, aMouseEvent->AsEvent()); } return nsEditorEventListener::MouseDown(aMouseEvent); @@ -208,7 +208,7 @@ nsresult nsHTMLEditorEventListener::MouseClick(nsIDOMMouseEvent* aMouseEvent) { nsCOMPtr target; - nsresult rv = aMouseEvent->GetTarget(getter_AddRefs(target)); + nsresult rv = aMouseEvent->AsEvent()->GetTarget(getter_AddRefs(target)); NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(target, NS_ERROR_NULL_POINTER); nsCOMPtr element = do_QueryInterface(target); diff --git a/editor/libeditor/nsPlaintextEditor.cpp b/editor/libeditor/nsPlaintextEditor.cpp index 0d9509eb2e3f..17889286d135 100644 --- a/editor/libeditor/nsPlaintextEditor.cpp +++ b/editor/libeditor/nsPlaintextEditor.cpp @@ -9,6 +9,7 @@ #include "mozilla/Assertions.h" #include "mozilla/Preferences.h" #include "mozilla/dom/Selection.h" +#include "mozilla/dom/Event.h" #include "mozilla/TextComposition.h" #include "mozilla/TextEvents.h" #include "mozilla/dom/Element.h" @@ -361,7 +362,7 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) } WidgetKeyboardEvent* nativeKeyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED); NS_ASSERTION(nativeKeyEvent->mMessage == eKeyPress, "HandleKeyPressEvent gets non-keypress event"); @@ -388,7 +389,7 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) } // else we insert the tab straight through - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); return TypedText(NS_LITERAL_STRING("\t"), eTypedText); } case nsIDOMKeyEvent::DOM_VK_RETURN: @@ -397,7 +398,7 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) nativeKeyEvent->IsOS()) { return NS_OK; } - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); return TypedText(EmptyString(), eTypedBreak); } @@ -409,7 +410,7 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) // we don't PreventDefault() here or keybindings like control-x won't work return NS_OK; } - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->PreventDefault(); nsAutoString str(nativeKeyEvent->charCode); return TypedText(str, eTypedText); } diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.cpp b/extensions/spellcheck/src/mozInlineSpellChecker.cpp index 159779cf2230..814d6abf418d 100644 --- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp +++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp @@ -45,6 +45,7 @@ #include "nsIDOMKeyEvent.h" #include "nsIDOMNode.h" #include "nsIDOMNodeList.h" +#include "nsIDOMEvent.h" #include "nsGenericHTMLElement.h" #include "nsRange.h" #include "mozilla/dom/Selection.h" diff --git a/layout/base/ZoomConstraintsClient.cpp b/layout/base/ZoomConstraintsClient.cpp index 9e6e9c1fd8e7..cab14234f531 100644 --- a/layout/base/ZoomConstraintsClient.cpp +++ b/layout/base/ZoomConstraintsClient.cpp @@ -11,6 +11,7 @@ #include "LayersLogging.h" #include "mozilla/layers/APZCCallbackHelper.h" #include "mozilla/Preferences.h" +#include "mozilla/dom/Event.h" #include "nsDocument.h" #include "nsIFrame.h" #include "nsLayoutUtils.h" diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index 7e7ff31dcbe9..d69b656faf02 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -65,6 +65,7 @@ #include "mozilla/unused.h" #include "mozilla/TimelineConsumers.h" #include "nsAnimationManager.h" +#include "nsIDOMEvent.h" #ifdef MOZ_NUWA_PROCESS #include "ipc/Nuwa.h" diff --git a/layout/xul/nsMenuBarFrame.cpp b/layout/xul/nsMenuBarFrame.cpp index 72a85fa72148..a11961c75448 100644 --- a/layout/xul/nsMenuBarFrame.cpp +++ b/layout/xul/nsMenuBarFrame.cpp @@ -26,6 +26,7 @@ #include "nsContentUtils.h" #include "nsUTF8Utils.h" #include "mozilla/TextEvents.h" +#include "mozilla/dom/Event.h" using namespace mozilla; @@ -165,7 +166,7 @@ nsMenuBarFrame::FindMenuWithShortcut(nsIDOMKeyEvent* aKeyEvent) nsAutoTArray accessKeys; WidgetKeyboardEvent* nativeKeyEvent = - aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsKeyboardEvent(); if (nativeKeyEvent) nsContentUtils::GetAccessKeyCandidates(nativeKeyEvent, accessKeys); if (accessKeys.IsEmpty() && charCode) diff --git a/layout/xul/nsMenuBarListener.cpp b/layout/xul/nsMenuBarListener.cpp index 56a4c77c21e0..7ef751b0dc9c 100644 --- a/layout/xul/nsMenuBarListener.cpp +++ b/layout/xul/nsMenuBarListener.cpp @@ -294,7 +294,7 @@ Modifiers nsMenuBarListener::GetModifiersForAccessKey(nsIDOMKeyEvent* aKeyEvent) { WidgetInputEvent* inputEvent = - aKeyEvent->GetInternalNSEvent()->AsInputEvent(); + aKeyEvent->AsEvent()->GetInternalNSEvent()->AsInputEvent(); MOZ_ASSERT(inputEvent); static const Modifiers kPossibleModifiersForAccessKey = diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 90875398c3b6..76542b0a33af 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -1910,7 +1910,7 @@ nsMenuPopupFrame::FindMenuWithShortcut(nsIDOMKeyEvent* aKeyEvent, bool& doAction static DOMTimeStamp lastKeyTime = 0; DOMTimeStamp keyTime; - aKeyEvent->GetTimeStamp(&keyTime); + aKeyEvent->AsEvent()->GetTimeStamp(&keyTime); if (charCode == 0) { if (keyCode == nsIDOMKeyEvent::DOM_VK_BACK_SPACE) { diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp index 3643c057aa9d..2daf8ab6e972 100644 --- a/layout/xul/nsSplitterFrame.cpp +++ b/layout/xul/nsSplitterFrame.cpp @@ -35,6 +35,7 @@ #include "nsDisplayList.h" #include "nsContentUtils.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/Event.h" #include "mozilla/MouseEvents.h" #include "mozilla/UniquePtr.h" @@ -741,7 +742,7 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent) mChildInfosAfterCount = 0; int32_t c; - nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent, + nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent->AsEvent(), mParentBox); if (isHorizontal) { c = pt.x; diff --git a/layout/xul/nsXULPopupManager.cpp b/layout/xul/nsXULPopupManager.cpp index 07d2b4e383ec..eda0f58d6b54 100644 --- a/layout/xul/nsXULPopupManager.cpp +++ b/layout/xul/nsXULPopupManager.cpp @@ -2008,7 +2008,7 @@ nsXULPopupManager::HandleShortcutNavigation(nsIDOMKeyEvent* aKeyEvent, { // On Windows, don't check shortcuts when the accelerator key is down. #ifdef XP_WIN - WidgetInputEvent* evt = aKeyEvent->GetInternalNSEvent()->AsInputEvent(); + WidgetInputEvent* evt = aKeyEvent->AsEvent()->GetInternalNSEvent()->AsInputEvent(); if (evt && evt->IsAccel()) { return false; } @@ -2024,7 +2024,7 @@ nsXULPopupManager::HandleShortcutNavigation(nsIDOMKeyEvent* aKeyEvent, if (result) { aFrame->ChangeMenuItem(result, false, true); if (action) { - WidgetGUIEvent* evt = aKeyEvent->GetInternalNSEvent()->AsGUIEvent(); + WidgetGUIEvent* evt = aKeyEvent->AsEvent()->GetInternalNSEvent()->AsGUIEvent(); nsMenuFrame* menuToOpen = result->Enter(evt); if (menuToOpen) { nsCOMPtr content = menuToOpen->GetContent(); @@ -2211,9 +2211,9 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode( aTopVisibleMenuItem->PopupType() != ePopupTypeMenu) { if (keyCode == nsIDOMKeyEvent::DOM_VK_ESCAPE) { HidePopup(aTopVisibleMenuItem->Content(), false, false, false, true); - aKeyEvent->StopPropagation(); - aKeyEvent->StopCrossProcessForwarding(); - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->StopPropagation(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->PreventDefault(); } return true; } @@ -2270,7 +2270,9 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode( // Otherwise, tell the active menubar, if any, to activate the menu. The // Enter method will return a menu if one needs to be opened as a result. nsMenuFrame* menuToOpen = nullptr; - WidgetGUIEvent* GUIEvent = aKeyEvent->GetInternalNSEvent()->AsGUIEvent(); + WidgetGUIEvent* GUIEvent = aKeyEvent->AsEvent()-> + GetInternalNSEvent()->AsGUIEvent(); + if (aTopVisibleMenuItem) { menuToOpen = aTopVisibleMenuItem->Frame()->Enter(GUIEvent); } else if (mActiveMenuBar) { @@ -2288,9 +2290,9 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode( } if (consume) { - aKeyEvent->StopPropagation(); - aKeyEvent->StopCrossProcessForwarding(); - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->StopPropagation(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->PreventDefault(); } return true; } @@ -2461,7 +2463,7 @@ nsXULPopupManager::HandleEvent(nsIDOMEvent* aEvent) } nsAutoString eventType; - keyEvent->GetType(eventType); + aEvent->GetType(eventType); if (eventType.EqualsLiteral("keyup")) { return KeyUp(keyEvent); } @@ -2487,14 +2489,14 @@ nsXULPopupManager::KeyUp(nsIDOMKeyEvent* aKeyEvent) return NS_OK; if (item->IgnoreKeys() == eIgnoreKeys_Handled) { - aKeyEvent->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); return NS_OK; } } - aKeyEvent->StopPropagation(); - aKeyEvent->StopCrossProcessForwarding(); - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->StopPropagation(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->PreventDefault(); return NS_OK; // I am consuming event } @@ -2545,8 +2547,8 @@ nsXULPopupManager::KeyDown(nsIDOMKeyEvent* aKeyEvent) else if (mActiveMenuBar) mActiveMenuBar->MenuClosed(); } - aKeyEvent->StopPropagation(); - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->StopPropagation(); + aKeyEvent->AsEvent()->PreventDefault(); } } @@ -2554,10 +2556,10 @@ nsXULPopupManager::KeyDown(nsIDOMKeyEvent* aKeyEvent) // listeners from becoming confused. if (!item || item->IgnoreKeys() != eIgnoreKeys_Handled) { - aKeyEvent->StopPropagation(); + aKeyEvent->AsEvent()->StopPropagation(); } - aKeyEvent->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); return NS_OK; } @@ -2584,10 +2586,10 @@ nsXULPopupManager::KeyPress(nsIDOMKeyEvent* aKeyEvent) bool onlyHandled = item && item->IgnoreKeys() == eIgnoreKeys_Handled; bool handled = HandleShortcutNavigation(keyEvent, nullptr); - aKeyEvent->StopCrossProcessForwarding(); + aKeyEvent->AsEvent()->StopCrossProcessForwarding(); if (handled || (consume && !onlyHandled)) { - aKeyEvent->StopPropagation(); - aKeyEvent->PreventDefault(); + aKeyEvent->AsEvent()->StopPropagation(); + aKeyEvent->AsEvent()->PreventDefault(); } return NS_OK; // I am consuming event From 523524c5838e327c7d61c649ca2d44e69eb94b40 Mon Sep 17 00:00:00 2001 From: John Lin Date: Wed, 13 Jan 2016 18:37:00 +0100 Subject: [PATCH 022/156] Bug 1235340 - Don't always disable/enable port for OMX_EventPortSettingsChanged. r=sotaro --- dom/media/platforms/omx/OmxDataDecoder.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/dom/media/platforms/omx/OmxDataDecoder.cpp b/dom/media/platforms/omx/OmxDataDecoder.cpp index fb568d5aa811..dd50cbf61577 100644 --- a/dom/media/platforms/omx/OmxDataDecoder.cpp +++ b/dom/media/platforms/omx/OmxDataDecoder.cpp @@ -760,15 +760,19 @@ OmxDataDecoder::Event(OMX_EVENTTYPE aEvent, OMX_U32 aData1, OMX_U32 aData2) switch (aEvent) { case OMX_EventPortSettingsChanged: { - // According to spec: "To prevent the loss of any input data, the - // component issuing the OMX_EventPortSettingsChanged event on its input - // port should buffer all input port data that arrives between the - // emission of the OMX_EventPortSettingsChanged event and the arrival of - // the command to disable the input port." - // - // So client needs to disable port and reallocate buffers. - MOZ_ASSERT(mPortSettingsChanged == -1); - mPortSettingsChanged = aData1; + // Don't always disable port. See bug 1235340. + if (aData2 == 0 || + aData2 == OMX_IndexParamPortDefinition) { + // According to spec: "To prevent the loss of any input data, the + // component issuing the OMX_EventPortSettingsChanged event on its input + // port should buffer all input port data that arrives between the + // emission of the OMX_EventPortSettingsChanged event and the arrival of + // the command to disable the input port." + // + // So client needs to disable port and reallocate buffers. + MOZ_ASSERT(mPortSettingsChanged == -1); + mPortSettingsChanged = aData1; + } LOG("Got OMX_EventPortSettingsChanged event"); break; } From 1ac727f9a5bbe926df1fb7b2945a204e3810185d Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Tue, 5 Jan 2016 13:54:30 -0600 Subject: [PATCH 023/156] Bug 1236104 - Allows scripts from pre-load cache to be off-thread compiled. r=kvijayan --- dom/base/nsScriptLoader.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp index d7c2182d3d49..e492c5461da6 100644 --- a/dom/base/nsScriptLoader.cpp +++ b/dom/base/nsScriptLoader.cpp @@ -646,6 +646,21 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement) // sheets. If the script comes from the network stream, cheat for // performance reasons and avoid a trip through the event loop. if (aElement->GetParserCreated() == FROM_PARSER_NETWORK) { + // Attempt to compile script off-thread first -- it reduces locking of + // the main thread for long time. + if (NumberOfProcessors() > 1 && + AttemptAsyncScriptCompile(request) == NS_OK) { + NS_ASSERTION(request->mProgress == nsScriptLoadRequest::Progress_Compiling, + "Request should be off-thread compiling now."); + NS_ASSERTION(!mParserBlockingRequest, + "There can be only one parser-blocking script at a time"); + NS_ASSERTION(mXSLTRequests.isEmpty(), + "Parser-blocking scripts and XSLT scripts in the same doc!"); + mParserBlockingRequest = request; + return true; + } + // And process a request if off-thread compilation heuristics think that + // non-async way will be faster. return ProcessRequest(request) == NS_ERROR_HTMLPARSER_BLOCK; } // Otherwise, we've got a document.written script, make a trip through From 552f476047750b69c37eb672efbc28be956d4282 Mon Sep 17 00:00:00 2001 From: Brad Kotsopoulos Date: Sat, 9 Jan 2016 13:20:00 +0100 Subject: [PATCH 024/156] Bug 1237420 - "Fix length-checking when setting WebGL 2 vertex attributes with an array". r=jgilbert --- dom/canvas/WebGL2ContextVertices.cpp | 6 +++--- dom/canvas/WebGLContextValidate.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom/canvas/WebGL2ContextVertices.cpp b/dom/canvas/WebGL2ContextVertices.cpp index 02acef991870..1a152663716b 100644 --- a/dom/canvas/WebGL2ContextVertices.cpp +++ b/dom/canvas/WebGL2ContextVertices.cpp @@ -122,10 +122,10 @@ WebGL2Context::VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) void WebGL2Context::VertexAttribI4iv(GLuint index, size_t length, const GLint* v) { - if (!ValidateAttribIndex(index, "vertexAttribI4iv")) + if (!ValidateAttribArraySetter("vertexAttribI4iv", 4, length)) return; - if (!ValidateAttribArraySetter("vertexAttribI4iv", 4, length)) + if (!ValidateAttribIndex(index, "vertexAttribI4iv")) return; mVertexAttribType[index] = LOCAL_GL_INT; @@ -183,7 +183,7 @@ WebGL2Context::VertexAttribI4uiv(GLuint index, size_t length, const GLuint* v) if (IsContextLost()) return; - if (!ValidateAttribIndex(index, "vertexAttribI4uiv")) + if (!ValidateAttribArraySetter("vertexAttribI4uiv", 4, length)) return; if (!ValidateAttribIndex(index, "vertexAttribI4uiv")) diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp index 5a7820c5d075..639ea5ca5b84 100644 --- a/dom/canvas/WebGLContextValidate.cpp +++ b/dom/canvas/WebGLContextValidate.cpp @@ -448,8 +448,8 @@ WebGLContext::ValidateAttribArraySetter(const char* name, uint32_t setterElemSiz return false; if (arrayLength < setterElemSize) { - ErrorInvalidOperation("%s: Array must have >= %d elements.", name, - setterElemSize); + ErrorInvalidValue("%s: Array must have >= %d elements.", name, + setterElemSize); return false; } From 57e87b8e9230c259a00b372c32aac00264fb9da7 Mon Sep 17 00:00:00 2001 From: Tracy Walker Date: Mon, 11 Jan 2016 09:35:04 -0600 Subject: [PATCH 025/156] Bug 1237713 - re-enable test browser_tabkeynavigation. Also, remove relevant skip-if in browser/base/content/test/general/browser.ini. r=jimm --- browser/base/content/test/general/browser.ini | 2 +- .../test/general/browser_tabkeynavigation.js | 81 +++++++------------ 2 files changed, 31 insertions(+), 52 deletions(-) diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index 5c75c85458da..221cf9ec983a 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -417,7 +417,7 @@ skip-if = os == "linux" || os == "mac" # No tabs in titlebar on linux # Disabled on OS X because of bug 967917 [browser_tabfocus.js] [browser_tabkeynavigation.js] -skip-if = e10s +skip-if = (os == "mac" && !e10s) [browser_tabopen_reflows.js] [browser_tabs_close_beforeunload.js] support-files = diff --git a/browser/base/content/test/general/browser_tabkeynavigation.js b/browser/base/content/test/general/browser_tabkeynavigation.js index 64b0a3510116..89f5b3e1095d 100644 --- a/browser/base/content/test/general/browser_tabkeynavigation.js +++ b/browser/base/content/test/general/browser_tabkeynavigation.js @@ -42,23 +42,19 @@ function test() { is(gBrowser.selectedTab, tab1, "Tab1 should be activated"); - EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true }, - browser1.contentWindow); + EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+Tab on Tab1"); - EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true }); is(gBrowser.selectedTab, tab3, "Tab3 should be activated by pressing Ctrl+Tab on Tab2"); - EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true }, - browser3.contentWindow); + EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+Shift+Tab on Tab3"); - EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: true }); is(gBrowser.selectedTab, tab1, "Tab1 should be activated by pressing Ctrl+Shift+Tab on Tab2"); @@ -67,23 +63,19 @@ function test() { is(gBrowser.selectedTab, tab1, "Tab1 should be activated"); - EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true }, - browser1.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+PageDown on Tab1"); - EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true }); is(gBrowser.selectedTab, tab3, "Tab3 should be activated by pressing Ctrl+PageDown on Tab2"); - EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true }, - browser3.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+PageUp on Tab3"); - EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true }); is(gBrowser.selectedTab, tab1, "Tab1 should be activated by pressing Ctrl+PageUp on Tab2"); @@ -98,23 +90,19 @@ function test() { is(gBrowser.selectedTab, tab1, "Tab1 should be activated"); - EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true }, - browser1.contentWindow); + EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1"); - EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true }); is(gBrowser.selectedTab, tab3, "Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2"); - EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true }, - browser3.contentWindow); + EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3"); - EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey(reverseKey, { altKey: true, metaKey: true }); is(gBrowser.selectedTab, tab1, "Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2"); } @@ -125,15 +113,13 @@ function test() { is(gBrowser.tabContainer.selectedIndex, 2, "Tab2 index should be 2"); - EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true, shiftKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_DOWN", { ctrlKey: true, shiftKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated after Ctrl+Shift+PageDown"); is(gBrowser.tabContainer.selectedIndex, 3, "Tab2 index should be 1 after Ctrl+Shift+PageDown"); - EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true, shiftKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true, shiftKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated after Ctrl+Shift+PageUp"); is(gBrowser.tabContainer.selectedIndex, 2, @@ -153,45 +139,38 @@ function test() { is(gBrowser.selectedTab, tab1, "Tab1 should be activated"); - EventUtils.synthesizeKey(advanceKey, { metaKey: true }, - browser1.contentWindow); + + EventUtils.synthesizeKey(advanceKey, { metaKey: true }); is(gBrowser.selectedTab, tab2, "Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1"); - EventUtils.synthesizeKey(advanceKey, { metaKey: true }, - browser2.contentWindow); - todo_is(gBrowser.selectedTab, tab3, - "Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2"); + EventUtils.synthesizeKey(advanceKey, { metaKey: true }); + is(gBrowser.selectedTab, tab3, + "Tab3 should be activated by pressing Ctrl+" + advanceKey + " on Tab2"); - if (gBrowser.selectedTab != tab3) { - EventUtils.synthesizeKey(reverseKey, { metaKey: true }, - browser3.contentWindow); - is(gBrowser.selectedTab, tab2, - "Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3"); - } + EventUtils.synthesizeKey(reverseKey, { metaKey: true }); + is(gBrowser.selectedTab, tab2, + "Tab2 should be activated by pressing Ctrl+" + reverseKey + " on Tab3"); - EventUtils.synthesizeKey(reverseKey, { metaKey: true }, - browser2.contentWindow); - todo_is(gBrowser.selectedTab, tab1, - "Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2"); + EventUtils.synthesizeKey(reverseKey, { metaKey: true }); + is(gBrowser.selectedTab, tab1, + "Tab1 should be activated by pressing Ctrl+" + reverseKey + " on Tab2"); } else { gBrowser.selectedTab = tab2; - EventUtils.synthesizeKey("VK_F4", { type: "keydown", ctrlKey: true }, - browser2.contentWindow); + EventUtils.synthesizeKey("VK_F4", { type: "keydown", ctrlKey: true }); isnot(gBrowser.selectedTab, tab2, "Tab2 should be closed by pressing Ctrl+F4 on Tab2"); is(gBrowser.tabs.length, 3, - "The count of tabs should be 3 since tab2 should be closed"); + "The count of tabs should be 3 since tab2 should be closed"); let activeWindow = gBrowser.getBrowserForTab(gBrowser.selectedTab).contentWindow; // NOTE: keypress event shouldn't be fired since the keydown event should // be consumed by tab2. - EventUtils.synthesizeKey("VK_F4", { type: "keyup", ctrlKey: true }, - activeWindow); - is(gBrowser.tabs.length, 3, - "The count of tabs should be 3 since renaming key events shouldn't close other tabs"); + EventUtils.synthesizeKey("VK_F4", { type: "keyup", ctrlKey: true }); + is(gBrowser.tabs.length, 3, + "The count of tabs should be 3 since renaming key events shouldn't close other tabs"); } gBrowser.selectedTab = tab3; From 124e39b2ba803098a721de0dd7f3a9d684a98b40 Mon Sep 17 00:00:00 2001 From: Gerald Squelart Date: Tue, 12 Jan 2016 21:22:00 +0100 Subject: [PATCH 026/156] Bug 1237842 - Unlock mMutex before calling CloseActive. r=cpearce UnloadPlugins runs in the GMP thread. While it locks mMutex, any locking attempt on the main thread would effectively block the main thread while we are calling CloseActive on each plugin. The problem is that CloseActive calls GeckoMediaServiceParent::GetSingleton(), which dispatches a task to the main thread, which may be blocked because of mMutex. To solve this inter-locking issue, the list of plugins is first copied to a local array, after which mMutex may be released, and we may now call CloseActive without risking locking. --- dom/media/gmp/GMPServiceParent.cpp | 40 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/dom/media/gmp/GMPServiceParent.cpp b/dom/media/gmp/GMPServiceParent.cpp index 25821a4700a9..f39a33c31f6e 100644 --- a/dom/media/gmp/GMPServiceParent.cpp +++ b/dom/media/gmp/GMPServiceParent.cpp @@ -651,30 +651,34 @@ GeckoMediaPluginServiceParent::UnloadPlugins() NS_LITERAL_CSTRING("Starting to unload plugins")); #endif + nsTArray> plugins; { MutexAutoLock lock(mMutex); - LOGD(("%s::%s plugins:%u including async:%u", __CLASS__, __FUNCTION__, - mPlugins.Length(), mAsyncShutdownPlugins.Length())); + // Move all plugins references to a local array. This way mMutex won't be + // locked when calling CloseActive (to avoid inter-locking). + plugins = Move(mPlugins); + } + + LOGD(("%s::%s plugins:%u including async:%u", __CLASS__, __FUNCTION__, + plugins.Length(), mAsyncShutdownPlugins.Length())); #ifdef DEBUG - for (const auto& plugin : mPlugins) { - LOGD(("%s::%s plugin: '%s'", __CLASS__, __FUNCTION__, - plugin->GetDisplayName().get())); - } - for (const auto& plugin : mAsyncShutdownPlugins) { - LOGD(("%s::%s async plugin: '%s'", __CLASS__, __FUNCTION__, - plugin->GetDisplayName().get())); - } + for (const auto& plugin : plugins) { + LOGD(("%s::%s plugin: '%s'", __CLASS__, __FUNCTION__, + plugin->GetDisplayName().get())); + } + for (const auto& plugin : mAsyncShutdownPlugins) { + LOGD(("%s::%s async plugin: '%s'", __CLASS__, __FUNCTION__, + plugin->GetDisplayName().get())); + } #endif - // Note: CloseActive may be async; it could actually finish - // shutting down when all the plugins have unloaded. - for (size_t i = 0; i < mPlugins.Length(); i++) { + // Note: CloseActive may be async; it could actually finish + // shutting down when all the plugins have unloaded. + for (const auto& plugin : plugins) { #ifdef MOZ_CRASHREPORTER - SetAsyncShutdownPluginState(mPlugins[i], 'S', - NS_LITERAL_CSTRING("CloseActive")); + SetAsyncShutdownPluginState(plugin, 'S', + NS_LITERAL_CSTRING("CloseActive")); #endif - mPlugins[i]->CloseActive(true); - } - mPlugins.Clear(); + plugin->CloseActive(true); } #ifdef MOZ_CRASHREPORTER From 7e3ecdae7fd54a9b3ff3d685ca48323bfda632fb Mon Sep 17 00:00:00 2001 From: Chih-Yi Leu Date: Thu, 7 Jan 2016 22:06:00 +0100 Subject: [PATCH 027/156] Bug 1237896 - [Gamepad] Button Event cannot be correctly triggered after reconnect. r=qdot --- dom/gamepad/cocoa/CocoaGamepad.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/gamepad/cocoa/CocoaGamepad.cpp b/dom/gamepad/cocoa/CocoaGamepad.cpp index 897b62cdb169..97b8512665ee 100644 --- a/dom/gamepad/cocoa/CocoaGamepad.cpp +++ b/dom/gamepad/cocoa/CocoaGamepad.cpp @@ -331,7 +331,7 @@ DarwinGamepadService::InputValueChanged(IOHIDValueRef value) const int numButtons = gamepad.numButtons(); for (unsigned b = 0; b < ArrayLength(newState); b++) { if (newState[b] != oldState[b]) { - NewButtonEvent(i, numButtons - 4 + b, newState[b]); + NewButtonEvent(gamepad.mSuperIndex, numButtons - 4 + b, newState[b]); } } gamepad.setDpadState(newState); @@ -339,7 +339,7 @@ DarwinGamepadService::InputValueChanged(IOHIDValueRef value) double d = IOHIDValueGetIntegerValue(value); double v = 2.0f * (d - axis->min) / (double)(axis->max - axis->min) - 1.0f; - NewAxisMoveEvent(i, axis->id, v); + NewAxisMoveEvent(gamepad.mSuperIndex, axis->id, v); } else if (const Button* button = gamepad.lookupButton(element)) { int iv = IOHIDValueGetIntegerValue(value); bool pressed = iv != 0; @@ -350,7 +350,7 @@ DarwinGamepadService::InputValueChanged(IOHIDValueRef value) } else { v = pressed ? 1.0 : 0.0; } - NewButtonEvent(i, button->id, pressed, v); + NewButtonEvent(gamepad.mSuperIndex, button->id, pressed, v); } return; } From 90d53702b54ef2a581407c9624b066e1daeaff03 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Thu, 14 Jan 2016 10:33:12 +0100 Subject: [PATCH 028/156] Bug 1238031 - Fix make-new-dict to use a custom en_US dictionary that adds common variants and accented words. r=ehsan --HG-- rename : extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt => extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US-custom.txt rename : extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.aff => extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.aff rename : extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.dic => extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.dic --- .../locales/en-US/hunspell/README_en_US.txt | 4 +- .../dictionary-sources/5-mozilla-added | 378 +--------- .../dictionary-sources/5-mozilla-removed | 1 - .../dictionary-sources/install-new-dict | 6 +- .../hunspell/dictionary-sources/make-new-dict | 21 +- ...ADME_en_US.txt => README_en_US-custom.txt} | 8 +- .../orig/{en_US.aff => en_US-custom.aff} | 0 .../orig/{en_US.dic => en_US-custom.dic} | 649 +++++++++++++++--- .../locales/en-US/hunspell/en-US.dic | 646 ++++++++++++++--- 9 files changed, 1170 insertions(+), 543 deletions(-) rename extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/{README_en_US.txt => README_en_US-custom.txt} (98%) rename extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/{en_US.aff => en_US-custom.aff} (100%) rename extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/{en_US.dic => en_US-custom.dic} (98%) diff --git a/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt b/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt index ea57b594a385..94106e9b30f4 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt +++ b/extensions/spellcheck/locales/en-US/hunspell/README_en_US.txt @@ -1,6 +1,6 @@ en_US-mozilla Hunspell Dictionary Generated from SCOWL Version 2015.08.24 -Thu Aug 27 23:04:57 EDT 2015 +Sun Jan 10 15:07:17 EST 2016 http://wordlist.sourceforge.net @@ -311,4 +311,4 @@ from the Ispell distribution they are under the Ispell copyright: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Build Date: Thu Aug 27 23:04:57 EDT 2015 +Build Date: Sun Jan 10 15:07:17 EST 2016 diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-added b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-added index dd9ed0a639f0..ea26fc168262 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-added +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-added @@ -4469,6 +4469,8 @@ Friedrick Friedrick's FrontPage FrontPage's +Fukushima +Fukushima's Fulvia Fulvia's GHz's @@ -12056,9 +12058,6 @@ absorbances absorbancy absorbancy's acetyl -acknowledgement -acknowledgement's -acknowledgements actin acyl admin's @@ -12085,7 +12084,6 @@ anthropomorphized anthropomorphizes antisense antivirus's -antiviruses apatosaurus apatosaurus's arXiv @@ -12095,7 +12093,6 @@ archaeoastronomy's archaeologic archaeomagnetic archaeomagnetism -archeologically aryl aryl's aryls @@ -12148,12 +12145,9 @@ botnet's botnets broadcasted cDNA -cancelled canceller canceller's -cancelling capita -caravanserai carboxylic carnitas cerevisiae @@ -12178,29 +12172,13 @@ colonoscope's colonoscopes commenters compositeness -concurrent's concurrents -concuss's -condole's conferable config config's configs -configure's -conform's conformant -confront's -confuse's -conjoin's conmanly -conmans -connote's -consign's -conspire's -constrain's -contort's -contribute's -converge's corrigibility corrigibility's corrigible @@ -12223,137 +12201,49 @@ cultivar cultivar's cultivars cyber -cysteine's cytokine cytokine's cytokines datasheet datasheet's datasheets -debar's -debark's -debase's -debrief's -debug's -debunk's -decamp's -decant's decertification decertifications decertified decertifies decertify decertifying -decipher's -declaim's -declaimable -decode's -decommission's -decompress's -deconstruct's deconstructionist's -decontrol's -decouple's -decrypt's -deduct's -deface's -define's -deflower's -defog's -deforest's -deform's -defray's -defrock's -defrost's -defuse's -degas's degenerations -degrade's -dehydrate's dehydrogenase dehydrogenase's -deice's -delimit's -delint's deliverables -delouse's -demist's -demob's -demote's -denature's -denote's -depart's -deplane's -deport's -depose's -depress's dequeue dequeued dequeues dequeuing -derail's -derange's -deride's -desalt's -descale's -describe's -deserve's designee designings -deskill's -despoil's -detest's -dethrone's -detract's -devalue's -devote's dialoged dialoging +dialogs dialogued dialoguer dialoguing diatomaceous dihydro -disabuse's -disaffect's -disaffiliate's -disarm's disarrangements -disassociate's -disband's -disbar's -disclaim's +disassembler +disassembler's +disassemblers +disassembly +disassembly's disclaimable disclosable -disclose's -discolor's -discomfit's -discommode's -disconcert's discountenance's -discover's -discursive's -discuss's -disfigure's -disfranchise's -disgorge's -disincentive's -disincline's disintermediation disintermediations -disjoint's -dismantle's -dismember's -dismiss's -disorient's -displace's -disport's -dispose's -disrobe's dissentious -distill's -distort's -distract's djinn donator donator's @@ -12394,7 +12284,6 @@ exon exon's exons experimentalism -faggoting faux filesystem filesystem's @@ -12430,7 +12319,6 @@ gigajoules gigapixel gigapixel's gigapixels -glycerine grande grey grey's @@ -12456,38 +12344,17 @@ iPods idolator idolator's idolators -inactive's inactives inactivities incentivize incentivized incentivizes incentivizing -incite's inclosable -inclose's -incommode's incorrigibleness -incrust's -indoor's -induct's -indue's -infill's -infiltrate's -infold's -inform's -infringe's -infuse's -inhabit's inkjet inkjet's inkjets -inoffensive's -inquire's -inscribe's -inspire's -inspirit's -instill's intermediacies intermediacy intermediated @@ -12505,11 +12372,6 @@ intersexual's intersexualism intersexuality intersexuals -intone's -intrench's -intrust's -invariant's -invest's jewellery judgement judgement's @@ -12535,7 +12397,6 @@ limnologist's limnologists limnology limnology's -linguini linguistical mRNA mage @@ -12546,7 +12407,6 @@ mammalia meetup meetup's meetups -megadeathes megajoule megajoule's mesothelioma @@ -12582,7 +12442,6 @@ multicast murine musculus must've -mySimon namespace namespace's namespaces @@ -12642,18 +12501,13 @@ poutines prejudgement prejudgement's prejudgements -proactive's -proactives -proclaim's +preliminarily proclaimable procreations -procure's profiler profiler's profilers programmatically -prolong's -promote's pronate pronated pronates @@ -12662,13 +12516,8 @@ pronation pronator pronator's pronators -propose's -propound's proprietorships propyl -prorogue's -proscribe's -protract's pseudorandom pseudorandomly quinoa @@ -12680,155 +12529,32 @@ rasterized rasterizer rasterizes rasterizing -react's reactivity's -readdress's reappointments -rearm's -reassign's -reattempt's -rebind's -reboot's rebroadcasted recency -recent's -recharter's -recite's -reclaim's -recode's -recollect's -recolor's -recombine's -recommission's recompilation's -recondition's -reconstruct's -reconvert's -recook's -recoup's -recover's -recross's -recurrent's -recurrents recurse recursed recurses recursing -recursive's recuse recused recuses recusing -redistrict's -redouble's -redraft's reductase reductase's -reduplicate's -reecho's -reedit's -reelect's -reemploy's -reface's -refactor's -refile's -refinance's -refine's -refinish's reflux's -refocus's -refold's -reforest's -refreeze's -refuel's -regain's -regale's -regrade's -rehearse's -reheat's -rehire's -rehouse's -reinsert's -rejig's -rejigger's -rejoin's -rejudge's -relabel's -relight's -reload's relocations -remap's -remaster's -remeasure's -remelt's -remember's -remind's -remortgage's -rename's renominations -renumber's -reorient's -repack's -repackage's -repartition's repartitions -repay's -rephrase's -repine's -replace's -reposition's -repress's -reprice's -reprocess's -reproduce's -require's -reroute's -rescale's -rescan's -reschedule's -reseal's -reseed's -resell's -resettle's -reshape's -reship's -reside's -resign's resizable resize -resize's resized resizer resizes -resow's -respire's -respray's -restaff's -restitch's -restock's -restore's -restrain's -restructure's -restudy's -restyle's resubmission's -resurface's -resurvey's -retie's -retire's -retool's -retract's retransmission's -retrench's -retry's -retype's -revalue's -revisit's -reweigh's -rewire's -reword's -rework's -rezone's rheumatological rheumatologist rheumatologist's @@ -12839,9 +12565,6 @@ rootkit rootkit's rootkits rotatably -sabre -sabre's -sabres sativa savoir schnaps @@ -12874,8 +12597,6 @@ signups sitemap sitemap's sitemaps -smoulder -smouldering snarkily sommelier sommelier's @@ -12944,106 +12665,29 @@ trackback trackback's trackbacks transfect -transfect's transfected transfecting transfects transgenderism transgene -transgene's transgenes triages triaging tweep tweeps -unbalance's -unbar's -unbind's -unblock's -unbolt's -unbosom's -unbuckle's -unburden's -unbutton's uncancelled -unchain's uncheck -uncheck's unchecking unchecks -unclasp's -unclassified's -unclassifieds -uncloak's -unclog's -uncoil's -uncolored's -uncoloreds -uncommon's -uncork's -uncouple's -uncover's -uncross's -uncurl's undeliverables undesignated -unearth's -unfaithful's -unfetter's -unfold's -unfreeze's -unfriendly's -unfrock's -unfurl's -unhand's -unharness's -unhinge's -unhitch's -unhook's -unhorse's uninterruptible unironic unironically -unkind's unlabelled -unlace's -unlatch's -unleash's -unload's -unmake's -unman's -unmask's -unnatural's -unnerve's -unpack's -unplug's -unquote's -unravel's -unreel's -unsaddle's -unsafe's -unsay's -unscramble's -unscrew's -unseal's -unseat's -unsettle's -unshackle's -unsnap's -unsnarl's -unstop's -unstrap's -untangle's -untie's -untwist's -unusual's -unveil's -unwind's -unworthy's -unwrap's -unyoke's -unzip's username's +validator +validators vertebrata volcanological volcanologist diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-removed b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-removed index 2f79cf3703ed..50f550e0a5c6 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-removed +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/5-mozilla-removed @@ -1,2 +1 @@ ABCs -megadeaths diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict index 579005c632fb..838229a025e8 100755 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/install-new-dict @@ -16,7 +16,7 @@ set -x if [ -e orig-bk ]; then echo "$0: directory 'orig-bk' exists." 1>&2 ; exit 0; fi mv orig orig-bk mkdir orig -cp $SPELLER/en_US.dic $SPELLER/en_US.aff $SPELLER/README_en_US.txt orig +cp $SPELLER/en_US-custom.dic $SPELLER/en_US-custom.aff $SPELLER/README_en_US-custom.txt orig mkdir mozilla-bk mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk @@ -24,6 +24,10 @@ mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk # Convert the affix file to ISO8859-1 sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF8$/SET ISO8859-1/' en_US-mozilla.aff +# Convert the dictionary to ISO8859-1 +mv en_US-mozilla.dic en_US-mozilla-utf8.dic +iconv -f utf-8 -t iso-8859-1 < en_US-mozilla-utf8.dic > en_US-mozilla.dic + cp en_US-mozilla.aff ../en-US.aff cp en_US-mozilla.dic ../en-US.dic cp README_en_US-mozilla.txt ../README_en_US.txt diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict index 935d5e3932e8..909e3f1da6d7 100755 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/make-new-dict @@ -30,21 +30,32 @@ expand() { } cd $SPELLER -./make-hunspell-dict -all > ./make-hunspell-dict.log +MK_LIST="../mk-list -v1 --accents=both en_US 60" +cat < params.txt +With Input Command: $MK_LIST +EOF +# note: output of make-hunspell-dict is utf-8 +$MK_LIST | ./make-hunspell-dict -one en_US-custom params.txt > ./make-hunspell-dict.log cd $WKDIR -expand $SPELLER/en.aff < $SPELLER/en.dic.supp > 0-special +# Note: Input and output of "expand" is always iso-8859-1. +# All expanded word list files are thus in iso-8859-1. -expand $ORIG/en_US.aff < $ORIG/en_US.dic > 1-base.txt +expand $SPELLER/en.aff < $SPELLER/en.dic.supp > 0-special # input: ASCII -expand ../en-US.aff < ../en-US.dic > 2-mozilla.txt +# input in utf-8, expand expects iso-8859-1 so use iconv +iconv -f utf-8 -t iso-8859-1 $ORIG/en_US-custom.dic | expand $ORIG/en_US-custom.aff > 1-base.txt -expand $SPELLER/en.aff < $SPELLER/en_US.dic > 3-upstream.txt +expand ../en-US.aff < ../en-US.dic > 2-mozilla.txt # input: iso-8850-1 + +# input in utf-8, expand expects iso-8859-1 so use iconv +iconv -f utf-8 -t iso-8859-1 $SPELLER/en_US-custom.dic | expand $SPELLER/en_US-custom.aff > 3-upstream.txt comm -23 1-base.txt 2-mozilla.txt > 2-mozilla-rem comm -13 1-base.txt 2-mozilla.txt > 2-mozilla-add comm -23 3-upstream.txt 2-mozilla-rem | cat - 2-mozilla-add | sort -u > 4-patched.txt +# note: output of make-hunspell-dict is utf-8 cat 4-patched.txt | comm -23 - 0-special | $SPELLER/make-hunspell-dict -one en_US-mozilla /dev/null # sanity check should yield identical results diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US-custom.txt similarity index 98% rename from extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt rename to extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US-custom.txt index ea8d459bb22c..6c610bf88caf 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US.txt +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/README_en_US-custom.txt @@ -1,6 +1,6 @@ -en_US Hunspell Dictionary +en_US-custom Hunspell Dictionary Generated from SCOWL Version 2015.08.24 -Thu Aug 27 23:04:43 EDT 2015 +Sun Jan 10 15:07:16 EST 2016 http://wordlist.sourceforge.net @@ -311,5 +311,5 @@ from the Ispell distribution they are under the Ispell copyright: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Build Date: Thu Aug 27 23:04:43 EDT 2015 -Wordlist Command: mk-list --accents=strip en_US 60 +Build Date: Sun Jan 10 15:07:16 EST 2016 +With Input Command: ../mk-list -v1 --accents=both en_US 60 diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.aff b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.aff similarity index 100% rename from extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.aff rename to extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.aff diff --git a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.dic b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.dic similarity index 98% rename from extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.dic rename to extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.dic index 5bff61de226f..88f862efe37f 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US.dic +++ b/extensions/spellcheck/locales/en-US/hunspell/dictionary-sources/orig/en_US-custom.dic @@ -1,4 +1,4 @@ -48756 +49245 0/nm 0th/pt 1/n1 @@ -690,6 +690,7 @@ Astrakhan/M AstroTurf/M Asturias/M Asuncion/M +Asunción/M Aswan/M At/SM Atacama/M @@ -697,7 +698,9 @@ Atahualpa/M Atalanta/M Atari/M Ataturk/M +Atatürk/M Athabasca/M +Athabaska Athabaskan/SM Athanasius Athena/M @@ -952,10 +955,12 @@ Bartholomew/M Bartlett/M Bartok/M Barton/M +Bartók/M Baruch/M Baryshnikov/M Basel/M Basho/M +Basic Basie/M Basil/M Basque/MS @@ -1060,6 +1065,7 @@ Beltane/M Belushi/M Ben/M Benacerraf/M +Benares/M Benchley/M Bender/M Bendix/M @@ -1165,6 +1171,7 @@ Bialystok/M Bianca/M Bib Bible/MS +Biblical/M Bic/M Biddle/M Biden/M @@ -1198,6 +1205,7 @@ Bizet/M Bjerknes/M Bjork/M Bk/M +Black/MS Blackbeard/M Blackburn/M Blackfeet/M @@ -1253,6 +1261,7 @@ Boer/SM Boethius/M Bogart/M Bogota/M +Bogotá/M Bohemia/M Bohemian/SM Bohr/M @@ -1331,6 +1340,7 @@ Bowman/M Boyd/M Boyer/M Boyle/M +Boötes/M Br/MT Brad/MY Bradbury/M @@ -1549,6 +1559,7 @@ Bushnell/M Butler/M Butterfingers/M Buxtehude/M +Buñuel/M Byblos/M Byers/M Byrd/M @@ -1798,6 +1809,7 @@ Cassie/M Cassiopeia/M Cassius/M Castaneda/M +Castile/M Castillo/M Castlereagh/M Castor/M @@ -1845,6 +1857,7 @@ Cecile/M Cecilia/M Cecily/M Cedric/M +Celebes/M Celeste/M Celia/M Celina/M @@ -2184,6 +2197,7 @@ Comte/M Conakry/M Conan/M Concepcion/M +Concepción/M Concetta/M Concord/SM Concorde/M @@ -2474,6 +2488,7 @@ Damon/M Dan/M Dana/M Danae/M +Danaë/M Dane/SM Danelaw/M Dangerfield/M @@ -2637,8 +2652,10 @@ Desiree/M Desmond/M Detroit/M Deuteronomy/M +Deutschmark/SM Devanagari/M Devi/M +Devil/M Devin/M Devon/M Devonian/M @@ -2711,7 +2728,9 @@ Dixieland/SM Dixon/M Djibouti/M Dmitri/M +Dnepr Dnepropetrovsk/M +Dnieper/M Dniester/M Dobbin/M Doberman/M @@ -2803,6 +2822,7 @@ Dreyfus/M Dristan/M Dropbox/M Drudge/M +Druid/M Dryden/M Dschubba/M Du @@ -2857,6 +2877,7 @@ Dutchwoman Duvalier/M Dvina/M Dvorak/M +Dvorák/M Dwayne/M Dwight/M Dy/M @@ -2865,6 +2886,8 @@ Dylan/M Dyson/M Dzerzhinsky/M Dzungaria/M +Dürer/M +Düsseldorf/M E/SM EC ECG/M @@ -3030,6 +3053,7 @@ Elwood/M Elysee/M Elysian/M Elysium/SM +Elysée/M Emacs/M Emanuel/M Emerson/M @@ -3097,6 +3121,8 @@ Erich/M Erick/M Ericka/M Erickson/M +Ericson/M +Ericsson/M Eridanus/M Erie/M Erik/M @@ -3141,6 +3167,7 @@ Estella/M Estelle/M Ester/M Esterhazy/M +Esterházy/M Estes/M Esther/M Estonia/M @@ -3161,6 +3188,7 @@ Eu/M Eucharist/MS Eucharistic Euclid/M +Euclidean/M Eugene/M Eugenia/M Eugenie/M @@ -3241,6 +3269,7 @@ FWIW FY FYI Faberge/M +Fabergé/M Fabian/MS Facebook/M Faeroe/M @@ -3269,6 +3298,7 @@ Farrakhan/M Farrell/M Farrow/M Farsi/M +Fascist Fassbinder/M Fatah/M Fates/M @@ -3509,6 +3539,7 @@ Funafuti/M Fundy/M Furies/M Furtwangler/M +Furtwängler/M Fushun/M Fuzhou/M Fuzzbuster/M @@ -3689,6 +3720,7 @@ Gethsemane/M Getty/M Gettysburg/M Gewurztraminer/M +Gewürztraminer/M Ghana/M Ghanaian Ghats/M @@ -3907,6 +3939,8 @@ Grundy/M Grunewald/M Grus/M Gruyere/SM +Gruyère/M +Grünewald/M Guadalajara/M Guadalcanal/M Guadalquivir/M @@ -3965,6 +3999,8 @@ Gwendoline/M Gwendolyn/M Gwyn/M Gypsy/SM +Gödel/M +Göteborg/M H/M HBO/M HDD @@ -4064,6 +4100,7 @@ Hansel/M Hansen/M Hanson/M Hanuka +Hanukah/M Hanukkah/M Hanukkahs Hapsburg/M @@ -4465,6 +4502,7 @@ Hymen/M Hyperion/M Hyundai/M Hz/M +Héloise/M I'd I'll I'm @@ -4544,6 +4582,7 @@ Illinois/M Illinoisan/MS Illuminati/M Ilyushin/M +Imam Imelda/M Imhotep/M Imodium/M @@ -4887,6 +4926,7 @@ Johns/M Johnson/M Johnston/M Jolene/M +Joliet/M Jolson/M Jon/M Jonah/M @@ -5058,6 +5098,7 @@ Kathy/M Katie/M Katina/M Katmai/M +Katmandu/M Katowice/M Katrina/M Katy/M @@ -5255,6 +5296,7 @@ Koufax/M Kowloon/M Kr/M Kraft/M +Krakatau/M Krakatoa/M Krakow/M Kramer/M @@ -5308,6 +5350,7 @@ Kuznets/M Kuznetsk/M Kwakiutl/M Kwan/M +Kwangchow/M Kwangju/M Kwanzaa/MS Ky/MH @@ -5347,6 +5390,7 @@ Lab Laban/M Labrador/SM Labradorean +Labradorian Lacey/M Lachesis/M Lacy/M @@ -5774,6 +5818,7 @@ Lula/M Lully/M Lulu/M Lumiere/M +Lumière/M Luna/M Lupe/M Lupercalia/M @@ -5967,6 +6012,7 @@ Malibu/M Malinda/M Malinowski/M Mallarme/M +Mallarmé/M Mallomars/M Mallory/M Malone/M @@ -5980,6 +6026,7 @@ Malthusian/SM Mameluke/M Mamet/M Mamie/M +Mammon/SM Mamore/M Man/M Managua/M @@ -6368,6 +6415,7 @@ Merton/M Mervin/M Mesa/M Mesabi/M +Meshed/M Mesmer/M Mesolithic/M Mesopotamia/M @@ -6652,6 +6700,7 @@ Moscow/M Moseley/M Moselle/M Moses/M +Moslem/M Mosley/M Moss/M Mosul/M @@ -6742,6 +6791,7 @@ Myron/M Myrtle/M Mysore/M Myst/M +Münchhausen/M N'Djamena N/MD NAACP/M @@ -6849,6 +6899,7 @@ Nathans/M Nation/M Nationwide/M Nativity/M +Nature Naugahyde/M Nauru/M Nautilus/M @@ -6977,6 +7028,7 @@ Nikita/M Nikkei/M Nikki/M Nikolai/M +Nikolayev/M Nikon/M Nile/M Nimitz/M @@ -7031,6 +7083,7 @@ Norsemen/M North/M Northampton/M Northeast/MS +Northern/MR Northerner/M Northrop/M Northrup/M @@ -7354,6 +7407,7 @@ Paine/M Paiute/SM Pakistan/M Pakistani/SM +Palau/M Palembang/M Paleocene/M Paleogene/M @@ -7398,6 +7452,7 @@ Paralympic/S Paramaribo/M Paramount/M Parana/M +Paraná/M Parcheesi/M Pareto/M Paris/M @@ -7414,6 +7469,8 @@ Parnassus/MS Parnell/M Parr/M Parrish/M +Parsee/SM +Parsi/MS Parsifal/M Parsons/M Parthenon/M @@ -7474,6 +7531,7 @@ Pegasus/MS Peggy/M Pei/M Peiping/M +Pekinese/M Peking/SM Pekingese/SM Pele/M @@ -7627,6 +7685,7 @@ Pius/M Pizarro/M Pkwy Pl +Place Planck/M Plano Plantagenet/M @@ -7661,11 +7720,13 @@ Podunk/M Poe/M Pogo/M Poincare/M +Poincaré/M Poiret/M Poirot/M Poisson/M Poitier/M Pokemon/M +Pokémon/M Pol/MY Poland/M Polanski/M @@ -7788,6 +7849,7 @@ Proudhon/M Proust/M Provencal/MS Provence/M +Provençal/M Proverbs Providence/SM Provo/M @@ -7825,6 +7887,7 @@ Punjabi/M Purana/M Purcell/M Purdue/M +Purgatory Purim/MS Purina/M Puritan/M @@ -7852,6 +7915,8 @@ Pythagoras/M Pythagorean/M Pythias/M Python/M +Pétain/M +Pôrto/M Q QA QB @@ -7875,6 +7940,7 @@ Quaternary/M Quayle/M Que Quebec/M +Quebecker Quebecois/M Quechua/M Queen/MS @@ -7894,7 +7960,12 @@ Quixote/M Quixotism/M Qumran/M Quonset/M -R/M +Qur'an +Qur'anic +Quran +Quranic +Québecois/M +R/MD RAF/M RAM/SM RBI @@ -7940,6 +8011,7 @@ Rae/M Rafael/M Raffles/M Ragnarok/M +Ragnarök/M Rainier/M Raleigh/M Ralph/M @@ -8004,6 +8076,7 @@ Reba/M Rebekah/M Recife/M Reconstruction/M +Red/SM Redeemer/M Redford/M Redgrave/M @@ -8205,6 +8278,7 @@ Romano/M Romanov/M Romans/M Romansh/M +Romantic Romanticism Romany/SM Rome/SM @@ -8296,9 +8370,11 @@ Rudolph/M Rudy/M Rudyard/M Rufus/M +Rugby Ruhr/M Ruiz/M Rukeyser/M +Rumanian/SM Rumpelstiltskin/M Rumsfeld/M Runnymede/M @@ -8463,6 +8539,7 @@ Samuelson/M San'a San/M Sana/M +Sanaa/M Sanchez/M Sancho/M Sand/ZM @@ -8565,6 +8642,7 @@ Schopenhauer/M Schrieffer/M Schrodinger/M Schroeder/M +Schrödinger/M Schubert/M Schultz/M Schulz/M @@ -8797,6 +8875,7 @@ Shylockian/M Si/M Siam/M Siamese/M +Sian/M Sibelius/M Siberia/M Siberian/MS @@ -8849,6 +8928,7 @@ Sinkiang/M Sioux/M Sir/SM Sirius/M +Sister/MS Sistine/M Sisyphean/M Sisyphus/M @@ -8946,7 +9026,8 @@ Sousa/M South/M Southampton/M Southeast/MS -Southerner/SM +Southern/ZR +Southerner/M Southey/M Souths Southwest/MS @@ -9026,8 +9107,10 @@ Starbucks/M Stark/M Starkey/M Starr/M +Statehouse/MS Staten/M States +Stateside Staubach/M Ste Steadicam/M @@ -9117,6 +9200,8 @@ Suharto/M Sui/M Sukarno/M Sukkot +Sukkoth/M +Sukkoths Sulawesi/M Suleiman/M Sulla/M @@ -9146,6 +9231,7 @@ Superglue/M Superior/M Superman/M Supt +Surabaja Surabaya/M Surat/M Suriname/M @@ -9204,6 +9290,7 @@ Syriac/M Syrian/MS Szilard/M Szymborska/M +Sèvres/M T'ang/M T/MDG TA @@ -9297,6 +9384,7 @@ Tania/M Tanisha/M Tanner/M Tannhauser/M +Tannhäuser/M Tantalus/M Tanya/M Tanzania/M @@ -9313,6 +9401,7 @@ Target/M Tarim/M Tarkenton/M Tarkington/M +Tartar/MS Tartary/M Tartuffe/M Tarzan/M @@ -9373,6 +9462,7 @@ Terrell/M Terrence/M Terri/M Terrie/M +Territory Terry/M Tertiary/M Tesla/M @@ -9426,6 +9516,7 @@ Thespian/M Thespis/M Thessalonian/SM Thessaloniki/M +Thessaloníki/M Thessaly/M Thieu/M Thimbu/M @@ -9465,6 +9556,7 @@ Ticketmaster/M Ticonderoga/M Tide/M Tienanmen/M +Tientsin/M Tiffany/M Tigris/M Tijuana/M @@ -9840,6 +9932,7 @@ Valletta/M Valois/M Valparaiso/M Valvoline/M +Valéry/M Van/M Vance/M Vancouver/M @@ -9864,6 +9957,7 @@ Vazquez/M Veblen/M Veda/SM Vedanta/M +Veep Vega/SM Vegas/M Vegemite/M @@ -9874,6 +9968,8 @@ Velcro/MS Velez/M Velma/M Velveeta/M +Velásquez/M +Velázquez/M Venetian/SM Venezuela/M Venezuelan/SM @@ -9949,6 +10045,7 @@ Virginia/M Virginian/SM Virgo/SM Visa/M +Visakhapatnam/M Visayans/M Vishnu/M Visigoth/M @@ -10417,6 +10514,7 @@ Zenger/M Zeno/M Zephaniah/M Zephyrus/M +Zeppelin/M Zest/M Zeus/M Zhdanov @@ -10461,6 +10559,7 @@ Zworykin/M Zyrtec/M Zyuganov/M Zzz +Zürich/M a/S aah aardvark/SM @@ -10488,6 +10587,7 @@ abbr abbrev/S abbreviate/DSGNX abbreviation/M +abbé/SM abdicate/GNDSX abdication/M abdomen/SM @@ -10502,6 +10602,7 @@ aberration/MS aberrational abet/S abetted +abetter/SM abetting abettor/SM abeyance/M @@ -10696,6 +10797,8 @@ accounted/U accounting/M accouter/SGD accouterments/M +accoutre/DSG +accoutrements accredit/SGD accreditation/M accredited/U @@ -10747,8 +10850,9 @@ acidify/GDS acidity/M acidosis/M acidulous -acknowledge/DSG +acknowledge/DSGL acknowledged/U +acknowledgement/MS acknowledgment/SM acme/SM acne/M @@ -10843,6 +10947,7 @@ addend/MS addenda addendum/M adder/M +addible addict/GVMDS addiction/SM addition/SM @@ -10873,6 +10978,7 @@ adiabatic adieu/MS adios adipose +adiós adj adjacency/M adjacent/Y @@ -11003,13 +11109,16 @@ advise/LDRSZGB advised/UY advisement/M adviser/M +advisor/SM advisory/SM advocacy/M advocate/MGDS advt adware -adze/SM +adz/MS +adze/M aegis/M +aeon/SM aerate/DSGN aeration/M aerator/SM @@ -11026,6 +11135,7 @@ aerodynamic/S aerodynamically aerodynamics/M aerogram/S +aerogramme/S aeronautic/S aeronautical aeronautics/M @@ -11114,6 +11224,7 @@ agar/M agate/MS agave/M age/DSMGJ +ageing/SM ageism/M ageist/SM ageless/YP @@ -11213,14 +11324,14 @@ airfield/SM airflow/M airfoil/SM airfreight/M -airguns +airgun/S airhead/SM airily airiness/M airing/M airless/P airlessness/M -airletters +airletter/S airlift/SGMD airline/RSMZ airliner/M @@ -11320,7 +11431,7 @@ alimony/M aliveness/M aliyah/M aliyahs -alkali/M +alkali/MS alkalies alkaline alkalinity/M @@ -11473,6 +11584,7 @@ ambergris/M ambiance/MS ambidexterity/M ambidextrous/Y +ambience/MS ambient ambiguity/SM ambiguous/UY @@ -11497,6 +11609,10 @@ ambulation/M ambulatory/SM ambuscade/MGDS ambush/GMDS +ameba/MS +amebae +amebic +ameboid ameliorate/GNVDS amelioration/M amen/B @@ -11518,8 +11634,10 @@ amicably amid amide/MS amidships +amidst amigo/MS amino +amir/SM amiss amity/M ammeter/SM @@ -11568,11 +11686,13 @@ amplification/M amplifier/M amplify/NDRSXZG amplitude/SM +ampoule/MS ampule/MS amputate/GNDSX amputation/M amputee/MS amt +amuck amulet/MS amuse/LGDS amusement/MS @@ -11604,6 +11724,7 @@ analysis/AM analyst/SM analytic analytical/Y +analyticalally analyzable analyze/ADSG analyzer/SM @@ -11817,6 +11938,7 @@ antibiotic/MS antibody/SM antic/MS anticancer +antichrist/SM anticipate/GNXDS anticipated/U anticipation/M @@ -12023,6 +12145,8 @@ applicator/SM applier/MS applique/DSM appliqueing +appliqué/SMG +appliquéd apply/ANXGDS appoint/AELSVGD appointee/SM @@ -12136,6 +12260,9 @@ archdiocese/MS archduchess/MS archduke/MS archenemy/SM +archeological/Y +archeologist/SM +archeology/M archer/M archery/M archetypal @@ -12143,6 +12270,7 @@ archetype/MS archfiend/MS archiepiscopal archipelago/MS +archipelagoes architect/SM architectonic/S architectonics/M @@ -12522,6 +12650,7 @@ attache/BM attached/U attachment/AM attachments +attaché/MS attack/ZGMDRS attacker/M attain/AGDS @@ -12607,6 +12736,7 @@ aunt/SM auntie/SM aura/MS aural/Y +aureola/M aureole/SM auricle/SM auricular @@ -12752,6 +12882,7 @@ awn/GJSM awning/M awoke awoken +awol awry ax/MDSG axial/Y @@ -12883,7 +13014,8 @@ bacterium/M bad/MYP badder baddest -baddie/MS +baddie/M +baddy/SM bade badge/MZRS badger/GMD @@ -12993,6 +13125,7 @@ banana/SM band's band/ESGD bandage/DSMG +bandana/SM bandanna/MS bandbox/MS bandeau/M @@ -13002,6 +13135,7 @@ banditry/M bandleader/S bandmaster/SM bandoleer/SM +bandolier/SM bandsman/M bandsmen bandstand/SM @@ -13049,6 +13183,7 @@ baptism/MS baptismal baptist/S baptistery/SM +baptistry/SM baptize/ZGDRS baptized/U baptizer/M @@ -13130,6 +13265,8 @@ barrage/MGDS barre/MGJDS barred/UEC barrel/GSMD +barrelled +barrelling barren/TPSMR barrenness/M barrette/SM @@ -13209,7 +13346,9 @@ bathroom/SM baths bathtub/MS bathwater -bathyscaphe/SM +bathyscaph/MS +bathyscaphe/M +bathyscaphs bathysphere/MS batik/MS batiste/M @@ -13226,7 +13365,8 @@ batterer/M battery/SM batting/M battle/LDRSMZG -battleaxe/MS +battleax/MS +battleaxe/M battledore/SM battledress battlefield/MS @@ -13309,6 +13449,7 @@ beautifier/M beautiful/Y beautify/NDRSZG beauty/SM +beaux beaver/SGMD bebop/MS becalm/GSD @@ -13625,6 +13766,8 @@ bi/SMRZ biannual/Y bias/GMDS biased/U +biassed +biassing biathlon/SM bib/SM bible/MS @@ -13733,7 +13876,8 @@ binder/MS bindery/SM binding/MS bindweed/M -binge/MDS +binge/MGDS +bingeing bingo/M binman binmen @@ -13894,6 +14038,7 @@ blagging blah/M blahs/M blame/BMGDRS +blameable blameless/YP blamelessness/M blameworthiness/M @@ -13918,6 +14063,7 @@ blasphemy/SM blast/ZGMDRS blaster/M blastoff/MS +blasé blat/S blatancy/SM blatant/Y @@ -14055,6 +14201,7 @@ blowlamp/S blown blowout/SM blowpipe/SM +blowsy/RT blowtorch/MS blowup/MS blowy/TR @@ -14071,8 +14218,10 @@ bluebottle/SM bluefish/MS bluegill/MS bluegrass/M +blueing/M blueish bluejacket/SM +bluejay/SM bluejeans/M blueness/M bluenose/MS @@ -14143,6 +14292,8 @@ bobsleigh/M bobsleighs bobtail/SM bobwhite/MS +bocce/M +bocci/M boccie/M bock/M bod/SMDG @@ -14199,7 +14350,9 @@ bollix/GMDS bollocking/S bollocks bologna/M +bolshevik/SM bolshie +bolshy bolster/GMDS bolt's bolt/USGD @@ -14250,6 +14403,7 @@ bonus/MS bony/PTR boo/SMDHG boob/SGMD +booboo/MS booby/SM boodle/MS booger/S @@ -14302,6 +14456,7 @@ bootblack/SM bootee/MS booth/M booths +bootie/M bootlace/S bootleg/MS bootlegged @@ -14336,6 +14491,7 @@ boroughs borrow/SDRZGJ borrower/M borrowing/M +borsch/M borscht/M borstal/S borzoi/SM @@ -14348,6 +14504,7 @@ bossily bossiness/M bossism/M bossy/RTP +bosun/SM bot/S botanic botanical/Y @@ -14402,6 +14559,7 @@ boustrophedon bout/MS boutique/SM boutonniere/MS +boutonnière/MS bouzouki/MS bovine/SM bovver @@ -14535,6 +14693,7 @@ breakage/MS breakaway/MS breakdown/MS breaker/M +breakeven/M breakfast/MDGS breakfront/MS breakneck @@ -14583,6 +14742,7 @@ brew/MDRZGS brewer/M brewery/SM brewpub/SM +briar/SM bribe/DRSMZG briber/M bribery/M @@ -14644,6 +14804,7 @@ brink/SM brinkmanship/M briny/RTP brioche/SM +briquet/SM briquette/MS brisk/SDRYTGP brisket/SM @@ -14878,6 +15039,7 @@ bun/SM bunch/MDSG bunchy/RT bunco/SMDG +buncombe/M bundle/DSMG bung/MDGS bungalow/MS @@ -14890,6 +15052,7 @@ bunk's bunk/CDGS bunker/SM bunkhouse/SM +bunko/SMDG bunkum/M bunny/SM bunt/MDGSJ @@ -14937,6 +15100,7 @@ burner/M burnish/ZGMDRS burnisher/M burnoose/MS +burnous/MS burnout/MS burnt burp/MDGS @@ -15051,12 +15215,13 @@ c/IES ca cab/SMRZ cabal/MS -cabala's +cabala/M caballero/MS cabana/SM cabaret/SM cabbage/MS cabbed +cabbie/M cabbing cabby/SM cabdriver/SM @@ -15100,6 +15265,7 @@ cadmium/M cadre/MS caducei caduceus/M +caesarean/MS caesura/SM cafe/SM cafeteria/MS @@ -15108,6 +15274,7 @@ caff/CS caffeinated caffeine/M caftan/MS +café/SM cage/DSMG cagey cagier @@ -15150,6 +15317,7 @@ calculator/SM calculi calculus/M caldera/SM +caldron/SM calendar/MDGS calender's calf/M @@ -15158,7 +15326,7 @@ caliber/SM calibrate/GNDSX calibration/M calibrator/SM -calico/M +calico/MS calicoes californium/M caliper/SGMD @@ -15209,7 +15377,7 @@ cambric/M camcorder/SM came camel/MS -camelhair +camelhair/M camellia/MS cameo/MS camera/MS @@ -15220,6 +15388,7 @@ camerawomen camerawork camiknickers camisole/SM +camomile/SM camouflage/MZGDRS camouflager/M camp's @@ -15244,6 +15413,7 @@ canal/MS canalization/M canalize/GDS canape/MS +canapé/MS canard/MS canary/SM canasta/M @@ -15251,6 +15421,8 @@ cancan/MS cancel/DRSZG canceler/M cancellation/SM +cancelled +cancelling cancer/MS cancerous candelabra/SM @@ -15393,7 +15565,9 @@ caramelize/DSG carapace/SM carat/MS caravan/SM +caravansarai/S caravansary/SM +caravanserai/M caravel/SM caraway/SM carbide/SM @@ -15477,6 +15651,8 @@ carnal/Y carnality/M carnation/IMS carnelian/MS +carney/MS +carnie/M carnival/MS carnivora carnivore/SM @@ -15604,6 +15780,8 @@ catalepsy/M cataleptic/MS catalog/ZGSMDR cataloger/M +catalogue/DSMG +catalogued/U catalpa/SM catalyses catalysis/M @@ -15662,6 +15840,7 @@ catnapped catnapping catnip/M catsuit/S +catsup/MS cattail/SM catted cattery/S @@ -15937,6 +16116,7 @@ chapeau/SM chapel/MS chaperon/MDGS chaperonage/M +chaperone/SM chaperoned/U chaplain/MS chaplaincy/SM @@ -16164,6 +16344,7 @@ chilliness/M chilling/Y chillness/M chilly/TPR +chimaera/MS chime/MZGDRS chimer/M chimera/MS @@ -16206,18 +16387,23 @@ chirpy/PTR chirrup/GMDS chisel/ZGMDRS chiseler/M +chiselled +chiseller/MS +chiselling chit/SM chitchat/SM chitchatted chitchatting chitin/M chitinous +chitlins/M chitosan chitterlings/M chivalrous/PY chivalrousness/M chivalry/M chive/MS +chivvy/GDS chivy/GDS chlamydia/MS chlamydiae @@ -16237,6 +16423,7 @@ chock/GMDS chockablock chocoholic/SM chocolate/MS +chocolatey chocolaty choice/MTRS choir/MS @@ -16351,6 +16538,9 @@ chute/MS chutney/MS chutzpah/M chyme/M +château/M +châteaux +châtelaine/SM ciabatta/SM ciao/S cicada/MS @@ -16435,6 +16625,7 @@ citizenship/M citric citron/MS citronella/M +citrous citrus/MS city/SM citywide @@ -16499,6 +16690,7 @@ clarification/M clarify/XDSNG clarinet/SM clarinetist/SM +clarinettist/MS clarion/MDGS clarity/M clash/GMDS @@ -16580,10 +16772,13 @@ cleverness/M clevis/MS clew/SGMD cliche/MDS +cliché/MS +clichéd click/BZGMDRS clicker/M client/MS clientele/MS +clientèle/MS cliff/MS cliffhanger/SM cliffhanging @@ -16647,6 +16842,7 @@ clog/US clogged/U clogging/U cloisonne/M +cloisonné/M cloister/SMDG cloistral clomp/SDG @@ -16888,7 +17084,7 @@ cohesive/YP cohesiveness/M coho/MS cohort/SM -coif/MS +coif/MDGS coiffed coiffing coiffure/DSMG @@ -16941,6 +17137,7 @@ collator/MS colleague/MS collect's collect/ASGVD +collectable/MS collected/U collectedly collectible/SM @@ -17289,6 +17486,7 @@ computerate computerization/M computerize/GDS computing/M +compère/DSG comrade/SMY comradeship/M con/GSM @@ -17404,7 +17602,7 @@ conductor/MS conductress/MS conduit/SM cone/M -coneys +coney/SM confab/SM confabbed confabbing @@ -17464,6 +17662,7 @@ conformity/M confrere/MS confrontation/SM confrontational +confrère/SM confuse/RZ confused/Y confusing/Y @@ -17596,6 +17795,7 @@ consolidation/M consolidator/MS consoling/Y consomme/M +consommé/M consonance/SM consonant/SMY consortia @@ -17786,6 +17986,7 @@ convene/ADSG convener/MS convenience/IMS convenient/IY +convenor/MS convent/SM conventicle/MS convention/SM @@ -17806,6 +18007,7 @@ converted/U converter/SM convertibility/M convertible/SM +convertor/SM convex/Y convexity/M convey/SBDG @@ -17825,7 +18027,7 @@ convoy/SMDG convulse/GNVXDS convulsion/M convulsive/Y -cony/M +cony/SM coo/GSMD cook's cook/ADGS @@ -17834,10 +18036,11 @@ cooked/U cooker/SM cookery/SM cookhouse/S -cookie/SM +cookie/M cooking/M cookout/SM cookware/SM +cooky/SM cool/MDRYZTGPS coolant/SM cooler/M @@ -18014,6 +18217,7 @@ cortex/M cortical cortices cortisone/M +cortège/SM corundum/M coruscate/GNDS coruscation/M @@ -18083,6 +18287,7 @@ couldn't coulee/SM coulis coulomb/MS +coulée/SM council/MS councilman/M councilmen @@ -18197,6 +18402,7 @@ coverings coverlet/MS covert/SPMY covertness/M +coverup/MS covet/SDG covetous/YP covetousness/M @@ -18522,6 +18728,8 @@ crowfeet crowfoot/SM crown/SMDG crowned/U +crozier/MS +croûton/MS crucial/Y crucible/SM crucifix/MS @@ -18534,6 +18742,7 @@ crude/RMYTP crudeness/M crudites/M crudity/SM +crudités/M cruel/RYPT cruelness/M cruelty/SM @@ -18588,6 +18797,7 @@ crystallization/M crystallize/ADSG crystallographic crystallography +crèche/MS ct ctn ctr @@ -18616,6 +18826,7 @@ cuff/MDGS cuisine/SM culinary cull/MDGS +cullender/MS culminate/XDSGN culmination/M culotte/SM @@ -18672,6 +18883,7 @@ curate/DSMGV curative/MS curator/KMS curatorial +curaçao curb/MDGS curbing/M curbside @@ -18778,6 +18990,7 @@ cyan/M cyanide/M cyberbully/S cybercafe/S +cybercafé/S cybernetic/S cybernetics/M cyberpunk/SM @@ -18792,6 +19005,7 @@ cyclist/MS cyclometer/MS cyclone/MS cyclonic +cyclopaedia/MS cyclopedia/MS cyclopes cyclops/M @@ -18805,6 +19019,7 @@ cynic/SM cynical/Y cynicism/M cynosure/MS +cypher/M cypress/MS cyst/MS cystic @@ -18837,7 +19052,7 @@ dad/SM dadaism/M dadaist/MS daddy/SM -dado/M +dado/SM dadoes daemon/MS daemonic @@ -19014,6 +19229,7 @@ deanery/SM deanship/M dear/SPTMRYH dearest/S +dearie/M dearness/M dearth/M dearths @@ -19388,6 +19604,7 @@ dent/ISGMD dental/Y dentifrice/SM dentin/M +dentine/M dentist/MS dentistry/M dentition/M @@ -19480,6 +19697,7 @@ derogatory derrick/SM derriere/SM derringer/SM +derrière/SM derv dervish/MS desalinate/GNDS @@ -19507,6 +19725,7 @@ desertification desertion/SM deserved/UY deserving/U +deshabille/M desiccant/SM desiccate/DSGN desiccation/M @@ -19695,6 +19914,7 @@ dialysis/M dialyzes diam diamante +diamanté diameter/SM diametric diametrical/Y @@ -19730,6 +19950,7 @@ dick/MRXZS dicker/DG dickey/SM dickhead/S +dicky/SM dickybird/S dicotyledon/MS dicotyledonous @@ -19753,10 +19974,11 @@ diddlysquat diddums didgeridoo/S didn't -dido/M +dido/MS didoes didst die/DSM +diehard/SM dielectric/MS diereses dieresis/M @@ -19766,6 +19988,7 @@ dietary/SM dieter/M dietetic/S dietetics/M +dietician/MS dietitian/MS diff/DRZGS differ/DG @@ -19841,6 +20064,7 @@ dimensionless diminish/GDS diminished/U diminuendo/SM +diminuendoes diminution/SM diminutive/SM dimity/M @@ -19860,6 +20084,7 @@ diner/M dinette/MS ding/MDG dingbat/MS +dingdong/SGMD dinghy/SM dingily dinginess/M @@ -20173,8 +20398,10 @@ ditherer/M ditransitive ditsy ditto/SMDG +dittoes ditty/SM ditz/MS +ditzy/R diuretic/MS diurnal/Y div @@ -20217,6 +20444,7 @@ divisor/SM divorce/DSLMG divorcee/MS divorcement/MS +divorcée/MS divot/SM divulge/GDS divvy/DSMG @@ -20225,6 +20453,7 @@ dizzily dizziness/M dizzy/DRSPTG djellaba/MS +djellabahs do/SJMRHZG doable dob/S @@ -20272,14 +20501,16 @@ dog/SM dogcart/SM dogcatcher/SM doge/MS -dogeared +dogear/SMDG dogfight/SM dogfish/MS dogged/PY doggedness/M doggerel/M +doggie/M dogging -doggone/TGRS +doggone/TGDRS +doggoned/TR doggy/RSMT doghouse/SM dogie/SM @@ -20297,6 +20528,7 @@ dogtrot/MS dogtrotted dogtrotting dogwood/MS +doh/M doily/SM doing/USM doldrums/M @@ -20393,6 +20625,7 @@ dopiest dopiness/M doping/M doppelganger/S +doppelgänger/S dork/MS dorky/RT dorm/MRZS @@ -20608,6 +20841,7 @@ driftwood/M drill/SMDRZG driller/M drillmaster/SM +drily drink/SMRBJZG drinkable/U drinker/M @@ -20721,7 +20955,8 @@ ductless dud/GSMD dude/MS dudgeon/M -due/SM +due's +due/IS duel/MDRJZGS dueler/M duelist/SM @@ -20853,6 +21088,13 @@ dyspeptic/MS dysprosium/M dystonia dz +débutante/SM +décolletage/SM +décolleté +démodé +dérailleur/MS +déshabillé/M +détente/M e'en e'er e/FDST @@ -20992,6 +21234,7 @@ edelweiss/M edema/SM edge/MZGJDRS edger/M +edgeways edgewise edgily edginess/M @@ -21365,6 +21608,7 @@ emotionalism/M emotionalize/GDS emotionless emotive/Y +empanel/GDS empathetic empathize/DSG empathy/M @@ -21653,6 +21897,7 @@ entrust/SGD entry/ASM entryphone/S entryway/MS +entrée/MS entwine/DSG enumerable enumerate/DSGNX @@ -21660,6 +21905,7 @@ enumeration/M enumerator/SM enunciate/DSGN enunciation/M +enure/DSG enuresis/M envelop/SLDRZG envelope/SM @@ -21864,7 +22110,7 @@ escudo/SM escutcheon/SM esophageal esophagi -esophagus/M +esophagus/MS esoteric esoterically esp @@ -21891,6 +22137,7 @@ establishments estate/SM esteem/ESMDG ester/SM +esthetic/S estimable/I estimate/MGNDSX estimation/M @@ -22343,6 +22590,7 @@ extemporization/M extemporize/GDS extend/SZGDRB extender/M +extendible extensible extension/SM extensional @@ -22425,7 +22673,7 @@ exurb/SM exurban exurbanite/SM exurbia/M -eye/DSM +eye/DSMG eyeball/GMDS eyebrow/SM eyedropper/SM @@ -22462,6 +22710,7 @@ face/ACSDG facecloth/M facecloths faceless +facelift/SM facet/SMDG facetious/YP facetiousness/M @@ -22501,7 +22750,7 @@ faff/DGS fag/SM fagged fagging -faggot/SM +faggot/SMG fagot/SMG faience/M fail/MDGJS @@ -22606,6 +22855,7 @@ farce/SM farcical/Y fare/MGDS farewell/SM +farfetched farina/M farinaceous farm/MDRZGSJ @@ -22708,6 +22958,7 @@ fax/GMDS fay/TSMR faze/GDS fazed/U +faïence/M fealty/M fear/MDGS fearful/YP @@ -22873,7 +23124,9 @@ ff fiance/CM fiancee/MS fiances -fiasco/M +fiancé/SM +fiancée/MS +fiasco/SM fiascoes fiat/MS fib/ZSMR @@ -23175,6 +23428,7 @@ flambeing flamboyance/M flamboyancy/M flamboyant/Y +flambé/MD flame/DRSJMZG flamenco/MS flameproof/DGS @@ -23206,6 +23460,7 @@ flashily flashiness/M flashing/M flashlight/MS +flashpoint/SM flashy/RTP flask/SM flat/MYPS @@ -23336,6 +23591,7 @@ floor/SMDG floorboard/MS flooring/M floorwalker/SM +floozie/M floozy/SM flop/MS flophouse/MS @@ -23441,6 +23697,7 @@ flytrap/S flyway/SM flyweight/SM flywheel/MS +fo'c'sle/MS foal/MDGS foam/MDGS foaminess/M @@ -23503,6 +23760,7 @@ fondness/M fondue/SM font/MS fontanel/MS +fontanelle/MS foo foobar food/MS @@ -23591,6 +23849,7 @@ forefeet forefinger/SM forefoot/M forefront/SM +foregather/GDS forego/G foregoes foregone @@ -23707,6 +23966,7 @@ formidably formless/PY formlessness/M formula/MS +formulae formulaic formulate/ADSGNX formulated/U @@ -23826,6 +24086,7 @@ franchise's franchise/EDSG franchisee/SM franchiser/SM +franchisor/SM francium/M francophone frangibility/M @@ -23837,6 +24098,7 @@ frankness/M frantic frantically frappe/SM +frappé/M frat/MS fraternal/Y fraternity/FSM @@ -23857,11 +24119,13 @@ frazzle/MGDS freak/SMDG freakish/YP freakishness/M +freakout/MS freaky/RT freckle/DSMG freckly free/YTDRS freebase/MGDS +freebee/SM freebie/SM freebooter/SM freeborn @@ -24020,6 +24284,7 @@ froufrou/M froward/P frowardness/M frown/SMDG +frowsy/TR frowzily frowziness/M frowzy/TPR @@ -24163,6 +24428,7 @@ fusee/SM fuselage/SM fusibility/M fusible +fusileer/SM fusilier/SM fusillade/MS fusion/IFKSM @@ -24194,6 +24460,7 @@ fuzziness/M fuzzy/PTR fwd fwy +fête/SM g/SNXB gab/SM gabardine/SM @@ -24278,6 +24545,7 @@ gamesmanship/M gamester/MS gamete/SM gametic +gamey gamin/SM gamine/SM gaminess/M @@ -24335,14 +24603,17 @@ garnish/GLMDS garnishee/DSM garnisheeing garnishment/SM +garotte/MGDS garret/SM garrison/MDSG garrote/MZGDRS garroter/M +garrotte/MGDS garrulity/M garrulous/PY garrulousness/M garter/SM +garçon/SM gas's gas/CS gasbag/SM @@ -24443,6 +24714,7 @@ gelignite/M gelled gelling gem/SM +gemmology/M gemological gemologist/MS gemology/M @@ -24654,7 +24926,7 @@ gingersnap/SM gingery gingham/M gingivitis/M -ginkgo/M +ginkgo/SM ginkgoes ginned ginning @@ -24667,9 +24939,10 @@ girdle/DSMG girl/MS girlfriend/MS girlhood/SM +girlie girlish/YP girlishness/M -girly +girly/S giro/S girt/MDGS girth/M @@ -24691,6 +24964,7 @@ glacial/Y glaciate/XGNDS glaciation/M glacier/MS +glacé/SDG glad/MYSP gladden/GDS gladder @@ -24704,6 +24978,7 @@ gladiolus/M gladness/M gladsome glam +glamor/SGMD glamorization/M glamorize/DSG glamorous/Y @@ -24820,6 +25095,7 @@ glutton/MS gluttonous/Y gluttony/M glycerin/M +glycerine/M glycerol/M glycogen/M glyph @@ -24866,6 +25142,7 @@ god/SM godawful godchild/M godchildren +goddam/D goddammit goddamn/D goddaughter/MS @@ -24921,8 +25198,11 @@ gonzo goo/M goober/SM good/MYSP +goodby/M goodbye/MS +goodbys goodhearted +goodie/M goodish goodly/TR goodness/M @@ -24945,6 +25225,7 @@ goop/M goose/DSMG gooseberry/SM goosebumps/M +gooseflesh/M goosestep/S goosestepped goosestepping @@ -25044,6 +25325,7 @@ grampus/MS gran/S granary/SM grand/SMRYPT +grandad/MS grandam/MS grandaunt/MS grandchild/M @@ -25071,6 +25353,7 @@ granduncle/SM grange/SM granite/M granitic +grannie/M granny/SM granola/M grant/SMDRZG @@ -25337,6 +25620,7 @@ guacamole/M guanine/M guano/M guarani/MS +guaranies guarantee/MDS guaranteeing guarantor/MS @@ -25353,6 +25637,7 @@ guardsman/M guardsmen guava/SM gubernatorial +guerilla/SM guerrilla/SM guess/ZGBMDRS guesser/M @@ -25514,6 +25799,7 @@ habitualness/M habituate/GNDS habituation/M habitue/SM +habitué/SM hacienda/SM hack/MDRZGS hacker/M @@ -25539,6 +25825,7 @@ haggle/MZGDRS haggler/M hagiographer/SM hagiography/SM +hah hahnium/M haiku/M hail/MDGS @@ -25555,6 +25842,7 @@ haircut/SM hairdo/MS hairdresser/SM hairdressing/M +hairdrier/MS hairdryer/MS hairgrip/S hairiness/M @@ -25599,7 +25887,7 @@ hall/MS hallelujah/M hallelujahs hallmark/GMDS -halloo/MSG +halloo/MDSG hallow/DSG hallowed/U hallucinate/GNXDS @@ -25700,7 +25988,8 @@ hangup/MS hank/MRZS hanker/GJD hankering/M -hankie/MS +hankie/M +hanky/SM hansom/MS hap/MY haphazard/YP @@ -26321,12 +26610,12 @@ hipness/M hipped hipper hippest -hippie/SM +hippie/M hipping hippo/SM hippodrome/SM hippopotamus/MS -hippy +hippy/SM hipster/MS hire's hire/AGDS @@ -26361,6 +26650,7 @@ hitter/SM hitting hive/MGDS hiya +hm hmm ho/SMDRYZ hoagie/MS @@ -26387,6 +26677,7 @@ hobnob/S hobnobbed hobnobbing hobo/MS +hoboes hock/MDSG hockey/M hockshop/MS @@ -26486,10 +26777,10 @@ homey/SMP homeyness/M homicidal homicide/MS -homier -homiest +homie/RSMT homiletic homily/SM +hominess/M hominid/SM hominoid/S hominy/M @@ -26526,6 +26817,7 @@ honeypot/S honeysuckle/SM honk/MDRSZG honker/M +honkie/M honky/SM honor/ESGMDB honorableness/M @@ -26556,9 +26848,10 @@ hooligan/MS hooliganism/M hoop/MDSG hoopla/M -hooray +hooray/MS hoosegow/SM hoot/MDRSZG +hootch/M hootenanny/SM hooter/M hoover/DSG @@ -26630,8 +26923,7 @@ horsewhipping horsewoman/M horsewomen horsey -horsier -horsiest +horsy/TR hortatory horticultural horticulturalist/S @@ -26666,6 +26958,9 @@ hotbed/MS hotblooded hotbox/MS hotcake/SM +hotdog/MS +hotdogged +hotdogging hotel/SM hotelier/MS hotfoot/MDGS @@ -26674,6 +26969,7 @@ hotheaded/YP hotheadedness/M hothouse/SM hotkey/S +hotline/MS hotlink/S hotness/M hotplate/SM @@ -26730,7 +27026,7 @@ housing/MS hove hovel/SM hover/SGD -hovercraft/M +hovercraft/MS how/SM howbeit howdah/M @@ -26861,6 +27157,7 @@ hurler/M hurling/M hurrah/GMD hurrahs +hurray hurricane/MS hurried/UY hurry/DSMG @@ -26885,6 +27182,7 @@ hustle/DRSMZG hustler/M hut/SM hutch/MS +huzza/GSMD huzzah/MDG huzzahs hwy @@ -27382,7 +27680,8 @@ imposition/MS impossibility/SM impossible/S impossibly -impost/SM +impost/ZSMR +imposter/M impostor/SM imposture/MS impotence/M @@ -27438,6 +27737,7 @@ improvisation/SM improvisational improvise/ZGDRS improviser/M +improvisor/SM imprudence/M imprudent/Y impudence/M @@ -27657,6 +27957,7 @@ inductance/M inductee/SM induction/MS inductive/Y +indue/DG indulge/DSG indulgence/SM indulgent/Y @@ -27763,6 +28064,7 @@ inflection/MS inflectional inflict/SDGV infliction/M +inflight inflow/SM influence/MGDS influenced/U @@ -27808,6 +28110,7 @@ ingratiation/M ingredient/MS ingress/MS inguinal +ingénue/SM inhabit/DG inhabitable/U inhabitant/SM @@ -27882,6 +28185,7 @@ innovation/M innovator/MS innovatory innuendo/SM +innuendoes innumerably innumerate inoculate/AGDS @@ -27934,7 +28238,7 @@ insidious/YP insidiousness/M insight/MS insightful -insignia/M +insignia/SM insinuate/GNVDSX insinuation/M insinuator/SM @@ -27989,6 +28293,7 @@ institution/M institutional/Y institutionalization/M institutionalize/DSG +institutor/MS instr instruct/SDGV instructed/U @@ -28134,7 +28439,6 @@ intermingle/DSG intermission/SM intermittent/Y intermix/GDS -intern/GDL internal/SY internalization/M internalize/GDS @@ -28143,8 +28447,10 @@ internationalism/M internationalist/SM internationalization internationalize/DSG +interne/GDL internecine internee/SM +interneship/S internet internist/MS internment/M @@ -28513,6 +28819,7 @@ jailbreak/SM jailer/M jailhouse/S jalapeno/MS +jalapeño/MS jalopy/SM jalousie/MS jam/SM @@ -28532,6 +28839,7 @@ japanning jape/MGDS jar/SM jardiniere/SM +jardinière/SM jarful/MS jargon/M jarred @@ -28570,7 +28878,7 @@ jejuna jejune jejunum/M jell/DSG -jello/S +jello/SM jelly/GDSM jellybean/MS jellyfish/MS @@ -28589,6 +28897,7 @@ jerkiness/M jerkwater jerky/TRMP jeroboam/S +jerrican/S jerrybuilt jerrycan/S jersey/MS @@ -28633,8 +28942,9 @@ jingoism/M jingoist/SM jingoistic jink/DSG -jinn +jinn/MS jinni/M +jinricksha/SM jinrikisha/SM jinx/MDSG jitney/SM @@ -28746,6 +29056,7 @@ jubilee/SM judder/GDS judge's judge/ADSG +judgemental judgeship/M judgment/SM judgmental/Y @@ -28792,9 +29103,11 @@ junior/MS juniper/SM junk/MDRSZG junker/M -junket/MDSG +junket/MDRSZG junketeer/MS -junkie/MTRS +junketer/M +junkie/M +junky/TRSM junkyard/MS junta/SM juridic @@ -28804,7 +29117,7 @@ jurisdictional jurisprudence/M jurist/MS juristic -juror/SM +juror/FSM jury/ISM juryman/M jurymen @@ -28829,7 +29142,9 @@ k/IFGS kHz kW kWh +kabbala kabbalah +kabob/SM kaboom kabuki/M kaddish/MS @@ -28861,6 +29176,7 @@ kayo/MDSG kazoo/SM kc kebab/SM +kebob/SM kedgeree keel/MDSG keelhaul/DGS @@ -28962,6 +29278,7 @@ kind/UPRYT kinda kindergarten/MS kindergartner/SM +kindergärtner/SM kindhearted/PY kindheartedness/M kindle/AGDS @@ -29009,6 +29326,7 @@ kisser/M kissoff/SM kissogram/S kit/SGMD +kitbag/MS kitchen/SM kitchenette/MS kitchenware/M @@ -29037,6 +29355,7 @@ km kn knack/SZMR knacker/GD +knackwurst/MS knapsack/MS knave/SM knavery/M @@ -29104,6 +29423,7 @@ kookaburra/SM kookiness/M kooky/TPR kopeck/MS +kopek/SM korma kosher/DSG kowtow/GMDS @@ -29116,6 +29436,8 @@ krone/RM kronor kronur krypton/M +króna/M +krónur kt kuchen/SM kudos/M @@ -29159,6 +29481,7 @@ lackluster laconic laconically lacquer/GMDS +lacrimal lacrosse/M lactate/GNDS lactation/M @@ -29199,12 +29522,16 @@ laity/M lake/MS lakefront/S lakeside +lallygag/S +lallygagged +lallygagging lam/SM lama/MS lamasery/SM lamb/MDSG lambada/MS -lambaste/GDS +lambast/GDS +lambaste/S lambda/SM lambency/M lambent/Y @@ -29315,6 +29642,7 @@ larynges laryngitis/M larynx/M lasagna/MS +lasagne/MS lascivious/YP lasciviousness/M lase/ZGDRS @@ -29530,6 +29858,7 @@ legendarily legendary legerdemain/M legged +leggin/SM legginess/M legging/MS leggy/RPT @@ -29762,6 +30091,9 @@ likability/M likable/P likableness/M like/EMGDST +likeability/M +likeable/P +likeableness/M likelihood/UM likelihoods likeliness/UM @@ -29837,6 +30169,7 @@ lingo/M lingoes lingual linguine/M +linguini/SM linguist/SM linguistic/S linguistically @@ -29936,6 +30269,7 @@ litterer/M little/MTRP littleness/M littoral/SM +littérateur/SM liturgical/Y liturgist/SM liturgy/SM @@ -30077,6 +30411,7 @@ lolly/S lollygag/S lollygagged lollygagging +lollypop/MS lone/YZR loneliness/M lonely/PTR @@ -30187,6 +30522,7 @@ lovelorn lovely/RSMTP lovemaking/M lover/M +loveseat/SM lovesick lovey/S loving/Y @@ -30329,6 +30665,7 @@ lxix lxvi lxvii lyceum/MS +lychee/MS lychgate/S lye/MG lying/M @@ -30373,10 +30710,12 @@ machinery/M machinist/MS machismo/M macho/M +mack/MS mackerel/SM mackinaw/SM mackintosh/MS macrame/M +macramé/M macro/SM macrobiotic/S macrobiotics/M @@ -30457,11 +30796,14 @@ magnolia/MS magnum/MS magpie/MS magus/M +maharaja/SM maharajah/M maharajahs +maharanee/MS maharani/SM maharishi/SM mahatma/SM +mahjong/M mahogany/SM mahout/MS maid/MNSX @@ -30666,6 +31008,7 @@ manor/SM manorial manpower/M manque +manqué mansard/MS manse/SXMN manservant/M @@ -30694,6 +31037,7 @@ manumitting manure/MGDS manuscript/MS many/M +manège/M map's map/AS maple/SM @@ -30888,6 +31232,7 @@ maths matinee/SM mating/M matins/M +matinée/SM matriarch/M matriarchal matriarchs @@ -30914,6 +31259,7 @@ matzo/SMH matzoh/M matzohs matzot +matériel/M maudlin maul/MDRSZG mauler/M @@ -30952,6 +31298,7 @@ maypole/SM mayst maze/MS mazurka/MS +mañana/M mdse me/DS mead/M @@ -31411,7 +31758,9 @@ midweek/MS midwife/MGDS midwifery/SM midwinter/M +midwived midwives +midwiving midyear/MS mien/M miff/DSG @@ -31725,6 +32074,7 @@ missilery/M mission/AMS missionary/SM missioner/SM +missis/MS missive/MS misspeak/GS misspell/GDJS @@ -31884,8 +32234,10 @@ molester/M moll/MS mollification/M mollify/DSNG -molluscan +mollusc/SM +molluscan/SM mollusk/SM +molluskan/S molly/SM mollycoddle/DSMG molt/MDNRSZG @@ -31922,6 +32274,8 @@ monetize/CGDS money/SMD moneybag/MS moneybox/S +moneygrubber/SM +moneygrubbing/M moneylender/SM moneymaker/SM moneymaking/M @@ -31968,6 +32322,7 @@ monolithic monoliths monologist/SM monologue/SM +monologuist/SM monomania/M monomaniac/MS monomaniacal @@ -32193,6 +32548,7 @@ mouser/M mousetrap/SM mousetrapped mousetrapping +mousey mousiness/M moussaka/S mousse/MGDS @@ -32208,6 +32564,7 @@ mouthy/PTR mouton/M movable/SM move/AMZGDRSB +moveable/SM moved/U movement/SM mover/AM @@ -32268,6 +32625,7 @@ muggy/PTR mugshot/MS mugwump/MS mujaheddin +mujahedin/M mukluk/MS mulatto/M mulattoes @@ -32452,6 +32810,7 @@ mycologist/SM mycology/M myelitis/M myna/MS +mynah/MS myocardial myocardium myopia/M @@ -32481,6 +32840,8 @@ mythologize/DSG mythology/SM myths myxomatosis +métier/MS +mêlée/MS n/IKTH naan/S nab/S @@ -32507,6 +32868,7 @@ nailbrush/MS naive/RYT naivete/M naivety/M +naiveté/M naked/PY nakedness/M name's @@ -32885,7 +33247,7 @@ nightdress/MS nightfall/M nightgown/SM nighthawk/SM -nightie/SM +nightie/M nightingale/SM nightlife/M nightlight/S @@ -32901,6 +33263,7 @@ nighttime/M nightwatchman nightwatchmen nightwear/M +nighty/SM nihilism/M nihilist/MS nihilistic @@ -32937,6 +33300,7 @@ nippy/TPR nirvana/M nisei/M nit/SMR +nite/MS niter/M nitpick/SZGDR nitpicker/M @@ -32950,6 +33314,7 @@ nitrocellulose/M nitrogen/M nitrogenous nitroglycerin/M +nitroglycerine/M nitwit/MS nix/GMDS no/SM @@ -33381,6 +33746,7 @@ notorious/Y notwithstanding notwork/S nougat/MS +nought/MS noun/KMS nourish/DSLG nourishment/M @@ -33440,6 +33806,7 @@ number/ASDG numbered/U numberless numbness/M +numbskull/SM numerable/I numeracy/IM numeral/SM @@ -33505,6 +33872,7 @@ nympho/S nymphomania/M nymphomaniac/SM nymphs +née o o'clock o'er @@ -33776,7 +34144,7 @@ oily/RPT oink/MDSG ointment/SM okapi/SM -okay/MSG +okay/MDSG okra/MS old/TMNRP oldie/SM @@ -33797,11 +34165,13 @@ oligarchy/SM oligonucleotide/S oligopoly/SM olive/SM +olé/M om/SMNX ombudsman/M ombudsmen omega/SM omelet/MS +omelette/MS omen/M omicron/MS ominous/YP @@ -34200,6 +34570,7 @@ outrigger/SM outright outrun/S outrunning +outré outscore/GDS outsell/GS outset/SM @@ -34445,7 +34816,7 @@ oversight/SM oversimple oversimplification/M oversimplify/DSNGX -oversize +oversize/D oversleep/GS overslept oversold @@ -34728,13 +35099,14 @@ pantheist/SM pantheistic pantheon/SM panther/MS -pantie/MS +pantie/M panto/S pantomime/MGDS pantomimic pantomimist/SM pantry/SM pantsuit/SM +panty/SM pantyhose/M pantyliner/M pantywaist/SM @@ -34744,6 +35116,7 @@ papacy/SM papal paparazzi/M paparazzo +papaw/SM papaya/MS paper/SZGMDR paperback/SM @@ -34886,6 +35259,7 @@ parliamentary parlor/MS parlous parmigiana +parmigiano parochial/Y parochialism/M parodist/SM @@ -34938,6 +35312,7 @@ partisan/SM partisanship/M partition/GMDS partitive/MS +partizan/SM partly partner/MDSG partnership/MS @@ -34976,6 +35351,7 @@ passkey/MS passphrase/S passport/MS password/MS +passé past/AMS pasta/SM paste/DSMG @@ -35224,7 +35600,7 @@ peignoir/SM pejoration/M pejorative/SMY peke/MS -pekineses +pekinese/SM pekingese/SM pekoe/M pelagic @@ -35610,6 +35986,7 @@ pharmacist/MS pharmacological pharmacologist/SM pharmacology/M +pharmacopeia/SM pharmacopoeia/MS pharmacy/SM pharyngeal @@ -35848,6 +36225,7 @@ pigtail/MS pike/MZGDRS piker/M pikestaff/SM +pikestaves pilaf/SM pilaster/MS pilchard/MS @@ -35894,15 +36272,14 @@ pinfeather/SM ping/GMD pinhead/SM pinhole/SM -pinier -piniest pinion/SMDG pink/TGPMDRS pinkeye/M -pinkie/SM +pinkie/M pinkish pinkness/M pinko/MS +pinky/SM pinnacle/SM pinnate pinned/U @@ -35918,6 +36295,7 @@ pint/MS pinto/MS pinup/MS pinwheel/GSMD +piny/TR pinyin/M pinyon/SM pioneer/SGMD @@ -35945,6 +36323,7 @@ piratical/Y pirogi/M piroshki/M pirouette/DSMG +pirozhki/M piscatorial pismire/SM piss/ZGMDRS @@ -35990,11 +36369,14 @@ pivotal pix/M pixel/MS pixie/MS +pizazz/M pizza/MS pizzazz/M pizzeria/SM pizzicati pizzicato/M +piñata/MS +piñon/SM pj's pk pkg @@ -36160,6 +36542,7 @@ plethora/M pleura/M pleurae pleurisy/M +plexiglass/M plexus/MS pliability/M pliable @@ -36340,12 +36723,14 @@ pollination/M pollinator/SM polling/M polliwog/SM +pollock/M pollster/SM pollutant/MS pollute/ZGNDRS polluted/U polluter/M pollution/M +pollywog/MS polo/M polonaise/SM polonium/M @@ -36510,6 +36895,7 @@ portico/M porticoes portiere/MS portion/KSGMD +portière/MS portliness/M portly/RPT portmanteau/MS @@ -36566,6 +36952,7 @@ posthumous/Y posthypnotic postie/S postilion/SM +postillion/MS postindustrial posting/M postlude/SM @@ -36875,6 +37262,7 @@ prepossessing/U prepossession/SM preposterous/Y prepped +preppie/M prepping preppy/TRSM prepubescence/M @@ -36921,6 +37309,7 @@ preside/GDS presidency/SM president/MS presidential +presidia presidium/M presort/DGS press's @@ -36956,6 +37345,7 @@ pretension/M pretentious/UY pretentiousness/M preterit/SM +preterite/MS preterm preternatural/Y pretest/DGS @@ -37171,6 +37561,8 @@ prognosticate/XGNDS prognostication/M prognosticator/MS program/CAS +programed +programing programmable/MS programmatic programmed/AC @@ -37336,6 +37728,7 @@ protegee/S protein/SM protestant/S protestation/MS +protestor/MS protocol/MS proton/SM protoplasm/M @@ -37351,6 +37744,8 @@ protrusile protrusion/MS protuberance/MS protuberant +protégé/MS +protégée/S proud/RYT prov/NB provability/M @@ -37402,6 +37797,7 @@ pruner/M prurience/M prurient/Y pry/ZTGDRSM +précis/MDG psalm/MS psalmist/SM psaltery/SM @@ -37651,6 +38047,7 @@ pushily pushiness/M pushover/MS pushpin/S +pushup/MS pushy/TRP pusillanimity/M pusillanimous/Y @@ -37662,6 +38059,7 @@ pustular pustule/SM put/ISM putative +putdown/SM putout/MS putrefaction/M putrefactive @@ -37903,7 +38301,7 @@ rabble/MS rabid/PY rabidness/M rabies/M -raccoon/M +raccoon/MS race/MZGDRS racecourse/SM racegoer/S @@ -37925,6 +38323,7 @@ racket/SMDG racketeer/SMDG racketeering/M raconteur/SM +racquet/SM racquetball/SM racy/PRT rad/SM @@ -38024,6 +38423,7 @@ rainy/RT raise/MZGDRS raiser/M raisin/SM +raja/MS rajah/M rajahs rake/MGDS @@ -38075,6 +38475,7 @@ rangefinder/S ranger/M ranginess/M rangy/RTP +rani/MS rank/TGJPMDRYS ranking/M rankle/DSG @@ -38232,6 +38633,7 @@ realized/U realm/MS realness/M realpolitik/M +realtor/SM realty/M ream/ZGMDRS reamer/M @@ -38290,6 +38692,7 @@ recessional/SM recessionary recessive/SM recherche +recherché recidivism/M recidivist/SM recipe/SM @@ -39107,6 +39510,7 @@ rifler/M rifling/M rift/GMDS rig/SM +rigamarole/SM rigatoni/M rigged rigger/SM @@ -39183,6 +39587,7 @@ riskiness/M risky/RPT risotto/MS risque +risqué rissole/S rite/MS ritual/SMY @@ -39392,6 +39797,7 @@ router/M routine/MYS routinize/GDS roux +roué/MS rove/ZGDRS rover/M row/SZGMDR @@ -39540,6 +39946,7 @@ sabot/MS sabotage/DSMG saboteur/SM sabra/MS +sabre/MS sac/SM saccharin/M saccharine @@ -39622,6 +40029,7 @@ saintliness/M saintly/PRT saith sake/M +saki/M salaam/SMDG salable/U salacious/PY @@ -39632,6 +40040,7 @@ salamander/SM salami/SM salary/DSM sale/ABMS +saleable/U saleroom/S salesclerk/SM salesgirl/SM @@ -39844,12 +40253,15 @@ sausage/MS saute/MS sauteed sauteing +sauternes/M +sauté/MDSG savage/DRSMYTGP savageness/M savagery/SM savanna/MS savant/SM save/BJMZGDRS +saveable saved/U saver/M saving/M @@ -39898,6 +40310,7 @@ scalene scaliness/M scallion/MS scallop/GSMD +scallywag/MS scalp/MDRSZG scalpel/SM scalper/M @@ -40000,13 +40413,13 @@ schizophrenia/M schizophrenic/SM schlemiel/SM schlep/SM -schlepped -schlepping +schlepp/GMDS schlock/M +schlocky schmaltz/M schmaltzy/TR schmo/M -schmoes +schmoe/SM schmooze/DRSZG schmuck/MS schnapps/M @@ -40200,6 +40613,7 @@ scrump/SGD scrumptious/Y scrumpy scrunch/MDSG +scrunchie/M scrunchy/SM scruple/MGDS scrupulosity/M @@ -40408,6 +40822,7 @@ segue/MGDS segueing seigneur/SM seignior/SM +seigniorial seine/MZGDRS seiner/M seismic @@ -40449,6 +40864,7 @@ sellotape/DSG sellout/MS seltzer/MS selvage/MS +selvedge/MS selves semantic/S semantically @@ -40762,6 +41178,7 @@ shamefulness/M shameless/YP shamelessness/M shammed +shammies shamming shampoo/ZGMDRS shampooer/M @@ -40781,7 +41198,7 @@ shapelessness/M shapeliness/M shapely/PTR shard/MS -share/MZGDRS +share/MZGDRSB shareable sharecrop/S sharecropped @@ -40799,11 +41216,13 @@ sharp/MDNRYSPXZTG sharpen/ADGS sharpener/MS sharper/M -sharpie/MS +sharpie/M sharpish sharpness/M sharpshooter/SM sharpshooting/M +sharpy/SM +shat shatter/GMDS shatterproof shave/MZGDRSJ @@ -40841,8 +41260,10 @@ sheerness/M sheet/MSG sheeting/M sheetlike +sheik/MS sheikdom/MS sheikh/M +sheikhdom/MS sheikhs sheila/S shekel/SM @@ -40860,6 +41281,7 @@ shenanigan/SM shepherd/SMDG shepherdess/MS sherbet/SM +sherd/MS sheriff/SM sherry/SM shew/GDS @@ -40997,6 +41419,7 @@ shortening/M shortfall/MS shorthand/MD shorthorn/MS +shortie/M shortish shortlist/DGS shortness/M @@ -41222,6 +41645,7 @@ silly/TRSMP silo/MS silt/GMDS silty/TR +silvan silver/GMDS silverfish/MS silversmith/M @@ -41308,6 +41732,7 @@ sipper/SM sipping sir/SXMN sire/CMGDS +siree/M siren/M sirloin/SM sirocco/SM @@ -41344,6 +41769,7 @@ sixtieth/M sixtieths sixty/SMH size/MGBDRS +sizeable sizing/M sizzle/DRSMZG ska/M @@ -41398,6 +41824,7 @@ skimpiness/M skimpy/RTP skin/MS skincare/M +skinflick/MS skinflint/MS skinful skinhead/MS @@ -41428,6 +41855,7 @@ skulk/SDRZG skulker/M skull/SM skullcap/MS +skullduggery/M skunk/SMDG sky/GSM skycap/SM @@ -41641,6 +42069,7 @@ sluice/DSMG slum/MS slumber/GSMD slumberous +slumbrous slumdog/SM slumlord/MS slummed @@ -41662,6 +42091,8 @@ slut/MS sluttish slutty/RT sly/TRY +slyer +slyest slyness/M smack/SMDRZG smacker/M @@ -41722,12 +42153,14 @@ smolder/SGMD smooch/MDSG smoochy smooth/PDRYTG -smoothie/MS +smoothie/M smoothness/M smooths +smoothy/SM smorgasbord/SM smote smother/GSMD +smoulder/GMDS smudge/DSMG smudgy/TR smug/YP @@ -41741,6 +42174,7 @@ smurf/S smut/MS smuttiness/M smutty/TRP +smörgåsbord/MS snack/SMDG snaffle/DSMG snafu/SM @@ -41794,6 +42228,7 @@ sniffer/M sniffle/DSMG sniffy/RT snifter/SM +snigger/SMDG snip/MDRZGS snipe/SM sniper/M @@ -41937,6 +42372,7 @@ softcover soften/DRZG softener/M softhearted +softie/M softness/M software/M softwood/SM @@ -41946,9 +42382,12 @@ sogginess/M soggy/RTP soigne soignee +soigné +soignée soil/MDGS soiled/U soiree/SM +soirée/SM sojourn/ZGMDRS sojourner/M sol/SM @@ -42014,6 +42453,8 @@ solver/SM somatic somber/PY somberness/M +sombre/PY +sombreness/M sombrero/MS some somebody/SM @@ -42109,6 +42550,7 @@ sottish sou'wester sou/SMH souffle/SM +soufflé/SM sough/MDG soughs sought/U @@ -42132,6 +42574,7 @@ soundtrack/SM soup/MDGS soupcon/MS soupy/RT +soupçon/MS sour/MDRYTGSP source/ADSMG sourdough/M @@ -42374,11 +42817,13 @@ spinner/MS spinneret/SM spinney/S spinning/M +spinoff/MS spinster/SM spinsterhood/M spinsterish spiny/RT spiracle/SM +spiraea/MS spiral/SGMDY spire's spire/IFAS @@ -42660,6 +43105,7 @@ stagecoach/MS stagecraft/M stagehand/MS stagestruck +stagey stagflation/M stagger/MDGS staggering/Y @@ -42721,6 +43167,7 @@ standout/MS standpipe/SM standpoint/MS standstill/MS +standup/M stank stanza/SM staph/M @@ -42989,6 +43436,7 @@ stockbroking/M stockholder/SM stockily stockiness/M +stockinet/M stockinette/M stocking/SM stockist/S @@ -43002,7 +43450,8 @@ stodge stodgily stodginess/M stodgy/RTP -stogie/MS +stogie/M +stogy/SM stoic/SM stoical/Y stoicism/M @@ -43295,6 +43744,7 @@ sturgeon/SM stutter/MDRSZG stutterer/M sty/SM +stye/MS style's style/ADSG styli @@ -43852,6 +44302,7 @@ swankiness/M swanky/RPT swanned swanning +swansdown/M swansong/S swap/MS swapped @@ -43894,6 +44345,7 @@ sweepings/M sweepstakes/M sweet/XTSMNRYP sweetbread/SM +sweetbriar/SM sweetbrier/SM sweetcorn sweetened/U @@ -43992,7 +44444,7 @@ symbolical/Y symbolism/M symbolization/M symbolize/DSG -symmetric +symmetric/Y symmetrical/Y symmetry/SM sympathetic/U @@ -44063,6 +44515,7 @@ systemic/MS systemically systole/SM systolic +séance/SM t/SDNXGBJ ta tab/SM @@ -44183,6 +44636,7 @@ tamarack/MS tamarind/MS tambourine/MS tame/BYZTGDRSP +tameable tamed/U tameness/M tamer/M @@ -44339,6 +44793,7 @@ taxiway/S taxman taxmen taxonomic +taxonomical taxonomist/MS taxonomy/SM taxpayer/MS @@ -44414,6 +44869,7 @@ teenage/RZ teenager/M teeny/TR teenybopper/MS +teepee/MS teeter/MDSG teethe/GDS teething/M @@ -44499,6 +44955,7 @@ temperature/SM tempest/SM tempestuous/YP tempestuousness/M +tempi template's template/S temple/SM @@ -44542,6 +44999,7 @@ tenderloin/SM tenderness/M tendinitis/M tendon/SM +tendonitis/M tendril/SM tenement/SM tenet/SM @@ -44848,6 +45306,7 @@ thousand/MHS thousandfold thousandth/M thousandths +thraldom/M thrall/SMDG thralldom/M thrash/JMDRSZG @@ -44903,6 +45362,7 @@ throttler/M through throughout throughput/M +throughway/MS throw/SMRZG throwaway/SM throwback/SM @@ -45122,6 +45582,8 @@ titlist/MS titmice titmouse/M titter/SGMD +tittivate/DSGN +tittivation/M tittle/SM titty/S titular @@ -45255,7 +45717,7 @@ topcoat/SM topdressing/SM topee/S topflight -topi +topi/S topiary/M topic/SM topical/Y @@ -45281,6 +45743,8 @@ topsoil/M topspin/M toque/SM tor/SM +torah/M +torahs torch/GMDS torchbearer/MS torchlight/M @@ -45349,6 +45813,7 @@ touchpaper/S touchscreen/MS touchstone/MS touchy/RPT +touché tough/XTGMDNRYP toughen/ZGDR toughener/M @@ -45490,6 +45955,7 @@ tranquil/RYT tranquility/M tranquilize/ZGDRS tranquilizer/M +tranquillity/M trans/I transact/DGS transaction/SM @@ -45524,7 +45990,7 @@ transformation/SM transformer/M transfuse/DSXGN transfusion/M -transgender/S +transgender/SD transgenic transgress/GDS transgression/SM @@ -45620,6 +46086,7 @@ travel/MDRSZGJ traveled/U traveler/M traveling/M +travelog/SM travelogue/MS traversal/SM traverse/DSMG @@ -45946,6 +46413,7 @@ tumbler/M tumbleweed/SM tumbling/M tumbrel/SM +tumbril/SM tumescence/M tumescent tumid @@ -46077,6 +46545,7 @@ twin/MDRSZG twine/SM twiner/M twinge/DSMG +twinight twink/SY twinkle/MGJDS twinkling/M @@ -46218,6 +46687,7 @@ unassertive unassuming/Y unavailing/Y unaware/S +unbeknown unbeknownst unbend/SG unbent @@ -46231,7 +46701,6 @@ unbroken uncanny/T uncap/S uncaring -uncatalogued unceasing/Y unchangeable uncharacteristic @@ -46401,6 +46870,7 @@ undies/M undo undoubted/Y undramatic +undreamt undue undulant undulate/DSXGN @@ -46576,7 +47046,6 @@ unromantic unruliness/M unruly/RTP unsafe/YTR -unsaleable unsavory unscathed unsearchable @@ -46587,6 +47056,7 @@ unsentimental unset unshakable unshakably +unshakeable unshapely unshorn unsightliness/M @@ -46780,6 +47250,7 @@ utilization/M utilize/GBDS utmost/M utopia/SM +utopian/MS utter/SDYG utterance/SM uttermost/M @@ -46928,7 +47399,7 @@ vector/SGMD veejay/SM veep/MS veer/MDGS -veg/M +veg/SM vegan/SM vegeburger/S veges @@ -47004,6 +47475,8 @@ venue/ASM veracious/Y veracity/M veranda/SM +verandah/M +verandahs verb/KMS verbal/MYS verbalization/M @@ -47140,6 +47613,7 @@ victorious/Y victory/SM victual/SMDG vicuna/MS +vicuña/MS videlicet video/GSMD videocassette/SM @@ -47232,7 +47706,7 @@ virology/M virtual/Y virtue/SM virtuosity/M -virtuoso/M +virtuoso/SM virtuous/YP virtuousness/M virulence/M @@ -47335,6 +47809,7 @@ voicemail/M void/MDSGB voila voile/M +voilà vol/S volatile volatility/M @@ -47448,6 +47923,8 @@ wailing/M wain/MS wainscot/SJMDG wainscoting/M +wainscotted +wainscotting/MS wainwright/MS waist/SM waistband/MS @@ -47547,6 +48024,7 @@ warmness/M warmonger/SMG warmongering/M warmth/M +warmup/MS warn/JDGS warning/M warp/MDGS @@ -47636,6 +48114,7 @@ waterlogged watermark/MDGS watermelon/SM watermill/MS +waterpower/M waterproof/SMDG waterproofing/M waters/M @@ -47936,6 +48415,7 @@ whisk/SMDRZG whisker/MD whiskery whiskey/MS +whisky/SM whiskys whisper/MDRSZG whisperer/M @@ -47966,10 +48446,8 @@ whittle/ZGDRS whittler/M whiz/M whizkid/M +whizz/MDSG whizzbang/MS -whizzed -whizzes -whizzing who'd who'll who're @@ -48030,6 +48508,7 @@ widener/M wideness/M widescreen/S widespread +widgeon/MS widget/S widow/SMDRZG widower/M @@ -48043,7 +48522,7 @@ wienie/SM wife/MY wifeless wig/SM -wigeon/M +wigeon/SM wigged wigging wiggle/DRSMZG @@ -48070,6 +48549,8 @@ wildlife/M wildness/M wilds/M wile/MGDS +wilful/P +wilfulness/M wiliness/M will/MDS willful/PY @@ -48222,7 +48703,7 @@ wittiness/M witting/UY witty/RPT wive/GDS -wiz +wiz/S wizard/SMY wizardry/M wizened @@ -48541,8 +49022,8 @@ xxxviii xylem/M xylophone/SM xylophonist/MS +y y'all -y/F ya yacht/SMDG yachting/M @@ -48607,6 +49088,7 @@ yeomen yep/SM yes/MS yeshiva/SM +yeshivot yessed yessing yesterday/MS @@ -48662,7 +49144,7 @@ ytterbium/M yttrium/M yuan/M yucca/SM -yuck +yuck/MDSG yucky/TR yuk/SM yukked @@ -48755,3 +49237,10 @@ zydeco/M zygote/SM zygotic zymurgy/M +Ångström/M +éclair/SM +éclat/M +élan/M +émigré/SM +épée/MS +étude/SM diff --git a/extensions/spellcheck/locales/en-US/hunspell/en-US.dic b/extensions/spellcheck/locales/en-US/hunspell/en-US.dic index bf36472e1ea0..ef1c07f3ac8b 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/en-US.dic +++ b/extensions/spellcheck/locales/en-US/hunspell/en-US.dic @@ -1,4 +1,4 @@ -55107 +55587 0/nm 0th/pt 1/n1 @@ -1169,6 +1169,7 @@ Astrix/M AstroTurf/M Asturias/M Asuncion/M +Asuncin/M Aswan/M At/SM Atacama/M @@ -1176,7 +1177,9 @@ Atahualpa/M Atalanta/M Atari/M Ataturk/M +Atatrk/M Athabasca/M +Athabaska Athabaskan/SM Athanasius Athena/M @@ -1542,6 +1545,7 @@ Bartolomeo/M Barton/M Bartram/M Barty/M +Bartk/M Baruch/M Bary/M Baryram/M @@ -1550,6 +1554,7 @@ Base/M Basel/M Basho/M Basia/M +Basic Basie/M Basil/M Basile/M @@ -1696,6 +1701,7 @@ Belva/M Belvia/M Ben/M Benacerraf/M +Benares/M Benchley/M Bender/M Bendick/M @@ -1885,6 +1891,7 @@ Bibby/M Bibbye/M Bibi/M Bible/MS +Biblical/M Bic/M Biddie/M Biddle/M @@ -1938,6 +1945,7 @@ Bjerknes/M Bjork/M Bjorn/M Bk/M +Black/MS BlackBerry/M Blackbeard/M Blackburn/M @@ -2023,6 +2031,7 @@ Boethius/M Bogart/M Bogey/M Bogota/M +Bogot/M Bohemia/M Bohemian/SM Bohr/M @@ -2124,6 +2133,7 @@ Boycie/M Boyd/M Boyer/M Boyle/M +Botes/M Br/MNT Brad/MNY Bradan/M @@ -2447,6 +2457,7 @@ Butch/M Butler/M Butterfingers/M Buxtehude/M +Buuel/M Byblos/M Byers/M Byram/M @@ -2817,6 +2828,7 @@ Cassius/M Cassondra/M Cassy/M Castaneda/M +Castile/M Castillo/M Castlereagh/M Castor/M @@ -2902,6 +2914,7 @@ Ced/M Cedric/M Ceil/M Cele/M +Celebes/M Celene/M Celesta/M Celeste/M @@ -3461,6 +3474,7 @@ Conakry/M Conan/M Conant/M Concepcion/M +Concepcin/M Concetta/M Concettina/M Conchita/M @@ -3925,6 +3939,7 @@ Damon/M Dan/M Dana/M Danae/M +Dana/M Dane/SM Danelaw/M Danell/M @@ -4233,11 +4248,13 @@ Desmond/M Desmund/M Detroit/M Deuteronomy/M +Deutschmark/SM Dev/M Deva/M Devan/M Devanagari/M Devi/M +Devil/M Devin/M Devina/M Devinne/M @@ -4351,7 +4368,9 @@ Dixieland/SM Dixon/M Djibouti/M Dmitri/M +Dnepr Dnepropetrovsk/M +Dnieper/M Dniester/M Dniren/M Dobbin/M @@ -4530,6 +4549,7 @@ Drucy/M Drud/M Drudge/M Drugi/M +Druid/M Drusi/M Drusie/M Drusilla/M @@ -4611,6 +4631,7 @@ Dutchwoman Duvalier/M Dvina/M Dvorak/M +Dvork/M Dwain/M Dwayne/M Dwight/M @@ -4628,6 +4649,8 @@ Dynah/M Dyson/M Dzerzhinsky/M Dzungaria/M +Drer/M +Dsseldorf/M E/SMY EC ECG/M @@ -4932,6 +4955,7 @@ Elysia Elysian/M Elysium/SM Elyssa/M +Elyse/M Em/M Ema/M Emacs/M @@ -5060,6 +5084,8 @@ Ericha/M Erick/M Ericka/M Erickson/M +Ericson/M +Ericsson/M Eridanus/M Erie/M Erik/M @@ -5136,6 +5162,7 @@ Estella/M Estelle/M Ester/M Esterhazy/M +Esterhzy/M Estes/M Estevan/M Esther/M @@ -5173,6 +5200,7 @@ Eu/M Eucharist/MS Eucharistic Euclid/M +Euclidean/M Eudora/M Euell/M Eugen/M @@ -5299,6 +5327,7 @@ FYI Fabe/RM Faber/M Faberge/M +Faberg/M Fabian/MS Fabiano/M Fabien/M @@ -5364,6 +5393,7 @@ Farrell/M Farris/M Farrow/M Farsi/M +Fascist Faso/M Fassbinder/M Fatah/M @@ -5763,6 +5793,7 @@ Funafuti/M Fundy/M Furies/M Furtwangler/M +Furtwngler/M Fushun/M Fuzhou/M Fuzzbuster/M @@ -6089,6 +6120,7 @@ Gethsemane/M Getty/M Gettysburg/M Gewurztraminer/M +Gewrztraminer/M Ghana/M Ghanaian Ghats/M @@ -6446,6 +6478,8 @@ Grundy/M Grunewald/M Grus/M Gruyere/SM +Gruyre/M +Grnewald/M Guadalajara/M Guadalcanal/M Guadalquivir/M @@ -6548,6 +6582,8 @@ Gwyn/M Gwyneth/M Gwynne/M Gypsy/SM +Gdel/M +Gteborg/M H/M HBO/M HDD @@ -6683,6 +6719,7 @@ Hansen/M Hansiain/M Hanson/M Hanuka +Hanukah/M Hanukkah/M Hanukkahs Happy/M @@ -7262,6 +7299,7 @@ Hynda/M Hyperion/M Hyundai/M Hz/M +Hloise/M I'd I'll I'm @@ -7374,6 +7412,7 @@ Ilysa/M Ilyse/M Ilyssa/M Ilyushin/M +Imam Imelda/M Imhotep/M Immanuel @@ -7995,6 +8034,7 @@ Jolene/M Joletta/M Joli/M Jolie/M +Joliet/M Joline/M Jolson/M Joly/M @@ -8349,6 +8389,7 @@ Katinka/M Katleen/M Katlin/M Katmai/M +Katmandu/M Katowice/M Katrina/M Katrine @@ -8707,6 +8748,7 @@ Koufax/M Kowloon/M Kr/M Kraft/M +Krakatau/M Krakatoa/M Krakow/M Kramer/M @@ -8782,6 +8824,7 @@ Kuznets/M Kuznetsk/M Kwakiutl/M Kwan/M +Kwangchow/M Kwangju/M Kwanzaa/MS Ky/MH @@ -8829,6 +8872,7 @@ Lab Laban/M Labrador/SM Labradorean +Labradorian Lacee/M Lacey/M Lachesis/M @@ -9535,6 +9579,7 @@ Lulita/M Lully/M Lulu/M Lumiere/M +Lumire/M Luna/M Lupe/M Lupercalia/M @@ -9815,6 +9860,7 @@ Malinowski/M Malissa/M Malissia/M Mallarme/M +Mallarm/M Mallissa/M Mallomars/M Mallorie/M @@ -9836,6 +9882,7 @@ Mame/M Mameluke/M Mamet/M Mamie/M +Mammon/SM Mamore/M Man/M Managua/M @@ -10486,6 +10533,7 @@ Merwyn/M Meryl/M Mesa/M Mesabi/M +Meshed/M Mesmer/M Mesolithic/M Mesopotamia/M @@ -10881,6 +10929,7 @@ Moseley/M Moselle/M Moses/M Moshe/M +Moslem/M Mosley/M Moss/M Mosul/M @@ -11008,6 +11057,7 @@ Myrvyn/M Myrwyn/M Mysore/M Myst/M +Mnchhausen/M N'Djamena N/MD NAACP/M @@ -11168,6 +11218,7 @@ Natividad/M Nativity/M Natka/M Natty/M +Nature Naugahyde/M Nauru/M Nautilus/M @@ -11379,6 +11430,7 @@ Nikola/SM Nikolai/M Nikolaos/M Nikolaus/M +Nikolayev/M Nikoletta/M Nikolia/M Nikolos/M @@ -11487,6 +11539,7 @@ Nortel/M North/M Northampton/M Northeast/MS +Northern/MR Northerner/M Northrop/M Northrup/M @@ -11925,6 +11978,7 @@ Paine/M Paiute/SM Pakistan/M Pakistani/SM +Palau/M Palembang/M Paleocene/M Paleogene/M @@ -11988,6 +12042,7 @@ Paralympic/S Paramaribo/M Paramount/M Parana/M +Paran/M Parcheesi/M Pareto/M Paris/M @@ -12007,6 +12062,8 @@ Parr/M Parrish/M Parrnell/M Parry +Parsee/SM +Parsi/MS Parsifal/M Parsons/M Parthenon/M @@ -12104,6 +12161,7 @@ Peggy/M Pei/M Peiping/M Peirce/M +Pekinese/M Peking/SM Pekingese/SM Pele/M @@ -12334,6 +12392,7 @@ Pius/M Pizarro/M Pkwy Pl +Place Planck/M Plano Plantagenet/M @@ -12368,11 +12427,13 @@ Podunk/M Poe/M Pogo/M Poincare/M +Poincar/M Poiret/M Poirot/M Poisson/M Poitier/M Pokemon/M +Pokmon/M Pol/MY Poland/M Polanski/M @@ -12513,6 +12574,7 @@ Proudhon/M Proust/M Provencal/MS Provence/M +Provenal/M Proverbs Providence/SM Provo/M @@ -12558,6 +12620,7 @@ Punjabi/M Purana/M Purcell/M Purdue/M +Purgatory Purim/MS Purina/M Puritan/M @@ -12586,6 +12649,8 @@ Pythagoras/M Pythagorean/M Pythias/M Python/M +Ptain/M +Prto/M Q QA QB @@ -12610,6 +12675,7 @@ Quaternary/M Quayle/M Que Quebec/M +Quebecker Quebecois/M Quechua/M Queen/MS @@ -12645,8 +12711,13 @@ Quixote/M Quixotism/M Qumran/M Quonset/M +Qur'an +Qur'anic +Quran +Quranic +Qubecois/M Qwest/M -R/MG +R/MDG RAF/M RAM/SM RBI @@ -12714,6 +12785,7 @@ Raffles/M Rafi/M Ragnar/M Ragnarok/M +Ragnark/M Rahal/M Rahel/M Raimondo/M @@ -12837,6 +12909,7 @@ Rebekah/M Rebekkah/M Recife/M Reconstruction/M +Red/SM Redd/M Reddit/M Redeemer/M @@ -13184,6 +13257,7 @@ Romano/M Romanov/M Romans/M Romansh/M +Romantic Romanticism Romany/SM Rome/SM @@ -13357,10 +13431,12 @@ Rudy/M Rudyard/M Rufe/M Rufus/M +Rugby Ruggiero/M Ruhr/M Ruiz/M Rukeyser/M +Rumanian/SM Rumpelstiltskin/M Rumsfeld/M Runnymede/M @@ -13570,6 +13646,7 @@ Samuelson/M San'a San/M Sana/M +Sanaa/M Sanchez/M Sancho/M Sand/ZMR @@ -13714,6 +13791,7 @@ Schopenhauer/M Schrieffer/M Schrodinger/M Schroeder/M +Schrdinger/M Schubert/M Schultz/M Schulz/M @@ -14066,6 +14144,7 @@ Shylockian/M Si/M Siam/M Siamese/M +Sian/M Siana/M Sianna/M Sib/M @@ -14168,6 +14247,7 @@ Sisely/M Sisile/M Sissie/M Sissy/M +Sister/MS Sistine/M Sisyphean/M Sisyphus/M @@ -14295,7 +14375,8 @@ Sousa/M South/M Southampton/M Southeast/MS -Southerner/SM +Southern/ZR +Southerner/M Southey/M Souths Southwest/MS @@ -14397,8 +14478,10 @@ Starla/M Starlene/M Starlin/M Starr/M +Statehouse/MS Staten/M States +Stateside Staubach/M Stavro/MS Ste @@ -14524,6 +14607,8 @@ Sukarno/M Sukey/M Suki/M Sukkot +Sukkoth/M +Sukkoths Sula/M Sulawesi/M Suleiman/M @@ -14559,6 +14644,7 @@ Superglue/M Superior/M Superman/M Supt +Surabaja Surabaya/M Surat/M Suriname/M @@ -14644,6 +14730,7 @@ Syriac/M Syrian/MS Szilard/M Szymborska/M +Svres/M T'ang/M T/MDG TA @@ -14789,6 +14876,7 @@ Tann/MR Tanner/M Tanney/M Tannhauser/M +Tannhuser/M Tannie/M Tanny/M Tansy/M @@ -14812,6 +14900,7 @@ Tarkington/M Tarra/M Tarrah/M Tarrance/M +Tartar/MS Tartary/M Tartuffe/M Taryn/M @@ -14909,6 +14998,7 @@ Terri/M Terrie/M Terrijo/M Terrill/M +Territory Terry/M Terrye/M Tersina/M @@ -14993,6 +15083,7 @@ Thespian/M Thespis/M Thessalonian/SM Thessaloniki/M +Thessalonki/M Thessaly/M Thia/M Thibaud/M @@ -15055,6 +15146,7 @@ Tiebold/M Tiebout/M Tiena/M Tienanmen/M +Tientsin/M Tierney/M Tiertza/M Tiff/M @@ -15606,6 +15698,7 @@ Valois/M Valparaiso/M Valry/M Valvoline/M +Valry/M Van/M Vance/M Vancouver/M @@ -15641,6 +15734,7 @@ Vazquez/M Veblen/M Veda/SM Vedanta/M +Veep Vega/SM Vegas/M Vegemite/M @@ -15652,6 +15746,8 @@ Velez/M Velma/M Velveeta/M Velvet/M +Velsquez/M +Velzquez/M Venetian/SM Venezuela/M Venezuelan/SM @@ -15774,6 +15870,7 @@ Virginian/SM Virginie/M Virgo/SM Visa/M +Visakhapatnam/M Visayans/M Vishnu/M Visigoth/M @@ -16472,6 +16569,7 @@ Zenia/M Zeno/M Zephaniah/M Zephyrus/M +Zeppelin/M Zerk/M Zest/M Zeus/M @@ -16539,6 +16637,7 @@ Zworykin/M Zyrtec/M Zyuganov/M Zzz +Zrich/M a/S aah aardvark/SM @@ -16566,6 +16665,7 @@ abbr abbrev/S abbreviate/DSGNX abbreviation/M +abb/SM abdicate/GNDSX abdication/M abdomen/SM @@ -16580,6 +16680,7 @@ aberration/MS aberrational abet/S abetted +abetter/SM abetting abettor/SM abeyance/M @@ -16777,6 +16878,8 @@ accounted/U accounting/M accouter/SGD accouterments/M +accoutre/DSG +accoutrements accredit/SGD accreditation/M accredited/U @@ -16926,6 +17029,7 @@ addend/MS addenda addendum/M adder/M +addible addict/GVMDS addiction/SM addition/SM @@ -16956,6 +17060,7 @@ adiabatic adieu/MS adios adipose +adis adj adjacency/M adjacent/Y @@ -17086,14 +17191,17 @@ advise/LDRSZGB advised/UY advisement/M adviser/M +advisor/SM advisory/SM advocacy/M advocate/MGDS advocator/MS advt adware/SM -adze/SM +adz/MS +adze/M aegis/M +aeon/SM aerate/DSGN aeration/M aerator/SM @@ -17110,6 +17218,7 @@ aerodynamic/S aerodynamically aerodynamics/M aerogram/S +aerogramme/S aeronautic/S aeronautical aeronautics/M @@ -17198,6 +17307,7 @@ agar/M agate/MS agave/M age/DSMGJ +ageing/SM ageism/M ageist/SM ageless/YP @@ -17299,14 +17409,14 @@ airfield/SM airflow/M airfoil/SM airfreight/M -airguns +airgun/S airhead/SM airily airiness/M airing/M airless/P airlessness/M -airletters +airletter/S airlift/SGMD airline/RSMZ airliner/M @@ -17406,7 +17516,7 @@ alimony/M aliveness/M aliyah/M aliyahs -alkali/M +alkali/MS alkalies alkaline alkalinity/M @@ -17560,6 +17670,7 @@ ambergris/M ambiance/MS ambidexterity/M ambidextrous/Y +ambience/MS ambient ambiguity/SM ambiguous/UY @@ -17584,6 +17695,10 @@ ambulation/M ambulatory/SM ambuscade/MGDS ambush/GMDS +ameba/MS +amebae +amebic +ameboid ameliorate/GNVDS amelioration/M amen/B @@ -17605,8 +17720,10 @@ amicably amid amide/MS amidships +amidst amigo/MS amino +amir/SM amiss amity/M ammeter/SM @@ -17655,11 +17772,13 @@ amplification/M amplifier/M amplify/NDRSXZG amplitude/SM +ampoule/MS ampule/MS amputate/GNDSX amputation/M amputee/MS amt +amuck amulet/MS amuse/LGDS amusement/MS @@ -17691,6 +17810,7 @@ analysis/AM analyst/SM analytic analytical/Y +analyticalally analyzable analyze/ADSG analyzer/SM @@ -17907,6 +18027,7 @@ antibiotic/MS antibody/SM antic/MS anticancer +antichrist/SM anticipate/GNXDS anticipated/U anticipation/M @@ -18115,6 +18236,8 @@ applicator/SM applier/MS applique/DSM appliqueing +appliqu/SMG +appliqud apply/ANXGDS appoint/AELSVGD appointee/SM @@ -18232,7 +18355,9 @@ archdiocese/MS archduchess/MS archduke/MS archenemy/SM -archeologically +archeological/Y +archeologist/SM +archeology/M archer/M archery/M archetypal @@ -18240,6 +18365,7 @@ archetype/MS archfiend/MS archiepiscopal archipelago/MS +archipelagoes architect/SM architectonic/S architectonics/M @@ -18624,6 +18750,7 @@ attache/BM attached/U attachment/AM attachments +attach/MS attack/ZGMDRS attacker/M attain/AGDS @@ -18710,6 +18837,7 @@ auntie/SM aura/MS aural/Y aurei +aureola/M aureole/SM aureus auricle/SM @@ -18860,6 +18988,7 @@ awn/GJSM awning/M awoke awoken +awol awry ax/MDSG axe/M @@ -18992,7 +19121,8 @@ bacterium/M bad/MYP badder baddest -baddie/MS +baddie/M +baddy/SM bade badge/MZGRS badger/GMD @@ -19102,6 +19232,7 @@ banana/SM band's band/ESGD bandage/DSMG +bandana/SM bandanna/MS bandbox/MS bandeau/M @@ -19111,6 +19242,7 @@ banditry/M bandleader/S bandmaster/SM bandoleer/SM +bandolier/SM bandsman/M bandsmen bandstand/SM @@ -19158,6 +19290,7 @@ baptism/MS baptismal baptist/S baptistery/SM +baptistry/SM baptize/ZGDRS baptized/U baptizer/M @@ -19239,6 +19372,8 @@ barrage/MGDS barre/MGJDS barred/UEC barrel/GSMD +barrelled +barrelling barren/TPSMR barrenness/M barrette/SM @@ -19318,7 +19453,9 @@ bathroom/SM baths bathtub/MS bathwater -bathyscaphe/SM +bathyscaph/MS +bathyscaphe/M +bathyscaphs bathysphere/MS batik/MS batiste/M @@ -19335,7 +19472,8 @@ batterer/M battery/SM batting/M battle/LDRSMZG -battleaxe/MS +battleax/MS +battleaxe/M battledore/SM battledress battlefield/MS @@ -19418,6 +19556,7 @@ beautifier/M beautiful/Y beautify/NDRSZG beauty/SM +beaux beaver/SGMD bebop/MS becalm/GSD @@ -19735,6 +19874,8 @@ bi/SMRZ biannual/Y bias/GMDS biased/U +biassed +biassing biathlon/SM bib/SM bible/MS @@ -19843,7 +19984,8 @@ binder/MS bindery/SM binding/MS bindweed/M -binge/MDS +binge/MGDS +bingeing bingo/M binman binmen @@ -20009,6 +20151,7 @@ blagging blah/M blahs/M blame/BMGDRS +blameable blameless/YP blamelessness/M blameworthiness/M @@ -20033,6 +20176,7 @@ blasphemy/SM blast/ZGMDRS blaster/M blastoff/MS +blas blat/S blatancy/SM blatant/Y @@ -20174,6 +20318,7 @@ blowlamp/S blown blowout/SM blowpipe/SM +blowsy/RT blowtorch/MS blowup/MS blowy/TR @@ -20190,8 +20335,10 @@ bluebottle/SM bluefish/MS bluegill/MS bluegrass/M +blueing/M blueish bluejacket/SM +bluejay/SM bluejeans/M blueness/M bluenose/MS @@ -20262,6 +20409,8 @@ bobsleigh/M bobsleighs bobtail/SM bobwhite/MS +bocce/M +bocci/M boccie/M bock/M bod/SMDG @@ -20318,7 +20467,9 @@ bollix/GMDS bollocking/S bollocks bologna/M +bolshevik/SM bolshie +bolshy bolster/GMDS bolt's bolt/USGD @@ -20369,6 +20520,7 @@ bonus/MS bony/PTR boo/SMDHG boob/SGMD +booboo/MS booby/SM boodle/MS booger/S @@ -20422,6 +20574,7 @@ bootblack/SM bootee/MS booth/M booths +bootie/M bootlace/S bootleg/MS bootlegged @@ -20456,6 +20609,7 @@ boroughs borrow/SDRZGJ borrower/M borrowing/M +borsch/M borscht/M borstal/S borzoi/SM @@ -20468,6 +20622,7 @@ bossily bossiness/M bossism/M bossy/RTP +bosun/SM bot/S botanic botanical/Y @@ -20522,6 +20677,7 @@ boustrophedon bout/MS boutique/SM boutonniere/MS +boutonnire/MS bouzouki/MS bovine/SM bovver @@ -20655,6 +20811,7 @@ breakage/MS breakaway/MS breakdown/MS breaker/M +breakeven/M breakfast/MDGS breakfront/MS breakneck @@ -20703,6 +20860,7 @@ brew/MDRZGS brewer/M brewery/SM brewpub/SM +briar/SM bribe/DRSMZG briber/M bribery/M @@ -20764,6 +20922,7 @@ brink/SM brinkmanship/M briny/RTP brioche/SM +briquet/SM briquette/MS brisk/SDRYTGP brisket/SM @@ -20998,6 +21157,7 @@ bun/SM bunch/MDSG bunchy/RT bunco/SMDG +buncombe/M bundle/DSMG bung/MDGS bungalow/MS @@ -21010,6 +21170,7 @@ bunk's bunk/CDGS bunker/SM bunkhouse/SM +bunko/SMDG bunkum/M bunny/SM bunt/MDGSJ @@ -21057,6 +21218,7 @@ burner/M burnish/ZGMDRS burnisher/M burnoose/MS +burnous/MS burnout/MS burnt burp/MDGS @@ -21172,12 +21334,13 @@ cDNA ca cab/SMRZ cabal/MS -cabala's +cabala/M caballero/MS cabana/SM cabaret/SM cabbage/MS cabbed +cabbie/M cabbing cabby/SM cabdriver/SM @@ -21221,6 +21384,7 @@ cadmium/M cadre/MS caducei caduceus/M +caesarean/MS caesura/SM cafe/SM cafeteria/MS @@ -21229,6 +21393,7 @@ caff/CS caffeinated caffeine/M caftan/MS +caf/SM cage/DSMG cagey cagier @@ -21271,6 +21436,7 @@ calculator/SM calculi calculus/M caldera/SM +caldron/SM calendar/MDGS calender's calf/M @@ -21279,7 +21445,7 @@ caliber/SM calibrate/GNDSX calibration/M calibrator/SM -calico/M +calico/MS calicoes californium/M caliper/SGMD @@ -21330,7 +21496,7 @@ cambric/M camcorder/SM came camel/MS -camelhair +camelhair/M camellia/MS cameo/MS camera/MS @@ -21341,6 +21507,7 @@ camerawomen camerawork camiknickers camisole/SM +camomile/SM camouflage/MZGDRS camouflager/M camp's @@ -21365,6 +21532,7 @@ canal/MS canalization/M canalize/GDS canape/MS +canap/MS canard/MS canary/SM canasta/M @@ -21518,8 +21686,9 @@ caramelize/DSG carapace/SM carat/MS caravan/SM +caravansarai/S caravansary/SM -caravanserai +caravanserai/M caravel/SM caraway/SM carbide/SM @@ -21604,6 +21773,8 @@ carnal/Y carnality/M carnation/IMS carnelian/MS +carney/MS +carnie/M carnitas carnival/MS carnivora @@ -21732,6 +21903,8 @@ catalepsy/M cataleptic/MS catalog/ZGSMDR cataloger/M +catalogue/DSMG +catalogued/U catalpa/SM catalyses catalysis/M @@ -21790,6 +21963,7 @@ catnapped catnapping catnip/M catsuit/S +catsup/MS cattail/SM catted cattery/S @@ -22066,6 +22240,7 @@ chapeau/SM chapel/MS chaperon/MDGS chaperonage/M +chaperone/SM chaperoned/U chaplain/MS chaplaincy/SM @@ -22294,6 +22469,7 @@ chilliness/M chilling/Y chillness/M chilly/TPR +chimaera/MS chime/MZGDRS chimer/M chimera/MS @@ -22336,18 +22512,23 @@ chirpy/PTR chirrup/GMDS chisel/ZGMDRS chiseler/M +chiselled +chiseller/MS +chiselling chit/SM chitchat/SM chitchatted chitchatting chitin/M chitinous +chitlins/M chitosan chitterlings/M chivalrous/PY chivalrousness/M chivalry/M chive/MS +chivvy/GDS chivy/GDS chlamydia/MS chlamydiae @@ -22367,6 +22548,7 @@ chock/GMDS chockablock chocoholic/SM chocolate/MS +chocolatey chocolaty choice/MTRS choir/MS @@ -22481,6 +22663,9 @@ chute/MS chutney/MS chutzpah/M chyme/M +chteau/M +chteaux +chtelaine/SM ciabatta/SM ciao/S cicada/MS @@ -22566,6 +22751,7 @@ citizenship/M citric citron/MS citronella/M +citrous citrus/MS city/SM citywide @@ -22630,6 +22816,7 @@ clarification/M clarify/XDSNG clarinet/SM clarinetist/SM +clarinettist/MS clarion/MDGS clarity/M clash/GMDS @@ -22711,10 +22898,13 @@ cleverness/M clevis/MS clew/SGMD cliche/MDS +clich/MS +clichd click/BZGMDRS clicker/M client/MS clientele/MS +clientle/MS cliff/MS cliffhanger/SM cliffhanging @@ -22778,6 +22968,7 @@ clog/US clogged/U clogging/U cloisonne/M +cloisonn/M cloister/SMDG cloistral clomp/SDG @@ -23022,7 +23213,7 @@ cohesive/YP cohesiveness/M coho/MS cohort/SM -coif/MS +coif/MDGS coiffed coiffing coiffure/DSMG @@ -23076,6 +23267,7 @@ collator/MS colleague/MS collect's collect/ASGVD +collectable/MS collected/U collectedly collectible/SM @@ -23426,6 +23618,7 @@ computerate computerization/M computerize/GDS computing/M +compre/DSG comrade/SMY comradeship/M con/GSM @@ -23541,7 +23734,7 @@ conductor/MS conductress/MS conduit/SM cone/M -coneys +coney/SM confab/SM confabbed confabbing @@ -23602,6 +23795,7 @@ conformity/M confrere/MS confrontation/SM confrontational +confrre/SM confuse/RZ confused/Y confusing/Y @@ -23733,6 +23927,7 @@ consolidation/M consolidator/MS consoling/Y consomme/M +consomm/M consonance/SM consonant/SMY consortia @@ -23922,6 +24117,7 @@ convene/ADSG convener/MS convenience/IMS convenient/IY +convenor/MS convent/SM conventicle/MS convention/SM @@ -23942,6 +24138,7 @@ converted/U converter/SM convertibility/M convertible/SM +convertor/SM convex/Y convexity/M convey/SBDG @@ -23961,7 +24158,7 @@ convoy/SMDG convulse/GNVXDS convulsion/M convulsive/Y -cony/M +cony/SM coo/GSMD cook's cook/ADGS @@ -23970,10 +24167,11 @@ cooked/U cooker/SM cookery/SM cookhouse/S -cookie/SM +cookie/M cooking/M cookout/SM cookware/SM +cooky/SM cool/MDRYZTGPS coolant/SM cooler/M @@ -24153,6 +24351,7 @@ cortex/M cortical cortices cortisone/M +cortge/SM corundum/M coruscate/GNDS coruscation/M @@ -24222,6 +24421,7 @@ couldn't coulee/SM coulis coulomb/MS +coule/SM council/MS councilman/M councilmen @@ -24336,6 +24536,7 @@ coverings coverlet/MS covert/SPMY covertness/M +coverup/MS covet/SDG covetous/YP covetousness/M @@ -24661,6 +24862,8 @@ crowfeet crowfoot/SM crown/SMDG crowned/U +crozier/MS +croton/MS crucial/Y crucible/SM crucifix/MS @@ -24673,6 +24876,7 @@ crude/RMYTP crudeness/M crudites/M crudity/SM +crudits/M cruel/RYPT cruelness/M cruelty/SM @@ -24729,6 +24933,7 @@ crystallization/M crystallize/ADSG crystallographic crystallography +crche/MS ct ctn ctr @@ -24758,6 +24963,7 @@ cuisine/SM cul-de-sac culinary cull/MDGS +cullender/MS culminate/XDSGN culmination/M culotte/SM @@ -24815,6 +25021,7 @@ curate/DSMGV curative/MS curator/KMS curatorial +curaao curb/MDGS curbing/M curbside @@ -24922,6 +25129,7 @@ cyanide/M cyber cyberbully/S cybercafe/S +cybercaf/S cybernetic/S cybernetics/M cyberpunk/SM @@ -24936,6 +25144,7 @@ cyclist/MS cyclometer/MS cyclone/MS cyclonic +cyclopaedia/MS cyclopedia/MS cyclopes cyclops/M @@ -24949,6 +25158,7 @@ cynic/SM cynical/Y cynicism/M cynosure/MS +cypher/M cypress/MS cyst/MS cystic @@ -24982,7 +25192,7 @@ dad/SM dadaism/M dadaist/MS daddy/SM -dado/M +dado/SM dadoes daemon/MS daemonic @@ -25160,6 +25370,7 @@ deanery/SM deanship/M dear/SPTMRYH dearest/S +dearie/M dearness/M dearth/M dearths @@ -25536,6 +25747,7 @@ dent/ISGMD dental/Y dentifrice/SM dentin/M +dentine/M dentist/MS dentistry/M dentition/M @@ -25628,6 +25840,7 @@ derogatory derrick/SM derriere/SM derringer/SM +derrire/SM derv dervish/MS desalinate/GNDS @@ -25655,6 +25868,7 @@ desertification desertion/SM deserved/UY deserving/U +deshabille/M desiccant/SM desiccate/DSGN desiccation/M @@ -25844,6 +26058,7 @@ dialysis/M dialyzes diam diamante +diamant diameter/SM diametric diametrical/Y @@ -25880,6 +26095,7 @@ dick/MRXZS dicker/DG dickey/SM dickhead/S +dicky/SM dickybird/S dicotyledon/MS dicotyledonous @@ -25903,10 +26119,11 @@ diddlysquat diddums didgeridoo/S didn't -dido/M +dido/MS didoes didst die/DSM +diehard/SM dielectric/MS diereses dieresis/M @@ -25916,6 +26133,7 @@ dietary/SM dieter/M dietetic/S dietetics/M +dietician/MS dietitian/MS diff/DRZGS differ/DG @@ -25992,6 +26210,7 @@ dimensionless diminish/GDS diminished/U diminuendo/SM +diminuendoes diminution/SM diminutive/SM dimity/M @@ -26011,6 +26230,7 @@ diner/M dinette/MS ding/MDG dingbat/MS +dingdong/SGMD dinghy/SM dingily dinginess/M @@ -26325,8 +26545,10 @@ ditherer/M ditransitive ditsy ditto/SMDG +dittoes ditty/SM ditz/MS +ditzy/R diuretic/MS diurnal/Y div @@ -26369,6 +26591,7 @@ divisor/SM divorce/DSLMG divorcee/MS divorcement/MS +divorce/MS divot/SM divulge/GDS divvy/DSMG @@ -26377,6 +26600,7 @@ dizzily dizziness/M dizzy/DRSPTG djellaba/MS +djellabahs djinn do/SJMRHZG doable @@ -26425,14 +26649,16 @@ dog/SM dogcart/SM dogcatcher/SM doge/MS -dogeared +dogear/SMDG dogfight/SM dogfish/MS dogged/PY doggedness/M doggerel/M +doggie/M dogging -doggone/TGRS +doggone/TGDRS +doggoned/TR doggy/RSMT doghouse/SM dogie/SM @@ -26450,6 +26676,7 @@ dogtrot/MS dogtrotted dogtrotting dogwood/MS +doh/M doily/SM doing/USM doldrums/M @@ -26547,6 +26774,7 @@ dopiest dopiness/M doping/M doppelganger/S +doppelgnger/S dork/MS dorky/RT dorm/MRZS @@ -26762,6 +26990,7 @@ driftwood/M drill/SMDRZG driller/M drillmaster/SM +drily drink/SMRBJZG drinkable/U drinker/M @@ -26875,7 +27104,8 @@ ductless dud/GSMD dude/MS dudgeon/M -due/SM +due's +due/IS duel/MDRJZGS dueler/M duelist/SM @@ -27008,6 +27238,13 @@ dyspeptic/MS dysprosium/M dystonia dz +dbutante/SM +dcolletage/SM +dcollet +dmod +drailleur/MS +dshabill/M +dtente/M e'en e'er e/FDST @@ -27149,6 +27386,7 @@ edelweiss/M edema/SM edge/MZGJDRS edger/M +edgeways edgewise edgily edginess/M @@ -27524,6 +27762,7 @@ emotionalism/M emotionalize/GDS emotionless emotive/Y +empanel/GDS empathetic empathize/DSG empathy/M @@ -27814,6 +28053,7 @@ entrust/SGD entry/ASM entryphone/S entryway/MS +entre/MS entwine/DSG enumerable enumerate/DSGNX @@ -27821,6 +28061,7 @@ enumeration/M enumerator/SM enunciate/DSGN enunciation/M +enure/DSG enuresis/M envelop/SLDRZG envelope/SM @@ -28026,7 +28267,7 @@ escudo/SM escutcheon/SM esophageal esophagi -esophagus/M +esophagus/MS esoteric esoterically esp @@ -28053,6 +28294,7 @@ establishments estate/SM esteem/ESMDG ester/SM +esthetic/S estimable/I estimate/MGNDSX estimation/M @@ -28510,6 +28752,7 @@ extemporization/M extemporize/GDS extend/SZGDRB extender/M +extendible extensible extension/SM extensional @@ -28592,7 +28835,7 @@ exurb/SM exurban exurbanite/SM exurbia/M -eye/DSM +eye/DSMG eyeball/GMDS eyebrow/SM eyedropper/SM @@ -28629,6 +28872,7 @@ face/ACSDG facecloth/M facecloths faceless +facelift/SM facet/SMDG facetious/YP facetiousness/M @@ -28773,6 +29017,7 @@ farce/SM farcical/Y fare/MGDS farewell/SM +farfetched farina/M farinaceous farm/MDRZGSJ @@ -28876,6 +29121,7 @@ fax/GMDS fay/TSMR faze/GDS fazed/U +faence/M fealty/M fear/MDGS fearful/YP @@ -29041,7 +29287,9 @@ ff fiance/CM fiancee/MS fiances -fiasco/M +fianc/SM +fiance/MS +fiasco/SM fiascoes fiat/MS fib/ZSMR @@ -29344,6 +29592,7 @@ flambeing flamboyance/M flamboyancy/M flamboyant/Y +flamb/MD flame/DRSJMZG flamenco/MS flameproof/DGS @@ -29375,6 +29624,7 @@ flashily flashiness/M flashing/M flashlight/MS +flashpoint/SM flashy/RTP flask/SM flat/MYPS @@ -29505,6 +29755,7 @@ floor/SMDG floorboard/MS flooring/M floorwalker/SM +floozie/M floozy/SM flop/MS flophouse/MS @@ -29613,6 +29864,7 @@ flytrap/S flyway/SM flyweight/SM flywheel/MS +fo'c'sle/MS foal/MDGS foam/MDGS foaminess/M @@ -29676,6 +29928,7 @@ fondness/M fondue/SM font/MS fontanel/MS +fontanelle/MS foo foobar food/MS @@ -29764,6 +30017,7 @@ forefeet forefinger/SM forefoot/M forefront/SM +foregather/GDS forego/G foregoes foregone @@ -29881,6 +30135,7 @@ formidably formless/PY formlessness/M formula/MS +formulae formulaic formulate/ADSGNX formulated/U @@ -30000,6 +30255,7 @@ franchise's franchise/EDSG franchisee/SM franchiser/SM +franchisor/SM francium/M francophone frangibility/M @@ -30011,6 +30267,7 @@ frankness/M frantic frantically frappe/SM +frapp/M frat/MS fraternal/Y fraternity/FSM @@ -30031,11 +30288,13 @@ frazzle/MGDS freak/SMDG freakish/YP freakishness/M +freakout/MS freaky/RT freckle/DSMG freckly free/YTDRS freebase/MGDS +freebee/SM freebie/SM freebooter/SM freeborn @@ -30195,6 +30454,7 @@ froufrou/M froward/P frowardness/M frown/SMDG +frowsy/TR frowzily frowziness/M frowzy/TPR @@ -30339,6 +30599,7 @@ fusee/SM fuselage/SM fusibility/M fusible +fusileer/SM fusilier/SM fusillade/MS fusion/IFKSM @@ -30370,6 +30631,7 @@ fuzziness/M fuzzy/PTR fwd fwy +fte/SM g/SNXB gab/SM gabardine/SM @@ -30454,6 +30716,7 @@ gamesmanship/M gamester/MS gamete/SM gametic +gamey gamify/DSNG gamin/SM gamine/SM @@ -30512,14 +30775,17 @@ garnish/GLMDS garnishee/DSM garnisheeing garnishment/SM +garotte/MGDS garret/SM garrison/MDSG garrote/MZGDRS garroter/M +garrotte/MGDS garrulity/M garrulous/PY garrulousness/M garter/SM +garon/SM gas's gas/CS gasbag/SM @@ -30622,6 +30888,7 @@ gelignite/M gelled gelling gem/SM +gemmology/M gemological gemologist/MS gemology/M @@ -30836,7 +31103,7 @@ gingersnap/SM gingery gingham/M gingivitis/M -ginkgo/M +ginkgo/SM ginkgoes ginned ginning @@ -30849,9 +31116,10 @@ girdle/DSMG girl/MS girlfriend/MS girlhood/SM +girlie girlish/YP girlishness/M -girly +girly/S giro/S girt/MDGS girth/M @@ -30873,6 +31141,7 @@ glacial/Y glaciate/XGNDS glaciation/M glacier/MS +glac/SDG glad/MYSP gladden/GDS gladder @@ -30886,6 +31155,7 @@ gladiolus/M gladness/M gladsome glam +glamor/SGMD glamorization/M glamorize/DSG glamorous/Y @@ -31002,7 +31272,7 @@ glutton/MS gluttonous/Y gluttony/M glycerin/M -glycerine +glycerine/M glycerol/M glycogen/M glyph @@ -31049,6 +31319,7 @@ god/SM godawful godchild/M godchildren +goddam/D goddammit goddamn/D goddaughter/MS @@ -31104,8 +31375,11 @@ gonzo goo/M goober/SM good/MYSP +goodby/M goodbye/MS +goodbys goodhearted +goodie/M goodish goodly/TR goodness/M @@ -31128,6 +31402,7 @@ goop/M goose/DSMG gooseberry/SM goosebumps/M +gooseflesh/M goosestep/S goosestepped goosestepping @@ -31228,6 +31503,7 @@ grampus/MS gran/S granary/SM grand/SMRYPT +grandad/MS grandam/MS grandaunt/MS grandchild/M @@ -31256,6 +31532,7 @@ granduncle/SM grange/SM granite/M granitic +grannie/M granny/SM granola/M grant/SMDRZG @@ -31526,6 +31803,7 @@ guacamole/M guanine/M guano/M guarani/MS +guaranies guarantee/MDS guaranteeing guarantor/MS @@ -31542,6 +31820,7 @@ guardsman/M guardsmen guava/SM gubernatorial +guerilla/SM guerrilla/SM guess/ZGBMDRS guesser/M @@ -31704,6 +31983,7 @@ habitualness/M habituate/GNDS habituation/M habitue/SM +habitu/SM hacienda/SM hack/MDRZGS hacker/M @@ -31729,6 +32009,7 @@ haggle/MZGDRS haggler/M hagiographer/SM hagiography/SM +hah hahnium/M haiku/M hail/MDGS @@ -31745,6 +32026,7 @@ haircut/SM hairdo/MS hairdresser/SM hairdressing/M +hairdrier/MS hairdryer/MS hairgrip/S hairiness/M @@ -31789,7 +32071,7 @@ hall/MS hallelujah/M hallelujahs hallmark/GMDS -halloo/MSG +halloo/MDSG hallow/DSG hallowed/U hallucinate/GNXDS @@ -31890,7 +32172,8 @@ hangup/MS hank/MRZS hanker/GJD hankering/M -hankie/MS +hankie/M +hanky/SM hansom/MS hap/MY haphazard/YP @@ -32515,13 +32798,13 @@ hipness/M hipped hipper hippest -hippie/SM +hippie/M hipping hippo/SM hippodrome/SM hippopotami hippopotamus/MS -hippy +hippy/SM hipster/MS hire's hire/AGDS @@ -32556,6 +32839,7 @@ hitter/SM hitting hive/MGDS hiya +hm hmm ho/SMDRYZ hoagie/MS @@ -32582,6 +32866,7 @@ hobnob/S hobnobbed hobnobbing hobo/MS +hoboes hock/MDSG hockey/M hockshop/MS @@ -32682,10 +32967,10 @@ homey/SMP homeyness/M homicidal homicide/MS -homier -homiest +homie/RSMT homiletic homily/SM +hominess/M hominid/SM hominoid/S hominy/M @@ -32722,6 +33007,7 @@ honeypot/S honeysuckle/SM honk/MDRSZG honker/M +honkie/M honky/SM honor/ESGMDB honorableness/M @@ -32752,9 +33038,10 @@ hooligan/MS hooliganism/M hoop/MDSG hoopla/M -hooray +hooray/MS hoosegow/SM hoot/MDRSZG +hootch/M hootenanny/SM hooter/M hoover/DSG @@ -32826,8 +33113,7 @@ horsewhipping horsewoman/M horsewomen horsey -horsier -horsiest +horsy/TR hortatory horticultural horticulturalist/S @@ -32862,6 +33148,9 @@ hotbed/MS hotblooded hotbox/MS hotcake/SM +hotdog/MS +hotdogged +hotdogging hotel/SM hotelier/MS hotfoot/MDGS @@ -32870,6 +33159,7 @@ hotheaded/YP hotheadedness/M hothouse/SM hotkey/S +hotline/MS hotlink/S hotness/M hotplate/SM @@ -32926,7 +33216,7 @@ housing/MS hove hovel/SM hover/SGD -hovercraft/M +hovercraft/MS how/SM howbeit howdah/M @@ -33057,6 +33347,7 @@ hurler/M hurling/M hurrah/GMD hurrahs +hurray hurricane/MS hurried/UY hurry/DSMG @@ -33081,6 +33372,7 @@ hustle/DRSMZG hustler/M hut/SM hutch/MS +huzza/GSMD huzzah/MDG huzzahs hwy @@ -33579,7 +33871,8 @@ imposition/MS impossibility/SM impossible/S impossibly -impost/SM +impost/ZSMR +imposter/M impostor/SM imposture/MS impotence/M @@ -33635,6 +33928,7 @@ improvisation/SM improvisational improvise/ZGDRS improviser/M +improvisor/SM imprudence/M imprudent/Y impudence/M @@ -33853,6 +34147,7 @@ inductance/M inductee/SM induction/MS inductive/Y +indue/DG indulge/DSG indulgence/SM indulgent/Y @@ -33959,6 +34254,7 @@ inflection/MS inflectional inflict/SDGV infliction/M +inflight inflow/SM influence/MGDS influenced/U @@ -34004,6 +34300,7 @@ ingratiation/M ingredient/MS ingress/MS inguinal +ingnue/SM inhabit/DG inhabitable/U inhabitant/SM @@ -34079,6 +34376,7 @@ innovation/M innovator/MS innovatory innuendo/SM +innuendoes innumerably innumerate inoculate/AGDS @@ -34131,7 +34429,7 @@ insidious/YP insidiousness/M insight/MS insightful -insignia/M +insignia/SM insinuate/GNVDSX insinuation/M insinuator/SM @@ -34186,6 +34484,7 @@ institution/M institutional/Y institutionalization/M institutionalize/DSG +institutor/MS instr instruct/SDGV instructed/U @@ -34334,7 +34633,6 @@ intermingle/DSG intermission/SM intermittent/Y intermix/GDS -intern/GDL internal/SY internalization/M internalize/GDS @@ -34343,8 +34641,10 @@ internationalism/M internationalist/SM internationalization internationalize/DSG +interne/GDL internecine internee/SM +interneship/S internet internist/MS internment/M @@ -34719,6 +35019,7 @@ jailbreak/SM jailer/M jailhouse/S jalapeno/MS +jalapeo/MS jalopy/SM jalousie/MS jam/SM @@ -34738,6 +35039,7 @@ japanning jape/MGDS jar/SM jardiniere/SM +jardinire/SM jarful/MS jargon/M jarred @@ -34776,7 +35078,7 @@ jejuna jejune jejunum/M jell/DSG -jello/S +jello/SM jelly/GDSM jellybean/MS jellyfish/MS @@ -34795,6 +35097,7 @@ jerkiness/M jerkwater jerky/TRMP jeroboam/S +jerrican/S jerrybuilt jerrycan/S jersey/MS @@ -34840,8 +35143,9 @@ jingoism/M jingoist/SM jingoistic jink/DSG -jinn +jinn/MS jinni/M +jinricksha/SM jinrikisha/SM jinx/MDSG jitney/SM @@ -34954,6 +35258,7 @@ judder/GDS judge's judge/ADSG judgement/SM +judgemental judgeship/M judgment/SM judgmental/Y @@ -35000,9 +35305,11 @@ junior/MS juniper/SM junk/MDRSZG junker/M -junket/MDSG +junket/MDRSZG junketeer/MS -junkie/MTRS +junketer/M +junkie/M +junky/TRSM junkyard/MS junta/SM juridic @@ -35012,7 +35319,7 @@ jurisdictional jurisprudence/M jurist/MS juristic -juror/SM +juror/FSM jury/ISM juryman/M jurymen @@ -35037,7 +35344,9 @@ k/IFGS kHz kW kWh +kabbala kabbalah +kabob/SM kaboom kabuki/M kaddish/MS @@ -35070,6 +35379,7 @@ kazoo/SM kbps kc kebab/SM +kebob/SM kedgeree keel/MDSG keelhaul/DGS @@ -35174,6 +35484,7 @@ kind/UPRYT kinda kindergarten/MS kindergartner/SM +kindergrtner/SM kindhearted/PY kindheartedness/M kindle/AGDS @@ -35221,6 +35532,7 @@ kisser/M kissoff/SM kissogram/S kit/SGMD +kitbag/MS kitchen/SM kitchenette/MS kitchenware/M @@ -35249,6 +35561,7 @@ km kn knack/SZMR knacker/GD +knackwurst/MS knapsack/MS knave/SM knavery/M @@ -35316,6 +35629,7 @@ kookaburra/SM kookiness/M kooky/TPR kopeck/MS +kopek/SM korma kosher/DSG kowtow/GMDS @@ -35328,6 +35642,8 @@ krone/RM kronor kronur krypton/M +krna/M +krnur kt kuchen/SM kudos/M @@ -35372,6 +35688,7 @@ lackluster laconic laconically lacquer/GMDS +lacrimal lacrosse/M lactate/GNDS lactation/M @@ -35412,12 +35729,16 @@ laity/M lake/MS lakefront/S lakeside +lallygag/S +lallygagged +lallygagging lam/SM lama/MS lamasery/SM lamb/MDSG lambada/MS -lambaste/GDS +lambast/GDS +lambaste/S lambda/SM lambency/M lambent/Y @@ -35528,6 +35849,7 @@ larynges laryngitis/M larynx/M lasagna/MS +lasagne/MS lascivious/YP lasciviousness/M lase/ZGDRS @@ -35744,6 +36066,7 @@ legendarily legendary legerdemain/M legged +leggin/SM legginess/M legging/MS leggy/RPT @@ -35977,6 +36300,9 @@ likability/M likable/P likableness/M like/EMGDST +likeability/M +likeable/P +likeableness/M likelihood/UM likelihoods likeliness/UM @@ -36055,7 +36381,7 @@ lingo/M lingoes lingual linguine/M -linguini +linguini/SM linguist/SM linguistic/S linguistical/Y @@ -36155,6 +36481,7 @@ litterer/M little/MTRP littleness/M littoral/SM +littrateur/SM liturgical/Y liturgist/SM liturgy/SM @@ -36295,6 +36622,7 @@ lolly/S lollygag/S lollygagged lollygagging +lollypop/MS lone/YZR loneliness/M lonely/PTR @@ -36405,6 +36733,7 @@ lovelorn lovely/RSMTP lovemaking/M lover/M +loveseat/SM lovesick lovey/S loving/Y @@ -36547,6 +36876,7 @@ lxix lxvi lxvii lyceum/MS +lychee/MS lychgate/S lye/MG lying/M @@ -36592,10 +36922,12 @@ machinery/M machinist/MS machismo/M macho/M +mack/MS mackerel/SM mackinaw/SM mackintosh/MS macrame/M +macram/M macro/SM macrobiotic/S macrobiotics/M @@ -36677,11 +37009,14 @@ magnolia/MS magnum/MS magpie/MS magus/M +maharaja/SM maharajah/M maharajahs +maharanee/MS maharani/SM maharishi/SM mahatma/SM +mahjong/M mahogany/SM mahout/MS maid/MNSX @@ -36887,6 +37222,7 @@ manor/SM manorial manpower/M manque +manqu mans mansard/MS manse/SXMN @@ -36916,6 +37252,7 @@ manumitting manure/MGDS manuscript/MS many/M +mange/M map's map/AS maple/SM @@ -37110,6 +37447,7 @@ maths matinee/SM mating/M matins/M +matine/SM matriarch/M matriarchal matriarchs @@ -37136,6 +37474,7 @@ matzo/SMH matzoh/M matzohs matzot +matriel/M maudlin maul/MDRSZG mauler/M @@ -37174,6 +37513,7 @@ maypole/SM mayst maze/MS mazurka/MS +maana/M mdse me/DSH mead/M @@ -37638,7 +37978,9 @@ midweek/MS midwife/MGDS midwifery/SM midwinter/M +midwived midwives +midwiving midyear/MS mien/M miff/DSG @@ -37958,6 +38300,7 @@ missilery/M mission/AMS missionary/SM missioner/SM +missis/MS missive/MS misspeak/GS misspell/GDJS @@ -38119,8 +38462,10 @@ molester/M moll/MS mollification/M mollify/DSNG -molluscan +mollusc/SM +molluscan/SM mollusk/SM +molluskan/S molly/SM mollycoddle/DSMG molt/MDNRSZG @@ -38157,6 +38502,8 @@ monetize/CGDS money/SMD moneybag/MS moneybox/S +moneygrubber/SM +moneygrubbing/M moneylender/SM moneymaker/SM moneymaking/M @@ -38203,6 +38550,7 @@ monolithic monoliths monologist/SM monologue/SM +monologuist/SM monomania/M monomaniac/MS monomaniacal @@ -38429,6 +38777,7 @@ mouser/M mousetrap/SM mousetrapped mousetrapping +mousey mousiness/M moussaka/S mousse/MGDS @@ -38444,6 +38793,7 @@ mouthy/PTR mouton/M movable/SM move/AMZGDRSB +moveable/SM moved/U movement/SM mover/AM @@ -38504,6 +38854,7 @@ muggy/PTR mugshot/MS mugwump/MS mujaheddin +mujahedin/M mukluk/MS mulatto/M mulattoes @@ -38692,6 +39043,7 @@ mycologist/SM mycology/M myelitis/M myna/MS +mynah/MS myocardial myocardium myopia/M @@ -38721,6 +39073,8 @@ mythologize/DSG mythology/SM myths myxomatosis +mtier/MS +mle/MS n/IKTH naan/S nab/S @@ -38747,6 +39101,7 @@ nailbrush/MS naive/RYT naivete/M naivety/M +naivet/M naked/PY nakedness/M name's @@ -39133,7 +39488,7 @@ nightdress/MS nightfall/M nightgown/SM nighthawk/SM -nightie/SM +nightie/M nightingale/SM nightlife/M nightlight/S @@ -39149,6 +39504,7 @@ nighttime/M nightwatchman nightwatchmen nightwear/M +nighty/SM nihilism/M nihilist/MS nihilistic @@ -39185,6 +39541,7 @@ nippy/TPR nirvana/M nisei/M nit/SMR +nite/MS niter/M nitpick/SZGDR nitpicker/M @@ -39198,6 +39555,7 @@ nitrocellulose/M nitrogen/M nitrogenous nitroglycerin/M +nitroglycerine/M nitwit/MS nix/GMDS no/SM @@ -39628,6 +39986,7 @@ notorious/Y notwithstanding notwork/S nougat/MS +nought/MS noun/KMS nourish/DSLG nourishment/M @@ -39687,6 +40046,7 @@ number/ASDG numbered/U numberless numbness/M +numbskull/SM numerable/I numeracy/IM numeral/SM @@ -39752,6 +40112,7 @@ nympho/S nymphomania/M nymphomaniac/SM nymphs +ne o o'clock o'er @@ -40025,7 +40386,7 @@ oily/RPT oink/MDSG ointment/SM okapi/SM -okay/MSG +okay/MDSG okra/MS old/TMNRP oldie/SM @@ -40047,11 +40408,13 @@ oligo oligonucleotide/S oligopoly/SM olive/SM +ol/M om/SMNX ombudsman/M ombudsmen omega/SM omelet/MS +omelette/MS omen/M omicron/MS ominous/YP @@ -40451,6 +40814,7 @@ outrigger/SM outright outrun/S outrunning +outr outscore/GDS outsell/GS outset/SM @@ -40696,7 +41060,7 @@ oversight/SM oversimple oversimplification/M oversimplify/DSNGX -oversize +oversize/D oversleep/GS overslept oversold @@ -40980,13 +41344,14 @@ pantheist/SM pantheistic pantheon/SM panther/MS -pantie/MS +pantie/M panto/S pantomime/MGDS pantomimic pantomimist/SM pantry/SM pantsuit/SM +panty/SM pantyhose/M pantyliner/M pantywaist/SM @@ -40996,6 +41361,7 @@ papacy/SM papal paparazzi/M paparazzo +papaw/SM papaya/MS paper/SZGMDR paperback/SM @@ -41141,6 +41507,7 @@ parliamentary parlor/MS parlous parmigiana +parmigiano parochial/Y parochialism/M parodist/SM @@ -41194,6 +41561,7 @@ partisanship/M partition/GMDS partitions/A partitive/MS +partizan/SM partly partner/MDSG partnership/MS @@ -41232,6 +41600,7 @@ passkey/MS passphrase/S passport/MS password/MS +pass past/AMS pasta/SM paste/DSMG @@ -41480,7 +41849,7 @@ peignoir/SM pejoration/M pejorative/SMY peke/MS -pekineses +pekinese/SM pekingese/SM pekoe/M pelagic @@ -41868,6 +42237,7 @@ pharmacist/MS pharmacological pharmacologist/SM pharmacology/M +pharmacopeia/SM pharmacopoeia/MS pharmacy/SM pharyngeal @@ -42110,6 +42480,7 @@ pigtail/MS pike/MZGDRS piker/M pikestaff/SM +pikestaves pilaf/SM pilaster/MS pilchard/MS @@ -42156,15 +42527,14 @@ pinfeather/SM ping/GMD pinhead/SM pinhole/SM -pinier -piniest pinion/SMDG pink/TGPMDRS pinkeye/M -pinkie/SM +pinkie/M pinkish pinkness/M pinko/MS +pinky/SM pinnacle/SM pinnate pinned/U @@ -42180,6 +42550,7 @@ pint/MS pinto/MS pinup/MS pinwheel/GSMD +piny/TR pinyin/M pinyon/SM pioneer/SGMD @@ -42207,6 +42578,7 @@ piratical/Y pirogi/M piroshki/M pirouette/DSMG +pirozhki/M piscatorial pismire/SM piss/ZGMDRS @@ -42252,11 +42624,14 @@ pivotal pix/M pixel/MS pixie/MS +pizazz/M pizza/MS pizzazz/M pizzeria/SM pizzicati pizzicato/M +piata/MS +pion/SM pj's pk pkg @@ -42423,6 +42798,7 @@ plethora/M pleura/M pleurae pleurisy/M +plexiglass/M plexus/MS pliability/M pliable @@ -42603,12 +42979,14 @@ pollination/M pollinator/SM polling/M polliwog/SM +pollock/M pollster/SM pollutant/MS pollute/ZGNDRS polluted/U polluter/M pollution/M +pollywog/MS polo/M polonaise/SM polonium/M @@ -42776,6 +43154,7 @@ portico/M porticoes portiere/MS portion/KSGMD +portire/MS portliness/M portly/RPT portmanteau/MS @@ -42832,6 +43211,7 @@ posthumous/Y posthypnotic postie/S postilion/SM +postillion/MS postindustrial posting/M postlude/SM @@ -43144,6 +43524,7 @@ prepossessing/U prepossession/SM preposterous/Y prepped +preppie/M prepping preppy/TRSM prepubescence/M @@ -43190,6 +43571,7 @@ preside/GDS presidency/SM president/MS presidential +presidia presidium/M presort/DGS press's @@ -43225,6 +43607,7 @@ pretension/M pretentious/UY pretentiousness/M preterit/SM +preterite/MS preterm preternatural/Y pretest/DGS @@ -43440,6 +43823,8 @@ prognosticate/XGNDS prognostication/M prognosticator/MS program/CAS +programed +programing programmable/MS programmatic programmed/AC @@ -43608,6 +43993,7 @@ protegee/S protein/SM protestant/S protestation/MS +protestor/MS protocol/MS proton/SM protoplasm/M @@ -43623,6 +44009,8 @@ protrusile protrusion/MS protuberance/MS protuberant +protg/MS +protge/S proud/RYT prov/NB provability/M @@ -43674,6 +44062,7 @@ pruner/M prurience/M prurient/Y pry/ZTGDRSM +prcis/MDG psalm/MS psalmist/SM psaltery/SM @@ -43924,6 +44313,7 @@ pushily pushiness/M pushover/MS pushpin/S +pushup/MS pushy/TRP pusillanimity/M pusillanimous/Y @@ -43935,6 +44325,7 @@ pustular pustule/SM put/ISM putative +putdown/SM putout/MS putrefaction/M putrefactive @@ -44178,7 +44569,7 @@ rabble/MS rabid/PY rabidness/M rabies/M -raccoon/M +raccoon/MS race/MZGDRS racecourse/SM racegoer/S @@ -44201,6 +44592,7 @@ racketeer/SMDG racketeering/M raconteur/SM racoon +racquet/SM racquetball/SM racy/PRT rad/SM @@ -44300,6 +44692,7 @@ rainy/RT raise/MZGDRS raiser/M raisin/SM +raja/MS rajah/M rajahs rake/MGDS @@ -44351,6 +44744,7 @@ rangefinder/S ranger/M ranginess/M rangy/RTP +rani/MS rank/TGJPMDRYS ranking/M rankle/DSG @@ -44510,6 +44904,7 @@ realized/U realm/MS realness/M realpolitik/M +realtor/SM realty/M ream/ZGMDRS reamer/M @@ -44570,6 +44965,7 @@ recessional/SM recessionary recessive/SM recherche +recherch recidivism/M recidivist/SM recipe/SM @@ -45394,6 +45790,7 @@ rifler/M rifling/M rift/GMDS rig/SM +rigamarole/SM rigatoni/M rigged rigger/SM @@ -45470,6 +45867,7 @@ riskiness/M risky/RPT risotto/MS risque +risqu rissole/S rite/MS ritual/SMY @@ -45681,6 +46079,7 @@ router/M routine/MYS routinize/GDS roux +rou/MS rove/ZGDRS rover/M row/SZGMDR @@ -45912,6 +46311,7 @@ saintliness/M saintly/PRT saith sake/M +saki/M salaam/SMDG salable/U salacious/PY @@ -45922,6 +46322,7 @@ salamander/SM salami/SM salary/DSM sale/ABMS +saleable/U saleroom/S salesclerk/SM salesgirl/SM @@ -46135,12 +46536,15 @@ sausage/MS saute/MS sauteed sauteing +sauternes/M +saut/MDSG savage/DRSMYTGP savageness/M savagery/SM savanna/MS savant/SM save/BJMZGDRS +saveable saved/U saver/M saving/M @@ -46190,6 +46594,7 @@ scalene scaliness/M scallion/MS scallop/GSMD +scallywag/MS scalp/MDRSZG scalpel/SM scalper/M @@ -46292,13 +46697,13 @@ schizophrenia/M schizophrenic/SM schlemiel/SM schlep/SM -schlepped -schlepping +schlepp/GMDS schlock/M +schlocky schmaltz/M schmaltzy/TR schmo/M -schmoes +schmoe/SM schmooze/DRSZG schmuck/MS schnapps/M @@ -46496,6 +46901,7 @@ scrump/SGD scrumptious/Y scrumpy scrunch/MDSG +scrunchie/M scrunchy/SM scruple/MGDS scrupulosity/M @@ -46705,6 +47111,7 @@ segue/MGDS segueing seigneur/SM seignior/SM +seigniorial seine/MZGDRS seiner/M seismic @@ -46748,6 +47155,7 @@ sellotape/DSG sellout/MS seltzer/MS selvage/MS +selvedge/MS selves semantic/S semantically @@ -47063,6 +47471,7 @@ shamefulness/M shameless/YP shamelessness/M shammed +shammies shamming shampoo/ZGMDRS shampooer/M @@ -47082,7 +47491,7 @@ shapelessness/M shapeliness/M shapely/PTR shard/MS -share/MZGDRS +share/MZGDRSB shareable sharecrop/S sharecropped @@ -47100,11 +47509,13 @@ sharp/MDNRYSPXZTG sharpen/ADGS sharpener/MS sharper/M -sharpie/MS +sharpie/M sharpish sharpness/M sharpshooter/SM sharpshooting/M +sharpy/SM +shat shatter/GMDS shatterproof shave/MZGDRSJ @@ -47142,8 +47553,10 @@ sheerness/M sheet/MSG sheeting/M sheetlike +sheik/MS sheikdom/MS sheikh/M +sheikhdom/MS sheikhs sheila/S shekel/SM @@ -47162,6 +47575,7 @@ shenanigan/SM shepherd/SMDG shepherdess/MS sherbet/SM +sherd/MS sheriff/SM sherry/SM shew/GDS @@ -47301,6 +47715,7 @@ shortening/M shortfall/MS shorthand/MD shorthorn/MS +shortie/M shortish shortlist/DGS shortness/M @@ -47527,6 +47942,7 @@ silly/TRSMP silo/MS silt/GMDS silty/TR +silvan silver/GMDS silverfish/MS silversmith/M @@ -47613,6 +48029,7 @@ sipper/SM sipping sir/SXMN sire/CMGDS +siree/M siren/M sirloin/SM sirocco/SM @@ -47651,6 +48068,7 @@ sixtieths sixty/SMH size's size/ABDRS +sizeable sizing/M sizzle/DRSMZG ska/M @@ -47705,6 +48123,7 @@ skimpiness/M skimpy/RTP skin/MS skincare/M +skinflick/MS skinflint/MS skinful skinhead/MS @@ -47735,6 +48154,7 @@ skulk/SDRZG skulker/M skull/SM skullcap/MS +skullduggery/M skunk/SMDG sky/GSM skycap/SM @@ -47948,6 +48368,7 @@ sluice/DSMG slum/MS slumber/GSMD slumberous +slumbrous slumdog/SM slumlord/MS slummed @@ -47969,6 +48390,8 @@ slut/MS sluttish slutty/RT sly/TRY +slyer +slyest slyness/M smack/SMDRZG smacker/M @@ -48029,13 +48452,14 @@ smolder/SGMD smooch/MDSG smoochy smooth/PDRYTG -smoothie/MS +smoothie/M smoothness/M smooths +smoothy/SM smorgasbord/SM smote smother/GSMD -smoulder/G +smoulder/GMDS smudge/DSMG smudgy/TR smug/YP @@ -48049,6 +48473,7 @@ smurf/S smut/MS smuttiness/M smutty/TRP +smrgsbord/MS snack/SMDG snaffle/DSMG snafu/SM @@ -48103,6 +48528,7 @@ sniffer/M sniffle/DSMG sniffy/RT snifter/SM +snigger/SMDG snip/MDRZGS snipe/SM sniper/M @@ -48246,6 +48672,7 @@ softcover soften/DRZG softener/M softhearted +softie/M softness/M software/M softwood/SM @@ -48255,9 +48682,12 @@ sogginess/M soggy/RTP soigne soignee +soign +soigne soil/MDGS soiled/U soiree/SM +soire/SM sojourn/ZGMDRS sojourner/M sol/SM @@ -48323,6 +48753,8 @@ solver/SM somatic somber/PY somberness/M +sombre/PY +sombreness/M sombrero/MS some somebody/SM @@ -48419,6 +48851,7 @@ sottish sou'wester sou/SMH souffle/SM +souffl/SM sough/MDG soughs sought/U @@ -48442,6 +48875,7 @@ soundtrack/SM soup/MDGS soupcon/MS soupy/RT +soupon/MS sour/MDRYTGSP source/ADSMG sourdough/M @@ -48686,11 +49120,13 @@ spinner/MS spinneret/SM spinney/S spinning/M +spinoff/MS spinster/SM spinsterhood/M spinsterish spiny/RT spiracle/SM +spiraea/MS spiral/SGMDY spire's spire/IFAS @@ -48972,6 +49408,7 @@ stagecoach/MS stagecraft/M stagehand/MS stagestruck +stagey stagflation/M stagger/MDGS staggering/Y @@ -49033,6 +49470,7 @@ standout/MS standpipe/SM standpoint/MS standstill/MS +standup/M stank stanza/SM staph/M @@ -49303,6 +49741,7 @@ stockbroking/M stockholder/SM stockily stockiness/M +stockinet/M stockinette/M stocking/SM stockist/S @@ -49316,7 +49755,8 @@ stodge stodgily stodginess/M stodgy/RTP -stogie/MS +stogie/M +stogy/SM stoic/SM stoical/Y stoicism/M @@ -49609,6 +50049,7 @@ sturgeon/SM stutter/MDRSZG stutterer/M sty/SM +stye/MS style's style/ADSG styli @@ -50168,6 +50609,7 @@ swankiness/M swanky/RPT swanned swanning +swansdown/M swansong/S swap/MS swapped @@ -50210,6 +50652,7 @@ sweepings/M sweepstakes/M sweet/XTSMNRYP sweetbread/SM +sweetbriar/SM sweetbrier/SM sweetcorn sweetened/U @@ -50309,7 +50752,7 @@ symbolical/Y symbolism/M symbolization/M symbolize/DSG -symmetric +symmetric/Y symmetrical/Y symmetry/SM sympathetic/U @@ -50385,6 +50828,7 @@ systemic/MS systemically systole/SM systolic +sance/SM t/SDNXGBJ tRNA/M ta @@ -50507,6 +50951,7 @@ tamarack/MS tamarind/MS tambourine/MS tame/BYZTGDRSP +tameable tamed/U tameness/M tamer/M @@ -50665,6 +51110,7 @@ taxman taxmen taxon taxonomic +taxonomical taxonomist/MS taxonomy/SM taxpayer/MS @@ -50740,6 +51186,7 @@ teenage/RZ teenager/M teeny/TR teenybopper/MS +teepee/MS teeter/MDSG teethe/GDS teething/M @@ -50828,6 +51275,7 @@ temperature/SM tempest/SM tempestuous/YP tempestuousness/M +tempi template's template/S temple/SM @@ -50871,6 +51319,7 @@ tenderloin/SM tenderness/M tendinitis/M tendon/SM +tendonitis/M tendril/SM tenement/SM tenet/SM @@ -51183,6 +51632,7 @@ thousand/MHS thousandfold thousandth/M thousandths +thraldom/M thrall/SMDG thralldom/M thrash/JMDRSZG @@ -51238,6 +51688,7 @@ throttler/M through throughout throughput/M +throughway/MS throw/SMRZG throwaway/SM throwback/SM @@ -51457,6 +51908,8 @@ titlist/MS titmice titmouse/M titter/SGMD +tittivate/DSGN +tittivation/M tittle/SM titty/S titular @@ -51590,7 +52043,7 @@ topcoat/SM topdressing/SM topee/S topflight -topi +topi/S topiary/M topic/SM topical/Y @@ -51616,6 +52069,8 @@ topsoil/M topspin/M toque/SM tor/SM +torah/M +torahs torch/GMDS torchbearer/MS torchlight/M @@ -51684,6 +52139,7 @@ touchpaper/S touchscreen/MS touchstone/MS touchy/RPT +touch tough/XTGMDNRYP toughen/ZGDR toughener/M @@ -51827,6 +52283,7 @@ tranquil/RYT tranquility/M tranquilize/ZGDRS tranquilizer/M +tranquillity/M trans/I transact/DGS transaction/SM @@ -51862,7 +52319,7 @@ transformation/SM transformer/M transfuse/DSXGN transfusion/M -transgender/S +transgender/SD transgenderism transgene/S transgenic @@ -51961,6 +52418,7 @@ travel/MDRSZGJ traveled/U traveler/M traveling/M +travelog/SM travelogue/MS traversal/SM traverse/DSMG @@ -52287,6 +52745,7 @@ tumbler/M tumbleweed/SM tumbling/M tumbrel/SM +tumbril/SM tumescence/M tumescent tumid @@ -52419,6 +52878,7 @@ twin/MDRSZG twine/SM twiner/M twinge/DSMG +twinight twink/SY twinkle/MGJDS twinkling/M @@ -52560,6 +53020,7 @@ unassertive unassuming/Y unavailing/Y unaware/S +unbeknown unbeknownst unbend/SG unbent @@ -52573,7 +53034,6 @@ unbroken uncanny/T uncap/S uncaring -uncatalogued unceasing/Y unchangeable uncharacteristic @@ -52743,6 +53203,7 @@ undies/M undo undoubted/Y undramatic +undreamt undue undulant undulate/DSXGN @@ -52919,7 +53380,6 @@ unromantic unruliness/M unruly/RTP unsafe/YTR -unsaleable unsavory unscathed unseeing/Y @@ -52929,6 +53389,7 @@ unsentimental unset unshakable unshakably +unshakeable unshapely unshorn unsightliness/M @@ -53122,6 +53583,7 @@ utilization/M utilize/GBDS utmost/M utopia/SM +utopian/MS utter/SDYG utterance/SM uttermost/M @@ -53271,7 +53733,7 @@ vector/SGMD veejay/SM veep/MS veer/MDGS -veg/M +veg/SM vegan/SM vegeburger/S veges @@ -53347,6 +53809,8 @@ venue/ASM veracious/Y veracity/M veranda/SM +verandah/M +verandahs verb/KMS verbal/MYS verbalization/M @@ -53484,6 +53948,7 @@ victorious/Y victory/SM victual/SMDG vicuna/MS +vicua/MS videlicet video/GSMD videocassette/SM @@ -53576,7 +54041,7 @@ virology/M virtual/Y virtue/SM virtuosity/M -virtuoso/M +virtuoso/SM virtuous/YP virtuousness/M virulence/M @@ -53679,6 +54144,7 @@ voicemail/M void/MDSGB voila voile/M +voil vol/S volatile volatility/M @@ -53795,6 +54261,8 @@ wailing/M wain/MS wainscot/SJMDG wainscoting/M +wainscotted +wainscotting/MS wainwright/MS waist/SM waistband/MS @@ -53894,6 +54362,7 @@ warmness/M warmonger/SMG warmongering/M warmth/M +warmup/MS warn/JDGS warning/M warp/MDGS @@ -53983,6 +54452,7 @@ waterlogged watermark/MDGS watermelon/SM watermill/MS +waterpower/M waterproof/SMDG waterproofing/M waters/M @@ -54285,6 +54755,7 @@ whisk/SMDRZG whisker/MD whiskery whiskey/MS +whisky/SM whiskys whisper/MDRSZG whisperer/M @@ -54316,10 +54787,8 @@ whittle/ZGDRS whittler/M whiz/M whizkid/M +whizz/MDSG whizzbang/MS -whizzed -whizzes -whizzing who'd who'll who're @@ -54380,6 +54849,7 @@ widener/M wideness/M widescreen/MS widespread +widgeon/MS widget/S widow/SMDRZG widower/M @@ -54393,7 +54863,7 @@ wienie/SM wife/MY wifeless wig/SM -wigeon/M +wigeon/SM wigged wigging wiggle/DRSMZG @@ -54421,6 +54891,8 @@ wildlife/M wildness/M wilds/M wile/MGDS +wilful/P +wilfulness/M wiliness/M will/MDS willful/PY @@ -54573,7 +55045,7 @@ wittiness/M witting/UY witty/RPT wive/GDS -wiz +wiz/S wizard/SMY wizardry/M wizened @@ -54892,8 +55364,8 @@ xxxviii xylem/M xylophone/SM xylophonist/MS +y y'all -y/F ya yacht/SMDG yachting/M @@ -54958,6 +55430,7 @@ yeomen yep/SM yes/MS yeshiva/SM +yeshivot yessed yessing yesterday/MS @@ -55013,7 +55486,7 @@ ytterbium/M yttrium/M yuan/M yucca/SM -yuck +yuck/MDSG yucky/TR yuk/SM yukked @@ -55106,3 +55579,10 @@ zydeco/M zygote/SM zygotic zymurgy/M +ngstrm/M +clair/SM +clat/M +lan/M +migr/SM +pe/MS +tude/SM From 749cfba4bb0c1b919d9b244c5cc36b47c455b8cb Mon Sep 17 00:00:00 2001 From: Bogdan Postelnicu Date: Tue, 12 Jan 2016 14:52:28 +0200 Subject: [PATCH 029/156] Bug 1238911 - initialize canWait with false from constructor, avoid using the variable without initialization. r=lhansen --HG-- extra : transplant_source : k%A0JMZ%3F%10%B1%FD%F4%DA%3F%08%EA%3F%DC9%14%A3c --- js/src/builtin/AtomicsObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/builtin/AtomicsObject.cpp b/js/src/builtin/AtomicsObject.cpp index df0b4ae96aa5..2fd0c61520a7 100644 --- a/js/src/builtin/AtomicsObject.cpp +++ b/js/src/builtin/AtomicsObject.cpp @@ -1029,7 +1029,8 @@ js::FutexRuntime::unlock() js::FutexRuntime::FutexRuntime() : cond_(nullptr), - state_(Idle) + state_(Idle), + canWait_(false) { } From dc9a970c40d5483fa32a5ff408f03cce188cd640 Mon Sep 17 00:00:00 2001 From: Syd Polk Date: Mon, 11 Jan 2016 15:52:25 -0600 Subject: [PATCH 030/156] Bug 1230279 - Develop new mozharness script for media-tests for Jenkins; r=maja_zf r=whimboo --HG-- extra : transplant_source : %B7%DB%14%10c%C7%BE%83%B4%00%18%DB%D6%5D%0B%9F%F3%2A%D4%F4 --- .../mediatests/buildbot_posix_config.py | 5 +- .../mediatests/buildbot_windows_config.py | 5 +- .../configs/mediatests/jenkins_config.py | 72 ++++++++++ .../mozilla/testing/firefox_media_tests.py | 124 ++++++++++++------ .../scripts/firefox_media_tests_buildbot.py | 95 ++++---------- .../scripts/firefox_media_tests_jenkins.py | 52 ++++++++ 6 files changed, 237 insertions(+), 116 deletions(-) create mode 100755 testing/mozharness/configs/mediatests/jenkins_config.py create mode 100755 testing/mozharness/scripts/firefox_media_tests_jenkins.py diff --git a/testing/mozharness/configs/mediatests/buildbot_posix_config.py b/testing/mozharness/configs/mediatests/buildbot_posix_config.py index aa1127c32754..b87913e70ec5 100644 --- a/testing/mozharness/configs/mediatests/buildbot_posix_config.py +++ b/testing/mozharness/configs/mediatests/buildbot_posix_config.py @@ -41,10 +41,7 @@ config = { "firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git', "firefox_media_branch": 'master', - "firefox_media_rev": '49b500b30b80372a6c678ec7d0a2b074844f5e84', - "firefox_ui_repo": 'https://github.com/mozilla/firefox-ui-tests.git', - "firefox_ui_branch": 'mozilla-central', - "firefox_ui_rev": '32be49d74e1d10c6bf087235b1d6753c1b840bc4', + "firefox_media_rev": '0830e972e4b95fef3507207fc6bce028da27f2d3', "suite_definitions": { "media-tests": { diff --git a/testing/mozharness/configs/mediatests/buildbot_windows_config.py b/testing/mozharness/configs/mediatests/buildbot_windows_config.py index 2ddf0910e437..4eefc2c5a747 100644 --- a/testing/mozharness/configs/mediatests/buildbot_windows_config.py +++ b/testing/mozharness/configs/mediatests/buildbot_windows_config.py @@ -52,10 +52,7 @@ config = { "firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git', "firefox_media_branch": 'master', - "firefox_media_rev": '49b500b30b80372a6c678ec7d0a2b074844f5e84', - "firefox_ui_repo": 'https://github.com/mozilla/firefox-ui-tests.git', - "firefox_ui_branch": 'mozilla-central', - "firefox_ui_rev": '32be49d74e1d10c6bf087235b1d6753c1b840bc4', + "firefox_media_rev": '0830e972e4b95fef3507207fc6bce028da27f2d3', "suite_definitions": { "media-tests": { diff --git a/testing/mozharness/configs/mediatests/jenkins_config.py b/testing/mozharness/configs/mediatests/jenkins_config.py new file mode 100755 index 000000000000..e912a0ed9d68 --- /dev/null +++ b/testing/mozharness/configs/mediatests/jenkins_config.py @@ -0,0 +1,72 @@ +# Default configuration as used by Mozmill CI (Jenkins) + +import os +import platform +import sys + +import mozharness + + +external_tools_path = os.path.join( + os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))), + 'external_tools', +) + +config = { + 'env': { + 'PIP_TRUSTED_HOST': 'pypi.pub.build.mozilla.org', + }, + + # PIP + 'find_links': ['http://pypi.pub.build.mozilla.org/pub'], + 'pip_index': False, + + # mozcrash support + 'download_minidump_stackwalk': True, + 'download_symbols': 'ondemand', + 'download_tooltool': True, + + # Version control information + 'firefox_media_repo': 'https://github.com/mjzffr/firefox-media-tests.git', + 'firefox_media_branch': 'master', + + # Default test suite + 'test_suite': 'media-tests', + + 'suite_definitions': { + 'media-tests': { + 'options': [], + }, + 'media-youtube-tests': { + 'options': [ + '%(test_manifest)s' + ], + }, + }, + + 'default_actions': [ + 'clobber', + 'checkout', + 'download-and-extract', + 'create-virtualenv', + 'install', + 'run-media-tests', + ], + +} + +# General local variable overwrite +# Bug 1227079 - Python executable eeded to get it executed on Windows +if platform.system() == 'windows': + gittool = [ + sys.executable, + os.path.join(external_tools_path, 'gittool.py') + ] +else: + gittool = os.path.join(external_tools_path, 'gittool.py') + +exes = { + 'gittool.py' : gittool, +} + +config['exes'] = exes diff --git a/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py b/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py index 5315f33c8236..027f6633c20a 100644 --- a/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py +++ b/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py @@ -4,13 +4,12 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # ***** BEGIN LICENSE BLOCK ***** -"""firefox_media_tests.py -Author: Maja Frydrychowicz -""" import copy +import glob import os import re +import urlparse from mozharness.base.log import ERROR, WARNING from mozharness.base.script import PreScriptAction @@ -72,23 +71,14 @@ media_test_config_options = [ 'dest': 'firefox_media_rev', 'help': 'which firefox_media_tests revision to use', }], - [['--firefox-ui-repo'], { - 'dest': 'firefox_ui_repo', - 'default': 'https://github.com/mozilla/firefox-ui-tests.git', - 'help': 'which firefox_ui_tests repo to use', - }], - [['--firefox-ui-branch'], { - 'dest': 'firefox_ui_branch', - 'default': 'master', - 'help': 'which branch to use for firefox_ui_tests', - }], - [['--firefox-ui-rev'], { - 'dest': 'firefox_ui_rev', - 'help': 'which firefox_ui_tests revision to use', - }], + [["--suite"], + {"action": "store", + "dest": "test_suite", + "default": "media-tests", + "help": "suite name", + }], ] + (copy.deepcopy(testing_config_options)) - class JobResultParser(TestSummaryOutputParserHelper): """ Parses test output to determine overall result.""" def __init__(self, **kwargs): @@ -138,7 +128,9 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): actions = [ 'clobber', 'checkout', + 'download-and-extract', 'create-virtualenv', + 'install', 'run-media-tests', ] super(FirefoxMediaTestsBase, self).__init__( @@ -148,23 +140,45 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): **kwargs ) c = self.config + self.media_urls = c.get('media_urls') self.profile = c.get('profile') self.test_timeout = int(c.get('test_timeout')) self.tests = c.get('tests') self.e10s = c.get('e10s') + self.installer_url = c.get('installer_url') + self.installer_path = c.get('installer_path') + self.binary_path = c.get('binary_path') + self.test_packages_url = c.get('test_packages_url') + self.test_url = c.get('test_url') @PreScriptAction('create-virtualenv') def _pre_create_virtualenv(self, action): dirs = self.query_abs_dirs() - requirements_file = os.path.join(dirs['firefox_media_dir'], + marionette_requirements = os.path.join(dirs['abs_test_install_dir'], + 'config', + 'marionette_requirements.txt') + if os.access(marionette_requirements, os.F_OK): + self.register_virtualenv_module(requirements=[marionette_requirements], + two_pass=True) + + media_tests_requirements = os.path.join(dirs['firefox_media_dir'], 'requirements.txt') - if os.path.isfile(requirements_file): - self.register_virtualenv_module(requirements=[requirements_file]) - self.register_virtualenv_module(name='firefox-ui-tests', - url=dirs['firefox_ui_dir']) - self.register_virtualenv_module(name='firefox-media-tests', - url=dirs['firefox_media_dir']) + + if os.access(media_tests_requirements, os.F_OK): + self.register_virtualenv_module(requirements=[media_tests_requirements], + two_pass=True) + + def download_and_extract(self): + """Overriding method from TestingMixin until firefox-media-tests are in tree. + + Right now we only care about the installer and symbolds. + + """ + self._download_installer() + + if self.config.get('download_symbols'): + self._download_and_extract_symbols() def query_abs_dirs(self): if self.abs_dirs: @@ -174,8 +188,8 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): 'firefox_media_dir': os.path.join(abs_dirs['abs_work_dir'], 'firefox-media-tests') } - dirs['firefox_ui_dir'] = os.path.join(dirs['firefox_media_dir'], - 'firefox-ui-tests') + dirs['abs_test_install_dir'] = os.path.join(abs_dirs['abs_work_dir'], + 'tests') abs_dirs.update(dirs) self.abs_dirs = abs_dirs return self.abs_dirs @@ -188,20 +202,13 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): self.firefox_media_vc = { 'branch': c['firefox_media_branch'], 'repo': c['firefox_media_repo'], - 'revision': c['firefox_media_rev'], 'dest': dirs['firefox_media_dir'], } - self.firefox_ui_vc = { - 'branch': c['firefox_ui_branch'], - 'repo': c['firefox_ui_repo'], - 'revision': c['firefox_ui_rev'], - 'dest': dirs['firefox_ui_dir'] - } + if 'firefox-media-rev' in c: + self.firefox_media_vc['revision'] = c['firefox_media_rev'] def checkout(self): - revision = self.vcs_checkout(vcs='gittool', **self.firefox_media_vc) - if revision: - self.vcs_checkout(vcs='gittool', **self.firefox_ui_vc) + self.vcs_checkout(vcs='gittool', **self.firefox_media_vc) def _query_cmd(self): """ Determine how to call firefox-media-tests """ @@ -226,8 +233,48 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): if self.e10s: cmd.append('--e10s') + test_suite = self.config.get('test_suite') + if test_suite not in self.config["suite_definitions"]: + self.fatal("%s is not defined in the config!" % test_suite) + + test_manifest = None if test_suite != 'media-youtube-tests' else \ + os.path.join(dirs['firefox_media_dir'], + 'firefox_media_tests', + 'playback', 'youtube', 'manifest.ini') + config_fmt_args = { + 'test_manifest': test_manifest, + } + + for s in self.config["suite_definitions"][test_suite]["options"]: + cmd.append(s % config_fmt_args) + return cmd + def query_minidump_stackwalk(self): + """We don't have an extracted test package available to get the manifest file. + + So we have to explicitely download the latest version of the manifest from the + mozilla-central repository and feed it into the query_minidump_stackwalk() method. + + We can remove this whole method once our tests are part of the tree. + + """ + manifest_path = None + + if os.environ.get('MINIDUMP_STACKWALK') or self.config.get('download_minidump_stackwalk'): + tooltool_manifest = self.query_minidump_tooltool_manifest() + url_base = 'https://hg.mozilla.org/mozilla-central/raw-file/default/testing/' + + dirs = self.query_abs_dirs() + manifest_path = os.path.join(dirs['abs_work_dir'], 'releng.manifest') + try: + self.download_file(urlparse.urljoin(url_base, tooltool_manifest), + manifest_path) + except Exception as e: + self.fatal('Download of tooltool manifest file failed: %s' % e.message) + + return super(FirefoxMediaTestsBase, self).query_minidump_stackwalk(manifest=manifest_path) + def run_media_tests(self): cmd = self._query_cmd() self.job_result_parser = JobResultParser( @@ -237,8 +284,7 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript): ) env = self.query_env() - if (not os.environ.get('MINIDUMP_STACKWALK') and - self.query_minidump_stackwalk()): + if self.query_minidump_stackwalk(): env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path return_code = self.run_command( diff --git a/testing/mozharness/scripts/firefox_media_tests_buildbot.py b/testing/mozharness/scripts/firefox_media_tests_buildbot.py index 268dbed95bc3..c4491c63d70f 100644 --- a/testing/mozharness/scripts/firefox_media_tests_buildbot.py +++ b/testing/mozharness/scripts/firefox_media_tests_buildbot.py @@ -15,8 +15,8 @@ import sys sys.path.insert(1, os.path.dirname(sys.path[0])) -from mozharness.base.log import ERROR, DEBUG, INFO -from mozharness.base.script import PreScriptAction, PostScriptAction +from mozharness.base.log import DEBUG, ERROR, INFO +from mozharness.base.script import PostScriptAction from mozharness.mozilla.blob_upload import ( BlobUploadMixin, blobupload_config_options @@ -25,25 +25,16 @@ from mozharness.mozilla.buildbot import ( TBPL_SUCCESS, TBPL_WARNING, TBPL_FAILURE ) from mozharness.mozilla.testing.firefox_media_tests import ( - FirefoxMediaTestsBase, BUSTED, TESTFAILED, UNKNOWN, EXCEPTION, SUCCESS + FirefoxMediaTestsBase, TESTFAILED, SUCCESS ) -buildbot_media_test_options = [ - [["--suite"], - {"action": "store", - "dest": "test_suite", - "default": "media-tests", - "help": "suite name", - }], -] - class FirefoxMediaTestsBuildbot(FirefoxMediaTestsBase, BlobUploadMixin): def __init__(self): config_options = copy.deepcopy(blobupload_config_options) super(FirefoxMediaTestsBuildbot, self).__init__( - config_options=config_options + buildbot_media_test_options, + config_options=config_options, all_actions=['clobber', 'read-buildbot-config', 'checkout', @@ -53,62 +44,6 @@ class FirefoxMediaTestsBuildbot(FirefoxMediaTestsBase, BlobUploadMixin): 'run-media-tests', ], ) - c = self.config - self.installer_url = c.get('installer_url') - self.installer_path = c.get('installer_path') - self.binary_path = c.get('binary_path') - self.test_packages_url = c.get('test_packages_url') - - @PreScriptAction('create-virtualenv') - def _pre_create_virtualenv(self, action): - dirs = self.query_abs_dirs() - requirements = os.path.join(dirs['abs_test_install_dir'], - 'config', - 'marionette_requirements.txt') - if os.access(requirements, os.F_OK): - self.register_virtualenv_module(requirements=[requirements], - two_pass=True) - super(FirefoxMediaTestsBuildbot, self)._pre_create_virtualenv(action) - - def query_abs_dirs(self): - if self.abs_dirs: - return self.abs_dirs - dirs = super(FirefoxMediaTestsBuildbot, self).query_abs_dirs() - dirs['abs_blob_upload_dir'] = os.path.join(dirs['abs_work_dir'], - 'blobber_upload_dir') - dirs['abs_test_install_dir'] = os.path.join(dirs['abs_work_dir'], - 'tests') - self.abs_dirs = dirs - return self.abs_dirs - - def _query_cmd(self): - """ Determine how to call firefox-media-tests """ - cmd = super(FirefoxMediaTestsBuildbot, self)._query_cmd() - # configure logging - dirs = self.query_abs_dirs() - blob_upload_dir = dirs.get('abs_blob_upload_dir') - cmd += ['--gecko-log', os.path.join(blob_upload_dir, - 'gecko.log')] - cmd += ['--log-html', os.path.join(blob_upload_dir, - 'media_tests.html')] - cmd += ['--log-mach', os.path.join(blob_upload_dir, - 'media_tests_mach.log')] - - test_suite = self.config.get('test_suite') - test_manifest = None if test_suite != 'media-youtube-tests' else \ - os.path.join(dirs['firefox_media_dir'], - 'firefox_media_tests', - 'playback', 'youtube', 'manifest.ini') - config_fmt_args = { - 'test_manifest': test_manifest, - } - - if test_suite not in self.config["suite_definitions"]: - self.fatal("%s is not defined in the config!" % test_suite) - for s in self.config["suite_definitions"][test_suite]["options"]: - cmd.append(s % config_fmt_args) - - return cmd def run_media_tests(self): status = super(FirefoxMediaTestsBuildbot, self).run_media_tests() @@ -120,6 +55,28 @@ class FirefoxMediaTestsBuildbot(FirefoxMediaTestsBase, BlobUploadMixin): tbpl_status = TBPL_WARNING self.buildbot_status(tbpl_status) + def query_abs_dirs(self): + if self.abs_dirs: + return self.abs_dirs + abs_dirs = super(FirefoxMediaTestsBuildbot, self).query_abs_dirs() + dirs = { + 'abs_blob_upload_dir': os.path.join(abs_dirs['abs_work_dir'], + 'blobber_upload_dir') + } + abs_dirs.update(dirs) + self.abs_dirs = abs_dirs + return self.abs_dirs + + def _query_cmd(self): + cmd = super(FirefoxMediaTestsBuildbot, self)._query_cmd() + dirs = self.query_abs_dirs() + # configure logging + blob_upload_dir = dirs.get('abs_blob_upload_dir') + cmd += ['--gecko-log', os.path.join(blob_upload_dir, 'gecko.log')] + cmd += ['--log-html', os.path.join(blob_upload_dir, 'media_tests.html')] + cmd += ['--log-mach', os.path.join(blob_upload_dir, 'media_tests_mach.log')] + return cmd + @PostScriptAction('run-media-tests') def _collect_uploads(self, action, success=None): """ Copy extra (log) files to blob upload dir. """ diff --git a/testing/mozharness/scripts/firefox_media_tests_jenkins.py b/testing/mozharness/scripts/firefox_media_tests_jenkins.py new file mode 100755 index 000000000000..3192874a35a5 --- /dev/null +++ b/testing/mozharness/scripts/firefox_media_tests_jenkins.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# ***** BEGIN LICENSE BLOCK ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# ***** BEGIN LICENSE BLOCK ***** +"""firefox_media_tests_jenkins.py + +Author: Syd Polk +""" +import copy +import glob +import os +import sys + +sys.path.insert(1, os.path.dirname(sys.path[0])) + +from mozharness.base.script import PreScriptAction +from mozharness.mozilla.testing.firefox_media_tests import ( + FirefoxMediaTestsBase +) + + +class FirefoxMediaTestsJenkins(FirefoxMediaTestsBase): + + def __init__(self): + super(FirefoxMediaTestsJenkins, self).__init__( + all_actions=['clobber', + 'checkout', + 'download-and-extract', + 'create-virtualenv', + 'install', + 'run-media-tests', + ], + ) + + def _query_cmd(self): + cmd = super(FirefoxMediaTestsJenkins, self)._query_cmd() + + dirs = self.query_abs_dirs() + + # configure logging + log_dir = dirs.get('abs_log_dir') + cmd += ['--gecko-log', os.path.join(log_dir, 'gecko.log')] + cmd += ['--log-html', os.path.join(log_dir, 'media_tests.html')] + cmd += ['--log-mach', os.path.join(log_dir, 'media_tests_mach.log')] + + return cmd + +if __name__ == '__main__': + media_test = FirefoxMediaTestsJenkins() + media_test.run_and_exit() From d6316eff108056996298b869ab60365466bbac50 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Wed, 13 Jan 2016 10:43:27 +0000 Subject: [PATCH 031/156] Bug 1222265 - Use -moz-appearance:none in layout/reftests/unicode testcases to work around unreliable Gtk3 form-control rendering. r=dholbert --- layout/reftests/unicode/unicode-attribute-selector.html | 4 +++- layout/reftests/unicode/unicode-element-selector.html | 2 ++ layout/reftests/unicode/unicode-lang.html | 4 +++- layout/reftests/unicode/unicode-pseudo-selector.html | 2 ++ layout/reftests/unicode/unicode-ref.html | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/layout/reftests/unicode/unicode-attribute-selector.html b/layout/reftests/unicode/unicode-attribute-selector.html index 622a07797fcc..8d2eab9e422b 100644 --- a/layout/reftests/unicode/unicode-attribute-selector.html +++ b/layout/reftests/unicode/unicode-attribute-selector.html @@ -6,7 +6,9 @@ div[dİr] {color: red;} div[dİr="ltr"] {text-indent: 30px;} input[dİsabled] {display: none;} - //input[dİsabled="disabled"] {display: inline;} + /* input[dİsabled="disabled"] {display: inline;} */ + /* work around unreliable form-control rendering on Gtk+3 (see bug 1223198): */ + input { -moz-appearance: none; } diff --git a/layout/reftests/unicode/unicode-element-selector.html b/layout/reftests/unicode/unicode-element-selector.html index 293523f4c9af..23d0fca513ff 100644 --- a/layout/reftests/unicode/unicode-element-selector.html +++ b/layout/reftests/unicode/unicode-element-selector.html @@ -4,6 +4,8 @@ Unicode tests - element selectors diff --git a/layout/reftests/unicode/unicode-lang.html b/layout/reftests/unicode/unicode-lang.html index 9be9cefaf68a..15a9d88486e2 100644 --- a/layout/reftests/unicode/unicode-lang.html +++ b/layout/reftests/unicode/unicode-lang.html @@ -4,7 +4,9 @@ Unicode tests - language selector diff --git a/layout/reftests/unicode/unicode-pseudo-selector.html b/layout/reftests/unicode/unicode-pseudo-selector.html index 779707067706..dad2217617f6 100644 --- a/layout/reftests/unicode/unicode-pseudo-selector.html +++ b/layout/reftests/unicode/unicode-pseudo-selector.html @@ -4,6 +4,8 @@ Unicode tests - pseudo element selectors diff --git a/layout/reftests/unicode/unicode-ref.html b/layout/reftests/unicode/unicode-ref.html index 5a5175a15e66..b4e8fb319b27 100644 --- a/layout/reftests/unicode/unicode-ref.html +++ b/layout/reftests/unicode/unicode-ref.html @@ -2,6 +2,10 @@ Unicode tests - reference rending + From b99a9577ea573097a337e009be59c089ae7c15f0 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 29 Dec 2015 18:06:20 +0000 Subject: [PATCH 032/156] Bug 1235610 - Add xpctall support for Bitrig and DragonFly. r=glandium --HG-- extra : transplant_source : %AD%3E%B5E%09%15%D7%CF%86%E37%FA%09%BF%E1%40%AF%E8%DCK --- xpcom/reflect/xptcall/md/unix/moz.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build index 3dad5e63d519..463c4bc77040 100644 --- a/xpcom/reflect/xptcall/md/unix/moz.build +++ b/xpcom/reflect/xptcall/md/unix/moz.build @@ -24,7 +24,7 @@ if CONFIG['OS_ARCH'] == 'GNU': 'xptcstubs_gcc_x86_unix.cpp' ] -if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD') or \ +if CONFIG['OS_ARCH'] in ('Linux', 'Bitrig', 'DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD') or \ CONFIG['OS_ARCH'].startswith('GNU_'): if CONFIG['OS_TEST'] == 'x86_64': SOURCES += [ @@ -102,7 +102,7 @@ if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110': 'xptcstubs_arm_netbsd.cpp', ] -if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD': +if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] in ('Bitrig', 'OpenBSD'): SOURCES += [ 'xptcinvoke_arm_openbsd.cpp', 'xptcstubs_arm_openbsd.cpp', From 8d4c9a3ae82b6ed8de1b46c8421a718ce6ceb4f4 Mon Sep 17 00:00:00 2001 From: Shih-Chiang Chien Date: Wed, 13 Jan 2016 19:21:25 +0800 Subject: [PATCH 033/156] Bug 1239242 - support PresentationRequest.startWithDevice(). r=smaug. --- dom/presentation/PresentationRequest.cpp | 9 +- dom/presentation/PresentationRequest.h | 3 + dom/presentation/PresentationService.cpp | 59 +++++- .../interfaces/nsIPresentationService.idl | 5 +- dom/presentation/ipc/PPresentation.ipdl | 1 + .../ipc/PresentationIPCService.cpp | 7 +- dom/presentation/ipc/PresentationParent.cpp | 2 +- .../tests/mochitest/mochitest.ini | 2 + ...t_presentation_sender_startWithDevice.html | 173 ++++++++++++++++++ dom/webidl/PresentationRequest.webidl | 20 ++ 10 files changed, 268 insertions(+), 13 deletions(-) create mode 100644 dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html diff --git a/dom/presentation/PresentationRequest.cpp b/dom/presentation/PresentationRequest.cpp index 96f7f97f66ef..2ed5b6a21064 100644 --- a/dom/presentation/PresentationRequest.cpp +++ b/dom/presentation/PresentationRequest.cpp @@ -80,6 +80,13 @@ PresentationRequest::WrapObject(JSContext* aCx, already_AddRefed PresentationRequest::Start(ErrorResult& aRv) +{ + return StartWithDevice(NullString(), aRv); +} + +already_AddRefed +PresentationRequest::StartWithDevice(const nsAString& aDeviceId, + ErrorResult& aRv) { nsCOMPtr global = do_QueryInterface(GetOwner()); if (NS_WARN_IF(!global)) { @@ -124,7 +131,7 @@ PresentationRequest::Start(ErrorResult& aRv) nsCOMPtr callback = new PresentationRequesterCallback(this, mUrl, id, promise); - rv = service->StartSession(mUrl, id, origin, callback); + rv = service->StartSession(mUrl, id, origin, aDeviceId, callback); if (NS_WARN_IF(NS_FAILED(rv))) { promise->MaybeReject(NS_ERROR_DOM_OPERATION_ERR); } diff --git a/dom/presentation/PresentationRequest.h b/dom/presentation/PresentationRequest.h index f66a2ba82dea..65df532893b4 100644 --- a/dom/presentation/PresentationRequest.h +++ b/dom/presentation/PresentationRequest.h @@ -33,6 +33,9 @@ public: // WebIDL (public APIs) already_AddRefed Start(ErrorResult& aRv); + already_AddRefed StartWithDevice(const nsAString& aDeviceId, + ErrorResult& aRv); + already_AddRefed GetAvailability(ErrorResult& aRv); IMPL_EVENT_HANDLER(connectionavailable); diff --git a/dom/presentation/PresentationService.cpp b/dom/presentation/PresentationService.cpp index f9a44aae7ff1..4ad4827c3427 100644 --- a/dom/presentation/PresentationService.cpp +++ b/dom/presentation/PresentationService.cpp @@ -384,6 +384,7 @@ NS_IMETHODIMP PresentationService::StartSession(const nsAString& aUrl, const nsAString& aSessionId, const nsAString& aOrigin, + const nsAString& aDeviceId, nsIPresentationServiceCallback* aCallback) { MOZ_ASSERT(NS_IsMainThread()); @@ -396,20 +397,62 @@ PresentationService::StartSession(const nsAString& aUrl, new PresentationControllingInfo(aUrl, aSessionId, aCallback); mSessionInfo.Put(aSessionId, info); - // Pop up a prompt and ask user to select a device. - nsCOMPtr prompt = - do_GetService(PRESENTATION_DEVICE_PROMPT_CONTRACTID); - if (NS_WARN_IF(!prompt)) { - return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); - } nsCOMPtr request = new PresentationDeviceRequest(aUrl, aSessionId, aOrigin); - nsresult rv = prompt->PromptDeviceSelection(request); + + if (aDeviceId.IsVoid()) { + // Pop up a prompt and ask user to select a device. + nsCOMPtr prompt = + do_GetService(PRESENTATION_DEVICE_PROMPT_CONTRACTID); + if (NS_WARN_IF(!prompt)) { + return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); + } + + nsresult rv = prompt->PromptDeviceSelection(request); + if (NS_WARN_IF(NS_FAILED(rv))) { + return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); + } + + return NS_OK; + } + + // Find the designated device from available device list. + nsCOMPtr deviceManager = + do_GetService(PRESENTATION_DEVICE_MANAGER_CONTRACTID); + if (NS_WARN_IF(!deviceManager)) { + return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); + } + + nsCOMPtr devices; + nsresult rv = deviceManager->GetAvailableDevices(getter_AddRefs(devices)); if (NS_WARN_IF(NS_FAILED(rv))) { return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); } - return NS_OK; + nsCOMPtr enumerator; + rv = devices->Enumerate(getter_AddRefs(enumerator)); + if (NS_WARN_IF(NS_FAILED(rv))) { + return info->ReplyError(NS_ERROR_DOM_OPERATION_ERR); + } + + NS_ConvertUTF16toUTF8 utf8DeviceId(aDeviceId); + bool hasMore; + while(NS_SUCCEEDED(enumerator->HasMoreElements(&hasMore)) && hasMore){ + nsCOMPtr isupports; + rv = enumerator->GetNext(getter_AddRefs(isupports)); + + nsCOMPtr device(do_QueryInterface(isupports)); + MOZ_ASSERT(device); + + nsAutoCString id; + if (NS_SUCCEEDED(device->GetId(id)) && id.Equals(utf8DeviceId)) { + request->Select(device); + return NS_OK; + } + } + + // Reject if designated device is not available. + return info->ReplyError(NS_ERROR_DOM_NOT_FOUND_ERR); } NS_IMETHODIMP diff --git a/dom/presentation/interfaces/nsIPresentationService.idl b/dom/presentation/interfaces/nsIPresentationService.idl index cfa18ed4bff8..005ae0606f95 100644 --- a/dom/presentation/interfaces/nsIPresentationService.idl +++ b/dom/presentation/interfaces/nsIPresentationService.idl @@ -33,7 +33,7 @@ interface nsIPresentationServiceCallback : nsISupports void notifyError(in nsresult error); }; -[scriptable, uuid(c177a13a-bf1a-48bf-8032-d415c3343c46)] +[scriptable, uuid(2e360359-c45c-4949-bf95-410242ce483f)] interface nsIPresentationService : nsISupports { /* @@ -43,6 +43,8 @@ interface nsIPresentationService : nsISupports * @param url: The url of presenting page. * @param sessionId: An ID to identify presentation session. * @param origin: The url of requesting page. + * @param deviceId: The specified device of handling this request, null string + for prompt device selection dialog. * @param callback: Invoke the callback when the operation is completed. * NotifySuccess() is called with |id| if a session is * established successfully with the selected device. @@ -51,6 +53,7 @@ interface nsIPresentationService : nsISupports void startSession(in DOMString url, in DOMString sessionId, in DOMString origin, + in DOMString deviceId, in nsIPresentationServiceCallback callback); /* diff --git a/dom/presentation/ipc/PPresentation.ipdl b/dom/presentation/ipc/PPresentation.ipdl index 94a0714122cf..9644e418a03e 100644 --- a/dom/presentation/ipc/PPresentation.ipdl +++ b/dom/presentation/ipc/PPresentation.ipdl @@ -17,6 +17,7 @@ struct StartSessionRequest nsString url; nsString sessionId; nsString origin; + nsString deviceId; }; struct SendSessionMessageRequest diff --git a/dom/presentation/ipc/PresentationIPCService.cpp b/dom/presentation/ipc/PresentationIPCService.cpp index 4034963b12db..eeda740b5e3b 100644 --- a/dom/presentation/ipc/PresentationIPCService.cpp +++ b/dom/presentation/ipc/PresentationIPCService.cpp @@ -49,10 +49,13 @@ NS_IMETHODIMP PresentationIPCService::StartSession(const nsAString& aUrl, const nsAString& aSessionId, const nsAString& aOrigin, + const nsAString& aDeviceId, nsIPresentationServiceCallback* aCallback) { - return SendRequest(aCallback, - StartSessionRequest(nsAutoString(aUrl), nsAutoString(aSessionId), nsAutoString(aOrigin))); + return SendRequest(aCallback, StartSessionRequest(nsAutoString(aUrl), + nsAutoString(aSessionId), + nsAutoString(aOrigin), + nsAutoString(aDeviceId))); } NS_IMETHODIMP diff --git a/dom/presentation/ipc/PresentationParent.cpp b/dom/presentation/ipc/PresentationParent.cpp index 4220c985355e..0e112ae8c23e 100644 --- a/dom/presentation/ipc/PresentationParent.cpp +++ b/dom/presentation/ipc/PresentationParent.cpp @@ -252,7 +252,7 @@ PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest) { MOZ_ASSERT(mService); return mService->StartSession(aRequest.url(), aRequest.sessionId(), - aRequest.origin(), this); + aRequest.origin(), aRequest.deviceId(), this); } nsresult diff --git a/dom/presentation/tests/mochitest/mochitest.ini b/dom/presentation/tests/mochitest/mochitest.ini index f94faefe6681..577ef9456bc9 100644 --- a/dom/presentation/tests/mochitest/mochitest.ini +++ b/dom/presentation/tests/mochitest/mochitest.ini @@ -17,6 +17,8 @@ skip-if = toolkit == 'android' # Bug 1129785 skip-if = toolkit == 'android' # Bug 1129785 [test_presentation_sender_default_request.html] skip-if = toolkit == 'android' # Bug 1129785 +[test_presentation_sender_startWithDevice.html] +skip-if = toolkit == 'android' # Bug 1129785 [test_presentation_receiver_establish_connection_error.html] skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android' || os == 'mac' || os == 'win' || buildapp == 'mulet') # Bug 1129785, Bug 1204709 [test_presentation_receiver_establish_connection_timeout.html] diff --git a/dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html b/dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html new file mode 100644 index 000000000000..7f5ad654f47f --- /dev/null +++ b/dom/presentation/tests/mochitest/test_presentation_sender_startWithDevice.html @@ -0,0 +1,173 @@ + + + + + + Test startWithDevice for B2G Presentation API at sender side + + + + +Test startWithDevice for B2G Presentation API at sender side + + + diff --git a/dom/webidl/PresentationRequest.webidl b/dom/webidl/PresentationRequest.webidl index cdd0c61b16e7..bb893cdceec6 100644 --- a/dom/webidl/PresentationRequest.webidl +++ b/dom/webidl/PresentationRequest.webidl @@ -43,4 +43,24 @@ interface PresentationRequest : EventTarget { * The event is fired for all connections that are created for the controller. */ attribute EventHandler onconnectionavailable; + + /* + * A chrome page, or page which has presentation-device-manage permissiongs, + * uses startWithDevice() to start a new connection with specified device, + * and it will be returned with the promise. UA may show a prompt box with a + * list of available devices and ask the user to grant permission, choose a + * device, or cancel the operation. + * + * The promise is resolved when the presenting page is successfully loaded and + * the communication channel is established, i.e., the connection state is + * "connected". + * + * The promise may be rejected duo to one of the following reasons: + * - "OperationError": Unexpected error occurs. + * - "NotFoundError": No available device. + * - "NetworkError": Failed to establish the control channel or data channel. + * - "TimeoutError": Presenting page takes too long to load. + */ + [CheckAnyPermissions="presentation-device-manage", Throws] + Promise startWithDevice(DOMString deviceId); }; From 16d73541080425c609a1ff8afbbd3cfd1f4f97a8 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Thu, 14 Jan 2016 13:34:46 +0100 Subject: [PATCH 034/156] Bug 1239288 - Add a shutdown test to the gfx job scheduler. r=jrmuizel --- gfx/tests/gtest/TestJobScheduler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gfx/tests/gtest/TestJobScheduler.cpp b/gfx/tests/gtest/TestJobScheduler.cpp index 0480365872fe..b7c5aa5237b9 100644 --- a/gfx/tests/gtest/TestJobScheduler.cpp +++ b/gfx/tests/gtest/TestJobScheduler.cpp @@ -220,6 +220,16 @@ void TestSchedulerChain(uint32_t aNumThreads, uint32_t aNumCmdBuffers) } // namespace test_scheduler +TEST(Moz2D, JobScheduler_Shutdown) { + srand(time(nullptr)); + for (uint32_t threads = 1; threads < 16; ++threads) { + for (uint32_t i = 1; i < 1000; ++i) { + mozilla::gfx::JobScheduler::Init(threads, threads); + mozilla::gfx::JobScheduler::ShutDown(); + } + } +} + TEST(Moz2D, JobScheduler_Join) { srand(time(nullptr)); for (uint32_t threads = 1; threads < 8; ++threads) { From 34851976de3d66b91efba4634ec5950fc2f83b43 Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Thu, 14 Jan 2016 06:13:25 -0700 Subject: [PATCH 035/156] Bug 1231024 - Fix printing of live bundle information in regalloc spew, r=jonco. --- js/src/jit/BacktrackingAllocator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/jit/BacktrackingAllocator.cpp b/js/src/jit/BacktrackingAllocator.cpp index f01250136cf8..aa2aedaaf9f9 100644 --- a/js/src/jit/BacktrackingAllocator.cpp +++ b/js/src/jit/BacktrackingAllocator.cpp @@ -2251,9 +2251,9 @@ LiveBundle::toString() const char *buf = JS_smprintf(""); for (LiveRange::BundleLinkIterator iter = rangesBegin(); buf && iter; iter++) { - buf = JS_smprintf(buf, "%s %s", - (iter == rangesBegin()) ? "" : " ##", - LiveRange::get(*iter)->toString().get()); + buf = JS_sprintf_append(buf, "%s %s", + (iter == rangesBegin()) ? "" : " ##", + LiveRange::get(*iter)->toString().get()); } if (!buf) From 46c160c030b51aa8787bee65e4faa8b6d9078d4d Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 14 Jan 2016 13:49:35 +0000 Subject: [PATCH 036/156] Bug 1238575 - Fix shell evalInWorker() to wait for thread if it exits early r=terrence --- js/src/jit-test/tests/gc/bug-1238575-2.js | 4 ++++ js/src/jit-test/tests/gc/bug-1238575.js | 8 ++++++++ js/src/shell/js.cpp | 19 ++++++++++++++--- js/src/vm/Runtime.cpp | 4 ++++ js/src/vm/Runtime.h | 25 +++++++++++++++++++++++ 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 js/src/jit-test/tests/gc/bug-1238575-2.js create mode 100644 js/src/jit-test/tests/gc/bug-1238575.js diff --git a/js/src/jit-test/tests/gc/bug-1238575-2.js b/js/src/jit-test/tests/gc/bug-1238575-2.js new file mode 100644 index 000000000000..73739b795c17 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238575-2.js @@ -0,0 +1,4 @@ +if (!('oomTest' in this)) + quit(); + +oomTest(() => evalInWorker("1")); diff --git a/js/src/jit-test/tests/gc/bug-1238575.js b/js/src/jit-test/tests/gc/bug-1238575.js new file mode 100644 index 000000000000..2485093640b4 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238575.js @@ -0,0 +1,8 @@ +// |jit-test| allow-oom; allow-unhandlable-oom + +if (!('oomAfterAllocations' in this)) + quit(); + +oomAfterAllocations(5) +gcslice(11); +evalInWorker("1"); diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 36c4d6af95e5..1eccd870d509 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -2838,19 +2838,32 @@ EvalInWorker(JSContext* cx, unsigned argc, Value* vp) JSLinearString* str = &args[0].toString()->asLinear(); char16_t* chars = (char16_t*) js_malloc(str->length() * sizeof(char16_t)); - if (!chars) + if (!chars) { + ReportOutOfMemory(cx); return false; + } + CopyChars(chars, *str); WorkerInput* input = js_new(cx->runtime(), chars, str->length()); - if (!input) + if (!input) { + ReportOutOfMemory(cx); return false; + } PRThread* thread = PR_CreateThread(PR_USER_THREAD, WorkerMain, input, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, gMaxStackSize + 128 * 1024); - if (!thread || !workerThreads.append(thread)) + if (!thread) { + ReportOutOfMemory(cx); return false; + } + + if (!workerThreads.append(thread)) { + ReportOutOfMemory(cx); + PR_JoinThread(thread); + return false; + } return true; } diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 499c714e2e45..0084df3c9c76 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -143,6 +143,9 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime) asyncCallIsExplicit(false), entryMonitor(nullptr), parentRuntime(parentRuntime), +#ifdef DEBUG + updateChildRuntimeCount(parentRuntime), +#endif interrupt_(false), telemetryCallback(nullptr), handlingSegFault(false), @@ -360,6 +363,7 @@ JSRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes) JSRuntime::~JSRuntime() { MOZ_ASSERT(!isHeapBusy()); + MOZ_ASSERT(childRuntimeCount == 0); fx.destroyInstance(); diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 884743b842db..24221db263f0 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -796,6 +796,31 @@ struct JSRuntime : public JS::shadow::Runtime, JSRuntime* parentRuntime; private: +#ifdef DEBUG + /* The number of child runtimes that have this runtime as their parent. */ + mozilla::Atomic childRuntimeCount; + + class AutoUpdateChildRuntimeCount + { + JSRuntime* parent_; + + public: + explicit AutoUpdateChildRuntimeCount(JSRuntime* parent) + : parent_(parent) + { + if (parent_) + parent_->childRuntimeCount++; + } + + ~AutoUpdateChildRuntimeCount() { + if (parent_) + parent_->childRuntimeCount--; + } + }; + + AutoUpdateChildRuntimeCount updateChildRuntimeCount; +#endif + mozilla::Atomic interrupt_; /* Call this to accumulate telemetry data. */ From 0bccb498cdc564ae23200fea0fad6233eb975d91 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 14 Jan 2016 13:50:50 +0000 Subject: [PATCH 037/156] Bug 1238548 - Make GCRuntime::setParameter() fallible r=terrence --- js/src/builtin/TestingFunctions.cpp | 72 +++++++++++++------------ js/src/gc/GCRuntime.h | 8 +-- js/src/jit-test/tests/gc/bug-1238548.js | 2 + js/src/jsapi.cpp | 2 +- js/src/jsgc.cpp | 63 +++++++++++++++------- 5 files changed, 90 insertions(+), 57 deletions(-) create mode 100644 js/src/jit-test/tests/gc/bug-1238548.js diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 82806c905cc5..2b3277bb3088 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -330,43 +330,42 @@ MinorGC(JSContext* cx, unsigned argc, Value* vp) return true; } -#define FOR_EACH_GC_PARAM(_) \ - _("maxBytes", JSGC_MAX_BYTES, true, false) \ - _("maxMallocBytes", JSGC_MAX_MALLOC_BYTES, true, false) \ - _("gcBytes", JSGC_BYTES, false, false) \ - _("gcNumber", JSGC_NUMBER, false, false) \ - _("mode", JSGC_MODE, true, true) \ - _("unusedChunks", JSGC_UNUSED_CHUNKS, false, false) \ - _("totalChunks", JSGC_TOTAL_CHUNKS, false, false) \ - _("sliceTimeBudget", JSGC_SLICE_TIME_BUDGET, true, false) \ - _("markStackLimit", JSGC_MARK_STACK_LIMIT, true, false) \ - _("highFrequencyTimeLimit", JSGC_HIGH_FREQUENCY_TIME_LIMIT, true, false) \ - _("highFrequencyLowLimit", JSGC_HIGH_FREQUENCY_LOW_LIMIT, true, false) \ - _("highFrequencyHighLimit", JSGC_HIGH_FREQUENCY_HIGH_LIMIT, true, false) \ - _("highFrequencyHeapGrowthMax", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, true, false) \ - _("highFrequencyHeapGrowthMin", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, true, false) \ - _("lowFrequencyHeapGrowth", JSGC_LOW_FREQUENCY_HEAP_GROWTH, true, false) \ - _("dynamicHeapGrowth", JSGC_DYNAMIC_HEAP_GROWTH, true, true) \ - _("dynamicMarkSlice", JSGC_DYNAMIC_MARK_SLICE, true, true) \ - _("allocationThreshold", JSGC_ALLOCATION_THRESHOLD, true, false) \ - _("decommitThreshold", JSGC_DECOMMIT_THRESHOLD, true, false) \ - _("minEmptyChunkCount", JSGC_MIN_EMPTY_CHUNK_COUNT, true, true) \ - _("maxEmptyChunkCount", JSGC_MAX_EMPTY_CHUNK_COUNT, true, true) \ - _("compactingEnabled", JSGC_COMPACTING_ENABLED, true, true) +#define FOR_EACH_GC_PARAM(_) \ + _("maxBytes", JSGC_MAX_BYTES, true) \ + _("maxMallocBytes", JSGC_MAX_MALLOC_BYTES, true) \ + _("gcBytes", JSGC_BYTES, false) \ + _("gcNumber", JSGC_NUMBER, false) \ + _("mode", JSGC_MODE, true) \ + _("unusedChunks", JSGC_UNUSED_CHUNKS, false) \ + _("totalChunks", JSGC_TOTAL_CHUNKS, false) \ + _("sliceTimeBudget", JSGC_SLICE_TIME_BUDGET, true) \ + _("markStackLimit", JSGC_MARK_STACK_LIMIT, true) \ + _("highFrequencyTimeLimit", JSGC_HIGH_FREQUENCY_TIME_LIMIT, true) \ + _("highFrequencyLowLimit", JSGC_HIGH_FREQUENCY_LOW_LIMIT, true) \ + _("highFrequencyHighLimit", JSGC_HIGH_FREQUENCY_HIGH_LIMIT, true) \ + _("highFrequencyHeapGrowthMax", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, true) \ + _("highFrequencyHeapGrowthMin", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, true) \ + _("lowFrequencyHeapGrowth", JSGC_LOW_FREQUENCY_HEAP_GROWTH, true) \ + _("dynamicHeapGrowth", JSGC_DYNAMIC_HEAP_GROWTH, true) \ + _("dynamicMarkSlice", JSGC_DYNAMIC_MARK_SLICE, true) \ + _("allocationThreshold", JSGC_ALLOCATION_THRESHOLD, true) \ + _("decommitThreshold", JSGC_DECOMMIT_THRESHOLD, true) \ + _("minEmptyChunkCount", JSGC_MIN_EMPTY_CHUNK_COUNT, true) \ + _("maxEmptyChunkCount", JSGC_MAX_EMPTY_CHUNK_COUNT, true) \ + _("compactingEnabled", JSGC_COMPACTING_ENABLED, true) static const struct ParamInfo { const char* name; JSGCParamKey param; bool writable; - bool allowZero; } paramMap[] = { -#define DEFINE_PARAM_INFO(name, key, writable, allowZero) \ - {name, key, writable, allowZero}, +#define DEFINE_PARAM_INFO(name, key, writable) \ + {name, key, writable}, FOR_EACH_GC_PARAM(DEFINE_PARAM_INFO) #undef DEFINE_PARAM_INFO }; -#define PARAM_NAME_LIST_ENTRY(name, key, writable, allowZero) \ +#define PARAM_NAME_LIST_ENTRY(name, key, writable) \ " " name #define GC_PARAMETER_ARGS_LIST FOR_EACH_GC_PARAM(PARAM_NAME_LIST_ENTRY) @@ -423,12 +422,6 @@ GCParameter(JSContext* cx, unsigned argc, Value* vp) } uint32_t value = floor(d); - if (!info.allowZero && value == 0) { - JS_ReportError(cx, "the second argument must be convertable to uint32_t " - "with non-zero value"); - return false; - } - if (param == JSGC_MARK_STACK_LIMIT && JS::IsIncrementalGCInProgress(cx->runtime())) { JS_ReportError(cx, "attempt to set markStackLimit while a GC is in progress"); return false; @@ -445,7 +438,18 @@ GCParameter(JSContext* cx, unsigned argc, Value* vp) } } - JS_SetGCParameter(cx->runtime(), param, value); + bool ok; + { + JSRuntime* rt = cx->runtime(); + AutoLockGC lock(rt); + ok = rt->gc.setParameter(param, value, lock); + } + + if (!ok) { + JS_ReportError(cx, "Parameter value out of range"); + return false; + } + args.rval().setUndefined(); return true; } diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 0ee6357a11c7..035006b5a896 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -154,8 +154,8 @@ class GCSchedulingTunables /* * Controls the number of empty chunks reserved for future allocation. */ - unsigned minEmptyChunkCount_; - unsigned maxEmptyChunkCount_; + uint32_t minEmptyChunkCount_; + uint32_t maxEmptyChunkCount_; public: GCSchedulingTunables() @@ -190,7 +190,7 @@ class GCSchedulingTunables unsigned minEmptyChunkCount(const AutoLockGC&) const { return minEmptyChunkCount_; } unsigned maxEmptyChunkCount() const { return maxEmptyChunkCount_; } - void setParameter(JSGCParamKey key, uint32_t value, const AutoLockGC& lock); + bool setParameter(JSGCParamKey key, uint32_t value, const AutoLockGC& lock); }; /* @@ -593,7 +593,7 @@ class GCRuntime void removeRoot(Value* vp); void setMarkStackLimit(size_t limit, AutoLockGC& lock); - void setParameter(JSGCParamKey key, uint32_t value, AutoLockGC& lock); + bool setParameter(JSGCParamKey key, uint32_t value, AutoLockGC& lock); uint32_t getParameter(JSGCParamKey key, const AutoLockGC& lock); bool triggerGC(JS::gcreason::Reason reason); diff --git a/js/src/jit-test/tests/gc/bug-1238548.js b/js/src/jit-test/tests/gc/bug-1238548.js new file mode 100644 index 000000000000..9424ffb9c6f2 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238548.js @@ -0,0 +1,2 @@ +// |jit-test| error: Error +gcparam("highFrequencyHeapGrowthMax", 1); diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index e66383f51358..77053eff9d5e 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -1476,7 +1476,7 @@ JS_PUBLIC_API(void) JS_SetGCParameter(JSRuntime* rt, JSGCParamKey key, uint32_t value) { AutoLockGC lock(rt); - rt->gc.setParameter(key, value, lock); + MOZ_ALWAYS_TRUE(rt->gc.setParameter(key, value, lock)); } JS_PUBLIC_API(uint32_t) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index d8617b8fb5c6..14b1525fbee1 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1293,7 +1293,7 @@ GCRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes) * for default backward API compatibility. */ AutoLockGC lock(rt); - tunables.setParameter(JSGC_MAX_BYTES, maxbytes, lock); + MOZ_ALWAYS_TRUE(tunables.setParameter(JSGC_MAX_BYTES, maxbytes, lock)); setMaxMallocBytes(maxbytes); const char* size = getenv("JSGC_MARK_STACK_LIMIT"); @@ -1401,7 +1401,7 @@ GCRuntime::finishRoots() FinishPersistentRootedChains(rt->mainThread.roots); } -void +bool GCRuntime::setParameter(JSGCParamKey key, uint32_t value, AutoLockGC& lock) { switch (key) { @@ -1420,24 +1420,30 @@ GCRuntime::setParameter(JSGCParamKey key, uint32_t value, AutoLockGC& lock) decommitThreshold = (uint64_t)value * 1024 * 1024; break; case JSGC_MODE: + if (mode != JSGC_MODE_GLOBAL && + mode != JSGC_MODE_COMPARTMENT && + mode != JSGC_MODE_INCREMENTAL) + { + return false; + } mode = JSGCMode(value); - MOZ_ASSERT(mode == JSGC_MODE_GLOBAL || - mode == JSGC_MODE_COMPARTMENT || - mode == JSGC_MODE_INCREMENTAL); break; case JSGC_COMPACTING_ENABLED: compactingEnabled = value != 0; break; default: - tunables.setParameter(key, value, lock); + if (!tunables.setParameter(key, value, lock)) + return false; for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) { zone->threshold.updateAfterGC(zone->usage.gcBytes(), GC_NORMAL, tunables, schedulingState, lock); } } + + return true; } -void +bool GCSchedulingTunables::setParameter(JSGCParamKey key, uint32_t value, const AutoLockGC& lock) { switch(key) { @@ -1447,31 +1453,50 @@ GCSchedulingTunables::setParameter(JSGCParamKey key, uint32_t value, const AutoL case JSGC_HIGH_FREQUENCY_TIME_LIMIT: highFrequencyThresholdUsec_ = value * PRMJ_USEC_PER_MSEC; break; - case JSGC_HIGH_FREQUENCY_LOW_LIMIT: - highFrequencyLowLimitBytes_ = (uint64_t)value * 1024 * 1024; + case JSGC_HIGH_FREQUENCY_LOW_LIMIT: { + uint64_t newLimit = (uint64_t)value * 1024 * 1024; + if (newLimit == UINT64_MAX) + return false; + highFrequencyLowLimitBytes_ = newLimit; if (highFrequencyLowLimitBytes_ >= highFrequencyHighLimitBytes_) highFrequencyHighLimitBytes_ = highFrequencyLowLimitBytes_ + 1; MOZ_ASSERT(highFrequencyHighLimitBytes_ > highFrequencyLowLimitBytes_); break; - case JSGC_HIGH_FREQUENCY_HIGH_LIMIT: - MOZ_ASSERT(value > 0); - highFrequencyHighLimitBytes_ = (uint64_t)value * 1024 * 1024; + } + case JSGC_HIGH_FREQUENCY_HIGH_LIMIT: { + uint64_t newLimit = (uint64_t)value * 1024 * 1024; + if (newLimit == 0) + return false; + highFrequencyHighLimitBytes_ = newLimit; if (highFrequencyHighLimitBytes_ <= highFrequencyLowLimitBytes_) highFrequencyLowLimitBytes_ = highFrequencyHighLimitBytes_ - 1; MOZ_ASSERT(highFrequencyHighLimitBytes_ > highFrequencyLowLimitBytes_); break; - case JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX: - highFrequencyHeapGrowthMax_ = value / 100.0; + } + case JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX: { + double newGrowth = value / 100.0; + if (newGrowth <= 0.85) + return false; + highFrequencyHeapGrowthMax_ = newGrowth; MOZ_ASSERT(highFrequencyHeapGrowthMax_ / 0.85 > 1.0); break; - case JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN: - highFrequencyHeapGrowthMin_ = value / 100.0; + } + case JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN: { + double newGrowth = value / 100.0; + if (newGrowth <= 0.85) + return false; + highFrequencyHeapGrowthMin_ = newGrowth; MOZ_ASSERT(highFrequencyHeapGrowthMin_ / 0.85 > 1.0); break; - case JSGC_LOW_FREQUENCY_HEAP_GROWTH: - lowFrequencyHeapGrowth_ = value / 100.0; + } + case JSGC_LOW_FREQUENCY_HEAP_GROWTH: { + double newGrowth = value / 100.0; + if (newGrowth <= 0.9) + return false; + lowFrequencyHeapGrowth_ = newGrowth; MOZ_ASSERT(lowFrequencyHeapGrowth_ / 0.9 > 1.0); break; + } case JSGC_DYNAMIC_HEAP_GROWTH: dynamicHeapGrowthEnabled_ = value != 0; break; @@ -1496,6 +1521,8 @@ GCSchedulingTunables::setParameter(JSGCParamKey key, uint32_t value, const AutoL default: MOZ_CRASH("Unknown GC parameter."); } + + return true; } uint32_t From 4098b4956e0440ab9222574271368116eafd7ee1 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 14 Jan 2016 13:51:39 +0000 Subject: [PATCH 038/156] Bug 1238582 - Fix spurious assertion failure in array sort due to over-eager OOM simulation r=jandem --- js/src/jit-test/tests/gc/bug-1238582.js | 4 ++++ js/src/jsarray.cpp | 16 ++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 js/src/jit-test/tests/gc/bug-1238582.js diff --git a/js/src/jit-test/tests/gc/bug-1238582.js b/js/src/jit-test/tests/gc/bug-1238582.js new file mode 100644 index 000000000000..60286c8eee87 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1238582.js @@ -0,0 +1,4 @@ +if (!('oomTest' in this)) + quit(); + +oomTest(() => { let a = [2147483651]; [a[0], a[undefined]].sort(); }); diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 40e6c8475072..0512b6923d13 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -1741,7 +1741,7 @@ SortLexicographically(JSContext* cx, AutoValueVector* vec, size_t len) Vector strElements(cx); /* MergeSort uses the upper half as scratch space. */ - if (!strElements.reserve(2 * len)) + if (!strElements.resize(2 * len)) return false; /* Convert Values to strings. */ @@ -1753,14 +1753,10 @@ SortLexicographically(JSContext* cx, AutoValueVector* vec, size_t len) if (!ValueToStringBuffer(cx, (*vec)[i], sb)) return false; - StringifiedElement el = { cursor, sb.length(), i }; - strElements.infallibleAppend(el); + strElements[i] = { cursor, sb.length(), i }; cursor = sb.length(); } - /* Resize strElements so we can perform MergeSort. */ - JS_ALWAYS_TRUE(strElements.resize(2 * len)); - /* Sort Values in vec alphabetically. */ return MergeSortByKey(strElements.begin(), len, strElements.begin() + len, SortComparatorStringifiedElements(cx, sb), vec); @@ -1780,7 +1776,7 @@ SortNumerically(JSContext* cx, AutoValueVector* vec, size_t len, ComparatorMatch Vector numElements(cx); /* MergeSort uses the upper half as scratch space. */ - if (!numElements.reserve(2 * len)) + if (!numElements.resize(2 * len)) return false; /* Convert Values to numerics. */ @@ -1792,13 +1788,9 @@ SortNumerically(JSContext* cx, AutoValueVector* vec, size_t len, ComparatorMatch if (!ToNumber(cx, (*vec)[i], &dv)) return false; - NumericElement el = { dv, i }; - numElements.infallibleAppend(el); + numElements[i] = { dv, i }; } - /* Resize strElements so we can perform MergeSort. */ - JS_ALWAYS_TRUE(numElements.resize(2 * len)); - /* Sort Values in vec numerically. */ return MergeSortByKey(numElements.begin(), len, numElements.begin() + len, SortComparatorNumerics[comp], vec); From 65f5672a1b3b6a518aa8fe27e17337544cd35f47 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 14 Jan 2016 14:01:19 +0000 Subject: [PATCH 039/156] Bug 1238610 - Restore compartment debug mode flags if adding a debuggee global fails r=jimb --- js/src/jit-test/tests/debug/bug-1238610.js | 27 ++++++++++++++++++++++ js/src/jscompartment.h | 3 ++- js/src/vm/Debugger.cpp | 24 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 js/src/jit-test/tests/debug/bug-1238610.js diff --git a/js/src/jit-test/tests/debug/bug-1238610.js b/js/src/jit-test/tests/debug/bug-1238610.js new file mode 100644 index 000000000000..369d7550d0f3 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug-1238610.js @@ -0,0 +1,27 @@ +// |jit-test| allow-oom + +if (!('oomAfterAllocations' in this)) + quit(); + +if (helperThreadCount() === 0) + quit(0); + +lfcode = new Array(); +dbg = Debugger(); +dbg.onEnterFrame = function() {}; +g = newGlobal(); +lfcode.push(` + oomAfterAllocations(100); + new Number(); + dbg.addDebuggee(g); +`) +file = lfcode.shift(); +loadFile(file); +function loadFile(lfVarx) { + lfGlobal = newGlobal() + for (lfLocal in this) + if (!(lfLocal in lfGlobal)) + lfGlobal[lfLocal] = this[lfLocal] + offThreadCompileScript(lfVarx) + lfGlobal.runOffThreadScript() +} diff --git a/js/src/jscompartment.h b/js/src/jscompartment.h index 1e4829ccd884..76e2d2523d9a 100644 --- a/js/src/jscompartment.h +++ b/js/src/jscompartment.h @@ -482,7 +482,8 @@ struct JSCompartment DebuggerNeedsDelazification = 1 << 4 }; - unsigned debugModeBits; + unsigned debugModeBits; + friend class AutoRestoreCompartmentDebugMode; static const unsigned DebuggerObservesMask = IsDebuggee | DebuggerObservesAllExecution | diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 8326e3913248..243c337c7087 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -248,6 +248,28 @@ class Debugger::FrameRange } }; +class AutoRestoreCompartmentDebugMode +{ + JSCompartment* comp_; + unsigned bits_; + + public: + AutoRestoreCompartmentDebugMode(JSCompartment* comp) + : comp_(comp), bits_(comp->debugModeBits) + { + MOZ_ASSERT(comp_); + } + + ~AutoRestoreCompartmentDebugMode() { + if (comp_) + comp_->debugModeBits = bits_; + } + + void release() { + comp_ = nullptr; + } +}; + /*** Breakpoints *********************************************************************************/ @@ -3474,6 +3496,7 @@ Debugger::addDebuggeeGlobal(JSContext* cx, Handle global) }); // (6) + AutoRestoreCompartmentDebugMode debugModeGuard(debuggeeCompartment); debuggeeCompartment->setIsDebuggee(); debuggeeCompartment->updateDebuggerObservesAsmJS(); debuggeeCompartment->updateDebuggerObservesCoverage(); @@ -3485,6 +3508,7 @@ Debugger::addDebuggeeGlobal(JSContext* cx, Handle global) zoneDebuggersGuard.release(); debuggeeZonesGuard.release(); allocationsTrackingGuard.release(); + debugModeGuard.release(); return true; } From e5a189497fbc4329ffd673128a234ff6700c64fa Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Wed, 13 Jan 2016 18:47:58 +0000 Subject: [PATCH 040/156] Bug 1239371 - Consider state of boolean values for marionette.logging pref; r=automatedtester The patch for bug 1239363 treated the marionette.logging preference as a defined/undefined state, and didn't look specifically at the state of the variable itself. This meant that if it was set to false, logging would still be enabled. As this was not the original behaviour were adding backwards compatibility for, this patch corrects this problem by making false equivalent to the default (Log.Level.Info). --HG-- extra : rebase_source : be0e3403c62934c1b6686af409a2e2a0eac2f33d --- .../components/marionettecomponent.js | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/testing/marionette/components/marionettecomponent.js b/testing/marionette/components/marionettecomponent.js index aebd619ba99b..2d91d3989e28 100644 --- a/testing/marionette/components/marionettecomponent.js +++ b/testing/marionette/components/marionettecomponent.js @@ -61,13 +61,22 @@ MarionetteComponent.prototype.determineLoggingLevel_ = function() { // marionette.logging pref can override default // with an entry from the Log.Level enum if (Preferences.has(LOG_PREF)) { - let s = Preferences.get(LOG_PREF); - if (typeof s == "string") { - s = s.toLowerCase(); - s = s.charAt(0).toUpperCase() + s.slice(1); - level = Log.Level[s]; - } else { - level = Log.Level.Trace; + let p = Preferences.get(LOG_PREF); + + switch (typeof p) { + // Gecko >= 46 + case "string": + let s = p.toLowerCase(); + s = s.charAt(0).toUpperCase() + s.slice(1); + level = Log.Level[s]; + break; + + // Gecko <= 45 + case "boolean": + if (p) { + level = Log.Level.Trace; + } + break; } } From 2c319f6bef63aab6a4fbbdceb527c04e12b58c22 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:12 +0100 Subject: [PATCH 041/156] Bug 1237201 part 1 - Use MOZ_ALWAYS_TRUE in nsScriptLoadHandler::TryDecodeRawData. r=yury --- dom/base/nsScriptLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp index e492c5461da6..df903bd27d9c 100644 --- a/dom/base/nsScriptLoader.cpp +++ b/dom/base/nsScriptLoader.cpp @@ -1806,7 +1806,7 @@ nsScriptLoadHandler::TryDecodeRawData(const uint8_t* aData, haveRead += dstLen; MOZ_ASSERT(haveRead <= capacity, "mDecoder produced more data than expected"); - mBuffer.resizeUninitialized(haveRead); + MOZ_ALWAYS_TRUE(mBuffer.resizeUninitialized(haveRead)); return NS_OK; } From 98f91b82f95871aadf614ff64eae60673e0ac95c Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:16 +0100 Subject: [PATCH 042/156] Bug 1237201 part 2 - Handle Vector OOM in gfx/. r=jrmuizel,kats --- gfx/2d/Preferences.cpp | 6 ++-- gfx/2d/SFNTData.cpp | 4 ++- gfx/2d/SFNTNameTable.cpp | 24 ++++++++++------ gfx/layers/apz/src/AsyncPanZoomController.cpp | 28 +++++++++++-------- gfx/thebes/gfxUtils.cpp | 4 ++- 5 files changed, 43 insertions(+), 23 deletions(-) diff --git a/gfx/2d/Preferences.cpp b/gfx/2d/Preferences.cpp index 87a2a496efea..73904cbc7c84 100644 --- a/gfx/2d/Preferences.cpp +++ b/gfx/2d/Preferences.cpp @@ -31,7 +31,9 @@ int32_t PreferenceAccess::RegisterLivePref(const char* aName, int32_t* aVar, int32_t aDefault) { - Int32Prefs().append(Int32Pref{ aName, aVar }); + if (!Int32Prefs().append(Int32Pref{ aName, aVar })) { + MOZ_CRASH(); + } return aDefault; } @@ -57,4 +59,4 @@ PreferenceAccess::SetAccess(PreferenceAccess* aAccess) } } // namespace gfx -} // namespace mozilla \ No newline at end of file +} // namespace mozilla diff --git a/gfx/2d/SFNTData.cpp b/gfx/2d/SFNTData.cpp index 23c42331e102..1978577eb056 100644 --- a/gfx/2d/SFNTData.cpp +++ b/gfx/2d/SFNTData.cpp @@ -194,7 +194,9 @@ SFNTData::GetU16FullNames(Vector& aU16FullNames) if (mFonts[i]->GetU16FullName(name)) { fontFound = true; } - aU16FullNames.append(Move(name)); + if (!aU16FullNames.append(Move(name))) { + return false; + } } return fontFound; diff --git a/gfx/2d/SFNTNameTable.cpp b/gfx/2d/SFNTNameTable.cpp index 1977c273711f..082ccfa7f489 100644 --- a/gfx/2d/SFNTNameTable.cpp +++ b/gfx/2d/SFNTNameTable.cpp @@ -128,37 +128,45 @@ CreateCanonicalU16Matchers(const BigEndianUint16& aNameID) NameRecordMatchers *matchers = new NameRecordMatchers(); // First, look for the English name (this will normally succeed). - matchers->append( + if (!matchers->append( [=](const NameRecord *aNameRecord) { return aNameRecord->nameID == aNameID && aNameRecord->languageID == CANONICAL_LANG_ID && aNameRecord->platformID == PLATFORM_ID && IsUTF16Encoding(aNameRecord); - }); + })) { + MOZ_CRASH(); + } // Second, look for all languages. - matchers->append( + if (!matchers->append( [=](const NameRecord *aNameRecord) { return aNameRecord->nameID == aNameID && aNameRecord->platformID == PLATFORM_ID && IsUTF16Encoding(aNameRecord); - }); + })) { + MOZ_CRASH(); + } #if defined(XP_MACOSX) // On Mac may be dealing with font that only has Microsoft name entries. - matchers->append( + if (!matchers->append( [=](const NameRecord *aNameRecord) { return aNameRecord->nameID == aNameID && aNameRecord->languageID == LANG_ID_MICROSOFT_EN_US && aNameRecord->platformID == PLATFORM_ID_MICROSOFT && IsUTF16Encoding(aNameRecord); - }); - matchers->append( + })) { + MOZ_CRASH(); + } + if (!matchers->append( [=](const NameRecord *aNameRecord) { return aNameRecord->nameID == aNameID && aNameRecord->platformID == PLATFORM_ID_MICROSOFT && IsUTF16Encoding(aNameRecord); - }); + })) { + MOZ_CRASH(); + } #endif return matchers; diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 2cbe23d8f513..bbd9a730fd58 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -516,9 +516,11 @@ public: // while holding mMonitor, because otherwise, if the overscrolled APZC // is this one, then the SetState(NOTHING) in UpdateAnimation will // stomp on the SetState(SNAP_BACK) it does. - mDeferredTasks.append(NewRunnableMethod(mOverscrollHandoffChain.get(), - &OverscrollHandoffChain::SnapBackOverscrolledApzc, - &mApzc)); + if (!mDeferredTasks.append(NewRunnableMethod(mOverscrollHandoffChain.get(), + &OverscrollHandoffChain::SnapBackOverscrolledApzc, + &mApzc))) { + MOZ_CRASH(); + } return false; } @@ -567,11 +569,13 @@ public: // the lock ordering. Instead we schedule HandleFlingOverscroll() to be // called after mMonitor is released. APZC_LOG("%p fling went into overscroll, handing off with velocity %s\n", &mApzc, Stringify(velocity).c_str()); - mDeferredTasks.append(NewRunnableMethod(&mApzc, - &AsyncPanZoomController::HandleFlingOverscroll, - velocity, - mOverscrollHandoffChain, - mScrolledApzc)); + if (!mDeferredTasks.append(NewRunnableMethod(&mApzc, + &AsyncPanZoomController::HandleFlingOverscroll, + velocity, + mOverscrollHandoffChain, + mScrolledApzc))) { + MOZ_CRASH(); + } // If there is a remaining velocity on this APZC, continue this fling // as well. (This fling and the handed-off fling will run concurrently.) @@ -796,9 +800,11 @@ public: // HandleSmoothScrollOverscroll() (which acquires the tree lock) would violate // the lock ordering. Instead we schedule HandleSmoothScrollOverscroll() to be // called after mMonitor is released. - mDeferredTasks.append(NewRunnableMethod(&mApzc, - &AsyncPanZoomController::HandleSmoothScrollOverscroll, - velocity)); + if (!mDeferredTasks.append(NewRunnableMethod(&mApzc, + &AsyncPanZoomController::HandleSmoothScrollOverscroll, + velocity))) { + MOZ_CRASH(); + } return false; } diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index d166cf10aad7..7ba09f2ffa52 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -1197,7 +1197,9 @@ EncodeSourceSurfaceInternal(SourceSurface* aSurface, &numReadThisTime)) == NS_OK && numReadThisTime > 0) { // Update the length of the vector without overwriting the new data. - imgData.growByUninitialized(numReadThisTime); + if (!imgData.growByUninitialized(numReadThisTime)) { + return NS_ERROR_OUT_OF_MEMORY; + } imgSize += numReadThisTime; if (imgSize == bufSize) { From 3c3f394c55792f2759ec906635f3ce302cbb37af Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:21 +0100 Subject: [PATCH 043/156] Bug 1237201 part 3 - Handle Vector OOM in StreamingLexer. r=njn --- image/StreamingLexer.h | 8 ++++++-- image/test/gtest/TestStreamingLexer.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/image/StreamingLexer.h b/image/StreamingLexer.h index 0f49981b004b..968d3a0c3eec 100644 --- a/image/StreamingLexer.h +++ b/image/StreamingLexer.h @@ -316,7 +316,9 @@ public: size_t toRead = std::min(aLength, mTransition.Size() - mBuffer.length()); - mBuffer.append(aInput, toRead); + if (!mBuffer.append(aInput, toRead)) { + return Some(TerminalState::FAILURE); + } aInput += toRead; aLength -= toRead; if (mBuffer.length() != mTransition.Size()) { @@ -394,7 +396,9 @@ public: if (!mBuffer.reserve(mTransition.Size())) { return Some(TerminalState::FAILURE); // Done due to allocation failure. } - mBuffer.append(aInput, aLength); + if (!mBuffer.append(aInput, aLength)) { + return Some(TerminalState::FAILURE); + } return Nothing(); // Need more input. } diff --git a/image/test/gtest/TestStreamingLexer.cpp b/image/test/gtest/TestStreamingLexer.cpp index 5be764e52fb5..8f59ae286bfb 100644 --- a/image/test/gtest/TestStreamingLexer.cpp +++ b/image/test/gtest/TestStreamingLexer.cpp @@ -55,7 +55,7 @@ DoLexWithUnbuffered(TestState aState, const char* aData, size_t aLength, return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); case TestState::UNBUFFERED: EXPECT_TRUE(aLength <= 3); - aUnbufferedVector.append(aData, aLength); + EXPECT_TRUE(aUnbufferedVector.append(aData, aLength)); return Transition::ContinueUnbuffered(TestState::UNBUFFERED); case TestState::TWO: CheckData(aUnbufferedVector.begin(), aUnbufferedVector.length()); From e649af9a9f222634ddf522e6eeba64a60a601538 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:24 +0100 Subject: [PATCH 044/156] Bug 1237201 part 4 - Handle Vector OOM in ipc/. r=billm --- ipc/glue/MessageChannel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp index 7db849063dcc..153532985aeb 100644 --- a/ipc/glue/MessageChannel.cpp +++ b/ipc/glue/MessageChannel.cpp @@ -226,7 +226,8 @@ public: if (mThat.mCxxStackFrames.empty()) mThat.EnteredCxxStack(); - mThat.mCxxStackFrames.append(InterruptFrame(direction, msg)); + if (!mThat.mCxxStackFrames.append(InterruptFrame(direction, msg))) + MOZ_CRASH(); const InterruptFrame& frame = mThat.mCxxStackFrames.back(); @@ -778,7 +779,8 @@ MessageChannel::ProcessPendingRequests() for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); ) { Message &msg = *it; if (!ShouldDeferMessage(msg)) { - toProcess.append(Move(msg)); + if (!toProcess.append(Move(msg))) + MOZ_CRASH(); it = mPending.erase(it); continue; } From 6aaa4ac6176bdf87783ebcce2fb77165fc236de9 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:28 +0100 Subject: [PATCH 045/156] Bug 1237201 part 5 - Ignore Vector OOM in JSMainRuntimeCompartmentsReporter. r=njn --- js/xpconnect/src/XPCJSRuntime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index 5c0857cc8f4b..ec9390283859 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -2664,7 +2664,7 @@ class JSMainRuntimeCompartmentsReporter final : public nsIMemoryReporter ? NS_LITERAL_CSTRING("js-main-runtime-compartments/system/") : NS_LITERAL_CSTRING("js-main-runtime-compartments/user/"), 0); - data->paths.append(path); + (void)data->paths.append(path); } NS_IMETHOD CollectReports(nsIMemoryReporterCallback* cb, From dabcd72958dc829e8d65bbcb99a5509f9cabd880 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:33 +0100 Subject: [PATCH 046/156] Bug 1237201 part 6 - Handle Vector OOM in media/webrtc/. r=jesup --- .../webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp | 4 +++- .../signaling/src/peerconnection/WebrtcGlobalInformation.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp index 3b0d83936fb2..3a24d821377a 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp @@ -328,7 +328,9 @@ PeerConnectionCtx::EverySecondTelemetryCallback_m(nsITimer* timer, void *closure for (auto p = ctx->mPeerConnections.begin(); p != ctx->mPeerConnections.end(); ++p) { if (p->second->HasMedia()) { - queries->append(nsAutoPtr(new RTCStatsQuery(true))); + if (!queries->append(nsAutoPtr(new RTCStatsQuery(true)))) { + return; + } if (NS_WARN_IF(NS_FAILED(p->second->BuildStatsQuery_m(nullptr, // all tracks queries->back())))) { queries->popBack(); diff --git a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp index 4b3646dc9785..326dae52c012 100644 --- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp +++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp @@ -386,7 +386,9 @@ BuildStatsQueryList( if (aPcIdFilter.IsEmpty() || aPcIdFilter.EqualsASCII(pc.second->GetIdAsAscii().c_str())) { if (pc.second->HasMedia()) { - queries->append(nsAutoPtr(new RTCStatsQuery(true))); + if (!queries->append(nsAutoPtr(new RTCStatsQuery(true)))) { + return NS_ERROR_OUT_OF_MEMORY; + } rv = pc.second->BuildStatsQuery_m(nullptr, queries->back()); // all tracks if (NS_WARN_IF(NS_FAILED(rv))) { return rv; From 366cd496559a423eb3a763afe97e6dd404359ce6 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 14 Jan 2016 15:19:37 +0100 Subject: [PATCH 047/156] Bug 1237201 part 7 - Handle Vector OOM in nsPerformanceStats, telemetry. r=Yoric --- js/src/vm/Stopwatch.cpp | 6 ++- .../perfmonitoring/nsPerformanceStats.cpp | 37 ++++++++++++++----- toolkit/components/telemetry/Telemetry.cpp | 4 +- .../components/telemetry/ThreadHangStats.h | 4 +- xpcom/threads/BackgroundHangMonitor.cpp | 4 +- 5 files changed, 41 insertions(+), 14 deletions(-) diff --git a/js/src/vm/Stopwatch.cpp b/js/src/vm/Stopwatch.cpp index c06724a8edb1..faa37f765f79 100644 --- a/js/src/vm/Stopwatch.cpp +++ b/js/src/vm/Stopwatch.cpp @@ -221,8 +221,10 @@ AutoStopwatch::AutoStopwatch(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IM } for (auto group = groups->begin(); group < groups->end(); group++) { auto acquired = acquireGroup(*group); - if (acquired) - groups_.append(acquired); + if (acquired) { + if (!groups_.append(acquired)) + MOZ_CRASH(); + } } if (groups_.length() == 0) { // We are not in charge of monitoring anything. diff --git a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp index d2c759943a22..187164e8a040 100644 --- a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp +++ b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp @@ -164,7 +164,9 @@ nsPerformanceObservationTarget::SetTarget(nsPerformanceGroupDetails* details) { NS_IMETHODIMP nsPerformanceObservationTarget::AddJankObserver(nsIPerformanceObserver* observer) { - mObservers.append(observer); + if (!mObservers.append(observer)) { + MOZ_CRASH(); + } return NS_OK; }; @@ -188,7 +190,9 @@ void nsPerformanceObservationTarget::NotifyJankObservers(nsIPerformanceGroupDetails* source, nsIPerformanceAlert* gravity) { // Copy the vector to make sure that it won't change under our feet. mozilla::Vector> observers; - observers.appendAll(mObservers); + if (!observers.appendAll(mObservers)) { + MOZ_CRASH(); + } // Now actually notify. for (auto iter = observers.begin(), end = observers.end(); iter < end; ++iter) { @@ -733,7 +737,9 @@ nsPerformanceStatsService::Dispose() // not modify the hashtable while iterating it. GroupVector groups; for (auto iter = mGroups.Iter(); !iter.Done(); iter.Next()) { - groups.append(iter.Get()->GetKey()); + if (!groups.append(iter.Get()->GetKey())) { + MOZ_CRASH(); + } } for (auto iter = groups.begin(), end = groups.end(); iter < end; ++iter) { RefPtr group = *iter; @@ -1007,7 +1013,10 @@ nsPerformanceStatsService::GetPerformanceGroups(JSContext* cx, JSGroupVector& ou } // All compartments belong to the top group. - out.append(mTopGroup); + if (!out.append(mTopGroup)) { + JS_ReportOutOfMemory(cx); + return false; + } nsAutoString name; CompartmentName(cx, global, name); @@ -1032,7 +1041,10 @@ nsPerformanceStatsService::GetPerformanceGroups(JSContext* cx, JSGroupVector& ou nsPerformanceGroup::GroupScope::ADDON) ); } - out.append(entry->GetGroup()); + if (!out.append(entry->GetGroup())) { + JS_ReportOutOfMemory(cx); + return false; + } } // Find out if the compartment is executed by a window. If so, its @@ -1054,7 +1066,10 @@ nsPerformanceStatsService::GetPerformanceGroups(JSContext* cx, JSGroupVector& ou nsPerformanceGroup::GroupScope::WINDOW) ); } - out.append(entry->GetGroup()); + if (!out.append(entry->GetGroup())) { + JS_ReportOutOfMemory(cx); + return false; + } } // All compartments have their own group. @@ -1063,7 +1078,10 @@ nsPerformanceStatsService::GetPerformanceGroups(JSContext* cx, JSGroupVector& ou name, addonId, windowId, mProcessId, isSystem, nsPerformanceGroup::GroupScope::COMPARTMENT); - out.append(group); + if (!out.append(group)) { + JS_ReportOutOfMemory(cx); + return false; + } return true; } @@ -1190,8 +1208,9 @@ nsPerformanceStatsService::CommitGroup(uint64_t iteration, if (totalTimeDelta >= mJankAlertThreshold) { if (!group->HasPendingAlert()) { - group->SetHasPendingAlert(true); - mPendingAlerts.append(group); + if (mPendingAlerts.append(group)) { + group->SetHasPendingAlert(true); + } return; } } diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index 3a57c38f0ff8..7387e280d302 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -16,6 +16,7 @@ #include "mozilla/DebugOnly.h" #include "mozilla/Likely.h" #include "mozilla/MathAlgorithms.h" +#include "mozilla/unused.h" #include "base/histogram.h" #include "base/pickle.h" @@ -3669,7 +3670,8 @@ TelemetryImpl::RecordThreadHangStats(Telemetry::ThreadHangStats& aStats) MutexAutoLock autoLock(sTelemetry->mThreadHangStatsMutex); - sTelemetry->mThreadHangStats.append(Move(aStats)); + // Ignore OOM. + mozilla::Unused << sTelemetry->mThreadHangStats.append(Move(aStats)); } NS_IMPL_ISUPPORTS(TelemetryImpl, nsITelemetry, nsIMemoryReporter) diff --git a/toolkit/components/telemetry/ThreadHangStats.h b/toolkit/components/telemetry/ThreadHangStats.h index 6ab077fa62ce..60aa680c87da 100644 --- a/toolkit/components/telemetry/ThreadHangStats.h +++ b/toolkit/components/telemetry/ThreadHangStats.h @@ -187,7 +187,9 @@ public: void Add(PRIntervalTime aTime, HangMonitor::HangAnnotationsPtr aAnnotations) { TimeHistogram::Add(aTime); if (aAnnotations) { - mAnnotations.append(Move(aAnnotations)); + if (!mAnnotations.append(Move(aAnnotations))) { + MOZ_CRASH(); + } } } }; diff --git a/xpcom/threads/BackgroundHangMonitor.cpp b/xpcom/threads/BackgroundHangMonitor.cpp index 3b5ccc4c4bfd..06d39b7f282a 100644 --- a/xpcom/threads/BackgroundHangMonitor.cpp +++ b/xpcom/threads/BackgroundHangMonitor.cpp @@ -437,7 +437,9 @@ BackgroundHangThread::ReportHang(PRIntervalTime aHangTime) } // Add new histogram newHistogram.Add(aHangTime, Move(mAnnotations)); - mStats.mHangs.append(Move(newHistogram)); + if (!mStats.mHangs.append(Move(newHistogram))) { + MOZ_CRASH(); + } return mStats.mHangs.back(); } From c73ad6fc40bddd7fc0eb3ad2805fe14e72bad00d Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 14 Jan 2016 14:21:30 +0000 Subject: [PATCH 048/156] Bug 1238610 - Fix implicit constructor errors r=me --- js/src/vm/Debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 243c337c7087..c37d1c3e3b68 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -254,7 +254,7 @@ class AutoRestoreCompartmentDebugMode unsigned bits_; public: - AutoRestoreCompartmentDebugMode(JSCompartment* comp) + explicit AutoRestoreCompartmentDebugMode(JSCompartment* comp) : comp_(comp), bits_(comp->debugModeBits) { MOZ_ASSERT(comp_); From 0a584993f6b094ae4494e1a83d32dc6796d266ac Mon Sep 17 00:00:00 2001 From: David Burns Date: Wed, 13 Jan 2016 14:24:48 +0000 Subject: [PATCH 049/156] Bug 1239307: Marionette to click on centre first client rect r=ato Updating Marionette to click on the centre of the first client rect instead of clicking on the centre of the bounding rect. This allows us to click on multiline links and other items where where are mutliple DOMRects associated with an element. --HG-- extra : commitid : LdAoye46nTf extra : rebase_source : d70743027886996dbea8e5cb33b4c0cdf81114b0 extra : histedit_source : 5ff0b5e7a247c810a7ff21ecbbbb714371871280 --- .../marionette/client/marionette/tests/unit/test_click.py | 6 ++++++ testing/marionette/listener.js | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/testing/marionette/client/marionette/tests/unit/test_click.py b/testing/marionette/client/marionette/tests/unit/test_click.py index 14b779654f46..f89803ab143d 100644 --- a/testing/marionette/client/marionette/tests/unit/test_click.py +++ b/testing/marionette/client/marionette/tests/unit/test_click.py @@ -32,3 +32,9 @@ class TestClick(MarionetteTestCase): with self.assertRaises(ElementNotVisibleException): self.marionette.find_element(By.ID, 'child').click() + + def test_clicking_on_a_multiline_link(self): + test_html = self.marionette.absolute_url("clicks.html") + self.marionette.navigate(test_html) + self.marionette.find_element(By.ID, "overflowLink").click() + self.wait_for_condition(lambda mn: self.marionette.title == "XHTML Test Page") diff --git a/testing/marionette/listener.js b/testing/marionette/listener.js index f3cfe9d95482..80837a30762d 100644 --- a/testing/marionette/listener.js +++ b/testing/marionette/listener.js @@ -1470,7 +1470,10 @@ function clickElement(id) { if (utils.isElementEnabled(el)) { checkEnabledAccessibility(acc, el, true); checkActionableAccessibility(acc, el); - utils.synthesizeMouseAtCenter(el, {}, el.ownerDocument.defaultView); + let rects = el.getClientRects(); + utils.synthesizeMouseAtPoint(rects[0].left + rects[0].width/2, + rects[0].top + rects[0].height/2, + {}, el.ownerDocument.defaultView); } else { throw new InvalidElementStateError("Element is not Enabled"); } From 0ac8e4221570e28b2da60d24d3f57013c0ad47dc Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Thu, 14 Jan 2016 14:23:54 +0000 Subject: [PATCH 050/156] Bug 1239606 - Implement UserContextUI.jsm, r=paolo --- browser/base/content/browser.js | 20 ++------------ browser/components/preferences/cookies.js | 21 ++------------ browser/components/preferences/cookies.xul | 3 -- browser/modules/UserContextUI.jsm | 32 ++++++++++++++++++++++ browser/modules/moz.build | 1 + 5 files changed, 37 insertions(+), 40 deletions(-) create mode 100644 browser/modules/UserContextUI.jsm diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2b65bda4d0b5..b6946926befd 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -10,6 +10,7 @@ var Cc = Components.classes; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/NotificationDB.jsm"); Cu.import("resource:///modules/RecentWindow.jsm"); +Cu.import("resource:///modules/UserContextUI.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Preferences", @@ -4059,24 +4060,7 @@ function updateUserContextUIIndicator(browser) let label = document.getElementById("userContext-label"); let userContextId = browser.getAttribute("usercontextid"); hbox.setAttribute("usercontextid", userContextId); - switch (userContextId) { - case "1": - label.value = gBrowserBundle.GetStringFromName("usercontext.personal.label"); - break; - case "2": - label.value = gBrowserBundle.GetStringFromName("usercontext.work.label"); - break; - case "3": - label.value = gBrowserBundle.GetStringFromName("usercontext.banking.label"); - break; - case "4": - label.value = gBrowserBundle.GetStringFromName("usercontext.shopping.label"); - break; - // Display the context IDs for values outside the pre-defined range. - // Used for debugging, no localization necessary. - default: - label.value = "Context " + userContextId; - } + label.value = UserContextUI.getUserContextLabel(userContextId); } /** diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js index c8d144d68d6a..1aaf8443e788 100644 --- a/browser/components/preferences/cookies.js +++ b/browser/components/preferences/cookies.js @@ -7,6 +7,7 @@ const nsICookie = Components.interfaces.nsICookie; Components.utils.import("resource://gre/modules/PluralForm.jsm"); Components.utils.import("resource://gre/modules/Services.jsm") +Components.utils.import("resource:///modules/UserContextUI.jsm"); var gCookiesWindow = { _cm : Components.classes["@mozilla.org/cookiemanager;1"] @@ -17,7 +18,6 @@ var gCookiesWindow = { _hostOrder : [], _tree : null, _bundle : null, - _bundleBrowser : null, init: function () { var os = Components.classes["@mozilla.org/observer-service;1"] @@ -26,7 +26,6 @@ var gCookiesWindow = { os.addObserver(this, "perm-changed", false); this._bundle = document.getElementById("bundlePreferences"); - this._bundleBrowser = document.getElementById("bundleBrowser"); this._tree = document.getElementById("cookiesList"); this._populateList(true); @@ -518,7 +517,7 @@ var gCookiesWindow = { : this._bundle.getString("hostColon"), isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly") : this._bundle.getString("forAnyConnection"), - userContext: this._convertUserContextIdToContainerName(aItem.originAttributes.userContextId) }; + userContext: UserContextUI.getUserContextLabel(aItem.originAttributes.userContextId) }; for (var i = 0; i < ids.length; ++i) { document.getElementById(ids[i]).disabled = false; } @@ -536,22 +535,6 @@ var gCookiesWindow = { document.getElementById(property).value = properties[property]; }, - _convertUserContextIdToContainerName: function(aUserContextId) { - // TODO: this code should be moved in a separate module - bug 1239606 - switch (aUserContextId) { - // No UserContext: - case 0: return ""; - - case 1: return this._bundleBrowser.getString("usercontext.personal.label"); - case 2: return this._bundleBrowser.getString("usercontext.work.label"); - case 3: return this._bundleBrowser.getString("usercontext.shopping.label"); - case 4: return this._bundleBrowser.getString("usercontext.banking.label"); - - // This should not happen. - default: return "Context " + aUserContextId; - } - }, - onCookieSelected: function () { var item; var seln = this._tree.view.selection; diff --git a/browser/components/preferences/cookies.xul b/browser/components/preferences/cookies.xul index af67e6a17bee..cda6ea220695 100644 --- a/browser/components/preferences/cookies.xul +++ b/browser/components/preferences/cookies.xul @@ -24,9 +24,6 @@ - - diff --git a/browser/modules/UserContextUI.jsm b/browser/modules/UserContextUI.jsm new file mode 100644 index 000000000000..ef60380aa735 --- /dev/null +++ b/browser/modules/UserContextUI.jsm @@ -0,0 +1,32 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +this.EXPORTED_SYMBOLS = ["UserContextUI"]; + +const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; + +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); +Cu.import("resource://gre/modules/Services.jsm") + +XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() { + return Services.strings.createBundle("chrome://browser/locale/browser.properties"); +}); + +this.UserContextUI = { + getUserContextLabel(userContextId) { + switch (userContextId) { + // No UserContext: + case 0: return ""; + + case 1: return gBrowserBundle.GetStringFromName("usercontext.personal.label"); + case 2: return gBrowserBundle.GetStringFromName("usercontext.work.label"); + case 3: return gBrowserBundle.GetStringFromName("usercontext.shopping.label"); + case 4: return gBrowserBundle.GetStringFromName("usercontext.banking.label"); + + // Display the context IDs for values outside the pre-defined range. + // Used for debugging, no localization necessary. + default: return "Context " + userContextId; + } + } +} diff --git a/browser/modules/moz.build b/browser/modules/moz.build index 233104a8fbc9..28df60d71de3 100644 --- a/browser/modules/moz.build +++ b/browser/modules/moz.build @@ -43,6 +43,7 @@ EXTRA_JS_MODULES += [ 'Social.jsm', 'TabGroupsMigrator.jsm', 'TransientPrefs.jsm', + 'UserContextUI.jsm', 'WebappManager.jsm', 'webrtcUI.jsm', ] From 781d4bfb9122022d8d10da183996f9a6f6d5c6c5 Mon Sep 17 00:00:00 2001 From: Armen Zambrano Gasparnian Date: Thu, 14 Jan 2016 09:32:03 -0500 Subject: [PATCH 051/156] Bug 1239592 - Bump TC Linux64 debug jit tests timeout to 7200. r=jmaher --HG-- extra : commitid : HHOxm4V5b6I --- testing/taskcluster/tasks/tests/fx_linux64_jittests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/taskcluster/tasks/tests/fx_linux64_jittests.yml b/testing/taskcluster/tasks/tests/fx_linux64_jittests.yml index 94e7542fad54..db4cc7f140cd 100644 --- a/testing/taskcluster/tasks/tests/fx_linux64_jittests.yml +++ b/testing/taskcluster/tasks/tests/fx_linux64_jittests.yml @@ -5,6 +5,8 @@ task: metadata: name: '[TC] Linux64 jittests {{chunk}}' description: Jittests run {{chunk}} + payload: + maxRunTime: 7200 extra: chunks: total: 2 From b7d365cf8a5d47db395e37b30181b075a98454d1 Mon Sep 17 00:00:00 2001 From: Gian-Carlo Pascutto Date: Wed, 14 May 2014 05:39:00 +0200 Subject: [PATCH 052/156] Bug 936041 - Enable new malware download protection on Android. r=francois f=margaret --- mobile/android/app/mobile.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index c37840c56418..1bc8c75e20b6 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -633,8 +633,8 @@ pref("image.downscale-during-decode.enabled", true); #ifdef MOZ_SAFE_BROWSING pref("browser.safebrowsing.enabled", true); pref("browser.safebrowsing.malware.enabled", true); -pref("browser.safebrowsing.downloads.enabled", false); -pref("browser.safebrowsing.downloads.remote.enabled", false); +pref("browser.safebrowsing.downloads.enabled", true); +pref("browser.safebrowsing.downloads.remote.enabled", true); pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000); pref("browser.safebrowsing.debug", false); @@ -665,6 +665,9 @@ pref("urlclassifier.gethash.timeout_ms", 5000); // a gethash request will be forced to check that the result is still in // the database. pref("urlclassifier.max-complete-age", 2700); + +// Tables for application reputation. +pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar"); #endif // True if this is the first time we are showing about:firstrun From e5e0e995c34c743f9ad384e83cd9c66cf1d8a8f3 Mon Sep 17 00:00:00 2001 From: Alessio Placitelli Date: Wed, 13 Jan 2016 06:02:00 +0100 Subject: [PATCH 053/156] Bug 1238142 - Harden Telemetry addon data collection. r=gfritzsche --- .../telemetry/TelemetryEnvironment.jsm | 94 +++++++++++-------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index 9fde9a95af52..9ea75d783b78 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -264,7 +264,7 @@ function getGfxField(aPropertyName, aDefault) { * @return {String} The substring or null if the input string is null. */ function limitStringToLength(aString, aMaxLength) { - if (aString === null || aString === undefined) { + if (typeof(aString) !== "string") { return null; } return aString.substring(0, aMaxLength); @@ -515,28 +515,36 @@ EnvironmentAddonBuilder.prototype = { continue; } - // Make sure to have valid dates. - let installDate = new Date(Math.max(0, addon.installDate)); - let updateDate = new Date(Math.max(0, addon.updateDate)); + // Weird addon data in the wild can lead to exceptions while collecting + // the data. + try { + // Make sure to have valid dates. + let installDate = new Date(Math.max(0, addon.installDate)); + let updateDate = new Date(Math.max(0, addon.updateDate)); - activeAddons[addon.id] = { - blocklisted: (addon.blocklistState !== Ci.nsIBlocklistService.STATE_NOT_BLOCKED), - description: limitStringToLength(addon.description, MAX_ADDON_STRING_LENGTH), - name: limitStringToLength(addon.name, MAX_ADDON_STRING_LENGTH), - userDisabled: addon.userDisabled, - appDisabled: addon.appDisabled, - version: limitStringToLength(addon.version, MAX_ADDON_STRING_LENGTH), - scope: addon.scope, - type: addon.type, - foreignInstall: addon.foreignInstall, - hasBinaryComponents: addon.hasBinaryComponents, - installDay: Utils.millisecondsToDays(installDate.getTime()), - updateDay: Utils.millisecondsToDays(updateDate.getTime()), - signedState: addon.signedState, - }; + activeAddons[addon.id] = { + blocklisted: (addon.blocklistState !== Ci.nsIBlocklistService.STATE_NOT_BLOCKED), + description: limitStringToLength(addon.description, MAX_ADDON_STRING_LENGTH), + name: limitStringToLength(addon.name, MAX_ADDON_STRING_LENGTH), + userDisabled: addon.userDisabled, + appDisabled: addon.appDisabled, + version: limitStringToLength(addon.version, MAX_ADDON_STRING_LENGTH), + scope: addon.scope, + type: addon.type, + foreignInstall: addon.foreignInstall, + hasBinaryComponents: addon.hasBinaryComponents, + installDay: Utils.millisecondsToDays(installDate.getTime()), + updateDay: Utils.millisecondsToDays(updateDate.getTime()), + signedState: addon.signedState, + }; - if (addon.signedState !== undefined) - activeAddons[addon.id].signedState = addon.signedState; + if (addon.signedState !== undefined) + activeAddons[addon.id].signedState = addon.signedState; + + } catch (ex) { + this._environment._log.error("_getActiveAddons - An addon was discarded due to an error", ex); + continue; + } } return activeAddons; @@ -592,19 +600,24 @@ EnvironmentAddonBuilder.prototype = { continue; } - // Make sure to have a valid date. - let updateDate = new Date(Math.max(0, tag.lastModifiedTime)); + try { + // Make sure to have a valid date. + let updateDate = new Date(Math.max(0, tag.lastModifiedTime)); - activePlugins.push({ - name: limitStringToLength(tag.name, MAX_ADDON_STRING_LENGTH), - version: limitStringToLength(tag.version, MAX_ADDON_STRING_LENGTH), - description: limitStringToLength(tag.description, MAX_ADDON_STRING_LENGTH), - blocklisted: tag.blocklisted, - disabled: tag.disabled, - clicktoplay: tag.clicktoplay, - mimeTypes: tag.getMimeTypes({}), - updateDay: Utils.millisecondsToDays(updateDate.getTime()), - }); + activePlugins.push({ + name: limitStringToLength(tag.name, MAX_ADDON_STRING_LENGTH), + version: limitStringToLength(tag.version, MAX_ADDON_STRING_LENGTH), + description: limitStringToLength(tag.description, MAX_ADDON_STRING_LENGTH), + blocklisted: tag.blocklisted, + disabled: tag.disabled, + clicktoplay: tag.clicktoplay, + mimeTypes: tag.getMimeTypes({}), + updateDay: Utils.millisecondsToDays(updateDate.getTime()), + }); + } catch (ex) { + this._environment._log.error("_getActivePlugins - A plugin was discarded due to an error", ex); + continue; + } } return activePlugins; @@ -628,11 +641,16 @@ EnvironmentAddonBuilder.prototype = { continue; } - activeGMPlugins[plugin.id] = { - version: plugin.version, - userDisabled: plugin.userDisabled, - applyBackgroundUpdates: plugin.applyBackgroundUpdates, - }; + try { + activeGMPlugins[plugin.id] = { + version: plugin.version, + userDisabled: plugin.userDisabled, + applyBackgroundUpdates: plugin.applyBackgroundUpdates, + }; + } catch (ex) { + this._environment._log.error("_getActiveGMPlugins - A GMPlugin was discarded due to an error", ex); + continue; + } } return activeGMPlugins; From 815ad2a85ed85cbf1d7b1967e97196b3b893eb24 Mon Sep 17 00:00:00 2001 From: Alessio Placitelli Date: Wed, 13 Jan 2016 08:46:00 +0100 Subject: [PATCH 054/156] Bug 1238142 - Add test coverage. r=gfritzsche --- .../tests/unit/test_TelemetryEnvironment.js | 118 +++++++++++++++++- 1 file changed, 112 insertions(+), 6 deletions(-) diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index 493e6d7bb41a..19d14c93f98a 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -560,7 +560,7 @@ function checkActiveGMPlugin(data) { Assert.equal(typeof data.applyBackgroundUpdates, "number"); } -function checkAddonsSection(data) { +function checkAddonsSection(data, expectBrokenAddons) { const EXPECTED_FIELDS = [ "activeAddons", "theme", "activePlugins", "activeGMPlugins", "activeExperiment", "persona", @@ -572,9 +572,11 @@ function checkAddonsSection(data) { } // Check the active addons, if available. - let activeAddons = data.addons.activeAddons; - for (let addon in activeAddons) { - checkActiveAddon(activeAddons[addon]); + if (!expectBrokenAddons) { + let activeAddons = data.addons.activeAddons; + for (let addon in activeAddons) { + checkActiveAddon(activeAddons[addon]); + } } // Check "theme" structure. @@ -605,13 +607,13 @@ function checkAddonsSection(data) { Assert.ok(checkNullOrString(data.addons.persona)); } -function checkEnvironmentData(data, isInitial = false) { +function checkEnvironmentData(data, isInitial = false, expectBrokenAddons = false) { checkBuildSection(data); checkSettingsSection(data); checkProfileSection(data); checkPartnerSection(data, isInitial); checkSystemSection(data); - checkAddonsSection(data); + checkAddonsSection(data, expectBrokenAddons); } function run_test() { @@ -965,6 +967,9 @@ add_task(function* test_addonsAndPlugins() { let personaId = (gIsGonk) ? null : PERSONA_ID; Assert.equal(data.addons.persona, personaId, "The correct Persona Id must be reported."); + + // Uninstall the addon. + yield AddonTestUtils.uninstallAddonByID(ADDON_ID); }); add_task(function* test_signedAddon() { @@ -1041,6 +1046,107 @@ add_task(function* test_addonsFieldsLimit() { "The description string must have been limited"); }); +add_task(function* test_collectionWithbrokenAddonData() { + const BROKEN_ADDON_ID = "telemetry-test2.example.com@services.mozilla.org"; + const BROKEN_MANIFEST = { + name: "telemetry social provider", + origin: "https://telemetry-test2.example.com", + sidebarURL: "https://telemetry-test2.example.com/browser/browser/base/content/test/social/social_sidebar.html", + workerURL: "https://telemetry-test2.example.com/browser/browser/base/content/test/social/social_worker.js", + iconURL: "https://telemetry-test2.example.com/browser/browser/base/content/test/general/moz.png", + version: 1, // This is intentionally not a string. + signedState: AddonManager.SIGNEDSTATE_SIGNED, + }; + + const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi"; + const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org"; + const ADDON_INSTALL_DATE = truncateToDays(Date.now()); + const EXPECTED_ADDON_DATA = { + blocklisted: false, + description: "A restartless addon which gets enabled without a reboot.", + name: "XPI Telemetry Restartless Test", + userDisabled: false, + appDisabled: false, + version: "1.0", + scope: 1, + type: "extension", + foreignInstall: false, + hasBinaryComponents: false, + installDay: ADDON_INSTALL_DATE, + updateDay: ADDON_INSTALL_DATE, + signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_MISSING : + AddonManager.SIGNEDSTATE_NOT_REQUIRED, + }; + + let deferred = PromiseUtils.defer(); + let receivedNotifications = 0; + + let registerCheckpointPromise = (aExpected) => { + gNow = futureDate(gNow, 10 * MILLISECONDS_PER_MINUTE); + fakeNow(gNow); + return new Promise(resolve => TelemetryEnvironment.registerChangeListener( + "testBrokenAddon_collection" + aExpected, (reason, data) => { + Assert.equal(reason, "addons-changed"); + receivedNotifications++; + resolve(); + })); + }; + + let assertCheckpoint = (aExpected) => { + Assert.equal(receivedNotifications, aExpected); + TelemetryEnvironment.unregisterChangeListener("testBrokenAddon_collection" + aExpected); + }; + + // Initialize Social in order to use the SocialService later. + let Social = Cu.import("resource:///modules/Social.jsm", {}).Social; + Social.init(); + Assert.ok(Social.initialized, "Social is now initialized"); + + // Add the broken provider to the SocialService. + const PROVIDER_DATA = { + origin: BROKEN_MANIFEST.origin, + manifest: BROKEN_MANIFEST, + }; + + let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService; + let checkpointPromise = registerCheckpointPromise(1); + SocialService.installProvider(PROVIDER_DATA, () => SocialService.enableProvider(BROKEN_MANIFEST.origin), + { bypassInstallPanel: true }); + yield checkpointPromise; + assertCheckpoint(1); + + // Set the clock in the future so our changes don't get throttled. + gNow = fakeNow(futureDate(gNow, 10 * MILLISECONDS_PER_MINUTE)); + // Now install an addon which returns the correct information. + checkpointPromise = registerCheckpointPromise(2); + yield AddonTestUtils.installXPIFromURL(ADDON_INSTALL_URL); + yield checkpointPromise; + assertCheckpoint(2); + + // Check that the new environment contains the Social addon installed with the broken + // manifest and the rest of the data. + let data = TelemetryEnvironment.currentEnvironment; + checkEnvironmentData(data, false, true /* expect broken addons*/); + + let activeAddons = data.addons.activeAddons; + Assert.ok(BROKEN_ADDON_ID in activeAddons, + "The addon with the broken manifest must be reported."); + Assert.equal(activeAddons[BROKEN_ADDON_ID].version, null, + "null should be reported for invalid data."); + Assert.ok(ADDON_ID in activeAddons, + "The valid addon must be reported."); + Assert.equal(activeAddons[ADDON_ID].description, EXPECTED_ADDON_DATA.description, + "The description for the valid addon should be correct."); + + // Uninstall the broken addon so don't mess with other tests. + deferred = PromiseUtils.defer(); + SocialService.uninstallProvider(BROKEN_MANIFEST.origin, deferred.resolve); + yield deferred.promise; + + // Uninstall the valid addon. + yield AddonTestUtils.uninstallAddonByID(ADDON_ID); +}); + add_task(function* test_changeThrottling() { const PREF_TEST = "toolkit.telemetry.test.pref1"; const PREFS_TO_WATCH = new Map([ From fa2e9f9114382c73bde0fac81932d74b9d68908a Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Wed, 6 Jan 2016 15:01:24 -0800 Subject: [PATCH 055/156] Bug 1157469 - use EventListenerService to update markupview event bubbles. r=bgrins Inspector actor now uses EventListenerService:addListenerChangeListener to propagate event listener changes as mutations with type 'events'. markupview will now trigger an update when receiving a mutation of type 'event', and the event bubble display will be updated --HG-- extra : transplant_source : %13%1C%9EJeu%0A%F7Z%9F%EF%8D%3EY%B7U%A1%8B%F2%96 --- devtools/client/inspector/markup/markup.js | 10 +- .../markup/test/browser_markup_events.js | 36 ++++ .../markup/test/doc_markup_events.html | 14 ++ .../markup/test/helper_events_test_runner.js | 36 +++- devtools/server/actors/inspector.js | 31 +++ devtools/server/tests/mochitest/chrome.ini | 1 + .../test_inspector-mutations-events.html | 184 ++++++++++++++++++ 7 files changed, 302 insertions(+), 10 deletions(-) create mode 100644 devtools/server/tests/mochitest/test_inspector-mutations-events.html diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 0088b3a2de74..07d2ce0c5c1e 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -841,14 +841,13 @@ MarkupView.prototype = { // we're not viewing. continue; } - if (type === "attributes" || type === "characterData") { + if (type === "attributes" || type === "characterData" + || type === "events" || type === "pseudoClassLock") { container.update(); } else if (type === "childList" || type === "nativeAnonymousChildList") { container.childrenDirty = true; // Update the children to take care of changes in the markup view DOM. this._updateChildren(container, {flash: true}); - } else if (type === "pseudoClassLock") { - container.update(); } } @@ -2547,7 +2546,6 @@ function ElementEditor(aContainer, aNode) { let tagName = this.node.nodeName.toLowerCase(); this.tag.textContent = tagName; this.closeTag.textContent = tagName; - this.eventNode.style.display = this.node.hasEventListeners ? "inline-block" : "none"; this.update(); this.initialized = true; @@ -2643,6 +2641,10 @@ ElementEditor.prototype = { } } + // Update the event bubble display + this.eventNode.style.display = this.node.hasEventListeners ? + "inline-block" : "none"; + this.updateTextEditor(); }, diff --git a/devtools/client/inspector/markup/test/browser_markup_events.js b/devtools/client/inspector/markup/test/browser_markup_events.js index 8656a3a42710..56f9dbdd2ffa 100644 --- a/devtools/client/inspector/markup/test/browser_markup_events.js +++ b/devtools/client/inspector/markup/test/browser_markup_events.js @@ -152,6 +152,42 @@ const TEST_DATA = [ } ] }, + // #noevents tests check that dynamically added events are properly displayed + // in the markupview + { + selector: "#noevents", + expected: [] + }, + { + selector: "#noevents", + beforeTest: function* (inspector, testActor) { + let nodeMutated = inspector.once("markupmutation"); + yield testActor.eval("window.wrappedJSObject.addNoeventsClickHandler();"); + yield nodeMutated; + }, + expected: [ + { + type: "click", + filename: TEST_URL + ":106", + attributes: [ + "Bubbling", + "DOM2" + ], + handler: 'function noeventsClickHandler(event) {\n' + + ' alert("noevents has an event listener");\n' + + '}' + } + ] + }, + { + selector: "#noevents", + beforeTest: function* (inspector, testActor) { + let nodeMutated = inspector.once("markupmutation"); + yield testActor.eval("window.wrappedJSObject.removeNoeventsClickHandler();"); + yield nodeMutated; + }, + expected: [] + }, ]; add_task(runEventPopupTests); diff --git a/devtools/client/inspector/markup/test/doc_markup_events.html b/devtools/client/inspector/markup/test/doc_markup_events.html index a06f7b5a65e1..1a4f358971f9 100644 --- a/devtools/client/inspector/markup/test/doc_markup_events.html +++ b/devtools/client/inspector/markup/test/doc_markup_events.html @@ -102,6 +102,20 @@ alert("boundHandleEvent clicked"); } }; + + function noeventsClickHandler(event) { + alert("noevents has an event listener"); + }; + + function addNoeventsClickHandler() { + let noevents = document.getElementById("noevents"); + noevents.addEventListener("click", noeventsClickHandler); + }; + + function removeNoeventsClickHandler() { + let noevents = document.getElementById("noevents"); + noevents.removeEventListener("click", noeventsClickHandler); + }; diff --git a/devtools/client/inspector/markup/test/helper_events_test_runner.js b/devtools/client/inspector/markup/test/helper_events_test_runner.js index 52f96bb5dd44..371fe57918ba 100644 --- a/devtools/client/inspector/markup/test/helper_events_test_runner.js +++ b/devtools/client/inspector/markup/test/helper_events_test_runner.js @@ -7,12 +7,12 @@ * TEST_DATA array. */ function* runEventPopupTests() { - let {inspector} = yield addTab(TEST_URL).then(openInspector); + let {inspector, testActor} = yield addTab(TEST_URL).then(openInspector); yield inspector.markup.expandAll(); - for (let {selector, expected} of TEST_DATA) { - yield checkEventsForNode(selector, expected, inspector); + for (let test of TEST_DATA) { + yield checkEventsForNode(test, inspector, testActor); } // Wait for promises to avoid leaks when running this as a single test. @@ -25,12 +25,36 @@ function* runEventPopupTests() { * Generator function that takes a selector and expected results and returns * the event info. * - * @param {String} selector - * Selector pointing at the node to be inspected + * @param {Object} test + * A test object should contain the following properties: + * - selector {String} a css selector targeting the node to edit + * - expected {Array} array of expected event objects + * - type {String} event type + * - filename {String} filename:line where the evt handler is defined + * - attributes {Array} array of event attributes ({String}) + * - handler {String} string representation of the handler + * - beforeTest {Function} (optional) a function to execute on the page + * before running the test + * @param {InspectorPanel} inspector The instance of InspectorPanel currently + * opened + * @param {TestActorFront} testActor */ -function* checkEventsForNode(selector, expected, inspector) { +function* checkEventsForNode(test, inspector, testActor) { + let {selector, expected, beforeTest} = test; let container = yield getContainerForSelector(selector, inspector); + + if (typeof beforeTest === "function") { + yield beforeTest(inspector, testActor); + } + let evHolder = container.elt.querySelector(".markupview-events"); + + if (expected.length === 0) { + // if no event is expected, simply check that the event bubble is hidden + is(evHolder.style.display, "none", "event bubble should be hidden"); + return; + } + let tooltip = inspector.markup.tooltip; yield selectNode(selector, inspector); diff --git a/devtools/server/actors/inspector.js b/devtools/server/actors/inspector.js index 6f1e05f6fabc..8a96c9ae20ca 100644 --- a/devtools/server/actors/inspector.js +++ b/devtools/server/actors/inspector.js @@ -863,6 +863,8 @@ var NodeFront = protocol.FrontClass(NodeActor, { this._form.incompleteValue = change.incompleteValue; } else if (change.type === "pseudoClassLock") { this._form.pseudoClassLocks = change.pseudoClassLocks; + } else if (change.type === "events") { + this._form.hasEventListeners = change.hasEventListeners; } }, @@ -1348,6 +1350,32 @@ var WalkerActor = protocol.ActorClass({ this.layoutChangeObserver.on("reflows", this._onReflows); this._onResize = this._onResize.bind(this); this.layoutChangeObserver.on("resize", this._onResize); + + this._onEventListenerChange = this._onEventListenerChange.bind(this); + eventListenerService.addListenerChangeListener(this._onEventListenerChange); + }, + + /** + * Callback for eventListenerService.addListenerChangeListener + * @param nsISimpleEnumerator changesEnum + * enumerator of nsIEventListenerChange + */ + _onEventListenerChange: function(changesEnum) { + let changes = changesEnum.enumerate(); + while (changes.hasMoreElements()) { + let current = changes.getNext().QueryInterface(Ci.nsIEventListenerChange); + let target = current.target; + + if (this._refMap.has(target)) { + let actor = this._refMap.get(target); + let mutation = { + type: "events", + target: actor.actorID, + hasEventListeners: actor._hasEventListeners + }; + this.queueMutation(mutation); + } + } }, // Returns the JSON representation of this object over the wire. @@ -1414,6 +1442,9 @@ var WalkerActor = protocol.ActorClass({ this.layoutChangeObserver = null; releaseLayoutChangesObserver(this.tabActor); + eventListenerService.removeListenerChangeListener( + this._onEventListenerChange); + this.onMutations = null; this.tabActor = null; diff --git a/devtools/server/tests/mochitest/chrome.ini b/devtools/server/tests/mochitest/chrome.ini index 9d3b222c7607..c328b5dcdf1b 100644 --- a/devtools/server/tests/mochitest/chrome.ini +++ b/devtools/server/tests/mochitest/chrome.ini @@ -69,6 +69,7 @@ skip-if = buildapp == 'mulet' [test_inspector-hide.html] [test_inspector-insert.html] [test_inspector-mutations-attr.html] +[test_inspector-mutations-events.html] [test_inspector-mutations-childlist.html] [test_inspector-mutations-frameload.html] [test_inspector-mutations-value.html] diff --git a/devtools/server/tests/mochitest/test_inspector-mutations-events.html b/devtools/server/tests/mochitest/test_inspector-mutations-events.html new file mode 100644 index 000000000000..546122e445ef --- /dev/null +++ b/devtools/server/tests/mochitest/test_inspector-mutations-events.html @@ -0,0 +1,184 @@ + + + + + + Test for Bug 1157469 + + + + + + +Mozilla Bug 1157469 +Test Document +

+ +
+
+ + From 996520ebd13a1a6c3b2888a29d393fccbfaaf884 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Mon, 11 Jan 2016 20:32:12 +0200 Subject: [PATCH 056/156] Bug 1157469 - null check wrapper in case WrapNode fails, r=bholley --- dom/base/nsINode.cpp | 5 +++-- dom/bindings/BindingUtils.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index 2e95e3c325a5..5848d3133de1 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -2779,8 +2779,9 @@ nsINode::WrapObject(JSContext *aCx, JS::Handle aGivenProto) } JS::Rooted obj(aCx, WrapNode(aCx, aGivenProto)); - MOZ_ASSERT_IF(ChromeOnlyAccess(), - xpc::IsInContentXBLScope(obj) || !xpc::UseContentXBLScope(js::GetObjectCompartment(obj))); + MOZ_ASSERT_IF(obj && ChromeOnlyAccess(), + xpc::IsInContentXBLScope(obj) || + !xpc::UseContentXBLScope(js::GetObjectCompartment(obj))); return obj; } diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 18a148c60af6..dd4de1afcc52 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -1594,7 +1594,7 @@ WrapNativeParent(JSContext* cx, T* p, nsWrapperCache* cache, } JSObject* parent = WrapNativeParentHelper::Wrap(cx, p, cache); - if (!useXBLScope) { + if (!parent || !useXBLScope) { return parent; } From f38ed72a4aeb9042a637ab2252e3d0a0e2f28067 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Wed, 13 Jan 2016 19:24:09 +0100 Subject: [PATCH 057/156] Bug 1238467 - add tooltiptext on SideMenuWidget group checkbox. r=vporof --- .../test/mochitest/browser_dbg_break-on-dom-03.js | 9 ++++++++- devtools/client/locales/en-US/shared.properties | 4 ++++ devtools/client/shared/widgets/SideMenuWidget.jsm | 15 +++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-03.js b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-03.js index f4aac1064443..fa25a1ae8ff9 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-03.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-dom-03.js @@ -24,8 +24,15 @@ function test() { is(gEvents.widget._parent.querySelectorAll(".side-menu-widget-group").length, 3, "There should be 3 groups shown in the view."); - is(gEvents.widget._parent.querySelectorAll(".side-menu-widget-group-checkbox").length, 3, + + let groupCheckboxes = gEvents.widget._parent.querySelectorAll( + ".side-menu-widget-group-checkbox"); + is(groupCheckboxes.length, 3, "There should be a checkbox for each group shown in the view."); + for (let cb of groupCheckboxes) { + isnot(cb.getAttribute("tooltiptext"), "undefined", + "A valid tooltip text should be defined on group checkboxes"); + } is(gEvents.widget._parent.querySelectorAll(".side-menu-widget-item").length, 4, "There should be 4 items shown in the view."); diff --git a/devtools/client/locales/en-US/shared.properties b/devtools/client/locales/en-US/shared.properties index ad2ad2245df9..a4ed711fdb88 100644 --- a/devtools/client/locales/en-US/shared.properties +++ b/devtools/client/locales/en-US/shared.properties @@ -5,3 +5,7 @@ # LOCALIZATION NOTE (dimensions): This is used to display the dimensions # of a node or image, like 100×200. dimensions=%S\u00D7%S + +# LOCALIZATION NOTE (groupCheckbox.tooltip): This is used in the SideMenuWidget +# as the default tooltip of a group checkbox +sideMenu.groupCheckbox.tooltip=Toggle all checkboxes in this group \ No newline at end of file diff --git a/devtools/client/shared/widgets/SideMenuWidget.jsm b/devtools/client/shared/widgets/SideMenuWidget.jsm index e61d40a8e6e3..30fbca7e9907 100644 --- a/devtools/client/shared/widgets/SideMenuWidget.jsm +++ b/devtools/client/shared/widgets/SideMenuWidget.jsm @@ -8,11 +8,18 @@ const Ci = Components.interfaces; const Cu = Components.utils; +const SHARED_STRINGS_URI = "chrome://devtools/locale/shared.properties"; + Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm"); Cu.import("resource://devtools/shared/event-emitter.js"); this.EXPORTED_SYMBOLS = ["SideMenuWidget"]; +/** + * Localization convenience methods. + */ +var L10N = new ViewHelpers.L10N(SHARED_STRINGS_URI); + /** * A simple side menu, with the ability of grouping menu items. * @@ -471,7 +478,10 @@ function SideMenuGroup(aWidget, aName, aOptions={}) { // Show a checkbox before the content. if (aOptions.showCheckbox) { - let checkbox = this._checkbox = makeCheckbox(title, { description: aName }); + let checkbox = this._checkbox = makeCheckbox(title, { + description: aName, + checkboxTooltip: L10N.getStr("sideMenu.groupCheckbox.tooltip") + }); checkbox.className = "side-menu-widget-group-checkbox"; } @@ -685,7 +695,8 @@ SideMenuItem.prototype = { */ function makeCheckbox(aParentNode, aOptions) { let checkbox = aParentNode.ownerDocument.createElement("checkbox"); - checkbox.setAttribute("tooltiptext", aOptions.checkboxTooltip); + + checkbox.setAttribute("tooltiptext", aOptions.checkboxTooltip || ""); if (aOptions.checkboxState) { checkbox.setAttribute("checked", true); From 161dd1d26903bb33665c70a99fef24549942c15b Mon Sep 17 00:00:00 2001 From: Matt Claypotch Date: Wed, 13 Jan 2016 14:10:00 +0100 Subject: [PATCH 058/156] Bug 1228697 - twisty arrow should not shrink in a flexed row; r=bgrins --- devtools/client/themes/webconsole.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devtools/client/themes/webconsole.css b/devtools/client/themes/webconsole.css index 4da1ce7f44f2..ff2ad44259c2 100644 --- a/devtools/client/themes/webconsole.css +++ b/devtools/client/themes/webconsole.css @@ -494,7 +494,8 @@ a { .message .theme-twisty { display: inline-block; vertical-align: middle; - margin: 3px 3px 0 0; + margin: 3px 0 0 0; + flex-shrink: 0; } .stacktrace li { From 85c19fa4d40500a5ed0de813f2dda333bdb30caf Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 12 Jan 2016 11:13:54 +0100 Subject: [PATCH 059/156] Bug 1238639 - HeapAnalysesWorker getCreationTime throws when given non-existant path;r=fitzgen --HG-- extra : transplant_source : v%81ga%DA%C8%25%F5%BF.af%86%236w%A4%1D%02%E1 --- .../shared/heapsnapshot/HeapAnalysesWorker.js | 6 ++++-- .../unit/test_HeapAnalyses_getCreationTime_01.js | 15 ++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/devtools/shared/heapsnapshot/HeapAnalysesWorker.js b/devtools/shared/heapsnapshot/HeapAnalysesWorker.js index 4ea8583ef3e1..3f0b74af0b60 100644 --- a/devtools/shared/heapsnapshot/HeapAnalysesWorker.js +++ b/devtools/shared/heapsnapshot/HeapAnalysesWorker.js @@ -91,8 +91,10 @@ workerHelper.createTask(self, "takeCensusDiff", request => { * @see HeapAnalysesClient.prototype.getCreationTime */ workerHelper.createTask(self, "getCreationTime", snapshotFilePath => { - let snapshot = snapshots[snapshotFilePath]; - return snapshot ? snapshot.creationTime : null; + if (!snapshots[snapshotFilePath]) { + throw new Error(`No known heap snapshot for '${snapshotFilePath}'`); + } + return snapshots[snapshotFilePath].creationTime; }); /** diff --git a/devtools/shared/heapsnapshot/tests/unit/test_HeapAnalyses_getCreationTime_01.js b/devtools/shared/heapsnapshot/tests/unit/test_HeapAnalyses_getCreationTime_01.js index 29e27e74c23c..9ef50487732b 100644 --- a/devtools/shared/heapsnapshot/tests/unit/test_HeapAnalyses_getCreationTime_01.js +++ b/devtools/shared/heapsnapshot/tests/unit/test_HeapAnalyses_getCreationTime_01.js @@ -32,12 +32,17 @@ add_task(function* () { yield client.readHeapSnapshot(snapshotFilePath); ok(true, "Should have read the heap snapshot"); - let time = yield client.getCreationTime("/not/a/real/path", { - breakdown: BREAKDOWN - }); - equal(time, null, "getCreationTime returns `null` when snapshot does not exist"); + let threw = false; + try { + yield client.getCreationTime("/not/a/real/path", { + breakdown: BREAKDOWN + }); + } catch (_) { + threw = true; + } + ok(threw, "getCreationTime should throw when snapshot does not exist"); - time = yield client.getCreationTime(snapshotFilePath, { + let time = yield client.getCreationTime(snapshotFilePath, { breakdown: BREAKDOWN }); ok(time >= start, "creation time occurred after start"); From c9a7afbbd017127b66c5d94f00c37a3691d985b0 Mon Sep 17 00:00:00 2001 From: Lin Clark Date: Tue, 12 Jan 2016 11:46:00 +0100 Subject: [PATCH 060/156] Bug 1239008 - Change ChromeDebuggerActor to protocol.js. r=jryans --- devtools/server/actors/child-process.js | 4 +-- devtools/server/actors/chrome-debugger.js | 32 +++++++++++++++++++++++ devtools/server/actors/moz.build | 1 + devtools/server/actors/script.js | 30 --------------------- 4 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 devtools/server/actors/chrome-debugger.js diff --git a/devtools/server/actors/child-process.js b/devtools/server/actors/child-process.js index 521487c6736f..cbbcc62dcd8d 100644 --- a/devtools/server/actors/child-process.js +++ b/devtools/server/actors/child-process.js @@ -6,7 +6,7 @@ const { Cc, Ci, Cu } = require("chrome"); -const { ChromeDebuggerActor } = require("devtools/server/actors/script"); +const { ChromeDebuggerActor } = require("devtools/server/actors/chrome-debugger"); const { WebConsoleActor } = require("devtools/server/actors/webconsole"); const makeDebugger = require("devtools/server/actors/utils/make-debugger"); const { ActorPool } = require("devtools/server/main"); @@ -75,7 +75,7 @@ ChildProcessActor.prototype = { } if (!this.threadActor) { - this.threadActor = new ChromeDebuggerActor(this.conn, this); + this.threadActor = new ChromeDebuggerActor(this); this._contextPool.addActor(this.threadActor); } diff --git a/devtools/server/actors/chrome-debugger.js b/devtools/server/actors/chrome-debugger.js new file mode 100644 index 000000000000..7dadd19d7c78 --- /dev/null +++ b/devtools/server/actors/chrome-debugger.js @@ -0,0 +1,32 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2; js-indent-level: 2 -*- */ +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +const { ActorClass } = require("devtools/server/protocol"); +const { ThreadActor } = require("devtools/server/actors/script"); + +/** + * ChromeDebuggerActor is a thin wrapper over ThreadActor, slightly changing + * some of its behavior. + */ +let ChromeDebuggerActor = ActorClass({ + typeName: "chromeDebugger", + extends: ThreadActor, + + /** + * Create the actor. + * + * @param parent object + * This actor's parent actor. See ThreadActor for a list of expected + * properties. + */ + initialize: function(parent) { + ThreadActor.call(this, parent); + } +}); + +exports.ChromeDebuggerActor = ChromeDebuggerActor; diff --git a/devtools/server/actors/moz.build b/devtools/server/actors/moz.build index f544b7bb0f47..2fe0642e013c 100644 --- a/devtools/server/actors/moz.build +++ b/devtools/server/actors/moz.build @@ -17,6 +17,7 @@ DevToolsModules( 'canvas.js', 'child-process.js', 'childtab.js', + 'chrome-debugger.js', 'chrome.js', 'common.js', 'csscoverage.js', diff --git a/devtools/server/actors/script.js b/devtools/server/actors/script.js index 5493db527b99..d55221031e3b 100644 --- a/devtools/server/actors/script.js +++ b/devtools/server/actors/script.js @@ -3394,36 +3394,6 @@ function hackDebugger(Debugger) { }); } - -/** - * Creates an actor for handling chrome debugging. ChromeDebuggerActor is a - * thin wrapper over ThreadActor, slightly changing some of its behavior. - * - * @param aConnection object - * The DebuggerServerConnection with which this ChromeDebuggerActor - * is associated. (Currently unused, but required to make this - * constructor usable with addGlobalActor.) - * - * @param aParent object - * This actor's parent actor. See ThreadActor for a list of expected - * properties. - */ -function ChromeDebuggerActor(aConnection, aParent) -{ - ThreadActor.call(this, aParent); -} - -ChromeDebuggerActor.prototype = Object.create(ThreadActor.prototype); - -update(ChromeDebuggerActor.prototype, { - constructor: ChromeDebuggerActor, - - // A constant prefix that will be used to form the actor ID by the server. - actorPrefix: "chromeDebugger" -}); - -exports.ChromeDebuggerActor = ChromeDebuggerActor; - /** * Creates an actor for handling add-on debugging. AddonThreadActor is * a thin wrapper over ThreadActor. From 19bdd172446981e73203aa8a2f290da086141b42 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Mon, 11 Jan 2016 11:57:36 +0000 Subject: [PATCH 061/156] Bug 1237350 - don't steal focus for the search box if another piece of non-button/non-input UI has focus, r=jaws,giorgos --HG-- extra : commitid : 39jGZvehw2u extra : rebase_source : 59490d14e7e9de043645f89231ee7a818f3d7ed8 --- browser/base/content/abouthome/aboutHome.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/browser/base/content/abouthome/aboutHome.js b/browser/base/content/abouthome/aboutHome.js index 352d534b325e..26f77a794ba6 100644 --- a/browser/base/content/abouthome/aboutHome.js +++ b/browser/base/content/abouthome/aboutHome.js @@ -56,9 +56,21 @@ window.addEventListener("pagehide", function() { }); window.addEventListener("keypress", ev => { - // focus the search-box on keypress - if (document.activeElement.id == "searchText") // unless already focussed + if (ev.defaultPrevented) { return; + } + + // don't focus the search-box on keypress if something other than the + // body or document element has focus - don't want to steal input from other elements + // Make an exception for and - - - ); - } - }); - - return { - FeedbackView: FeedbackView - }; -})(_, navigator.mozL10n || document.mozL10n); diff --git a/browser/extensions/loop/content/panels/js/panel.jsx b/browser/extensions/loop/content/panels/js/panel.jsx deleted file mode 100644 index f8162643a91a..000000000000 --- a/browser/extensions/loop/content/panels/js/panel.jsx +++ /dev/null @@ -1,1151 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -var loop = loop || {}; -loop.panel = (function(_, mozL10n) { - "use strict"; - - var sharedViews = loop.shared.views; - var sharedModels = loop.shared.models; - var sharedMixins = loop.shared.mixins; - var sharedActions = loop.shared.actions; - var Button = sharedViews.Button; - var Checkbox = sharedViews.Checkbox; - - var FTU_VERSION = 1; - - var GettingStartedView = React.createClass({ - mixins: [sharedMixins.WindowCloseMixin], - - handleButtonClick: function() { - loop.requestMulti( - ["OpenGettingStartedTour", "getting-started"], - ["SetLoopPref", "gettingStarted.latestFTUVersion", FTU_VERSION], - ["SetPanelHeight"]).then(function() { - var event = new CustomEvent("GettingStartedSeen"); - window.dispatchEvent(event); - }.bind(this)); - this.closeWindow(); - }, - - componentWillMount: function() { - // Set 553 pixel height to show the full FTU panel content. - loop.request("SetPanelHeight", 553); - }, - - render: function() { - return ( -
-
- -
- {mozL10n.get("first_time_experience_subheading2")} -
-
-
- {mozL10n.get("first_time_experience_content")} -
- -
-
-
-
- ); - } - }); - - /** - * Displays a view requesting the user to sign-in again. - */ - var SignInRequestView = React.createClass({ - mixins: [sharedMixins.WindowCloseMixin], - - handleSignInClick: function(event) { - event.preventDefault(); - loop.request("LoginToFxA", true); - this.closeWindow(); - }, - - handleGuestClick: function(event) { - loop.request("LogoutFromFxA"); - }, - - render: function() { - var shortname = mozL10n.get("clientShortname2"); - var line1 = mozL10n.get("sign_in_again_title_line_one", { - clientShortname2: shortname - }); - var line2 = mozL10n.get("sign_in_again_title_line_two2", { - clientShortname2: shortname - }); - var useGuestString = mozL10n.get("sign_in_again_use_as_guest_button2", { - clientSuperShortname: mozL10n.get("clientSuperShortname") - }); - - return ( -
- ); - } - }); - - var ToSView = React.createClass({ - mixins: [sharedMixins.WindowCloseMixin], - - getInitialState: function() { - return { - terms_of_use_url: loop.getStoredRequest(["GetLoopPref", "legal.ToS_url"]), - privacy_notice_url: loop.getStoredRequest(["GetLoopPref", "legal.privacy_url"]) - }; - }, - - handleLinkClick: function(event) { - if (!event.target || !event.target.href) { - return; - } - - event.preventDefault(); - loop.request("OpenURL", event.target.href); - this.closeWindow(); - }, - - render: function() { - var locale = mozL10n.getLanguage(); - var tosHTML = mozL10n.get("legal_text_and_links3", { - "clientShortname": mozL10n.get("clientShortname2"), - "terms_of_use": React.renderToStaticMarkup( - - {mozL10n.get("legal_text_tos")} - - ), - "privacy_notice": React.renderToStaticMarkup( - - {mozL10n.get("legal_text_privacy")} - - ) - }); - - return ( -
-

- {mozL10n.get("powered_by_beforeLogo")} -

-

-
- ); - } - }); - - /** - * Panel settings (gear) menu entry. - */ - var SettingsDropdownEntry = React.createClass({ - propTypes: { - displayed: React.PropTypes.bool, - extraCSSClass: React.PropTypes.string, - label: React.PropTypes.string.isRequired, - onClick: React.PropTypes.func.isRequired - }, - - getDefaultProps: function() { - return { displayed: true }; - }, - - render: function() { - var cx = classNames; - - if (!this.props.displayed) { - return null; - } - - var extraCSSClass = { - "dropdown-menu-item": true - }; - if (this.props.extraCSSClass) { - extraCSSClass[this.props.extraCSSClass] = true; - } - - return ( -
  • - {this.props.label} -
  • - ); - } - }); - - /** - * Panel settings (gear) menu. - */ - var SettingsDropdown = React.createClass({ - mixins: [sharedMixins.DropdownMenuMixin(), sharedMixins.WindowCloseMixin], - - getInitialState: function() { - return { - signedIn: !!loop.getStoredRequest(["GetUserProfile"]), - fxAEnabled: loop.getStoredRequest(["GetFxAEnabled"]), - doNotDisturb: loop.getStoredRequest(["GetDoNotDisturb"]) - }; - }, - - componentWillUpdate: function(nextProps, nextState) { - if (nextState.showMenu !== this.state.showMenu) { - loop.requestMulti( - ["GetUserProfile"], - ["GetFxAEnabled"], - ["GetDoNotDisturb"] - ).then(function(results) { - this.setState({ - signedIn: !!results[0], - fxAEnabled: results[1], - doNotDisturb: results[2] - }); - }.bind(this)); - } - }, - - handleClickSettingsEntry: function() { - // XXX to be implemented at the same time as unhiding the entry - }, - - handleClickAccountEntry: function() { - loop.request("OpenFxASettings"); - this.closeWindow(); - }, - - handleClickAuthEntry: function() { - if (this.state.signedIn) { - loop.request("LogoutFromFxA"); - } else { - loop.request("LoginToFxA"); - } - }, - - handleHelpEntry: function(event) { - event.preventDefault(); - loop.request("GetLoopPref", "support_url").then(function(helloSupportUrl) { - loop.request("OpenURL", helloSupportUrl); - this.closeWindow(); - }.bind(this)); - }, - - handleToggleNotifications: function() { - loop.request("GetDoNotDisturb").then(function(result) { - loop.request("SetDoNotDisturb", !result); - }); - this.hideDropdownMenu(); - }, - - /** - * Load on the browser the feedback url from prefs - */ - handleSubmitFeedback: function(event) { - event.preventDefault(); - loop.request("GetLoopPref", "feedback.manualFormURL").then(function(helloFeedbackUrl) { - loop.request("OpenURL", helloFeedbackUrl); - this.closeWindow(); - }.bind(this)); - }, - - openGettingStartedTour: function() { - loop.request("OpenGettingStartedTour", "settings-menu"); - this.closeWindow(); - }, - - render: function() { - var cx = classNames; - var accountEntryCSSClass = this.state.signedIn ? "entry-settings-signout" : - "entry-settings-signin"; - var notificationsLabel = this.state.doNotDisturb ? "settings_menu_item_turnnotificationson" : - "settings_menu_item_turnnotificationsoff"; - - return ( -
    -
    - ); - } - }); - - /** - * FxA sign in/up link component. - */ - var AccountLink = React.createClass({ - mixins: [sharedMixins.WindowCloseMixin], - - propTypes: { - fxAEnabled: React.PropTypes.bool.isRequired, - userProfile: userProfileValidator - }, - - handleSignInLinkClick: function() { - loop.request("LoginToFxA"); - this.closeWindow(); - }, - - render: function() { - if (!this.props.fxAEnabled) { - return null; - } - - if (this.props.userProfile && this.props.userProfile.email) { - return ( -
    - {loop.shared.utils.truncate(this.props.userProfile.email, 24)} -
    - ); - } - - return ( -

    - - {mozL10n.get("panel_footer_signin_or_signup_link")} - -

    - ); - } - }); - - var RoomEntryContextItem = React.createClass({ - mixins: [loop.shared.mixins.WindowCloseMixin], - - propTypes: { - roomUrls: React.PropTypes.array - }, - - handleClick: function(event) { - event.stopPropagation(); - event.preventDefault(); - if (event.currentTarget.href) { - loop.request("OpenURL", event.currentTarget.href); - this.closeWindow(); - } - }, - - _renderDefaultIcon: function() { - return ( -
    - -
    - ); - }, - - _renderIcon: function(roomUrl) { - return ( -
    - - - -
    - ); - }, - - render: function() { - var roomUrl = this.props.roomUrls && this.props.roomUrls[0]; - if (roomUrl && roomUrl.location) { - return this._renderIcon(roomUrl); - } - - return this._renderDefaultIcon(); - } - }); - - /** - * Room list entry. - * - * Active Room means there are participants in the room. - * Opened Room means the user is in the room. - */ - var RoomEntry = React.createClass({ - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - isOpenedRoom: React.PropTypes.bool.isRequired, - room: React.PropTypes.instanceOf(loop.store.Room).isRequired - }, - - mixins: [ - loop.shared.mixins.WindowCloseMixin, - sharedMixins.DropdownMenuMixin() - ], - - getInitialState: function() { - return { - eventPosY: 0 - }; - }, - - _isActive: function() { - return this.props.room.participants.length > 0; - }, - - handleClickEntry: function(event) { - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.OpenRoom({ - roomToken: this.props.room.roomToken - })); - - // Open url if needed. - loop.request("getSelectedTabMetadata").then(function(metadata) { - var contextURL = this.props.room.decryptedContext.urls && - this.props.room.decryptedContext.urls[0].location; - if (contextURL && metadata.url !== contextURL) { - loop.request("OpenURL", contextURL); - } - this.closeWindow(); - }.bind(this)); - }, - - handleClick: function(e) { - e.preventDefault(); - e.stopPropagation(); - - this.setState({ - eventPosY: e.pageY - }); - - this.toggleDropdownMenu(); - }, - - /** - * Callback called when moving cursor away from the conversation entry. - * Will close the dropdown menu. - */ - _handleMouseOut: function() { - if (this.state.showMenu) { - this.toggleDropdownMenu(); - } - }, - - render: function() { - var roomClasses = classNames({ - "room-entry": true, - "room-active": this._isActive(), - "room-opened": this.props.isOpenedRoom - }); - var urlData = (this.props.room.decryptedContext.urls || [])[0] || {}; - var roomTitle = this.props.room.decryptedContext.roomName || - urlData.description || urlData.location || - mozL10n.get("room_name_untitled_page"); - - return ( -
    - -

    {roomTitle}

    - {this.props.isOpenedRoom ? null : - } -
    - ); - } - }); - - /** - * Buttons corresponding to each conversation entry. - * This component renders the edit button for displaying contextual dropdown - * menu for conversation entries. It also holds the dropdown menu. - */ - var RoomEntryContextButtons = React.createClass({ - propTypes: { - dispatcher: React.PropTypes.object.isRequired, - eventPosY: React.PropTypes.number.isRequired, - handleClick: React.PropTypes.func.isRequired, - room: React.PropTypes.object.isRequired, - showMenu: React.PropTypes.bool.isRequired, - toggleDropdownMenu: React.PropTypes.func.isRequired - }, - - handleEmailButtonClick: function(event) { - event.preventDefault(); - event.stopPropagation(); - - this.props.dispatcher.dispatch( - new sharedActions.EmailRoomUrl({ - roomUrl: this.props.room.roomUrl, - from: "panel" - }) - ); - - this.props.toggleDropdownMenu(); - }, - - handleCopyButtonClick: function(event) { - event.stopPropagation(); - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.CopyRoomUrl({ - roomUrl: this.props.room.roomUrl, - from: "panel" - })); - - this.props.toggleDropdownMenu(); - }, - - handleDeleteButtonClick: function(event) { - event.stopPropagation(); - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.DeleteRoom({ - roomToken: this.props.room.roomToken - })); - - this.props.toggleDropdownMenu(); - }, - - render: function() { - return ( -
    -
    - {this.props.showMenu ? - : - null} -
    - ); - } - }); - - /** - * Dropdown menu for each conversation entry. - * Because the container element has overflow we need to position the menu - * absolutely and have a different element as offset parent for it. We need - * eventPosY to make sure the position on the Y Axis is correct while for the - * X axis there can be only 2 different positions based on being RTL or not. - */ - var ConversationDropdown = React.createClass({ - propTypes: { - eventPosY: React.PropTypes.number.isRequired, - handleCopyButtonClick: React.PropTypes.func.isRequired, - handleDeleteButtonClick: React.PropTypes.func.isRequired, - handleEmailButtonClick: React.PropTypes.func.isRequired - }, - - getInitialState: function() { - return { - openDirUp: false - }; - }, - - componentDidMount: function() { - var menuNode = this.getDOMNode(); - var menuNodeRect = menuNode.getBoundingClientRect(); - - // Get the parent element and make sure the menu does not overlow its - // container. - var listNode = loop.shared.utils.findParentNode(this.getDOMNode(), - "rooms"); - var listNodeRect = listNode.getBoundingClientRect(); - - // Click offset to not display the menu right next to the area clicked. - var offset = 10; - - if (this.props.eventPosY + menuNodeRect.height >= - listNodeRect.top + listNodeRect.height) { - // Position above click area. - menuNode.style.top = this.props.eventPosY - menuNodeRect.height - - listNodeRect.top - offset + "px"; - } else { - // Position below click area. - menuNode.style.top = this.props.eventPosY - listNodeRect.top + - offset + "px"; - } - }, - - render: function() { - var dropdownClasses = classNames({ - "dropdown-menu": true, - "dropdown-menu-up": this.state.openDirUp - }); - - return ( -
      -
    • - {mozL10n.get("copy_link_menuitem")} -
    • -
    • - {mozL10n.get("email_link_menuitem")} -
    • -
    • - {mozL10n.get("delete_conversation_menuitem2")} -
    • -
    - ); - } - }); - - /** - * User profile prop can be either an object or null as per mozLoopAPI - * and there is no way to express this with React 0.13.3 - */ - function userProfileValidator(props, propName, componentName) { - if (Object.prototype.toString.call(props[propName]) !== "[object Object]" && - !_.isNull(props[propName])) { - return new Error("Required prop `" + propName + - "` was not correctly specified in `" + componentName + "`."); - } - } - - /** - * Room list. - */ - var RoomList = React.createClass({ - mixins: [Backbone.Events, sharedMixins.WindowCloseMixin], - - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - store: React.PropTypes.instanceOf(loop.store.RoomStore).isRequired - }, - - getInitialState: function() { - return this.props.store.getStoreState(); - }, - - componentDidMount: function() { - this.listenTo(this.props.store, "change", this._onStoreStateChanged); - - // XXX this should no longer be necessary once have a better mechanism - // for updating the list (possibly as part of the content side of bug - // 1074665. - this.props.dispatcher.dispatch(new sharedActions.GetAllRooms()); - }, - - componentWillUnmount: function() { - this.stopListening(this.props.store); - }, - - componentWillUpdate: function(nextProps, nextState) { - // If we've just created a room, close the panel - the store will open - // the room. - if (this.state.pendingCreation && - !nextState.pendingCreation && !nextState.error) { - this.closeWindow(); - } - }, - - _onStoreStateChanged: function() { - this.setState(this.props.store.getStoreState()); - }, - - /** - * Let the user know we're loading rooms - * @returns {Object} React render - */ - _renderLoadingRoomsView: function() { - return ( -
    - {this._renderNewRoomButton()} -
    - -
    -
    - ); - }, - - _renderNoRoomsView: function() { - return ( -
    - {this._renderNewRoomButton()} -
    -
    -

    - {mozL10n.get("no_conversations_message_heading2")} -

    -

    - {mozL10n.get("no_conversations_start_message2")} -

    -
    -
    -
    - ); - }, - - _renderNewRoomButton: function() { - return ( - - ); - }, - - render: function() { - if (this.state.error) { - // XXX Better end user reporting of errors. - console.error("RoomList error", this.state.error); - } - - if (this.state.pendingInitialRetrieval) { - return this._renderLoadingRoomsView(); - } - - if (!this.state.rooms.length) { - return this._renderNoRoomsView(); - } - - return ( -
    - {this._renderNewRoomButton()} -

    {mozL10n.get(this.state.openedRoom === null ? - "rooms_list_recently_browsed" : - "rooms_list_currently_browsing")}

    -
    { - this.state.rooms.map(function(room, i) { - if (this.state.openedRoom !== null && - room.roomToken !== this.state.openedRoom) { - return null; - } - - return ( - - ); - }, this) - }
    -
    - ); - } - }); - - /** - * Used for creating a new room with or without context. - */ - var NewRoomView = React.createClass({ - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - inRoom: React.PropTypes.bool.isRequired, - pendingOperation: React.PropTypes.bool.isRequired - }, - - mixins: [ - sharedMixins.DocumentVisibilityMixin, - React.addons.PureRenderMixin - ], - - getInitialState: function() { - return { - previewImage: "", - description: "", - url: "" - }; - }, - - onDocumentVisible: function() { - // We would use onDocumentHidden to null out the data ready for the next - // opening. However, this seems to cause an awkward glitch in the display - // when opening the panel, and it seems cleaner just to update the data - // even if there's a small delay. - - loop.request("GetSelectedTabMetadata").then(function(metadata) { - // Bail out when the component is not mounted (anymore). - // This occurs during test runs. See bug 1174611 for more info. - if (!this.isMounted() || !metadata) { - return; - } - - var previewImage = metadata.favicon || ""; - var description = metadata.title || metadata.description; - var url = metadata.url; - this.setState({ - previewImage: previewImage, - description: description, - url: url - }); - }.bind(this)); - }, - - handleCreateButtonClick: function() { - var createRoomAction = new sharedActions.CreateRoom(); - - createRoomAction.urls = [{ - location: this.state.url, - description: this.state.description, - thumbnail: this.state.previewImage - }]; - this.props.dispatcher.dispatch(createRoomAction); - }, - - handleStopSharingButtonClick: function() { - loop.request("HangupAllChatWindows"); - }, - - render: function() { - return ( -
    - {this.props.inRoom ? - : - } -
    - ); - } - }); - - /** - * E10s not supported view - */ - var E10sNotSupported = React.createClass({ - propTypes: { - onClick: React.PropTypes.func.isRequired - }, - - render: function() { - return ( -
    -
    - -

    - {mozL10n.get("e10s_not_supported_subheading", { - brandShortname: mozL10n.get("clientShortname2") - })} -

    -
    -
    - ); - } - }); - - /** - * Panel view. - */ - var PanelView = React.createClass({ - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - // Only used for the ui-showcase: - gettingStartedSeen: React.PropTypes.bool, - notifications: React.PropTypes.object.isRequired, - roomStore: - React.PropTypes.instanceOf(loop.store.RoomStore).isRequired, - // Only used for the ui-showcase: - userProfile: React.PropTypes.object - }, - - getDefaultProps: function() { - return { - gettingStartedSeen: true - }; - }, - - getInitialState: function() { - return { - fxAEnabled: loop.getStoredRequest(["GetFxAEnabled"]), - hasEncryptionKey: loop.getStoredRequest(["GetHasEncryptionKey"]), - userProfile: loop.getStoredRequest(["GetUserProfile"]), - gettingStartedSeen: loop.getStoredRequest(["GetLoopPref", "gettingStarted.latestFTUVersion"]) >= FTU_VERSION, - multiProcessEnabled: loop.getStoredRequest(["IsMultiProcessEnabled"]) - }; - }, - - _serviceErrorToShow: function(callback) { - return new Promise(function(resolve) { - loop.request("GetErrors").then(function(errors) { - if (!errors || !Object.keys(errors).length) { - resolve(null); - return; - } - // Just get the first error for now since more than one should be rare. - var firstErrorKey = Object.keys(errors)[0]; - resolve({ - type: firstErrorKey, - error: errors[firstErrorKey] - }); - }); - }); - }, - - updateServiceErrors: function() { - this._serviceErrorToShow().then(function(serviceError) { - if (serviceError) { - this.props.notifications.set({ - id: "service-error", - level: "error", - message: serviceError.error.friendlyMessage, - details: serviceError.error.friendlyDetails, - detailsButtonLabel: serviceError.error.friendlyDetailsButtonLabel, - detailsButtonCallback: serviceError.error.friendlyDetailsButtonCallback - }); - } else { - this.props.notifications.remove(this.props.notifications.get("service-error")); - } - }.bind(this)); - }, - - _onStatusChanged: function() { - loop.requestMulti( - ["GetUserProfile"], - ["GetHasEncryptionKey"] - ).then(function(results) { - var profile = results[0]; - var hasEncryptionKey = results[1]; - var currUid = this.state.userProfile ? this.state.userProfile.uid : null; - var newUid = profile ? profile.uid : null; - if (currUid === newUid) { - // Update the state of hasEncryptionKey as this might have changed now. - this.setState({ hasEncryptionKey: hasEncryptionKey }); - } else { - this.setState({ userProfile: profile }); - } - this.updateServiceErrors(); - }.bind(this)); - }, - - _gettingStartedSeen: function() { - loop.request("GetLoopPref", "gettingStarted.latestFTUVersion").then(function(result) { - this.setState({ - gettingStartedSeen: result >= FTU_VERSION - }); - }.bind(this)); - }, - - componentWillMount: function() { - this.updateServiceErrors(); - }, - - componentDidMount: function() { - loop.subscribe("LoopStatusChanged", this._onStatusChanged); - window.addEventListener("GettingStartedSeen", this._gettingStartedSeen); - }, - - componentWillUnmount: function() { - loop.unsubscribe("LoopStatusChanged", this._onStatusChanged); - window.removeEventListener("GettingStartedSeen", this._gettingStartedSeen); - }, - - handleContextMenu: function(e) { - e.preventDefault(); - }, - - launchNonE10sWindow: function(e) { - loop.request("GetSelectedTabMetadata").then(function(metadata) { - loop.request("OpenNonE10sWindow", metadata.url); - }); - }, - - render: function() { - var NotificationListView = sharedViews.NotificationListView; - - if (this.state.multiProcessEnabled) { - return ( - - ); - } - - if (!this.props.gettingStartedSeen || !this.state.gettingStartedSeen) { - return ( -
    - - - -
    - ); - } - if (!this.state.hasEncryptionKey) { - return ; - } - - return ( -
    -
    - - -
    -
    - -
    -
    - -
    -
    -
    - ); - } - }); - - /** - * Panel initialisation. - */ - function init() { - var requests = [ - ["GetAllConstants"], - ["GetAllStrings"], - ["GetLocale"], - ["GetPluralRule"] - ]; - var prefetch = [ - ["GetLoopPref", "gettingStarted.latestFTUVersion"], - ["GetLoopPref", "legal.ToS_url"], - ["GetLoopPref", "legal.privacy_url"], - ["GetUserProfile"], - ["GetFxAEnabled"], - ["GetDoNotDisturb"], - ["GetHasEncryptionKey"], - ["IsMultiProcessEnabled"] - ]; - - return loop.requestMulti.apply(null, requests.concat(prefetch)).then(function(results) { - // `requestIdx` is keyed off the order of the `requests` and `prefetch` - // arrays. Be careful to update both when making changes. - var requestIdx = 0; - var constants = results[requestIdx]; - // Do the initial L10n setup, we do this before anything - // else to ensure the L10n environment is setup correctly. - var stringBundle = results[++requestIdx]; - var locale = results[++requestIdx]; - var pluralRule = results[++requestIdx]; - mozL10n.initialize({ - locale: locale, - pluralRule: pluralRule, - getStrings: function(key) { - if (!(key in stringBundle)) { - console.error("No string found for key: ", key); - return "{ textContent: '' }"; - } - - return JSON.stringify({ textContent: stringBundle[key] }); - } - }); - - prefetch.forEach(function(req) { - req.shift(); - loop.storeRequest(req, results[++requestIdx]); - }); - - var notifications = new sharedModels.NotificationCollection(); - var dispatcher = new loop.Dispatcher(); - var roomStore = new loop.store.RoomStore(dispatcher, { - notifications: notifications, - constants: constants - }); - - React.render(, document.querySelector("#main")); - - document.documentElement.setAttribute("lang", mozL10n.getLanguage()); - document.documentElement.setAttribute("dir", mozL10n.getDirection()); - document.body.setAttribute("platform", loop.shared.utils.getPlatform()); - - // Notify the window that we've finished initalization and initial layout - var evtObject = document.createEvent("Event"); - evtObject.initEvent("loopPanelInitialized", true, false); - window.dispatchEvent(evtObject); - }); - } - - return { - AccountLink: AccountLink, - ConversationDropdown: ConversationDropdown, - E10sNotSupported: E10sNotSupported, - GettingStartedView: GettingStartedView, - init: init, - NewRoomView: NewRoomView, - PanelView: PanelView, - RoomEntry: RoomEntry, - RoomEntryContextButtons: RoomEntryContextButtons, - RoomList: RoomList, - SettingsDropdown: SettingsDropdown, - SignInRequestView: SignInRequestView, - ToSView: ToSView - }; -})(_, document.mozL10n); - -document.addEventListener("DOMContentLoaded", loop.panel.init); diff --git a/browser/extensions/loop/content/panels/js/roomViews.jsx b/browser/extensions/loop/content/panels/js/roomViews.jsx deleted file mode 100644 index 032e46219f1d..000000000000 --- a/browser/extensions/loop/content/panels/js/roomViews.jsx +++ /dev/null @@ -1,870 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -var loop = loop || {}; -loop.roomViews = (function(mozL10n) { - "use strict"; - - var ROOM_STATES = loop.store.ROOM_STATES; - var FAILURE_DETAILS = loop.shared.utils.FAILURE_DETAILS; - var sharedActions = loop.shared.actions; - var sharedMixins = loop.shared.mixins; - var sharedUtils = loop.shared.utils; - var sharedViews = loop.shared.views; - - /** - * ActiveRoomStore mixin. - * @type {Object} - */ - var ActiveRoomStoreMixin = { - mixins: [Backbone.Events], - - propTypes: { - roomStore: React.PropTypes.instanceOf(loop.store.RoomStore).isRequired - }, - - componentWillMount: function() { - this.listenTo(this.props.roomStore, "change:activeRoom", - this._onActiveRoomStateChanged); - this.listenTo(this.props.roomStore, "change:error", - this._onRoomError); - this.listenTo(this.props.roomStore, "change:savingContext", - this._onRoomSavingContext); - }, - - componentWillUnmount: function() { - this.stopListening(this.props.roomStore); - }, - - _onActiveRoomStateChanged: function() { - // Only update the state if we're mounted, to avoid the problem where - // stopListening doesn't nuke the active listeners during a event - // processing. - if (this.isMounted()) { - this.setState(this.props.roomStore.getStoreState("activeRoom")); - } - }, - - _onRoomError: function() { - // Only update the state if we're mounted, to avoid the problem where - // stopListening doesn't nuke the active listeners during a event - // processing. - if (this.isMounted()) { - this.setState({ error: this.props.roomStore.getStoreState("error") }); - } - }, - - _onRoomSavingContext: function() { - // Only update the state if we're mounted, to avoid the problem where - // stopListening doesn't nuke the active listeners during a event - // processing. - if (this.isMounted()) { - this.setState({ savingContext: this.props.roomStore.getStoreState("savingContext") }); - } - }, - - getInitialState: function() { - var storeState = this.props.roomStore.getStoreState("activeRoom"); - return _.extend({ - // Used by the UI showcase. - roomState: this.props.roomState || storeState.roomState, - savingContext: false - }, storeState); - } - }; - - /** - * Used to display errors in direct calls and rooms to the user. - */ - var FailureInfoView = React.createClass({ - propTypes: { - failureReason: React.PropTypes.string.isRequired - }, - - /** - * Returns the translated message appropraite to the failure reason. - * - * @return {String} The translated message for the failure reason. - */ - _getMessage: function() { - switch (this.props.failureReason) { - case FAILURE_DETAILS.NO_MEDIA: - case FAILURE_DETAILS.UNABLE_TO_PUBLISH_MEDIA: - return mozL10n.get("no_media_failure_message"); - case FAILURE_DETAILS.TOS_FAILURE: - return mozL10n.get("tos_failure_message", - { clientShortname: mozL10n.get("clientShortname2") }); - case FAILURE_DETAILS.ICE_FAILED: - return mozL10n.get("ice_failure_message"); - default: - return mozL10n.get("generic_failure_message"); - } - }, - - render: function() { - return ( -
    -
    -

    {this._getMessage()}

    -
    - ); - } - }); - - /** - * Something went wrong view. Displayed when there's a big problem. - */ - var RoomFailureView = React.createClass({ - mixins: [sharedMixins.AudioMixin], - - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - failureReason: React.PropTypes.string - }, - - componentDidMount: function() { - this.play("failure"); - }, - - handleRejoinCall: function() { - this.props.dispatcher.dispatch(new sharedActions.JoinRoom()); - }, - - render: function() { - var settingsMenuItems = [ - { id: "help" } - ]; - - var btnTitle; - if (this.props.failureReason === FAILURE_DETAILS.ICE_FAILED) { - btnTitle = mozL10n.get("retry_call_button"); - } else { - btnTitle = mozL10n.get("rejoin_button"); - } - - return ( -
    - -
    - -
    - -
    - ); - } - }); - - var SocialShareDropdown = React.createClass({ - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - roomUrl: React.PropTypes.string, - show: React.PropTypes.bool.isRequired, - socialShareProviders: React.PropTypes.array - }, - - handleAddServiceClick: function(event) { - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.AddSocialShareProvider()); - }, - - handleProviderClick: function(event) { - event.preventDefault(); - - var origin = event.currentTarget.dataset.provider; - var provider = this.props.socialShareProviders - .filter(function(socialProvider) { - return socialProvider.origin === origin; - })[0]; - - this.props.dispatcher.dispatch(new sharedActions.ShareRoomUrl({ - provider: provider, - roomUrl: this.props.roomUrl, - previews: [] - })); - }, - - render: function() { - // Don't render a thing when no data has been fetched yet. - if (!this.props.socialShareProviders) { - return null; - } - - var cx = classNames; - var shareDropdown = cx({ - "share-service-dropdown": true, - "dropdown-menu": true, - "visually-hidden": true, - "hide": !this.props.show - }); - - return ( -
      -
    • - - {mozL10n.get("share_add_service_button")} -
    • - {this.props.socialShareProviders.length ?
    • : null} - { - this.props.socialShareProviders.map(function(provider, idx) { - return ( -
    • - - {provider.name} -
    • - ); - }.bind(this)) - } -
    - ); - } - }); - - /** - * Desktop room invitation view (overlay). - */ - var DesktopRoomInvitationView = React.createClass({ - statics: { - TRIGGERED_RESET_DELAY: 2000 - }, - - mixins: [sharedMixins.DropdownMenuMixin(".room-invitation-overlay")], - - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - error: React.PropTypes.object, - onAddContextClick: React.PropTypes.func, - onEditContextClose: React.PropTypes.func, - // This data is supplied by the activeRoomStore. - roomData: React.PropTypes.object.isRequired, - savingContext: React.PropTypes.bool, - show: React.PropTypes.bool.isRequired, - showEditContext: React.PropTypes.bool.isRequired, - socialShareProviders: React.PropTypes.array - }, - - getInitialState: function() { - return { - copiedUrl: false, - newRoomName: "" - }; - }, - - handleEmailButtonClick: function(event) { - event.preventDefault(); - - var roomData = this.props.roomData; - var contextURL = roomData.roomContextUrls && roomData.roomContextUrls[0]; - if (contextURL) { - if (contextURL.location === null) { - contextURL = undefined; - } else { - contextURL = sharedUtils.formatURL(contextURL.location).hostname; - } - } - - this.props.dispatcher.dispatch( - new sharedActions.EmailRoomUrl({ - roomUrl: roomData.roomUrl, - roomDescription: contextURL, - from: "conversation" - })); - }, - - handleFacebookButtonClick: function(event) { - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.FacebookShareRoomUrl({ - from: "conversation", - roomUrl: this.props.roomData.roomUrl - })); - }, - - handleCopyButtonClick: function(event) { - event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.CopyRoomUrl({ - roomUrl: this.props.roomData.roomUrl, - from: "conversation" - })); - - this.setState({ copiedUrl: true }); - setTimeout(this.resetTriggeredButtons, this.constructor.TRIGGERED_RESET_DELAY); - }, - - /** - * Reset state of triggered buttons if necessary - */ - resetTriggeredButtons: function() { - if (this.state.copiedUrl) { - this.setState({ copiedUrl: false }); - } - }, - - handleEditContextClose: function() { - if (this.props.onEditContextClose) { - this.props.onEditContextClose(); - } - }, - - render: function() { - if (!this.props.show || !this.props.roomData.roomUrl) { - return null; - } - - var cx = classNames; - return ( -
    -
    -

    - {mozL10n.get("invite_header_text2")} -

    -
    -
    -
    - -

    {mozL10n.get(this.state.copiedUrl ? - "invite_copied_link_button" : "invite_copy_link_button")}

    -
    -
    - -

    {mozL10n.get("invite_email_link_button")}

    -
    -
    - -

    {mozL10n.get("invite_facebook_button3")}

    -
    -
    - - -
    - ); - } - }); - - var DesktopRoomEditContextView = React.createClass({ - mixins: [React.addons.LinkedStateMixin], - maxRoomNameLength: 124, - - propTypes: { - dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, - error: React.PropTypes.object, - onClose: React.PropTypes.func, - // This data is supplied by the activeRoomStore. - roomData: React.PropTypes.object.isRequired, - savingContext: React.PropTypes.bool.isRequired, - show: React.PropTypes.bool.isRequired - }, - - componentWillMount: function() { - this._fetchMetadata(); - }, - - componentWillReceiveProps: function(nextProps) { - var newState = {}; - // When the 'show' prop is changed from outside this component, we do need - // to update the state. - if (("show" in nextProps) && nextProps.show !== this.props.show) { - newState.show = nextProps.show; - if (nextProps.show) { - this._fetchMetadata(); - } - } - // When we receive an update for the `roomData` property, make sure that - // the current form fields reflect reality. This is necessary, because the - // form state is maintained in the components' state. - if (nextProps.roomData) { - // Right now it's only necessary to update the form input states when - // they contain no text yet. - if (!this.state.newRoomName && nextProps.roomData.roomName) { - newState.newRoomName = nextProps.roomData.roomName; - } - var url = this._getURL(nextProps.roomData); - if (url) { - if (!this.state.newRoomURL && url.location) { - newState.newRoomURL = url.location; - } - if (!this.state.newRoomDescription && url.description) { - newState.newRoomDescription = url.description; - } - if (!this.state.newRoomThumbnail && url.thumbnail) { - newState.newRoomThumbnail = url.thumbnail; - } - } - } - - // Feature support: when a context save completed without error, we can - // close the context edit form. - if (("savingContext" in nextProps) && this.props.savingContext && - this.props.savingContext !== nextProps.savingContext && this.state.show - && !this.props.error && !nextProps.error) { - newState.show = false; - if (this.props.onClose) { - this.props.onClose(); - } - } - - if (Object.getOwnPropertyNames(newState).length) { - this.setState(newState); - } - }, - - getInitialState: function() { - var url = this._getURL(); - return { - // `availableContext` prop only used in tests. - availableContext: null, - show: this.props.show, - newRoomName: this.props.roomData.roomName || "", - newRoomURL: url && url.location || "", - newRoomDescription: url && url.description || "", - newRoomThumbnail: url && url.thumbnail || "" - }; - }, - - _fetchMetadata: function() { - loop.request("GetSelectedTabMetadata").then(function(metadata) { - var previewImage = metadata.favicon || ""; - var description = metadata.title || metadata.description; - var metaUrl = metadata.url; - this.setState({ - availableContext: { - previewImage: previewImage, - description: description, - url: metaUrl - } - }); - }.bind(this)); - }, - - handleCloseClick: function(event) { - event.stopPropagation(); - event.preventDefault(); - - this.setState({ show: false }); - if (this.props.onClose) { - this.props.onClose(); - } - }, - - handleContextClick: function(event) { - event.stopPropagation(); - event.preventDefault(); - - var url = this._getURL(); - if (!url || !url.location) { - return; - } - - loop.requestMulti( - ["OpenURL", url.location], - ["TelemetryAddValue", "LOOP_ROOM_CONTEXT_CLICK", 1]); - }, - - handleFormSubmit: function(event) { - event && event.preventDefault(); - - this.props.dispatcher.dispatch(new sharedActions.UpdateRoomContext({ - roomToken: this.props.roomData.roomToken, - newRoomName: this.state.newRoomName, - newRoomURL: this.state.newRoomURL, - newRoomDescription: this.state.newRoomDescription, - newRoomThumbnail: this.state.newRoomThumbnail - })); - }, - - handleTextareaKeyDown: function(event) { - // Submit the form as soon as the user press Enter in that field - // Note: We're using a textarea instead of a simple text input to display - // placeholder and entered text on two lines, to circumvent l10n - // rendering/UX issues for some locales. - if (event.which === 13) { - this.handleFormSubmit(event); - } - }, - - /** - * Utility function to extract URL context data from the `roomData` property - * that can also be supplied as an argument. - * - * @param {Object} roomData Optional room data object to use, equivalent to - * the activeRoomStore state. - * @return {Object} The first context URL found on the `roomData` object. - */ - _getURL: function(roomData) { - roomData = roomData || this.props.roomData; - return this.props.roomData.roomContextUrls && - this.props.roomData.roomContextUrls[0]; - }, - - render: function() { - if (!this.state.show) { - return null; - } - - var url = this._getURL(); - var thumbnail = url && url.thumbnail || "shared/img/icons-16x16.svg#globe"; - var urlDescription = url && url.description || ""; - var location = url && url.location || ""; - - var cx = classNames; - var availableContext = this.state.availableContext; - return ( -
    -

    - {mozL10n.get("rooms_change_failed_label")} -

    -

    {mozL10n.get("context_inroom_header")}

    -
    - - -