Merge inbound to mozilla-central. a=merge
authorCsoregi Natalia <ncsoregi@mozilla.com>
Wed, 17 Oct 2018 19:53:56 +0300
changeset 500169 4c944453210c428f505bc2d81b3b7f1c99a262a6
parent 500114 e7995331d6386309dbe2caca5f947a54fc088249 (current diff)
parent 500168 02d89c011037d8407576ec58e307f632a8f64b0f (diff)
child 500170 6bd88a7285587170add932d4e8558bf5444386ec
child 500198 8d6a97e2a3570e5ed13d404aabcaab41ee53c813
child 500244 d6ab96f62188cfb6b5121be03048e09f27ad8405
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central. a=merge
--- a/dom/animation/AnimationEffect.cpp
+++ b/dom/animation/AnimationEffect.cpp
@@ -31,19 +31,19 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Animatio
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationEffect)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationEffect)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 AnimationEffect::AnimationEffect(nsIDocument* aDocument,
-                                 const TimingParams& aTiming)
+                                 TimingParams&& aTiming)
   : mDocument(aDocument)
-  , mTiming(aTiming)
+  , mTiming(std::move(aTiming))
 {
 }
 
 AnimationEffect::~AnimationEffect() = default;
 
 // https://drafts.csswg.org/web-animations/#current
 bool
 AnimationEffect::IsCurrent() const
--- a/dom/animation/AnimationEffect.h
+++ b/dom/animation/AnimationEffect.h
@@ -29,17 +29,17 @@ struct ComputedEffectTiming;
 
 class AnimationEffect : public nsISupports,
                         public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationEffect)
 
-  AnimationEffect(nsIDocument* aDocument, const TimingParams& aTiming);
+  AnimationEffect(nsIDocument* aDocument, TimingParams&& aTiming);
 
   virtual KeyframeEffect* AsKeyframeEffect() { return nullptr; }
 
   virtual ElementPropertyTransition* AsTransition() { return nullptr; }
   virtual const ElementPropertyTransition* AsTransition() const
   {
     return nullptr;
   }
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -66,19 +66,19 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END_INHERITING(AnimationEffect)
 
 NS_IMPL_ADDREF_INHERITED(KeyframeEffect, AnimationEffect)
 NS_IMPL_RELEASE_INHERITED(KeyframeEffect, AnimationEffect)
 
 KeyframeEffect::KeyframeEffect(
   nsIDocument* aDocument,
   const Maybe<OwningAnimationTarget>& aTarget,
-  const TimingParams& aTiming,
+  TimingParams&& aTiming,
   const KeyframeEffectParams& aOptions)
-  : AnimationEffect(aDocument, aTiming)
+  : AnimationEffect(aDocument, std::move(aTiming))
   , mTarget(aTarget)
   , mEffectOptions(aOptions)
   , mInEffectOnLastAnimationTimingUpdate(false)
   , mCumulativeChangeHint(nsChangeHint(0))
 {
 }
 
 JSObject*
@@ -656,17 +656,17 @@ KeyframeEffect::ConstructKeyframeEffect(
     return nullptr;
   }
 
   KeyframeEffectParams effectOptions =
     KeyframeEffectParamsFromUnion(aOptions, aGlobal.CallerType());
 
   Maybe<OwningAnimationTarget> target = ConvertTarget(aTarget);
   RefPtr<KeyframeEffect> effect =
-    new KeyframeEffect(doc, target, timingParams, effectOptions);
+    new KeyframeEffect(doc, target, std::move(timingParams), effectOptions);
 
   effect->SetKeyframes(aGlobal.Context(), aKeyframes, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
   return effect.forget();
 }
@@ -868,17 +868,17 @@ KeyframeEffect::Constructor(const Global
   // iteration composite operation, composite operation, and spacing mode.
   // The constructor creates a new AnimationEffect object by
   // aSource's TimingParams.
   // Note: we don't need to re-throw exceptions since the value specified on
   //       aSource's timing object can be assumed valid.
   RefPtr<KeyframeEffect> effect =
     new KeyframeEffect(doc,
                        aSource.mTarget,
-                       aSource.SpecifiedTiming(),
+                       TimingParams(aSource.SpecifiedTiming()),
                        aSource.mEffectOptions);
   // Copy cumulative change hint. mCumulativeChangeHint should be the same as
   // the source one because both of targets are the same.
   effect->mCumulativeChangeHint = aSource.mCumulativeChangeHint;
 
   // Copy aSource's keyframes and animation properties.
   // Note: We don't call SetKeyframes directly, which might revise the
   //       computed offsets and rebuild the animation properties.
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -112,17 +112,17 @@ namespace dom {
 
 class Animation;
 
 class KeyframeEffect : public AnimationEffect
 {
 public:
   KeyframeEffect(nsIDocument* aDocument,
                  const Maybe<OwningAnimationTarget>& aTarget,
-                 const TimingParams& aTiming,
+                 TimingParams&& aTiming,
                  const KeyframeEffectParams& aOptions);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(KeyframeEffect,
                                                          AnimationEffect)
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/fetch/Response.cpp
+++ b/dom/fetch/Response.cpp
@@ -135,16 +135,17 @@ Response::Redirect(const GlobalObject& a
   if (aStatus != 301 && aStatus != 302 && aStatus != 303 && aStatus != 307 && aStatus != 308) {
     aRv.ThrowRangeError<MSG_INVALID_REDIRECT_STATUSCODE_ERROR>();
     return nullptr;
   }
 
   Optional<Nullable<fetch::ResponseBodyInit>> body;
   ResponseInit init;
   init.mStatus = aStatus;
+  init.mStatusText.AssignASCII("");
   RefPtr<Response> r = Response::Constructor(aGlobal, body, init, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   r->GetInternalHeaders()->Set(NS_LITERAL_CSTRING("Location"),
                                NS_ConvertUTF16toUTF8(parsedURL), aRv);
   if (NS_WARN_IF(aRv.Failed())) {
--- a/dom/tests/mochitest/fetch/test_response.js
+++ b/dom/tests/mochitest/fetch/test_response.js
@@ -100,16 +100,17 @@ function testError() {
   } catch(e) {
     ok(true, "Error response should have immutable headers");
   }
 }
 
 function testRedirect() {
   var res = Response.redirect("./redirect.response");
   is(res.status, 302, "Default redirect has status code 302");
+  is(res.statusText, "", "Default redirect has status text empty");
   var h = res.headers.get("location");
   ok(h === (new URL("./redirect.response", self.location.href)).href, "Location header should be correct absolute URL");
   try {
     res.headers.set("someheader", "not allowed");
     ok(false, "Redirects should have immutable headers");
   } catch(e) {
     ok(true, "Redirects should have immutable headers");
   }
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -524,17 +524,17 @@ BuildAnimation(nsPresContext* aPresConte
     return oldAnim.forget();
   }
 
   // mTarget is non-null here, so we emplace it directly.
   Maybe<OwningAnimationTarget> target;
   target.emplace(aTarget.mElement, aTarget.mPseudoType);
   KeyframeEffectParams effectOptions;
   RefPtr<KeyframeEffect> effect =
-    new KeyframeEffect(aPresContext->Document(), target, timing, effectOptions);
+    new KeyframeEffect(aPresContext->Document(), target, std::move(timing), effectOptions);
 
   aBuilder.SetKeyframes(*effect, std::move(keyframes));
 
   RefPtr<CSSAnimation> animation =
     new CSSAnimation(aPresContext->Document()->GetScopeObject(), animationName);
   animation->SetOwningElement(
     OwningElementRef(*aTarget.mElement, aTarget.mPseudoType));
 
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -826,17 +826,17 @@ nsTransitionManager::ConsiderInitiatingT
                               dom::PlaybackDirection::Normal,
                               dom::FillMode::Backwards);
 
   // aElement is non-null here, so we emplace it directly.
   Maybe<OwningAnimationTarget> target;
   target.emplace(aElement, aPseudoType);
   KeyframeEffectParams effectOptions;
   RefPtr<ElementPropertyTransition> pt =
-    new ElementPropertyTransition(aElement->OwnerDoc(), target, timing,
+    new ElementPropertyTransition(aElement->OwnerDoc(), target, std::move(timing),
                                   startForReversingTest, reversePortion,
                                   effectOptions);
 
   pt->SetKeyframes(GetTransitionKeyframes(aProperty,
                                           std::move(startValue), std::move(endValue), tf),
                    &aNewStyle);
 
   RefPtr<CSSTransition> animation =
--- a/layout/style/nsTransitionManager.h
+++ b/layout/style/nsTransitionManager.h
@@ -32,21 +32,21 @@ struct StyleTransition;
  *****************************************************************************/
 
 namespace mozilla {
 
 struct ElementPropertyTransition : public dom::KeyframeEffect
 {
   ElementPropertyTransition(nsIDocument* aDocument,
                             Maybe<OwningAnimationTarget>& aTarget,
-                            const TimingParams &aTiming,
+                            TimingParams&& aTiming,
                             AnimationValue aStartForReversingTest,
                             double aReversePortion,
                             const KeyframeEffectParams& aEffectOptions)
-    : dom::KeyframeEffect(aDocument, aTarget, aTiming, aEffectOptions)
+    : dom::KeyframeEffect(aDocument, aTarget, std::move(aTiming), aEffectOptions)
     , mStartForReversingTest(aStartForReversingTest)
     , mReversePortion(aReversePortion)
   { }
 
   ElementPropertyTransition* AsTransition() override { return this; }
   const ElementPropertyTransition* AsTransition() const override
   {
     return this;
--- a/testing/mozbase/mozdevice/mozdevice/adb.py
+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
@@ -764,28 +764,29 @@ class ADBDevice(ADBCommand):
             except ADBError:
                 self._logger.debug("Check for root adbd failed")
 
     @staticmethod
     def _escape_command_line(cmd):
         """Utility function to return escaped and quoted version of command
         line.
         """
+        re_quotable_chars = re.compile(r"[ ()\"&'\]]")
+
+        def is_quoted(s, delim):
+            if not s:
+                return False
+            return s[0] == delim and s[-1] == delim
+
         quoted_cmd = []
 
         for arg in cmd:
-            arg.replace('&', r'\&')
-
-            needs_quoting = False
-            for char in [' ', '(', ')', '"', '&']:
-                if arg.find(char) >= 0:
-                    needs_quoting = True
-                    break
-            if needs_quoting:
-                arg = "'%s'" % arg
+            if not is_quoted(arg, "'") and not is_quoted(arg, '"') and \
+               re_quotable_chars.search(arg):
+                arg = '"%s"' % arg.replace(r'"', r'\"')
 
             quoted_cmd.append(arg)
 
         return " ".join(quoted_cmd)
 
     @staticmethod
     def _get_exitcode(file_obj):
         """Get the exitcode from the last line of the file_obj for shell
--- a/testing/web-platform/meta/fetch/api/response/response-static-redirect.html.ini
+++ b/testing/web-platform/meta/fetch/api/response/response-static-redirect.html.ini
@@ -1,22 +1,3 @@
 [response-static-redirect.html]
   [Check error returned when giving invalid url to redirect()]
     expected: FAIL
-
-  [Check default redirect response]
-    expected: FAIL
-
-  [Check response returned by static method redirect(), status = 301]
-    expected: FAIL
-
-  [Check response returned by static method redirect(), status = 302]
-    expected: FAIL
-
-  [Check response returned by static method redirect(), status = 303]
-    expected: FAIL
-
-  [Check response returned by static method redirect(), status = 307]
-    expected: FAIL
-
-  [Check response returned by static method redirect(), status = 308]
-    expected: FAIL
-
--- a/testing/web-platform/tests/webdriver/tests/element_clear/clear.py
+++ b/testing/web-platform/tests/webdriver/tests/element_clear/clear.py
@@ -1,12 +1,11 @@
 # META: timeout=long
 
 import pytest
-import time
 
 from webdriver import Element
 
 from tests.support.asserts import (
     assert_element_has_focus,
     assert_error,
     assert_events_equal,
     assert_in_events,
@@ -43,17 +42,17 @@ def test_null_response_value(session):
     element = session.find.css("input", all=False)
 
     response = element_clear(session, element)
     value = assert_success(response)
     assert value is None
 
 
 def test_no_browsing_context(session, closed_window):
-    element = Element("foo" + str(time.time()), session)
+    element = Element("foo", session)
 
     response = element_clear(session, element)
     assert_error(response, "no such window")
 
 
 def test_connected_element(session):
     session.url = inline("<input>")
     element = session.find.css("input", all=False)