From c3f698ad0c9bff06a13224800530279140908668 Mon Sep 17 00:00:00 2001 From: cku Date: Thu, 7 Dec 2017 10:22:49 +0800 Subject: [PATCH 01/47] Bug 1207734 - Part 1.a. Implement ReleaseSharedListOnMainThread to reuse the code of releasing nsCSSValueSharedList objects hold by a style struct. r=emilio MozReview-Commit-ID: IBfqulFXimi --HG-- extra : source : b593afd0ebc2fd5412b9b28709a21743b2befc24 extra : histedit_source : c68a438eade5266ba7fcd3087ba0c6606cbb36d7 --- layout/style/nsStyleStruct.cpp | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 426d4bd194d9..15dffc66ee6d 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3692,13 +3692,16 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) MOZ_COUNT_CTOR(nsStyleDisplay); } -nsStyleDisplay::~nsStyleDisplay() + +static +void ReleaseSharedListOnMainThread(const char* aName, + RefPtr& aList) { // We don't allow releasing nsCSSValues with refcounted data in the Servo // traversal, since the refcounts aren't threadsafe. Since Servo may trigger // the deallocation of style structs during styling, we need to handle it // here. - if (mSpecifiedTransform && ServoStyleSet::IsInServoTraversal()) { + if (aList && ServoStyleSet::IsInServoTraversal()) { // The default behavior of NS_ReleaseOnMainThreadSystemGroup is to only // proxy the release if we're not already on the main thread. This is a nice // optimization for the cases we happen to be doing a sequential traversal @@ -3711,10 +3714,14 @@ nsStyleDisplay::~nsStyleDisplay() #else false; #endif - NS_ReleaseOnMainThreadSystemGroup( - "nsStyleDisplay::mSpecifiedTransform", - mSpecifiedTransform.forget(), alwaysProxy); + NS_ReleaseOnMainThreadSystemGroup(aName, aList.forget(), alwaysProxy); } +} + +nsStyleDisplay::~nsStyleDisplay() +{ + ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedTransform", + mSpecifiedTransform); MOZ_COUNT_DTOR(nsStyleDisplay); } @@ -4644,18 +4651,8 @@ nsStyleUIReset::~nsStyleUIReset() { MOZ_COUNT_DTOR(nsStyleUIReset); - // See the nsStyleDisplay destructor for why we're doing this. - if (mSpecifiedWindowTransform && ServoStyleSet::IsInServoTraversal()) { - bool alwaysProxy = -#ifdef DEBUG - true; -#else - false; -#endif - NS_ReleaseOnMainThreadSystemGroup( - "nsStyleUIReset::mSpecifiedWindowTransform", - mSpecifiedWindowTransform.forget(), alwaysProxy); - } + ReleaseSharedListOnMainThread("nsStyleUIReset::mSpecifiedWindowTransform", + mSpecifiedWindowTransform); } nsChangeHint From d55f61830e9b67c729d23c640621f177a0bd01c2 Mon Sep 17 00:00:00 2001 From: cku Date: Thu, 7 Dec 2017 10:32:18 +0800 Subject: [PATCH 02/47] Bug 1207734 - Part 1.b. Do not initialize mSpecifiedTransform in ctor. r=emilio nsDisplayList::mSpecifiedTransform is a RefPtr, no need put it into intialize list. MozReview-Commit-ID: B04gytHwb2K --HG-- extra : source : 62a57ffe6c6137efbf68bbc9843e0cb0a170003e extra : histedit_source : 611e7d35e359f0c72bbbddcd9266425c2a4f4f5b --- layout/style/nsStyleStruct.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 15dffc66ee6d..bcef36021cac 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3596,7 +3596,6 @@ nsStyleDisplay::nsStyleDisplay(const nsPresContext* aContext) , mBackfaceVisibility(NS_STYLE_BACKFACE_VISIBILITY_VISIBLE) , mTransformStyle(NS_STYLE_TRANSFORM_STYLE_FLAT) , mTransformBox(StyleGeometryBox::BorderBox) - , mSpecifiedTransform(nullptr) , mTransformOrigin{ {0.5f, eStyleUnit_Percent}, // Transform is centered on origin {0.5f, eStyleUnit_Percent}, {0, nsStyleCoord::CoordConstructor} } From e79ea7c484ea1e09a254d5bb4af82b91d3e4c8c9 Mon Sep 17 00:00:00 2001 From: cku Date: Mon, 15 Jan 2018 11:12:25 +0800 Subject: [PATCH 03/47] Bug 1207734 - Part 1.c. Fix coding style of HasTransformStyle. r=birtles MozReview-Commit-ID: 3UgIrO5qLFq --HG-- extra : source : 0b84734c0e64709ef0c0d4239ef8cc0a1068bdd6 extra : histedit_source : b08deb59f94fab16a3f188ec1fbf783800b9b42b --- layout/style/nsStyleStruct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 0ef67b5c84b0..4c7628aec04c 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2787,7 +2787,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay /* Returns whether the element has the -moz-transform property * or a related property. */ bool HasTransformStyle() const { - return mSpecifiedTransform != nullptr || + return mSpecifiedTransform || mTransformStyle == NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D || (mWillChangeBitField & NS_STYLE_WILL_CHANGE_TRANSFORM); } From 7429d3275ecd46742bffb07bccb8d9b2661b1952 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 6 Dec 2017 17:17:34 +0800 Subject: [PATCH 04/47] Bug 1207734 - Part 1.d. Carry the computed value of individual transform in nsStyleDisplay. r=emilio Add three more attributes in nsStyleDisplay 1. mSpecifiedRotate to carry computed value of 'rotate' property. 2. mSpecifiedTranslate to carry computed value of 'translate' property. 3. mSpecifiedScale to carry computed value of 'scale' property. Since each of these tree new property can be an animation target, we have to store them in speparate attributes, instead of putting them all in mSpecifiedTransform. MozReview-Commit-ID: G2dBAxzyBWh --HG-- extra : source : 1a75f7765d854910fbb10b2fd31427ef1d9524c6 extra : histedit_source : fd304f41f0e6856bf5a376e30bb13cb90b2534c5 --- layout/style/nsStyleStruct.cpp | 46 +++++++++++++++++++++++++--------- layout/style/nsStyleStruct.h | 6 ++++- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index bcef36021cac..c7f21a83c682 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3664,6 +3664,9 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) , mTransformStyle(aSource.mTransformStyle) , mTransformBox(aSource.mTransformBox) , mSpecifiedTransform(aSource.mSpecifiedTransform) + , mSpecifiedRotate(aSource.mSpecifiedRotate) + , mSpecifiedTranslate(aSource.mSpecifiedTranslate) + , mSpecifiedScale(aSource.mSpecifiedScale) , mTransformOrigin{ aSource.mTransformOrigin[0], aSource.mTransformOrigin[1], aSource.mTransformOrigin[2] } @@ -3721,6 +3724,12 @@ nsStyleDisplay::~nsStyleDisplay() { ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedTransform", mSpecifiedTransform); + ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedRotate", + mSpecifiedRotate); + ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedTranslate", + mSpecifiedTranslate); + ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedScale", + mSpecifiedScale); MOZ_COUNT_DTOR(nsStyleDisplay); } @@ -3739,6 +3748,23 @@ nsStyleDisplay::FinishStyle(nsPresContext* aPresContext) } } +static inline nsChangeHint +CompareTransformValues(const RefPtr& aList, + const RefPtr& aNewList) +{ + nsChangeHint result = nsChangeHint(0); + if (!aList != !aNewList || (aList && *aList != *aNewList)) { + result |= nsChangeHint_UpdateTransformLayer; + if (aList && aNewList) { + result |= nsChangeHint_UpdatePostTransformOverflow; + } else { + result |= nsChangeHint_UpdateOverflow; + } + } + + return result; +} + nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const { @@ -3867,18 +3893,14 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const */ nsChangeHint transformHint = nsChangeHint(0); - if (!mSpecifiedTransform != !aNewData.mSpecifiedTransform || - (mSpecifiedTransform && - *mSpecifiedTransform != *aNewData.mSpecifiedTransform)) { - transformHint |= nsChangeHint_UpdateTransformLayer; - - if (mSpecifiedTransform && - aNewData.mSpecifiedTransform) { - transformHint |= nsChangeHint_UpdatePostTransformOverflow; - } else { - transformHint |= nsChangeHint_UpdateOverflow; - } - } + transformHint |= CompareTransformValues(mSpecifiedTransform, + aNewData.mSpecifiedTransform); + transformHint |= CompareTransformValues(mSpecifiedRotate, aNewData. + mSpecifiedRotate); + transformHint |= CompareTransformValues(mSpecifiedTranslate, + aNewData.mSpecifiedTranslate); + transformHint |= CompareTransformValues(mSpecifiedScale, + aNewData.mSpecifiedScale); const nsChangeHint kUpdateOverflowAndRepaintHint = nsChangeHint_UpdateOverflow | nsChangeHint_RepaintFrame; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 4c7628aec04c..c075b87a1940 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2590,6 +2590,9 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay uint8_t mTransformStyle; StyleGeometryBox mTransformBox; // [reset] see nsStyleConsts.h RefPtr mSpecifiedTransform; // [reset] + RefPtr mSpecifiedRotate; // [reset] + RefPtr mSpecifiedTranslate; // [reset] + RefPtr mSpecifiedScale; // [reset] nsStyleCoord mTransformOrigin[3]; // [reset] percent, coord, calc, 3rd param is coord, calc only nsStyleCoord mChildPerspective; // [reset] none, coord nsStyleCoord mPerspectiveOrigin[2]; // [reset] percent, coord, calc @@ -2787,7 +2790,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay /* Returns whether the element has the -moz-transform property * or a related property. */ bool HasTransformStyle() const { - return mSpecifiedTransform || + return mSpecifiedTransform || mSpecifiedRotate || mSpecifiedTranslate || + mSpecifiedScale || mTransformStyle == NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D || (mWillChangeBitField & NS_STYLE_WILL_CHANGE_TRANSFORM); } From 705e13b202ecb94a57ed4ad965931274932af8b8 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 6 Dec 2017 23:24:27 +0800 Subject: [PATCH 05/47] Bug 1207734 - Part 2. Add a preference to enable/disable individual transform. r=emilio MozReview-Commit-ID: ESEWIh12anQ --HG-- extra : source : ddb231c2f01460224075257e696d0226dcb46dc7 extra : histedit_source : 0292bab783d5b02376b71232c56d11b7747e05fa --- modules/libpref/init/all.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 20cc42568e94..60e5b5402077 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2920,6 +2920,9 @@ pref("layout.css.dpi", -1); // of a CSS "px". This is only used for windows on the screen, not for printing. pref("layout.css.devPixelsPerPx", "-1.0"); +// Is support for CSS individual transform enabled? +pref("layout.css.individual-transform.enabled", false); + // Is support for CSS initial-letter property enabled? pref("layout.css.initial-letter.enabled", false); From 3e1f6d13fe0197d8970a057d88bb6420f3b64d30 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 6 Dec 2017 17:58:05 +0800 Subject: [PATCH 06/47] Bug 1207734 - Part 3. Add rotate/translate/scale properties into nsCSSPropList. r=emilio,heycam MozReview-Commit-ID: 3nb365nnqGF --HG-- extra : source : d5e9a0ff410ba6f4a66aa0cf077333038f1ffc4a extra : histedit_source : 91e94a210c5a60e1b993da41bc180e5879688df1 --- layout/style/nsCSSParser.cpp | 5 +++++ layout/style/nsCSSPropList.h | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index c1d8d5e02ba6..f09bd58f596d 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -11831,6 +11831,11 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSPropertyID aPropID) return ParseWebkitTextStroke(); case eCSSProperty_all: return ParseAll(); + case eCSSProperty_translate: + case eCSSProperty_rotate: + case eCSSProperty_scale: + // These properties aren't implemented in the old style system. + return false; default: MOZ_ASSERT(false, "should not be called"); return false; diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 5656f7d70c3c..2accf63bc3ec 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -3611,6 +3611,19 @@ CSS_PROP_POSITION( nullptr, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Right) +CSS_PROP_DISPLAY( + rotate, + rotate, + Rotate, + CSS_PROPERTY_PARSE_FUNCTION | + CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | + CSS_PROPERTY_CREATES_STACKING_CONTEXT | + CSS_PROPERTY_FIXPOS_CB, + "layout.css.individual-transform.enabled", + 0, + nullptr, + offsetof(nsStyleDisplay, mSpecifiedRotate), + eStyleAnimType_None) CSS_PROP_TEXT( ruby-align, ruby_align, @@ -4240,6 +4253,19 @@ CSS_PROP_TEXT( kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Discrete) +CSS_PROP_DISPLAY( + scale, + scale, + Scale, + CSS_PROPERTY_PARSE_FUNCTION | + CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | + CSS_PROPERTY_CREATES_STACKING_CONTEXT | + CSS_PROPERTY_FIXPOS_CB, + "layout.css.individual-transform.enabled", + 0, + nullptr, + offsetof(nsStyleDisplay, mSpecifiedScale), + eStyleAnimType_None) CSS_PROP_TEXT( text-transform, text_transform, @@ -4412,6 +4438,19 @@ CSS_PROP_DISPLAY( kTransitionTimingFunctionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) +CSS_PROP_DISPLAY( + translate, + translate, + Translate, + CSS_PROPERTY_PARSE_FUNCTION | + CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | + CSS_PROPERTY_CREATES_STACKING_CONTEXT | + CSS_PROPERTY_FIXPOS_CB, + "layout.css.individual-transform.enabled", + 0, + nullptr, + offsetof(nsStyleDisplay, mSpecifiedTranslate), + eStyleAnimType_None) #ifndef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND CSS_PROP_TEXTRESET( unicode-bidi, From 6ed6d25fb5a7c9f02250c6389ea16edb560ccbd0 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 13 Dec 2017 01:17:05 +0800 Subject: [PATCH 07/47] Bug 1207734 - Part 4.a. Store the final combined transform in nsStyleDisplay::mCombinedTransform. r=birtles MozReview-Commit-ID: FsuaMoclnL8 --HG-- extra : source : 792ed2b2a359c6f8ccb109707bac13f78eb08ad7 extra : histedit_source : 8b5659ff05a07bc32d11ff6507db9f716e060ea3 --- layout/style/nsStyleStruct.cpp | 56 ++++++++++++++++++++++++++++++++++ layout/style/nsStyleStruct.h | 21 ++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index c7f21a83c682..d19577e9f9d3 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3667,6 +3667,7 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) , mSpecifiedRotate(aSource.mSpecifiedRotate) , mSpecifiedTranslate(aSource.mSpecifiedTranslate) , mSpecifiedScale(aSource.mSpecifiedScale) + , mCombinedTransform(aSource.mCombinedTransform) , mTransformOrigin{ aSource.mTransformOrigin[0], aSource.mTransformOrigin[1], aSource.mTransformOrigin[2] } @@ -3730,6 +3731,8 @@ nsStyleDisplay::~nsStyleDisplay() mSpecifiedTranslate); ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedScale", mSpecifiedScale); + ReleaseSharedListOnMainThread("nsStyleDisplay::mCombinedTransform", + mCombinedTransform); MOZ_COUNT_DTOR(nsStyleDisplay); } @@ -3746,6 +3749,8 @@ nsStyleDisplay::FinishStyle(nsPresContext* aPresContext) shapeImage->ResolveImage(aPresContext); } } + + GenerateCombinedTransform(); } static inline nsChangeHint @@ -4015,6 +4020,57 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const return hint; } +void +nsStyleDisplay::GenerateCombinedTransform() +{ + mCombinedTransform = nullptr; + + // Follow the order defined in the spec to append transform functions. + // https://drafts.csswg.org/css-transforms-2/#ctm + AutoTArray shareLists; + if (mSpecifiedTranslate) { + shareLists.AppendElement(mSpecifiedTranslate.get()); + } + if (mSpecifiedRotate) { + shareLists.AppendElement(mSpecifiedRotate.get()); + } + if (mSpecifiedScale) { + shareLists.AppendElement(mSpecifiedScale.get()); + } + if (mSpecifiedTransform) { + shareLists.AppendElement(mSpecifiedTransform.get()); + } + + if (shareLists.Length() == 0) { + return; + } + + if (shareLists.Length() == 1) { + mCombinedTransform = shareLists[0]; + return; + } + + // In common, we may have 3 transform functions(for rotate, translate and + // scale) in mSpecifiedTransform, one rotate function in mSpecifiedRotate, + // one translate function in mSpecifiedTranslate, and one scale function in + // mSpecifiedScale. So 6 slots are enough for the most cases. + AutoTArray valueLists; + for (auto list: shareLists) { + if (list) { + valueLists.AppendElement(list->mHead->Clone()); + } + } + + // Check we have at least one list or else valueLists.Length() - 1 below will + // underflow. + MOZ_ASSERT(valueLists.Length()); + + for (uint32_t i = 0; i < valueLists.Length() - 1; i++) { + valueLists[i]->mNext = valueLists[i + 1]; + } + + mCombinedTransform = new nsCSSValueSharedList(valueLists[0]); +} // -------------------- // nsStyleVisibility // diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index c075b87a1940..f55f2571c512 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2593,6 +2593,13 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay RefPtr mSpecifiedRotate; // [reset] RefPtr mSpecifiedTranslate; // [reset] RefPtr mSpecifiedScale; // [reset] + + // Used to store the final combination of mSpecifiedTranslate, + // mSpecifiedRotate, mSpecifiedScale and mSpecifiedTransform. + // Use GetCombinedTransform() to get the final transform, instead of + // accessing mCombinedTransform directly. + RefPtr mCombinedTransform; + nsStyleCoord mTransformOrigin[3]; // [reset] percent, coord, calc, 3rd param is coord, calc only nsStyleCoord mChildPerspective; // [reset] none, coord nsStyleCoord mPerspectiveOrigin[2]; // [reset] percent, coord, calc @@ -2860,6 +2867,18 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay inline bool IsFixedPosContainingBlockForAppropriateFrame( StyleContextLike* aStyleContext) const; + /** + * Returns the final combined transform. + **/ + already_AddRefed GetCombinedTransform() const { + if (mCombinedTransform) { + return do_AddRef(mCombinedTransform); + } + + // backward compatible to gecko-backed style system. + return mSpecifiedTransform ? do_AddRef(mSpecifiedTransform) : nullptr; + } + private: // Helpers for above functions, which do some but not all of the tests // for them (since transform must be tested separately for each). @@ -2869,7 +2888,7 @@ private: template inline bool HasFixedPosContainingBlockStyleInternal( StyleContextLike* aStyleContext) const; - + void GenerateCombinedTransform(); public: // Return the 'float' and 'clear' properties, with inline-{start,end} values // resolved to {left,right} according to the given writing mode. These are From 564c97aa322df068eda05c3b1c2dc9b1e63dde33 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 13 Dec 2017 01:21:41 +0800 Subject: [PATCH 08/47] Bug 1207734 - Part 4.b. Use the final combined transform in the nsDisplayTransform. r=birtles MozReview-Commit-ID: CDlvzkcae0g --HG-- extra : source : 9d97fc3071af8f3d206f1cbe931c72949a9eb01f extra : histedit_source : 65d6c3301ea3282c0e82990fcacdf4a612c35f55 --- layout/painting/ActiveLayerTracker.cpp | 5 +++-- layout/painting/nsDisplayList.cpp | 2 +- layout/style/StyleAnimationValue.cpp | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/layout/painting/ActiveLayerTracker.cpp b/layout/painting/ActiveLayerTracker.cpp index ce7561d7c84b..dcdd1fb13cc1 100644 --- a/layout/painting/ActiveLayerTracker.cpp +++ b/layout/painting/ActiveLayerTracker.cpp @@ -248,7 +248,8 @@ static void IncrementScaleRestyleCountIfNeeded(nsIFrame* aFrame, LayerActivity* aActivity) { const nsStyleDisplay* display = aFrame->StyleDisplay(); - if (!display->mSpecifiedTransform) { + RefPtr transformList = display->GetCombinedTransform(); + if (!transformList) { // The transform was removed. aActivity->mPreviousTransformScale = Nothing(); IncrementMutationCount(&aActivity->mRestyleCounts[LayerActivity::ACTIVITY_SCALE]); @@ -261,7 +262,7 @@ IncrementScaleRestyleCountIfNeeded(nsIFrame* aFrame, LayerActivity* aActivity) bool dummyBool; nsStyleTransformMatrix::TransformReferenceBox refBox(aFrame); Matrix4x4 transform = - nsStyleTransformMatrix::ReadTransforms(display->mSpecifiedTransform->mHead, + nsStyleTransformMatrix::ReadTransforms(transformList->mHead, aFrame->StyleContext(), presContext, dummy, refBox, diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 7a2f856b46c3..bdf530077be2 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -8100,7 +8100,7 @@ nsDisplayTransform::FrameTransformProperties::FrameTransformProperties(const nsI float aAppUnitsPerPixel, const nsRect* aBoundsOverride) : mFrame(aFrame) - , mTransformList(aFrame->StyleDisplay()->mSpecifiedTransform) + , mTransformList(aFrame->StyleDisplay()->GetCombinedTransform()) , mToTransformOrigin(GetDeltaToTransformOrigin(aFrame, aAppUnitsPerPixel, aBoundsOverride)) { } diff --git a/layout/style/StyleAnimationValue.cpp b/layout/style/StyleAnimationValue.cpp index 184a73912b7a..41461d3d988f 100644 --- a/layout/style/StyleAnimationValue.cpp +++ b/layout/style/StyleAnimationValue.cpp @@ -4636,10 +4636,11 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty, const nsStyleDisplay *display = static_cast(styleStruct); nsAutoPtr result; - if (display->mSpecifiedTransform) { + RefPtr transformList = display->GetCombinedTransform(); + if (transformList) { // Clone, and convert all lengths (not percents) to pixels. nsCSSValueList **resultTail = getter_Transfers(result); - for (const nsCSSValueList *l = display->mSpecifiedTransform->mHead; + for (const nsCSSValueList *l = transformList->mHead; l; l = l->mNext) { nsCSSValueList *clone = new nsCSSValueList; *resultTail = clone; From 1aadc95d1d1244d167b3ec2ef7832f843fe16336 Mon Sep 17 00:00:00 2001 From: cku Date: Fri, 5 Jan 2018 14:45:05 +0800 Subject: [PATCH 09/47] Bug 1207734 - Part 4.c. Temporary disable async-transform for individual-transform. r=birtles Since we do not support async-transform for individual-transform yet. MozReview-Commit-ID: gfOzHpjOnQ --HG-- extra : source : e7c6e73fa4215ff49194b5dc89de7f3472259f1b extra : histedit_source : 7526bb5d88ca6cf2bd9cbe5298527d77cfe7d9c1 --- dom/animation/KeyframeEffectReadOnly.cpp | 6 ++++++ layout/style/nsStyleStruct.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index 839416ce3de4..fbad51d808a9 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -1670,6 +1670,12 @@ KeyframeEffectReadOnly::ShouldBlockAsyncTransformAnimations( } } + // XXX cku temporarily disable async-animation when this frame has any + // individual transforms before bug 1425837 been fixed. + if (aFrame->StyleDisplay()->HasIndividualTransform()) { + return true; + } + return false; } diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index f55f2571c512..0643d8e82c71 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2803,6 +2803,10 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay (mWillChangeBitField & NS_STYLE_WILL_CHANGE_TRANSFORM); } + bool HasIndividualTransform() const { + return mSpecifiedRotate || mSpecifiedTranslate || mSpecifiedScale; + } + bool HasPerspectiveStyle() const { return mChildPerspective.GetUnit() == eStyleUnit_Coord; } From e28f66c253952d4428b63682605ad4eea05ef113 Mon Sep 17 00:00:00 2001 From: cku Date: Tue, 19 Dec 2017 14:33:09 +0800 Subject: [PATCH 10/47] Bug 1207734 - Part 5. Implement the getComputedStyle API for individual transform. r=birtles MozReview-Commit-ID: 3w1kA6VCXsg --HG-- extra : source : 659e8ae95236178c2eb73bccb24e7fb6c2c1e351 extra : histedit_source : a4a93d99944741b265127e7227cc46899a7e3fcb --- layout/style/nsComputedDOMStyle.cpp | 207 ++++++++++++++++++ layout/style/nsComputedDOMStyle.h | 3 + layout/style/nsComputedDOMStylePropertyList.h | 3 + 3 files changed, 213 insertions(+) diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index d63396abefb7..02636defa534 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1735,6 +1735,213 @@ nsComputedDOMStyle::DoGetTransformBox() return val.forget(); } +static already_AddRefed +ReadIndividualTransformValue(nsCSSValueSharedList* aList, + const std::function& aCallback) +{ + if (!aList) { + RefPtr val = new nsROCSSPrimitiveValue; + val->SetIdent(eCSSKeyword_none); + return val.forget(); + } + + nsAutoString result; + const nsCSSValue::Array* data = aList->mHead->mValue.GetArrayValue(); + aCallback(data, result); + + RefPtr val = new nsROCSSPrimitiveValue; + val->SetString(result); + return val.forget(); +} + +already_AddRefed +nsComputedDOMStyle::DoGetTranslate() +{ + typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox; + + RefPtr self(this); + return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedTranslate, + [self](const nsCSSValue::Array* aData, nsString& aResult) { + GeckoStyleContext* contextIfGecko = + self->mStyleContext ? self->mStyleContext->GetAsGecko() : nullptr; + TransformReferenceBox refBox(self->mInnerFrame, nsSize(0, 0)); + RuleNodeCacheConditions dummy; + + // Even though the spec doesn't say to resolve percentage values, Blink + // and Edge do and so until that is clarified we do as well: + // + // https://github.com/w3c/csswg-drafts/issues/2124 + switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { + /* translate : */ + case eCSSKeyword_translatex: { + NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); + float tx = ProcessTranslatePart(aData->Item(1), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + &TransformReferenceBox::Width); + aResult.AppendFloat(tx); + aResult.AppendLiteral("px"); + break; + } + /* translate : */ + case eCSSKeyword_translate: { + NS_PRECONDITION(aData->Count() == 3, "Invalid array!"); + float tx = ProcessTranslatePart(aData->Item(1), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + &TransformReferenceBox::Width); + aResult.AppendFloat(tx); + aResult.AppendLiteral("px"); + + float ty = ProcessTranslatePart(aData->Item(2), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + &TransformReferenceBox::Height); + if (ty != 0) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(ty); + aResult.AppendLiteral("px"); + } + break; + } + /* translate : */ + case eCSSKeyword_translate3d: { + NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); + float tx = ProcessTranslatePart(aData->Item(1), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + &TransformReferenceBox::Width); + aResult.AppendFloat(tx); + aResult.AppendLiteral("px"); + + float ty = ProcessTranslatePart(aData->Item(2), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + &TransformReferenceBox::Height); + + float tz = ProcessTranslatePart(aData->Item(3), + contextIfGecko, + self->mStyleContext->PresContext(), + dummy, + &refBox, + nullptr); + if (ty != 0. || tz != 0.) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(ty); + aResult.AppendLiteral("px"); + } + if (tz != 0.) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(tz); + aResult.AppendLiteral("px"); + } + + break; + } + default: + MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); + } + }); +} + +already_AddRefed +nsComputedDOMStyle::DoGetScale() +{ + return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedScale, + [](const nsCSSValue::Array* aData, nsString& aResult) { + switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { + /* scale : */ + case eCSSKeyword_scalex: + NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); + aResult.AppendFloat(aData->Item(1).GetFloatValue()); + break; + /* scale : */ + case eCSSKeyword_scale: { + NS_PRECONDITION(aData->Count() == 3, "Invalid array!"); + aResult.AppendFloat(aData->Item(1).GetFloatValue()); + + float sy = aData->Item(2).GetFloatValue(); + if (sy != 1.) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(sy); + } + break; + } + /* scale : */ + case eCSSKeyword_scale3d: { + NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); + aResult.AppendFloat(aData->Item(1).GetFloatValue()); + + float sy = aData->Item(2).GetFloatValue(); + float sz = aData->Item(3).GetFloatValue(); + + if (sy != 1. || sz != 1.) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(sy); + } + if (sz != 1.) { + aResult.AppendLiteral(" "); + aResult.AppendFloat(sz); + } + break; + } + default: + MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); + } + }); +} + +already_AddRefed +nsComputedDOMStyle::DoGetRotate() +{ + return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedRotate, + [](const nsCSSValue::Array* aData, nsString& aResult) { + + switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { + /* rotate : */ + case eCSSKeyword_rotate: { + NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); + double theta = aData->Item(1).GetAngleValueInDegrees(); + aResult.AppendFloat(theta); + aResult.AppendLiteral("deg"); + break; + } + /* rotate : */ + case eCSSKeyword_rotate3d: { + NS_PRECONDITION(aData->Count() == 5, "Invalid array!"); + float rx = aData->Item(1).GetFloatValue(); + float ry = aData->Item(2).GetFloatValue(); + float rz = aData->Item(3).GetFloatValue(); + if (rx != 0. || ry != 0. || rz != 1.) { + aResult.AppendFloat(rx); + aResult.AppendLiteral(" "); + aResult.AppendFloat(ry); + aResult.AppendLiteral(" "); + aResult.AppendFloat(rz); + aResult.AppendLiteral(" "); + } + double theta = aData->Item(4).GetAngleValueInDegrees(); + aResult.AppendFloat(theta); + aResult.AppendLiteral("deg"); + break; + } + default: + MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); + } + }); +} + /* static */ already_AddRefed nsComputedDOMStyle::MatrixToCSSValue(const mozilla::gfx::Matrix4x4& matrix) { diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index 6b324c10ae77..eaf488d0f9fd 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -515,6 +515,9 @@ private: already_AddRefed DoGetPageBreakInside(); already_AddRefed DoGetTouchAction(); already_AddRefed DoGetTransform(); + already_AddRefed DoGetTranslate(); + already_AddRefed DoGetRotate(); + already_AddRefed DoGetScale(); already_AddRefed DoGetTransformBox(); already_AddRefed DoGetTransformOrigin(); already_AddRefed DoGetPerspective(); diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index be0f2c67d656..330d5f578cfe 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -222,8 +222,10 @@ COMPUTED_STYLE_PROP(position, Position) COMPUTED_STYLE_PROP(quotes, Quotes) COMPUTED_STYLE_PROP(resize, Resize) COMPUTED_STYLE_PROP(right, Right) +COMPUTED_STYLE_PROP(rotate, Rotate) COMPUTED_STYLE_PROP(ruby_align, RubyAlign) COMPUTED_STYLE_PROP(ruby_position, RubyPosition) +COMPUTED_STYLE_PROP(scale, Scale) COMPUTED_STYLE_PROP(scroll_behavior, ScrollBehavior) COMPUTED_STYLE_PROP(scroll_snap_coordinate, ScrollSnapCoordinate) COMPUTED_STYLE_PROP(scroll_snap_destination, ScrollSnapDestination) @@ -263,6 +265,7 @@ COMPUTED_STYLE_PROP(transition_delay, TransitionDelay) COMPUTED_STYLE_PROP(transition_duration, TransitionDuration) COMPUTED_STYLE_PROP(transition_property, TransitionProperty) COMPUTED_STYLE_PROP(transition_timing_function, TransitionTimingFunction) +COMPUTED_STYLE_PROP(translate, Translate) COMPUTED_STYLE_PROP(unicode_bidi, UnicodeBidi) COMPUTED_STYLE_PROP(vertical_align, VerticalAlign) COMPUTED_STYLE_PROP(visibility, Visibility) From 5a7597b204dabb438bd08180c2723d4a9efffaa9 Mon Sep 17 00:00:00 2001 From: cku Date: Wed, 20 Dec 2017 11:46:13 +0800 Subject: [PATCH 11/47] Bug 1207734 - Part 6. Fix an assertion from the early pref access checking. r=billm MozReview-Commit-ID: 8GgVojlNy3v --HG-- extra : source : 61d61bb2d868195ca53c53f183668f906aa4888c extra : histedit_source : 04602b00c51e85ebae37f091a70d92a4276d4b31 --- dom/ipc/ContentPrefs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/ipc/ContentPrefs.cpp b/dom/ipc/ContentPrefs.cpp index 6468cc7efc4a..66732e4e0d2c 100644 --- a/dom/ipc/ContentPrefs.cpp +++ b/dom/ipc/ContentPrefs.cpp @@ -152,6 +152,7 @@ const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = { "layout.css.grid-template-subgrid-value.enabled", "layout.css.grid.enabled", "layout.css.image-orientation.enabled", + "layout.css.individual-transform.enabled", "layout.css.initial-letter.enabled", "layout.css.isolation.enabled", "layout.css.mix-blend-mode.enabled", From debeadacaaa64f8143816725bb7b4a2e25856519 Mon Sep 17 00:00:00 2001 From: Paul Bone Date: Wed, 13 Dec 2017 11:31:39 +1100 Subject: [PATCH 12/47] Bug 1430703 - Fix some too-loose static assertions r=cduan --HG-- extra : rebase_source : 9a5b7de473290dc8d8578406513a9f002434b274 extra : histedit_source : cd563024fa007e3f40f108cd7d2339946bb40ec6 --- js/public/TraceKind.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/js/public/TraceKind.h b/js/public/TraceKind.h index ea821d2c72e2..145d2dac8199 100644 --- a/js/public/TraceKind.h +++ b/js/public/TraceKind.h @@ -64,11 +64,16 @@ enum class TraceKind RegExpShared = 0x4F }; const static uintptr_t OutOfLineTraceKindMask = 0x07; -static_assert(uintptr_t(JS::TraceKind::BaseShape) & OutOfLineTraceKindMask, "mask bits are set"); -static_assert(uintptr_t(JS::TraceKind::JitCode) & OutOfLineTraceKindMask, "mask bits are set"); -static_assert(uintptr_t(JS::TraceKind::LazyScript) & OutOfLineTraceKindMask, "mask bits are set"); -static_assert(uintptr_t(JS::TraceKind::Scope) & OutOfLineTraceKindMask, "mask bits are set"); -static_assert(uintptr_t(JS::TraceKind::RegExpShared) & OutOfLineTraceKindMask, "mask bits are set"); + +#define ASSERT_TRACE_KIND(tk) \ + static_assert((uintptr_t(tk) & OutOfLineTraceKindMask) == OutOfLineTraceKindMask, \ + "mask bits are set") +ASSERT_TRACE_KIND(JS::TraceKind::BaseShape); +ASSERT_TRACE_KIND(JS::TraceKind::JitCode); +ASSERT_TRACE_KIND(JS::TraceKind::LazyScript); +ASSERT_TRACE_KIND(JS::TraceKind::Scope); +ASSERT_TRACE_KIND(JS::TraceKind::RegExpShared); +#undef ASSERT_TRACE_KIND // When this header is imported inside SpiderMonkey, the class definitions are // available and we can query those definitions to find the correct kind From 00db3443a3d2acd440ce1c16950456ae3b82e5c7 Mon Sep 17 00:00:00 2001 From: Jorg K Date: Tue, 16 Jan 2018 16:17:00 +0200 Subject: [PATCH 13/47] Bug 1355977 - don't show GMT twice in certificate details. r=zibi --- security/manager/ssl/nsNSSCertHelper.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/security/manager/ssl/nsNSSCertHelper.cpp b/security/manager/ssl/nsNSSCertHelper.cpp index 4d2b2ff40159..152228f56a5a 100644 --- a/security/manager/ssl/nsNSSCertHelper.cpp +++ b/security/manager/ssl/nsNSSCertHelper.cpp @@ -1675,7 +1675,13 @@ ProcessTime(PRTime dispTime, kDateFormatLong, kTimeFormatSeconds, &explodedTimeGMT, tempString); text.Append(tempString); - text.AppendLiteral(" GMT)"); + // Append "GMT" if it's not already added by the formatter + // since the OS pattern contained a timezone (Mac and Linux). + if (tempString.Find(" GMT") == kNotFound) { + text.AppendLiteral(" GMT)"); + } else { + text.Append(')'); + } nsCOMPtr printableItem = new nsNSSASN1PrintableItem(); From f4e4ea9b59ebee448dfb444dab680ce1ea2d52c7 Mon Sep 17 00:00:00 2001 From: David Parks Date: Wed, 10 Jan 2018 14:07:56 -0800 Subject: [PATCH 14/47] Bug 1358372: Part 1 - Move Windows content process AudioSession init before sandbox lowering r=jimm Something about setting the grouping parameter was harmed by the sandbox. --- dom/ipc/ContentParent.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 74d09b99814c..a9c7e7829a29 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2382,6 +2382,17 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, } } +#if defined(XP_WIN) + // Send the info needed to join the browser process's audio session. + nsID id; + nsString sessionName; + nsString iconPath; + if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName, + iconPath))) { + Unused << SendSetAudioSessionData(id, sessionName, iconPath); + } +#endif + #ifdef MOZ_CONTENT_SANDBOX bool shouldSandbox = true; MaybeFileDesc brokerFd = void_t(); @@ -2413,16 +2424,6 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, KillHard("SandboxInitFailed"); } #endif -#if defined(XP_WIN) - // Send the info needed to join the browser process's audio session. - nsID id; - nsString sessionName; - nsString iconPath; - if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName, - iconPath))) { - Unused << SendSetAudioSessionData(id, sessionName, iconPath); - } -#endif { RefPtr swr = ServiceWorkerRegistrar::Get(); From efbd6f5a207ee6da5ab757adecfb1b0a28dc115f Mon Sep 17 00:00:00 2001 From: David Parks Date: Wed, 10 Jan 2018 14:57:19 -0800 Subject: [PATCH 15/47] Bug 1358372: Part 2 - Run Windows AudioSessionControl operations on main thread r=jimm This plays better with sndvol.exe. It reduces the impact of a bug that shows multiple volume sliders for the content processes. --- widget/windows/AudioSession.cpp | 85 ++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/widget/windows/AudioSession.cpp b/widget/windows/AudioSession.cpp index 9b06df81949d..007f0eacb2aa 100644 --- a/widget/windows/AudioSession.cpp +++ b/widget/windows/AudioSession.cpp @@ -20,6 +20,7 @@ #include "nsThreadUtils.h" #include "nsXULAppAPI.h" #include "mozilla/Attributes.h" +#include "mozilla/Mutex.h" #include @@ -54,6 +55,8 @@ public: STDMETHODIMP OnSessionDisconnected(AudioSessionDisconnectReason aReason); private: nsresult OnSessionDisconnectedInternal(); + nsresult CommitAudioSessionData(); + public: STDMETHODIMP OnSimpleVolumeChanged(float aVolume, BOOL aMute, @@ -86,6 +89,8 @@ protected: nsString mIconPath; nsID mSessionGroupingParameter; SessionState mState; + // Guards the IAudioSessionControl + mozilla::Mutex mMutex; ThreadSafeAutoRefCnt mRefCnt; NS_DECL_OWNINGTHREAD @@ -127,7 +132,8 @@ RecvAudioSessionData(const nsID& aID, AudioSession* AudioSession::sService = nullptr; -AudioSession::AudioSession() +AudioSession::AudioSession() : + mMutex("AudioSessionControl") { mState = UNINITIALIZED; } @@ -254,6 +260,7 @@ AudioSession::Start() return NS_ERROR_FAILURE; } + MutexAutoLock lock(mMutex); hr = manager->GetAudioSessionControl(&GUID_NULL, 0, getter_AddRefs(mAudioSessionControl)); @@ -262,25 +269,6 @@ AudioSession::Start() return NS_ERROR_FAILURE; } - hr = mAudioSessionControl->SetGroupingParam((LPGUID)&mSessionGroupingParameter, - nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - - hr = mAudioSessionControl->SetDisplayName(mDisplayName.get(), nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - - hr = mAudioSessionControl->SetIconPath(mIconPath.get(), nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - // Increments refcount of 'this'. hr = mAudioSessionControl->RegisterAudioSessionNotification(this); if (FAILED(hr)) { @@ -288,6 +276,11 @@ AudioSession::Start() return NS_ERROR_FAILURE; } + nsCOMPtr runnable = + NewRunnableMethod("AudioSession::CommitAudioSessionData", + this, &AudioSession::CommitAudioSessionData); + NS_DispatchToMainThread(runnable); + mState = STARTED; return NS_OK; @@ -296,6 +289,8 @@ AudioSession::Start() void AudioSession::StopInternal() { + mMutex.AssertCurrentThreadOwns(); + if (mAudioSessionControl && (mState == STARTED || mState == STOPPED)) { // Decrement refcount of 'this' @@ -318,6 +313,7 @@ AudioSession::Stop() RefPtr kungFuDeathGrip; kungFuDeathGrip.swap(sService); + MutexAutoLock lock(mMutex); StopInternal(); } @@ -374,6 +370,34 @@ AudioSession::SetSessionData(const nsID& aID, return NS_OK; } +nsresult +AudioSession::CommitAudioSessionData() +{ + MutexAutoLock lock(mMutex); + + HRESULT hr = + mAudioSessionControl->SetGroupingParam((LPGUID)&mSessionGroupingParameter, + nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + + hr = mAudioSessionControl->SetDisplayName(mDisplayName.get(), nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + + hr = mAudioSessionControl->SetIconPath(mIconPath.get(), nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} + STDMETHODIMP AudioSession::OnChannelVolumeChanged(DWORD aChannelCount, float aChannelVolumeArray[], @@ -419,15 +443,20 @@ AudioSession::OnSessionDisconnected(AudioSessionDisconnectReason aReason) nsresult AudioSession::OnSessionDisconnectedInternal() { - if (!mAudioSessionControl) - return NS_OK; + { + // We need to release the mutex before we call Start(). + MutexAutoLock lock(mMutex); - // When successful, UnregisterAudioSessionNotification will decrement the - // refcount of 'this'. Start will re-increment it. In the interim, - // we'll need to reference ourselves. - RefPtr kungFuDeathGrip(this); - mAudioSessionControl->UnregisterAudioSessionNotification(this); - mAudioSessionControl = nullptr; + if (!mAudioSessionControl) + return NS_OK; + + // When successful, UnregisterAudioSessionNotification will decrement the + // refcount of 'this'. Start will re-increment it. In the interim, + // we'll need to reference ourselves. + RefPtr kungFuDeathGrip(this); + mAudioSessionControl->UnregisterAudioSessionNotification(this); + mAudioSessionControl = nullptr; + } mState = AUDIO_SESSION_DISCONNECTED; CoUninitialize(); From 77619aeb6ecfdaaed7aa2a97699b2a35313d0124 Mon Sep 17 00:00:00 2001 From: Michael Froman Date: Thu, 11 Jan 2018 07:27:00 +0200 Subject: [PATCH 16/47] Bug 1415922 - "Stylo packages not installed during mach bootstrap if .hgrc file has alias for log set to log -G" [r=gps] --- python/mozboot/mozboot/bootstrap.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py index 29a00dfe5e1a..5c40fcd08a79 100644 --- a/python/mozboot/mozboot/bootstrap.py +++ b/python/mozboot/mozboot/bootstrap.py @@ -321,6 +321,7 @@ class Bootstrapper(object): state_dir_available = os.path.exists(state_dir) r = current_firefox_checkout(check_output=self.instance.check_output, + env=self.instance._hgplain_env(), hg=self.instance.which('hg')) (checkout_type, checkout_root) = r @@ -504,7 +505,7 @@ def clone_firefox(hg, dest): return True -def current_firefox_checkout(check_output, hg=None): +def current_firefox_checkout(check_output, env, hg=None): """Determine whether we're in a Firefox checkout. Returns one of None, ``git``, or ``hg``. @@ -521,7 +522,9 @@ def current_firefox_checkout(check_output, hg=None): if hg and os.path.exists(hg_dir): # Verify the hg repo is a Firefox repo by looking at rev 0. try: - node = check_output([hg, 'log', '-r', '0', '--template', '{node}'], cwd=path) + node = check_output([hg, 'log', '-r', '0', '--template', '{node}'], + cwd=path, + env=env) if node in HG_ROOT_REVISIONS: return ('hg', path) # Else the root revision is different. There could be nested From ee8460f7aff7487b1de947d8b1957d585ddd0460 Mon Sep 17 00:00:00 2001 From: Cosmin Sabou Date: Wed, 17 Jan 2018 13:56:16 +0200 Subject: [PATCH 17/47] Backed out 2 changesets (bug 1358372) for mochitest failures on AudioSession, AudioSession::CommitAudioSessionData, Mutex, nsStringBuffer on a CLOSED TREE Backed out changeset 76e48321127d (bug 1358372) Backed out changeset f8b2bbebb2f0 (bug 1358372) --- dom/ipc/ContentParent.cpp | 21 ++++---- widget/windows/AudioSession.cpp | 85 +++++++++++---------------------- 2 files changed, 38 insertions(+), 68 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index a9c7e7829a29..74d09b99814c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2382,17 +2382,6 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, } } -#if defined(XP_WIN) - // Send the info needed to join the browser process's audio session. - nsID id; - nsString sessionName; - nsString iconPath; - if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName, - iconPath))) { - Unused << SendSetAudioSessionData(id, sessionName, iconPath); - } -#endif - #ifdef MOZ_CONTENT_SANDBOX bool shouldSandbox = true; MaybeFileDesc brokerFd = void_t(); @@ -2424,6 +2413,16 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, KillHard("SandboxInitFailed"); } #endif +#if defined(XP_WIN) + // Send the info needed to join the browser process's audio session. + nsID id; + nsString sessionName; + nsString iconPath; + if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName, + iconPath))) { + Unused << SendSetAudioSessionData(id, sessionName, iconPath); + } +#endif { RefPtr swr = ServiceWorkerRegistrar::Get(); diff --git a/widget/windows/AudioSession.cpp b/widget/windows/AudioSession.cpp index 007f0eacb2aa..9b06df81949d 100644 --- a/widget/windows/AudioSession.cpp +++ b/widget/windows/AudioSession.cpp @@ -20,7 +20,6 @@ #include "nsThreadUtils.h" #include "nsXULAppAPI.h" #include "mozilla/Attributes.h" -#include "mozilla/Mutex.h" #include @@ -55,8 +54,6 @@ public: STDMETHODIMP OnSessionDisconnected(AudioSessionDisconnectReason aReason); private: nsresult OnSessionDisconnectedInternal(); - nsresult CommitAudioSessionData(); - public: STDMETHODIMP OnSimpleVolumeChanged(float aVolume, BOOL aMute, @@ -89,8 +86,6 @@ protected: nsString mIconPath; nsID mSessionGroupingParameter; SessionState mState; - // Guards the IAudioSessionControl - mozilla::Mutex mMutex; ThreadSafeAutoRefCnt mRefCnt; NS_DECL_OWNINGTHREAD @@ -132,8 +127,7 @@ RecvAudioSessionData(const nsID& aID, AudioSession* AudioSession::sService = nullptr; -AudioSession::AudioSession() : - mMutex("AudioSessionControl") +AudioSession::AudioSession() { mState = UNINITIALIZED; } @@ -260,7 +254,6 @@ AudioSession::Start() return NS_ERROR_FAILURE; } - MutexAutoLock lock(mMutex); hr = manager->GetAudioSessionControl(&GUID_NULL, 0, getter_AddRefs(mAudioSessionControl)); @@ -269,6 +262,25 @@ AudioSession::Start() return NS_ERROR_FAILURE; } + hr = mAudioSessionControl->SetGroupingParam((LPGUID)&mSessionGroupingParameter, + nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + + hr = mAudioSessionControl->SetDisplayName(mDisplayName.get(), nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + + hr = mAudioSessionControl->SetIconPath(mIconPath.get(), nullptr); + if (FAILED(hr)) { + StopInternal(); + return NS_ERROR_FAILURE; + } + // Increments refcount of 'this'. hr = mAudioSessionControl->RegisterAudioSessionNotification(this); if (FAILED(hr)) { @@ -276,11 +288,6 @@ AudioSession::Start() return NS_ERROR_FAILURE; } - nsCOMPtr runnable = - NewRunnableMethod("AudioSession::CommitAudioSessionData", - this, &AudioSession::CommitAudioSessionData); - NS_DispatchToMainThread(runnable); - mState = STARTED; return NS_OK; @@ -289,8 +296,6 @@ AudioSession::Start() void AudioSession::StopInternal() { - mMutex.AssertCurrentThreadOwns(); - if (mAudioSessionControl && (mState == STARTED || mState == STOPPED)) { // Decrement refcount of 'this' @@ -313,7 +318,6 @@ AudioSession::Stop() RefPtr kungFuDeathGrip; kungFuDeathGrip.swap(sService); - MutexAutoLock lock(mMutex); StopInternal(); } @@ -370,34 +374,6 @@ AudioSession::SetSessionData(const nsID& aID, return NS_OK; } -nsresult -AudioSession::CommitAudioSessionData() -{ - MutexAutoLock lock(mMutex); - - HRESULT hr = - mAudioSessionControl->SetGroupingParam((LPGUID)&mSessionGroupingParameter, - nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - - hr = mAudioSessionControl->SetDisplayName(mDisplayName.get(), nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - - hr = mAudioSessionControl->SetIconPath(mIconPath.get(), nullptr); - if (FAILED(hr)) { - StopInternal(); - return NS_ERROR_FAILURE; - } - - return NS_OK; -} - STDMETHODIMP AudioSession::OnChannelVolumeChanged(DWORD aChannelCount, float aChannelVolumeArray[], @@ -443,20 +419,15 @@ AudioSession::OnSessionDisconnected(AudioSessionDisconnectReason aReason) nsresult AudioSession::OnSessionDisconnectedInternal() { - { - // We need to release the mutex before we call Start(). - MutexAutoLock lock(mMutex); + if (!mAudioSessionControl) + return NS_OK; - if (!mAudioSessionControl) - return NS_OK; - - // When successful, UnregisterAudioSessionNotification will decrement the - // refcount of 'this'. Start will re-increment it. In the interim, - // we'll need to reference ourselves. - RefPtr kungFuDeathGrip(this); - mAudioSessionControl->UnregisterAudioSessionNotification(this); - mAudioSessionControl = nullptr; - } + // When successful, UnregisterAudioSessionNotification will decrement the + // refcount of 'this'. Start will re-increment it. In the interim, + // we'll need to reference ourselves. + RefPtr kungFuDeathGrip(this); + mAudioSessionControl->UnregisterAudioSessionNotification(this); + mAudioSessionControl = nullptr; mState = AUDIO_SESSION_DISCONNECTED; CoUninitialize(); From a6e93a071198bca3880b3ceb04d6f1fb7e37c654 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Wed, 17 Jan 2018 12:52:51 +0100 Subject: [PATCH 18/47] Bug 1430516 - Fixing a regression when a table cell is selected, r=catalinb --- dom/base/Selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/Selection.cpp b/dom/base/Selection.cpp index e810457836b0..efb5570d77c7 100644 --- a/dom/base/Selection.cpp +++ b/dom/base/Selection.cpp @@ -687,7 +687,7 @@ Selection::GetTableSelectionType(nsIDOMRange* aDOMRange, nsIContent* child = range->GetChildAtStartOffset(); // Not a single selected node - if (!child || child != range->GetChildAtEndOffset()) { + if (!child || child->GetNextSibling() != range->GetChildAtEndOffset()) { return NS_OK; } From a9eff4340522d03257135c5d8930ec71ab3a1307 Mon Sep 17 00:00:00 2001 From: Andrew Osmond Date: Wed, 17 Jan 2018 07:34:34 -0500 Subject: [PATCH 19/47] Bug 1430795 - Ensure certain gfx gtests are initialized properly. r=aosmond --- gfx/tests/gtest/TestCompositor.cpp | 2 +- gfx/tests/gtest/TestTextureCompatibility.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gfx/tests/gtest/TestCompositor.cpp b/gfx/tests/gtest/TestCompositor.cpp index a21200ed9124..aede68bd1e16 100644 --- a/gfx/tests/gtest/TestCompositor.cpp +++ b/gfx/tests/gtest/TestCompositor.cpp @@ -45,7 +45,7 @@ struct LayerManagerData { static already_AddRefed CreateTestCompositor(LayersBackend backend, widget::CompositorWidget* widget) { - gfxPrefs::GetSingleton(); + gfxPlatform::GetPlatform(); RefPtr compositor; diff --git a/gfx/tests/gtest/TestTextureCompatibility.cpp b/gfx/tests/gtest/TestTextureCompatibility.cpp index d2fd37b0d162..45db4943ed1c 100644 --- a/gfx/tests/gtest/TestTextureCompatibility.cpp +++ b/gfx/tests/gtest/TestTextureCompatibility.cpp @@ -54,7 +54,10 @@ CreateTextureWithBackend(LayersBackend& aLayersBackend, static void GetPlatformBackends(nsTArray& aBackends) { - gfxPlatform::GetPlatform()->GetCompositorBackends( + gfxPlatform* platform = gfxPlatform::GetPlatform(); + MOZ_ASSERT(platform); + + platform->GetCompositorBackends( gfxConfig::IsEnabled(Feature::HW_COMPOSITING), aBackends); if (aBackends.IsEmpty()) { From 1a23b6eab1e2838a156c37d9632aba20dbd7d3ab Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Wed, 17 Jan 2018 07:51:20 -0500 Subject: [PATCH 20/47] Bug 1400384 - support text writing modes with WebRender. r=gankro --- gfx/2d/2D.h | 6 +- gfx/2d/Factory.cpp | 13 +- gfx/2d/ScaledFontDWrite.cpp | 6 - gfx/2d/ScaledFontDWrite.h | 3 - gfx/2d/ScaledFontFontconfig.cpp | 8 +- gfx/2d/ScaledFontFontconfig.h | 4 +- gfx/2d/ScaledFontMac.cpp | 7 +- gfx/2d/ScaledFontMac.h | 4 +- gfx/thebes/gfxDWriteFonts.cpp | 1 - gfx/thebes/gfxFcPlatformFontList.cpp | 3 +- gfx/thebes/gfxFont.cpp | 173 ++++++++++++------ gfx/thebes/gfxFont.h | 1 + gfx/thebes/gfxMacFont.cpp | 3 +- gfx/webrender_bindings/webrender_ffi.h | 18 ++ layout/generic/TextDrawTarget.h | 39 +++- layout/reftests/w3c-css/failures.list | 2 +- layout/reftests/w3c-css/received/reftest.list | 2 +- 17 files changed, 184 insertions(+), 109 deletions(-) diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index a4bed67038cc..7e43d6e8f683 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -1566,15 +1566,14 @@ public: #ifdef MOZ_WIDGET_GTK static already_AddRefed CreateScaledFontForFontconfigFont(cairo_scaled_font_t* aScaledFont, FcPattern* aPattern, - const RefPtr& aUnscaledFont, Float aSize, - bool aNeedsOblique = false); + const RefPtr& aUnscaledFont, Float aSize); #endif #ifdef XP_DARWIN static already_AddRefed CreateScaledFontForMacFont(CGFontRef aCGFont, const RefPtr& aUnscaledFont, Float aSize, const Color& aFontSmoothingBackgroundColor, bool aUseFontSmoothing = true, - bool aApplySyntheticBold = false, bool aNeedsOblique = false); + bool aApplySyntheticBold = false); #endif /** @@ -1740,7 +1739,6 @@ public: Float aSize, bool aUseEmbeddedBitmap, bool aForceGDIMode, - bool aNeedsOblique, IDWriteRenderingParams *aParams, Float aGamma, Float aContrast); diff --git a/gfx/2d/Factory.cpp b/gfx/2d/Factory.cpp index ab3cc1337125..e9f5a25e628b 100644 --- a/gfx/2d/Factory.cpp +++ b/gfx/2d/Factory.cpp @@ -653,10 +653,9 @@ Factory::CreateScaledFontWithCairo(const NativeFont& aNativeFont, #ifdef MOZ_WIDGET_GTK already_AddRefed Factory::CreateScaledFontForFontconfigFont(cairo_scaled_font_t* aScaledFont, FcPattern* aPattern, - const RefPtr& aUnscaledFont, Float aSize, - bool aNeedsOblique) + const RefPtr& aUnscaledFont, Float aSize) { - return MakeAndAddRef(aScaledFont, aPattern, aUnscaledFont, aSize, aNeedsOblique); + return MakeAndAddRef(aScaledFont, aPattern, aUnscaledFont, aSize); } #endif @@ -667,13 +666,12 @@ Factory::CreateScaledFontForMacFont(CGFontRef aCGFont, Float aSize, const Color& aFontSmoothingBackgroundColor, bool aUseFontSmoothing, - bool aApplySyntheticBold, - bool aNeedsOblique) + bool aApplySyntheticBold) { return MakeAndAddRef( aCGFont, aUnscaledFont, aSize, false, aFontSmoothingBackgroundColor, aUseFontSmoothing, - aApplySyntheticBold, aNeedsOblique); + aApplySyntheticBold); } #endif @@ -952,13 +950,12 @@ Factory::CreateScaledFontForDWriteFont(IDWriteFontFace* aFontFace, float aSize, bool aUseEmbeddedBitmap, bool aForceGDIMode, - bool aNeedsOblique, IDWriteRenderingParams* aParams, Float aGamma, Float aContrast) { return MakeAndAddRef(aFontFace, aUnscaledFont, aSize, - aUseEmbeddedBitmap, aForceGDIMode, aNeedsOblique, + aUseEmbeddedBitmap, aForceGDIMode, aParams, aGamma, aContrast, aStyle); } diff --git a/gfx/2d/ScaledFontDWrite.cpp b/gfx/2d/ScaledFontDWrite.cpp index a4cb59e65408..b71e10404e1a 100644 --- a/gfx/2d/ScaledFontDWrite.cpp +++ b/gfx/2d/ScaledFontDWrite.cpp @@ -110,7 +110,6 @@ ScaledFontDWrite::ScaledFontDWrite(IDWriteFontFace *aFontFace, Float aSize, bool aUseEmbeddedBitmap, bool aForceGDIMode, - bool aNeedsOblique, IDWriteRenderingParams* aParams, Float aGamma, Float aContrast, @@ -119,7 +118,6 @@ ScaledFontDWrite::ScaledFontDWrite(IDWriteFontFace *aFontFace, , mFontFace(aFontFace) , mUseEmbeddedBitmap(aUseEmbeddedBitmap) , mForceGDIMode(aForceGDIMode) - , mNeedsOblique(aNeedsOblique) , mParams(aParams) , mGamma(aGamma) , mContrast(aContrast) @@ -406,9 +404,6 @@ ScaledFontDWrite::GetWRFontInstanceOptions(Maybe* aOutO if (ForceGDIMode()) { options.flags |= wr::FontInstanceFlags::FORCE_GDI; } - if (mNeedsOblique) { - options.flags |= wr::FontInstanceFlags::SYNTHETIC_ITALICS; - } options.bg_color = wr::ToColorU(Color()); *aOutOptions = Some(options); return true; @@ -432,7 +427,6 @@ UnscaledFontDWrite::CreateScaledFont(Float aGlyphSize, new ScaledFontDWrite(mFontFace, this, aGlyphSize, instanceData->mUseEmbeddedBitmap, instanceData->mForceGDIMode, - false, nullptr, instanceData->mGamma, instanceData->mContrast); diff --git a/gfx/2d/ScaledFontDWrite.h b/gfx/2d/ScaledFontDWrite.h index c8061e5e17c0..47e2f38fc83b 100644 --- a/gfx/2d/ScaledFontDWrite.h +++ b/gfx/2d/ScaledFontDWrite.h @@ -30,7 +30,6 @@ public: , mFontFace(aFont) , mUseEmbeddedBitmap(false) , mForceGDIMode(false) - , mNeedsOblique(false) , mGamma(2.2f) , mContrast(1.0f) {} @@ -40,7 +39,6 @@ public: Float aSize, bool aUseEmbeddedBitmap, bool aForceGDIMode, - bool aNeedsOblique, IDWriteRenderingParams *aParams, Float aGamma, Float aContrast, @@ -76,7 +74,6 @@ public: RefPtr mFontFace; bool mUseEmbeddedBitmap; bool mForceGDIMode; - bool mNeedsOblique; // DrawTargetD2D1 requires the IDWriteRenderingParams, // but we also separately need to store the gamma and contrast // since Skia needs to be able to access these without having diff --git a/gfx/2d/ScaledFontFontconfig.cpp b/gfx/2d/ScaledFontFontconfig.cpp index 004841e4866a..8fcd39ea3d98 100644 --- a/gfx/2d/ScaledFontFontconfig.cpp +++ b/gfx/2d/ScaledFontFontconfig.cpp @@ -25,11 +25,9 @@ namespace gfx { ScaledFontFontconfig::ScaledFontFontconfig(cairo_scaled_font_t* aScaledFont, FcPattern* aPattern, const RefPtr& aUnscaledFont, - Float aSize, - bool aNeedsOblique) + Float aSize) : ScaledFontBase(aUnscaledFont, aSize) , mPattern(aPattern) - , mNeedsOblique(aNeedsOblique) { SetCairoScaledFont(aScaledFont); FcPatternReference(aPattern); @@ -250,10 +248,6 @@ ScaledFontFontconfig::GetWRFontInstanceOptions(Maybe* a platformOptions.lcd_filter = wr::FontLCDFilter::Legacy; platformOptions.hinting = wr::FontHinting::Normal; - if (mNeedsOblique) { - options.flags |= wr::FontInstanceFlags::SYNTHETIC_ITALICS; - } - FcBool autohint; if (FcPatternGetBool(mPattern, FC_AUTOHINT, 0, &autohint) == FcResultMatch && autohint) { options.flags |= wr::FontInstanceFlags::FORCE_AUTOHINT; diff --git a/gfx/2d/ScaledFontFontconfig.h b/gfx/2d/ScaledFontFontconfig.h index 362c859c591e..ec618dd3e1b5 100644 --- a/gfx/2d/ScaledFontFontconfig.h +++ b/gfx/2d/ScaledFontFontconfig.h @@ -22,8 +22,7 @@ class ScaledFontFontconfig : public ScaledFontBase public: MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontFontconfig, override) ScaledFontFontconfig(cairo_scaled_font_t* aScaledFont, FcPattern* aPattern, - const RefPtr& aUnscaledFont, Float aSize, - bool aNeedsOblique = false); + const RefPtr& aUnscaledFont, Float aSize); ~ScaledFontFontconfig(); FontType GetType() const override { return FontType::FONTCONFIG; } @@ -76,7 +75,6 @@ private: NativeFontResource* aNativeFontResource = nullptr); FcPattern* mPattern; - bool mNeedsOblique; }; } diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 0a30dfee9666..85b34f214fc9 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -111,14 +111,12 @@ ScaledFontMac::ScaledFontMac(CGFontRef aFont, bool aOwnsFont, const Color &aFontSmoothingBackgroundColor, bool aUseFontSmoothing, - bool aApplySyntheticBold, - bool aNeedsOblique) + bool aApplySyntheticBold) : ScaledFontBase(aUnscaledFont, aSize) , mFont(aFont) , mFontSmoothingBackgroundColor(aFontSmoothingBackgroundColor) , mUseFontSmoothing(aUseFontSmoothing) , mApplySyntheticBold(aApplySyntheticBold) - , mNeedsOblique(aNeedsOblique) { if (!sSymbolLookupDone) { CTFontDrawGlyphsPtr = @@ -420,9 +418,6 @@ ScaledFontMac::GetWRFontInstanceOptions(Maybe* aOutOpti if (mApplySyntheticBold) { options.flags |= wr::FontInstanceFlags::SYNTHETIC_BOLD; } - if (mNeedsOblique) { - options.flags |= wr::FontInstanceFlags::SYNTHETIC_ITALICS; - } options.bg_color = wr::ToColorU(mFontSmoothingBackgroundColor); *aOutOptions = Some(options); return true; diff --git a/gfx/2d/ScaledFontMac.h b/gfx/2d/ScaledFontMac.h index 96bb1f3abe32..0e3d2cadd1d9 100644 --- a/gfx/2d/ScaledFontMac.h +++ b/gfx/2d/ScaledFontMac.h @@ -29,8 +29,7 @@ public: bool aOwnsFont = false, const Color &aFontSmoothingBackgroundColor = Color(), bool aUseFontSmoothing = true, - bool aApplySyntheticBold = false, - bool aNeedsOblique = false); + bool aApplySyntheticBold = false); ~ScaledFontMac(); FontType GetType() const override { return FontType::MAC; } @@ -60,7 +59,6 @@ private: Color mFontSmoothingBackgroundColor; bool mUseFontSmoothing; bool mApplySyntheticBold; - bool mNeedsOblique; typedef void (CTFontDrawGlyphsFuncT)(CTFontRef, const CGGlyph[], const CGPoint[], diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp index 336780d9da8c..eb9cbfb7f05f 100644 --- a/gfx/thebes/gfxDWriteFonts.cpp +++ b/gfx/thebes/gfxDWriteFonts.cpp @@ -686,7 +686,6 @@ gfxDWriteFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget) GetAdjustedSize(), useEmbeddedBitmap, forceGDI, - IsSyntheticOblique(), params, params->GetGamma(), params->GetEnhancedContrast()); diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp index 31fa05ddab09..f2c002d483bb 100644 --- a/gfx/thebes/gfxFcPlatformFontList.cpp +++ b/gfx/thebes/gfxFcPlatformFontList.cpp @@ -1308,8 +1308,7 @@ gfxFontconfigFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget) Factory::CreateScaledFontForFontconfigFont(GetCairoScaledFont(), GetPattern(), GetUnscaledFont(), - GetAdjustedSize(), - IsSyntheticOblique()); + GetAdjustedSize()); } RefPtr scaledFont(mAzureScaledFont); diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index ac2c72d894c7..9ce3d0230b0a 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -1839,8 +1839,8 @@ gfxFont::DrawGlyphs(const gfxShapedText* aShapedText, &aShapedText->GetCharacterGlyphs()[aOffset]; if (S == SpacingT::HasSpacing) { - float space = aBuffer.mRunParams.spacing[0].mBefore; - inlineCoord += aBuffer.mRunParams.isRTL ? - space : space; + float space = aBuffer.mRunParams.spacing[0].mBefore * aBuffer.mFontParams.advanceDirection; + inlineCoord += space; } // Allocate buffer space for the run, assuming all simple glyphs. @@ -1851,9 +1851,9 @@ gfxFont::DrawGlyphs(const gfxShapedText* aShapedText, for (uint32_t i = 0; i < aCount; ++i, ++glyphData) { if (glyphData->IsSimpleGlyph()) { - float advance = glyphData->GetSimpleAdvance(); + float advance = glyphData->GetSimpleAdvance() * aBuffer.mFontParams.advanceDirection; if (aBuffer.mRunParams.isRTL) { - inlineCoord -= advance; + inlineCoord += advance; } DrawOneGlyph(glyphData->GetSimpleGlyph(), *aPt, aBuffer, &emittedGlyphs); @@ -1869,9 +1869,9 @@ gfxFont::DrawGlyphs(const gfxShapedText* aShapedText, aShapedText->GetDetailedGlyphs(aOffset + i); MOZ_ASSERT(details, "missing DetailedGlyph!"); for (uint32_t j = 0; j < glyphCount; ++j, ++details) { - float advance = details->mAdvance; + float advance = details->mAdvance * aBuffer.mFontParams.advanceDirection; if (aBuffer.mRunParams.isRTL) { - inlineCoord -= advance; + inlineCoord += advance; } if (glyphData->IsMissing()) { if (!DrawMissingGlyph(aBuffer.mRunParams, @@ -1896,7 +1896,8 @@ gfxFont::DrawGlyphs(const gfxShapedText* aShapedText, if (i + 1 < aCount) { space += aBuffer.mRunParams.spacing[i + 1].mBefore; } - inlineCoord += aBuffer.mRunParams.isRTL ? -space : space; + space *= aBuffer.mFontParams.advanceDirection; + inlineCoord += space; } } @@ -2014,7 +2015,7 @@ gfxFont::DrawMissingGlyph(const TextRunDrawParams& aRunParams, // of the drawTarget's transform, we need to undo // this before drawing the hexbox. (Bug 983985) gfxContextMatrixAutoSaveRestore matrixRestore; - if (aFontParams.needsOblique && !aFontParams.isVerticalFont && !textDrawer) { + if (aFontParams.needsOblique && !textDrawer) { matrixRestore.SetContext(aRunParams.context); gfx::Matrix mat = aRunParams.context->CurrentMatrix(). @@ -2108,36 +2109,85 @@ gfxFont::Draw(const gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd, fontParams.haveColorGlyphs = GetFontEntry()->TryGetColorGlyphs(); fontParams.contextPaint = aRunParams.runContextPaint; - fontParams.isVerticalFont = - aOrientation == gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_UPRIGHT; - bool sideways = false; + if (textDrawer) { + fontParams.isVerticalFont = aRunParams.isVerticalRun; + } else { + fontParams.isVerticalFont = + aOrientation == gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_UPRIGHT; + } + gfxContextMatrixAutoSaveRestore matrixRestore; + layout::TextDrawTarget::AutoRestoreWRGlyphFlags glyphFlagsRestore; + // Save the current baseline offset for restoring later, in case it is modified. + float& baseline = fontParams.isVerticalFont ? aPt->x : aPt->y; + float origBaseline = baseline; + + // The point may be advanced in local-space, while the resulting point on return + // must be advanced in transformed space. So save the original point so we can + // properly transform the advance later. gfx::Point origPt = *aPt; - if (aRunParams.isVerticalRun && !fontParams.isVerticalFont) { + // Default to advancing along the +X direction (-X if RTL). + fontParams.advanceDirection = aRunParams.isRTL ? -1.0f : 1.0f; + // Default to offsetting baseline downward along the +Y direction. + float baselineDir = 1.0f; + // The direction of sideways rotation, if applicable. + // -1 for rotating left/counter-clockwise + // 1 for rotating right/clockwise + // 0 for no rotation + float sidewaysDir = + (aOrientation == gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_SIDEWAYS_LEFT ? + -1.0f : + (aOrientation == gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_SIDEWAYS_RIGHT ? + 1.0f : 0.0f)); + // If we're rendering a sideways run, we need to push a rotation transform to the context. + if (sidewaysDir != 0.0f) { if (textDrawer) { - textDrawer->FoundUnsupportedFeature(); - return; - } + // For WebRender, we can't use a DrawTarget transform and must instead use flags + // that locally transform the glyph, without affecting the glyph origin. The glyph + // origins must thus be offset in the transformed directions (instead of local-space + // directions). Modify the advance and baseline directions to account for the + // indicated transform. - sideways = true; - matrixRestore.SetContext(aRunParams.context); - gfxPoint p(aPt->x * aRunParams.devPerApp, - aPt->y * aRunParams.devPerApp); - const Metrics& metrics = GetMetrics(eHorizontal); - // Get a matrix we can use to draw the (horizontally-shaped) textrun - // with 90-degree CW rotation. - const gfxFloat - rotation = (aOrientation == - gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_SIDEWAYS_LEFT) - ? -M_PI / 2.0 : M_PI / 2.0; - gfxMatrix mat = - aRunParams.context->CurrentMatrixDouble(). - PreTranslate(p). // translate origin for rotation - PreRotate(rotation). // turn 90deg CCW (sideways-left) or CW (*-right) - PreTranslate(-p); // undo the translation + // The default text orientation is down being +Y and right being +X. + // Rotating 90 degrees left/CCW makes down be +X and right be -Y. + // Rotating 90 degrees right/CW makes down be -X and right be +Y. + // Thus the advance direction (moving right) is just sidewaysDir, + // i.e. negative along Y axis if rotated left and positive if + // rotated right. + fontParams.advanceDirection *= sidewaysDir; + // The baseline direction (moving down) is negated relative to the + // advance direction for sideways transforms. + baselineDir *= -sidewaysDir; + + glyphFlagsRestore.Save(textDrawer); + // Set the transform flags accordingly. Both sideways rotations transpose X and Y, + // while left rotation flips the resulting Y axis, and right rotation flips the + // resulting X axis. + textDrawer->SetWRGlyphFlags(textDrawer->GetWRGlyphFlags() | + wr::FontInstanceFlags::TRANSPOSE | + (aOrientation == + gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_SIDEWAYS_LEFT ? + wr::FontInstanceFlags::FLIP_Y : + wr::FontInstanceFlags::FLIP_X)); + } else { + // For non-WebRender targets, just push a rotation transform. + matrixRestore.SetContext(aRunParams.context); + gfxPoint p(aPt->x * aRunParams.devPerApp, + aPt->y * aRunParams.devPerApp); + // Get a matrix we can use to draw the (horizontally-shaped) textrun + // with 90-degree CW rotation. + const gfxFloat rotation = sidewaysDir * M_PI / 2.0f; + gfxMatrix mat = + aRunParams.context->CurrentMatrixDouble(). + PreTranslate(p). // translate origin for rotation + PreRotate(rotation). // turn 90deg CCW (sideways-left) or CW (*-right) + PreTranslate(-p); // undo the translation + + aRunParams.context->SetMatrixDouble(mat); + } // If we're drawing rotated horizontal text for an element styled // text-orientation:mixed, the dominant baseline will be vertical- @@ -2149,28 +2199,33 @@ gfxFont::Draw(const gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd, // those if available. // [1] See http://www.microsoft.com/typography/otspec/base.htm if (aTextRun->UseCenterBaseline()) { - gfxPoint baseAdj(0, (metrics.emAscent - metrics.emDescent) / 2); - mat.PreTranslate(baseAdj); + const Metrics& metrics = GetMetrics(eHorizontal); + float baseAdj = (metrics.emAscent - metrics.emDescent) / 2; + baseline += baseAdj * aTextRun->GetAppUnitsPerDevUnit() * baselineDir; } - - aRunParams.context->SetMatrixDouble(mat); } - if (fontParams.needsOblique && !fontParams.isVerticalFont && !textDrawer) { - // Adjust matrix for synthetic-oblique, except if we're doing vertical- - // upright text, in which case this will be handled for each glyph - // individually in DrawOneGlyph. - if (!matrixRestore.HasMatrix()) { - matrixRestore.SetContext(aRunParams.context); + if (fontParams.needsOblique) { + if (textDrawer) { + glyphFlagsRestore.Save(textDrawer); + textDrawer->SetWRGlyphFlags(textDrawer->GetWRGlyphFlags() | + wr::FontInstanceFlags::SYNTHETIC_ITALICS); + } else if (!fontParams.isVerticalFont) { + // Adjust matrix for synthetic-oblique, except if we're doing vertical- + // upright text, in which case this will be handled for each glyph + // individually in DrawOneGlyph. + if (!matrixRestore.HasMatrix()) { + matrixRestore.SetContext(aRunParams.context); + } + gfx::Point p(aPt->x * aRunParams.devPerApp, + aPt->y * aRunParams.devPerApp); + gfx::Matrix mat = + aRunParams.context->CurrentMatrix(). + PreTranslate(p). + PreMultiply(gfx::Matrix(1, 0, -OBLIQUE_SKEW_FACTOR, 1, 0, 0)). + PreTranslate(-p); + aRunParams.context->SetMatrix(mat); } - gfx::Point p(aPt->x * aRunParams.devPerApp, - aPt->y * aRunParams.devPerApp); - gfx::Matrix mat = - aRunParams.context->CurrentMatrix(). - PreTranslate(p). - PreMultiply(gfx::Matrix(1, 0, -OBLIQUE_SKEW_FACTOR, 1, 0, 0)). - PreTranslate(-p); - aRunParams.context->SetMatrix(mat); } RefPtr contextPaint; @@ -2212,11 +2267,9 @@ gfxFont::Draw(const gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd, fontParams.drawOptions.mAntialiasMode = Get2DAAMode(mAntialiasOption); - float& baseline = fontParams.isVerticalFont ? aPt->x : aPt->y; - float origBaseline = baseline; if (mStyle.baselineOffset != 0.0) { baseline += - mStyle.baselineOffset * aTextRun->GetAppUnitsPerDevUnit(); + mStyle.baselineOffset * aTextRun->GetAppUnitsPerDevUnit() * baselineDir; } bool emittedGlyphs; @@ -2228,7 +2281,7 @@ gfxFont::Draw(const gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd, GlyphBufferAzure buffer(aRunParams, fontParams); if (fontParams.haveSVGGlyphs || fontParams.haveColorGlyphs || fontParams.extraStrikes || - (fontParams.needsOblique && fontParams.isVerticalFont)) { + (fontParams.needsOblique && fontParams.isVerticalFont && !textDrawer)) { if (aRunParams.spacing) { emittedGlyphs = DrawGlyphsSetTransform(oldMat); aRunParams.dt->SetPermitSubpixelAA(oldSubpixelAA); - if (sideways) { - // adjust updated aPt to account for the transform we were using + if (sidewaysDir != 0.0f && !textDrawer) { + // Adjust updated aPt to account for the transform we were using. + // The advance happened horizontally in local-space, but the transformed + // sideways advance is actually vertical, with sign depending on the + // direction of rotation. float advance = aPt->x - origPt.x; - if (aOrientation == - gfx::ShapedTextFlags::TEXT_ORIENT_VERTICAL_SIDEWAYS_LEFT) { - *aPt = gfx::Point(origPt.x, origPt.y - advance); - } else { - *aPt = gfx::Point(origPt.x, origPt.y + advance); - } + *aPt = gfx::Point(origPt.x, origPt.y + advance * sidewaysDir); } } diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index 996b45740d9d..009baab0772d 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -2347,6 +2347,7 @@ struct MOZ_STACK_CLASS FontDrawParams { mozilla::gfx::Float synBoldOnePixelOffset; int32_t extraStrikes; mozilla::gfx::DrawOptions drawOptions; + gfxFloat advanceDirection; bool isVerticalFont; bool haveSVGGlyphs; bool haveColorGlyphs; diff --git a/gfx/thebes/gfxMacFont.cpp b/gfx/thebes/gfxMacFont.cpp index 15d199cf11fd..86be69b5fb3d 100644 --- a/gfx/thebes/gfxMacFont.cpp +++ b/gfx/thebes/gfxMacFont.cpp @@ -509,8 +509,7 @@ gfxMacFont::GetScaledFont(DrawTarget *aTarget) GetAdjustedSize(), Color::FromABGR(mFontSmoothingBackgroundColor), !mStyle.useGrayscaleAntialiasing, - IsSyntheticBold(), - IsSyntheticOblique()); + IsSyntheticBold()); if (!mAzureScaledFont) { return nullptr; } diff --git a/gfx/webrender_bindings/webrender_ffi.h b/gfx/webrender_bindings/webrender_ffi.h index 5fc7b7129672..0bef3f091c1d 100644 --- a/gfx/webrender_bindings/webrender_ffi.h +++ b/gfx/webrender_bindings/webrender_ffi.h @@ -51,11 +51,29 @@ struct FontInstanceFlags { return *this; } + FontInstanceFlags operator|(uint32_t aBits) { + FontInstanceFlags flags = { bits | aBits }; + return flags; + } + + FontInstanceFlags& operator&=(uint32_t aBits) { + bits &= aBits; + return *this; + } + + FontInstanceFlags operator&(uint32_t aBits) { + FontInstanceFlags flags = { bits & aBits }; + return flags; + } + enum : uint32_t { SYNTHETIC_ITALICS = 1 << 0, SYNTHETIC_BOLD = 1 << 1, EMBEDDED_BITMAPS = 1 << 2, SUBPIXEL_BGR = 1 << 3, + TRANSPOSE = 1 << 4, + FLIP_X = 1 << 5, + FLIP_Y = 1 << 6, FORCE_GDI = 1 << 16, diff --git a/layout/generic/TextDrawTarget.h b/layout/generic/TextDrawTarget.h index 9b333fb78702..42736bc50611 100644 --- a/layout/generic/TextDrawTarget.h +++ b/layout/generic/TextDrawTarget.h @@ -91,6 +91,41 @@ public: void FoundUnsupportedFeature() { mHasUnsupportedFeatures = true; } bool HasUnsupportedFeatures() { return mHasUnsupportedFeatures; } + wr::FontInstanceFlags GetWRGlyphFlags() const { return mWRGlyphFlags; } + void SetWRGlyphFlags(wr::FontInstanceFlags aFlags) { mWRGlyphFlags = aFlags; } + + class AutoRestoreWRGlyphFlags + { + public: + ~AutoRestoreWRGlyphFlags() + { + if (mTarget) { + mTarget->SetWRGlyphFlags(mFlags); + } + } + + void Save(TextDrawTarget* aTarget) + { + // This allows for recursive saves, in case the flags need to be modified + // under multiple conditions (i.e. transforms and synthetic italics), + // since the flags will be restored to the first saved value in the + // destructor on scope exit. + if (!mTarget) { + // Only record the first save with the original flags that will be restored. + mTarget = aTarget; + mFlags = aTarget->GetWRGlyphFlags(); + } else { + // Ensure that this is actually a recursive save to the same target + MOZ_ASSERT(mTarget == aTarget, + "Recursive save of WR glyph flags to different TextDrawTargets"); + } + } + + private: + TextDrawTarget* mTarget = nullptr; + wr::FontInstanceFlags mFlags = {0}; + }; + // This overload just stores the glyphs/font/color. void FillGlyphs(ScaledFont* aFont, @@ -134,7 +169,7 @@ public: wr::GlyphOptions glyphOptions; glyphOptions.render_mode = wr::ToFontRenderMode(aOptions.mAntialiasMode, GetPermitSubpixelAA()); - glyphOptions.flags = 0; + glyphOptions.flags = mWRGlyphFlags; mManager->WrBridge()->PushGlyphs(mBuilder, glyphs, aFont, color, mSc, mBoundsRect, mClipRect, @@ -287,6 +322,8 @@ private: wr::LayerRect mClipRect; bool mBackfaceVisible; + wr::FontInstanceFlags mWRGlyphFlags = {0}; + // The rest of this is dummy implementations of DrawTarget's API public: DrawTargetType GetType() const override { diff --git a/layout/reftests/w3c-css/failures.list b/layout/reftests/w3c-css/failures.list index 23968f0be264..4159def0ddd8 100644 --- a/layout/reftests/w3c-css/failures.list +++ b/layout/reftests/w3c-css/failures.list @@ -111,7 +111,7 @@ fuzzy-if(winWidget,110,1200) css-writing-modes-3/table-column-order-slr-007.xht fuzzy-if(OSX||winWidget,110,1200) css-writing-modes-3/table-column-order-srl-006.xht fuzzy-if(OSX||winWidget,75,404) css-writing-modes-3/text-align-v??-0??.xht fuzzy-if(OSX||winWidget,215,780) css-writing-modes-3/text-baseline-???-00?.xht -fuzzy-if(OSX,15,16) fails-if(webrender) css-writing-modes-3/text-combine-upright-decorations-001.html +fuzzy-if(OSX,15,16) css-writing-modes-3/text-combine-upright-decorations-001.html fuzzy-if(OSX||winWidget,255,480) css-writing-modes-3/text-indent-v??-0??.xht fuzzy-if(OSX||winWidget,226,960) css-writing-modes-3/text-orientation-016.xht fuzzy-if(OSX||winWidget,223,720) css-writing-modes-3/vertical-alignment-*.xht diff --git a/layout/reftests/w3c-css/received/reftest.list b/layout/reftests/w3c-css/received/reftest.list index 0f9cd7613a5b..2904e8468c06 100644 --- a/layout/reftests/w3c-css/received/reftest.list +++ b/layout/reftests/w3c-css/received/reftest.list @@ -1073,7 +1073,7 @@ fuzzy-if(OSX||winWidget,215,780) == css-writing-modes-3/text-baseline-vlr-007.xh fuzzy-if(OSX||winWidget,215,780) == css-writing-modes-3/text-baseline-vrl-002.xht css-writing-modes-3/text-baseline-vrl-002-ref.xht fuzzy-if(OSX||winWidget,215,780) == css-writing-modes-3/text-baseline-vrl-004.xht css-writing-modes-3/text-baseline-vrl-002-ref.xht fuzzy-if(OSX||winWidget,215,780) == css-writing-modes-3/text-baseline-vrl-006.xht css-writing-modes-3/text-baseline-vrl-006-ref.xht -fuzzy-if(OSX,15,16) fails-if(webrender) == css-writing-modes-3/text-combine-upright-decorations-001.html css-writing-modes-3/reference/text-combine-upright-decorations-001.html +fuzzy-if(OSX,15,16) == css-writing-modes-3/text-combine-upright-decorations-001.html css-writing-modes-3/reference/text-combine-upright-decorations-001.html == css-writing-modes-3/text-combine-upright-inherit-all-001.html css-writing-modes-3/reference/text-combine-upright-inherit-all-001.html == css-writing-modes-3/text-combine-upright-inherit-all-002.html css-writing-modes-3/reference/text-combine-upright-inherit-all-002.html == css-writing-modes-3/text-combine-upright-layout-rules-001.html css-writing-modes-3/reference/text-combine-upright-layout-rules-001-ref.html From a360b00f3ae47f6c1acf8fdc5f15b3a0201ddd60 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Tue, 16 Jan 2018 00:25:17 +0530 Subject: [PATCH 21/47] Bug 1430603: Set all BROWSER_*_DEFAULT probes just to ["main"]. r=chutten. --HG-- extra : rebase_source : 6ba3698b536d3033665f0a6e6d8a1d8bc1fb86c4 --- toolkit/components/telemetry/Histograms.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 62dc38d30f96..6c70124e68f5 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -10261,21 +10261,21 @@ "description": "How many times has view source in an external editor been opened, and did it succeed?" }, "BROWSER_IS_USER_DEFAULT": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "boolean", "releaseChannelCollection": "opt-out", "description": "The result of the startup default desktop browser check." }, "BROWSER_IS_USER_DEFAULT_ERROR": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "boolean", "releaseChannelCollection": "opt-out", "description": "True if the browser was unable to determine if the browser was set as default." }, "BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "exponential", "high": 250, @@ -10284,14 +10284,14 @@ "description": "The number of times that a profile has seen the 'Set Default Browser' dialog." }, "BROWSER_SET_DEFAULT_ALWAYS_CHECK": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "boolean", "releaseChannelCollection": "opt-out", "description": "True if the profile has `browser.shell.checkDefaultBrowser` set to true." }, "BROWSER_SET_DEFAULT_RESULT": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "enumerated", "n_values": 4, @@ -10299,14 +10299,14 @@ "description": "Result of the Set Default Browser dialog (0=Use Firefox + 'Always perform check' unchecked, 1=Use Firefox + 'Always perform check' checked, 2=Not Now + 'Always perform check' unchecked, 3=Not Now + 'Always perform check' checked)" }, "BROWSER_SET_DEFAULT_ERROR": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "boolean", "releaseChannelCollection": "opt-out", "description": "True if the browser was unable to set Firefox as the default browser" }, "BROWSER_IS_ASSIST_DEFAULT": { - "record_in_processes": ["main", "content"], + "record_in_processes": ["main"], "expires_in_version": "never", "kind": "boolean", "description": "The result of the default browser check for assist intent." From d1124b72c77fd4b9177995f65a1b4b1a47d6ac97 Mon Sep 17 00:00:00 2001 From: Chung-Sheng Fu Date: Tue, 16 Jan 2018 22:59:00 +0200 Subject: [PATCH 22/47] Bug 1418243 - Fix SecurityPolicyViolationEvent.violatedDirective. r=ckerschb MozReview-Commit-ID: 8DQ7CI5exUL --HG-- extra : rebase_source : 69181c5e5f61f6fee5224def74c54985c3b47dee --- dom/security/nsCSPContext.cpp | 44 +++++++++++++++++++++++++++++++---- dom/security/nsCSPUtils.cpp | 35 ++++++++++++++++++++++++---- dom/security/nsCSPUtils.h | 7 ++++++ 3 files changed, 77 insertions(+), 9 deletions(-) diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp index 35feb78ff5fc..ce95cbd6812d 100644 --- a/dom/security/nsCSPContext.cpp +++ b/dom/security/nsCSPContext.cpp @@ -4,6 +4,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 +#include + #include "nsCOMPtr.h" #include "nsContentPolicyUtils.h" #include "nsContentUtils.h" @@ -64,6 +67,29 @@ GetCspContextLog() static const uint32_t CSP_CACHE_URI_CUTOFF_SIZE = 512; +#ifdef DEBUG +/** + * This function is only used for verification purposes within + * GatherSecurityPolicyViolationEventData. + */ +static bool +ValidateDirectiveName(const nsAString& aDirective) +{ + static const auto directives = [] () { + std::unordered_set directives; + constexpr size_t dirLen = sizeof(CSPStrDirectives) / sizeof(CSPStrDirectives[0]); + for (size_t i = 0; i < dirLen; ++i) { + directives.insert(CSPStrDirectives[i]); + } + return directives; + } (); + + nsAutoString directive(aDirective); + auto itr = directives.find(NS_ConvertUTF16toUTF8(directive).get()); + return itr != directives.end(); +} +#endif // DEBUG + /** * Creates a key for use in the ShouldLoad cache. * Looks like: ! @@ -869,6 +895,8 @@ nsCSPContext::GatherSecurityPolicyViolationEventData( { NS_ENSURE_ARG_MAX(aViolatedPolicyIndex, mPolicies.Length() - 1); + MOZ_ASSERT(ValidateDirectiveName(aViolatedDirective), "Invalid directive name"); + nsresult rv; // document-uri @@ -900,12 +928,15 @@ nsCSPContext::GatherSecurityPolicyViolationEventData( aViolationEventInit.mBlockedURI = NS_ConvertUTF8toUTF16(reportBlockedURI); } - // violated-directive - aViolationEventInit.mViolatedDirective = aViolatedDirective; - // effective-directive + // The name of the policy directive that was violated. aViolationEventInit.mEffectiveDirective = aViolatedDirective; + // violated-directive + // In CSP2, the policy directive that was violated, as it appears in the policy. + // In CSP3, the same as effective-directive. + aViolationEventInit.mViolatedDirective = aViolatedDirective; + // original-policy nsAutoString originalPolicy; rv = this->GetPolicyString(aViolatedPolicyIndex, originalPolicy); @@ -1216,18 +1247,21 @@ class CSPReportSenderRunnable final : public Runnable { MOZ_ASSERT(NS_IsMainThread()); + nsresult rv; + // 0) prepare violation data mozilla::dom::SecurityPolicyViolationEventInit init; - mCSPContext->GatherSecurityPolicyViolationEventData( + rv = mCSPContext->GatherSecurityPolicyViolationEventData( mBlockedContentSource, mOriginalURI, mViolatedDirective, mViolatedPolicyIndex, mSourceFile, mScriptSample, mLineNum, init); + NS_ENSURE_SUCCESS(rv, rv); // 1) notify observers nsCOMPtr observerService = mozilla::services::GetObserverService(); NS_ASSERTION(observerService, "needs observer service"); - nsresult rv = observerService->NotifyObservers(mObserverSubject, + rv = observerService->NotifyObservers(mObserverSubject, CSP_VIOLATION_TOPIC, mViolatedDirective.get()); NS_ENSURE_SUCCESS(rv, rv); diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp index c3eec5301487..38b947b7bae1 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp @@ -1246,6 +1246,12 @@ bool nsCSPDirective::equals(CSPDirective aDirective) const return (mDirective == aDirective); } +void +nsCSPDirective::getDirName(nsAString& outStr) const +{ + outStr.AppendASCII(CSP_CSPDirectiveToString(mDirective)); +} + /* =============== nsCSPChildSrcDirective ============= */ nsCSPChildSrcDirective::nsCSPChildSrcDirective(CSPDirective aDirective) @@ -1331,6 +1337,13 @@ nsBlockAllMixedContentDirective::toString(nsAString& outStr) const nsIContentSecurityPolicy::BLOCK_ALL_MIXED_CONTENT)); } +void +nsBlockAllMixedContentDirective::getDirName(nsAString& outStr) const +{ + outStr.AppendASCII(CSP_CSPDirectiveToString( + nsIContentSecurityPolicy::BLOCK_ALL_MIXED_CONTENT)); +} + /* =============== nsUpgradeInsecureDirective ============= */ nsUpgradeInsecureDirective::nsUpgradeInsecureDirective(CSPDirective aDirective) @@ -1349,6 +1362,13 @@ nsUpgradeInsecureDirective::toString(nsAString& outStr) const nsIContentSecurityPolicy::UPGRADE_IF_INSECURE_DIRECTIVE)); } +void +nsUpgradeInsecureDirective::getDirName(nsAString& outStr) const +{ + outStr.AppendASCII(CSP_CSPDirectiveToString( + nsIContentSecurityPolicy::UPGRADE_IF_INSECURE_DIRECTIVE)); +} + /* ===== nsRequireSRIForDirective ========================= */ nsRequireSRIForDirective::nsRequireSRIForDirective(CSPDirective aDirective) @@ -1400,6 +1420,13 @@ nsRequireSRIForDirective::allows(enum CSPKeyword aKeyword, const nsAString& aHas return (aKeyword != CSP_REQUIRE_SRI_FOR); } +void +nsRequireSRIForDirective::getDirName(nsAString& outStr) const +{ + outStr.AppendASCII(CSP_CSPDirectiveToString( + nsIContentSecurityPolicy::REQUIRE_SRI_FOR)); +} + /* ===== nsCSPPolicy ========================= */ nsCSPPolicy::nsCSPPolicy() @@ -1453,7 +1480,7 @@ nsCSPPolicy::permits(CSPDirective aDir, if (mDirectives[i]->equals(aDir)) { if (!mDirectives[i]->permits(aUri, aNonce, aWasRedirected, mReportOnly, mUpgradeInsecDir, aParserCreated)) { - mDirectives[i]->toString(outViolatedDirective); + mDirectives[i]->getDirName(outViolatedDirective); return false; } return true; @@ -1468,7 +1495,7 @@ nsCSPPolicy::permits(CSPDirective aDir, if (!aSpecific && defaultDir) { if (!defaultDir->permits(aUri, aNonce, aWasRedirected, mReportOnly, mUpgradeInsecDir, aParserCreated)) { - defaultDir->toString(outViolatedDirective); + defaultDir->getDirName(outViolatedDirective); return false; } return true; @@ -1595,7 +1622,7 @@ nsCSPPolicy::getDirectiveStringForContentType(nsContentPolicyType aContentType, nsCSPDirective* defaultDir = nullptr; for (uint32_t i = 0; i < mDirectives.Length(); i++) { if (mDirectives[i]->restrictsContentType(aContentType)) { - mDirectives[i]->toString(outDirective); + mDirectives[i]->getDirName(outDirective); return; } if (mDirectives[i]->isDefaultDirective()) { @@ -1605,7 +1632,7 @@ nsCSPPolicy::getDirectiveStringForContentType(nsContentPolicyType aContentType, // if we haven't found a matching directive yet, // the contentType must be restricted by the default directive if (defaultDir) { - defaultDir->toString(outDirective); + defaultDir->getDirName(outDirective); return; } NS_ASSERTION(false, "Can not query directive string for contentType!"); diff --git a/dom/security/nsCSPUtils.h b/dom/security/nsCSPUtils.h index 3e081ce8d20c..12a818cd417c 100644 --- a/dom/security/nsCSPUtils.h +++ b/dom/security/nsCSPUtils.h @@ -471,6 +471,8 @@ class nsCSPDirective { bool visitSrcs(nsCSPSrcVisitor* aVisitor) const; + virtual void getDirName(nsAString& outStr) const; + protected: CSPDirective mDirective; nsTArray mSrcs; @@ -549,6 +551,8 @@ class nsBlockAllMixedContentDirective : public nsCSPDirective { void addSrcs(const nsTArray& aSrcs) override { MOZ_ASSERT(false, "block-all-mixed-content does not hold any srcs"); } + + void getDirName(nsAString& outStr) const override; }; /* =============== nsUpgradeInsecureDirective === */ @@ -602,6 +606,8 @@ class nsUpgradeInsecureDirective : public nsCSPDirective { void addSrcs(const nsTArray& aSrcs) override { MOZ_ASSERT(false, "upgrade-insecure-requests does not hold any srcs"); } + + void getDirName(nsAString& outStr) const override; }; /* ===== nsRequireSRIForDirective ========================= */ @@ -619,6 +625,7 @@ class nsRequireSRIForDirective : public nsCSPDirective { bool restrictsContentType(nsContentPolicyType aType) const override; bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce, bool aParserCreated) const override; + void getDirName(nsAString& outStr) const override; private: nsTArray mTypes; From bc05f945c6859e2d5ae43afe456650548b17c9ca Mon Sep 17 00:00:00 2001 From: Chung-Sheng Fu Date: Tue, 16 Jan 2018 22:59:00 +0200 Subject: [PATCH 23/47] Bug 1418243 - Enable web-platform tests which expected FAIL because of violatedDirective. r=ckerschb MozReview-Commit-ID: LkCwVWs2rSr --HG-- extra : rebase_source : 424721ff263563fd545615f2ba3addc8bcf2e492 --- ...uri-does-not-respect-base-uri.sub.html.ini | 2 -- .../blob-urls-do-not-match-self.sub.html.ini | 3 +-- .../connect-src-beacon-blocked.sub.html.ini | 5 ++-- ...rc-beacon-redirect-to-blocked.sub.html.ini | 3 +-- ...nnect-src-eventsource-blocked.sub.html.ini | 4 ++-- ...entsource-redirect-to-blocked.sub.html.ini | 5 ++-- ...connect-src-websocket-blocked.sub.html.ini | 5 ++-- ...ct-src-xmlhttprequest-blocked.sub.html.ini | 3 --- ...tprequest-redirect-to-blocked.sub.html.ini | 3 +-- .../connect-src/worker-from-guid.sub.html.ini | 3 +-- .../font-stylesheet-font-blocked.sub.html.ini | 2 -- .../form-action-src-blocked.sub.html.ini | 5 ++-- .../form-action-src-get-blocked.sub.html.ini | 5 ++-- ...action-src-javascript-blocked.sub.html.ini | 5 ++-- .../generic/generic-0_10_1.sub.html.ini | 2 -- .../generic/generic-0_2_2.sub.html.ini | 2 -- .../generic/generic-0_2_3.html.ini | 2 -- .../generic/generic-0_8_1.sub.html.ini | 2 -- .../report-blocked-data-uri.sub.html.ini | 3 +-- .../object-src-url-blocked.sub.html.ini | 3 +-- ...ds-reports-on-violation.https.sub.html.ini | 3 --- ...-overrides-report-uri-1.https.sub.html.ini | 2 -- ...-overrides-report-uri-2.https.sub.html.ini | 2 -- ...ds-reports-on-violation.https.sub.html.ini | 3 --- ...njected-inline-script-blocked.sub.html.ini | 3 +-- .../script-src/script-src-1_1.html.ini | 2 -- .../script-src/script-src-1_2.html.ini | 2 -- .../script-src/script-src-1_2_1.html.ini | 2 -- .../script-src/script-src-1_4.html.ini | 3 --- .../script-src/script-src-1_4_1.html.ini | 2 -- .../script-src/script-src-1_4_2.html.ini | 3 --- ...-strict_dynamic_discard_whitelist.html.ini | 2 -- ...mic_double_policy_different_nonce.html.ini | 2 -- ...dynamic_double_policy_report_only.html.ini | 3 +-- ...src-strict_dynamic_javascript_uri.html.ini | 2 -- ...n_parser_inserted_incorrect_nonce.html.ini | 2 -- ...rc-strict_dynamic_parser_inserted.html.ini | 24 ------------------- ...ipthash-unicode-normalization.sub.html.ini | 2 -- .../scriptnonce-and-scripthash.sub.html.ini | 2 -- ...riptnonce-ignore-unsafeinline.sub.html.ini | 2 -- ...typolicyviolation-block-image.sub.html.ini | 2 -- ...insecure-requests-reporting.https.html.ini | 11 ++------- ...injected-inline-style-blocked.sub.html.ini | 3 +-- ...allowed-while-cloning-objects.sub.html.ini | 2 -- ...nline-style-attribute-blocked.sub.html.ini | 3 +-- .../style-src/style-blocked.sub.html.ini | 3 +-- .../style-src/style-src-hash-blocked.html.ini | 2 -- .../style-src-imported-style-blocked.html.ini | 3 +-- ...src-injected-inline-style-blocked.html.ini | 2 -- ...c-injected-stylesheet-blocked.sub.html.ini | 2 -- ...rc-inline-style-attribute-blocked.html.ini | 2 -- .../style-src-inline-style-blocked.html.ini | 2 -- ...e-style-nonce-blocked-error-event.html.ini | 3 --- ...le-src-inline-style-nonce-blocked.html.ini | 2 -- .../style-src/style-src-none-blocked.html.ini | 2 -- ...tyle-src-stylesheet-nonce-blocked.html.ini | 2 -- .../stylehash-basic-blocked.sub.html.ini | 2 -- .../style-src/stylenonce-allowed.sub.html.ini | 3 +-- .../style-src/stylenonce-blocked.sub.html.ini | 3 +-- .../object-in-svg-foreignobject.sub.html.ini | 2 -- .../svg/svg-inline.sub.html.ini | 2 -- ...eval-blocked-and-sends-report.sub.html.ini | 3 +-- .../unsafe-eval/eval-blocked.sub.html.ini | 3 +-- ...l-scripts-setInterval-blocked.sub.html.ini | 3 +-- ...al-scripts-setTimeout-blocked.sub.html.ini | 3 +-- .../function-constructor-blocked.sub.html.ini | 3 +-- 66 files changed, 35 insertions(+), 173 deletions(-) diff --git a/testing/web-platform/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini b/testing/web-platform/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini index 66aefa9bd9f5..a01d37b2153d 100644 --- a/testing/web-platform/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini @@ -1,5 +1,3 @@ [report-uri-does-not-respect-base-uri.sub.html] prefs: [security.csp.enable_violation_events:true] - [Event is fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini b/testing/web-platform/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini index 9809bc29a73e..3cb050307f98 100644 --- a/testing/web-platform/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/blob/blob-urls-do-not-match-self.sub.html.ini @@ -1,4 +1,3 @@ [blob-urls-do-not-match-self.sub.html] - [Expecting logs: ["violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html.ini index 3e0a12558b57..9a3f7323add2 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html.ini @@ -1,10 +1,9 @@ [connect-src-beacon-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [sendBeacon should not throw.] expected: FAIL [redirect case] expected: TIMEOUT - [Expecting logs: ["Pass", "violated-directive=connect-src"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub.html.ini index 4222003cf6a2..496b75596d7d 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-beacon-redirect-to-blocked.sub.html.ini @@ -1,4 +1,3 @@ [connect-src-beacon-redirect-to-blocked.sub.html] - [Expecting logs: ["violated-directive=connect-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html.ini index e25737652c09..99c76995584a 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html.ini @@ -1,4 +1,4 @@ [connect-src-eventsource-blocked.sub.html] - [Expecting logs: ["Pass","violated-directive=connect-src"\]] - expected: FAIL + type: testharness + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-redirect-to-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-redirect-to-blocked.sub.html.ini index 15cb1b1c18fb..098e87f57f63 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-redirect-to-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-eventsource-redirect-to-blocked.sub.html.ini @@ -1,7 +1,6 @@ [connect-src-eventsource-redirect-to-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [Expecting logs: ["PASS EventSource() did not follow the disallowed redirect.","PASS successfullyParsed is true","TEST COMPLETE"\]] expected: FAIL - [Expecting logs: ["PASS EventSource() did not follow the disallowed redirect.","TEST COMPLETE", "violated-directive=connect-src"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-websocket-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-websocket-blocked.sub.html.ini index d912007bb827..e99ec693ed7d 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-websocket-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-websocket-blocked.sub.html.ini @@ -1,7 +1,6 @@ [connect-src-websocket-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [WebSocket should fire error event.] expected: FAIL - [Expecting logs: ["Pass","violated-directive=connect-src"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub.html.ini index 781f857debfa..b2194168da32 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub.html.ini @@ -6,6 +6,3 @@ [XHR should fire onerror after a redirect.] expected: FAIL - [Expecting logs: ["Pass","violated-directive=connect-src"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-redirect-to-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-redirect-to-blocked.sub.html.ini index 723c1469a879..c5fab72ccb0d 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-redirect-to-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/connect-src-xmlhttprequest-redirect-to-blocked.sub.html.ini @@ -1,4 +1,3 @@ [connect-src-xmlhttprequest-redirect-to-blocked.sub.html] - [Expecting logs: ["PASS XMLHttpRequest.send() did not follow the disallowed redirect.","TEST COMPLETE","violated-directive=connect-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/connect-src/worker-from-guid.sub.html.ini b/testing/web-platform/meta/content-security-policy/connect-src/worker-from-guid.sub.html.ini index 3af24d2bca01..e2168562faa6 100644 --- a/testing/web-platform/meta/content-security-policy/connect-src/worker-from-guid.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/connect-src/worker-from-guid.sub.html.ini @@ -1,4 +1,3 @@ [worker-from-guid.sub.html] - [Expecting logs: ["violated-directive=connect-src","xhr blocked","TEST COMPLETE"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/font-src/font-stylesheet-font-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/font-src/font-stylesheet-font-blocked.sub.html.ini index 2dc22204af48..01644f42bbe0 100644 --- a/testing/web-platform/meta/content-security-policy/font-src/font-stylesheet-font-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/font-src/font-stylesheet-font-blocked.sub.html.ini @@ -1,5 +1,3 @@ [font-stylesheet-font-blocked.sub.html] prefs: [security.csp.enable_violation_events:true] - [Test font does not load if it does not match font-src.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-blocked.sub.html.ini index bf7af988c28a..56f8b69b5437 100644 --- a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-blocked.sub.html.ini @@ -1,7 +1,6 @@ [form-action-src-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [form-action-src-blocked] expected: FAIL - [Expecting logs: ["violated-directive=form-action","TEST COMPLETE"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-get-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-get-blocked.sub.html.ini index 90bfd2eb6639..b632b598296c 100644 --- a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-get-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-get-blocked.sub.html.ini @@ -1,7 +1,6 @@ [form-action-src-get-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [form-action-src-allowed] expected: FAIL - [Expecting logs: ["violated-directive=form-action","TEST COMPLETE"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-javascript-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-javascript-blocked.sub.html.ini index 9d0edaa561b1..c11de025f68e 100644 --- a/testing/web-platform/meta/content-security-policy/form-action/form-action-src-javascript-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/form-action/form-action-src-javascript-blocked.sub.html.ini @@ -1,7 +1,6 @@ [form-action-src-javascript-blocked.sub.html] + type: testharness + prefs: [security.csp.enable_violation_events:true] [form-action-src-javascript-blocked] expected: FAIL - [Expecting logs: ["violated-directive=form-action","TEST COMPLETE"\]] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/generic/generic-0_10_1.sub.html.ini b/testing/web-platform/meta/content-security-policy/generic/generic-0_10_1.sub.html.ini index 49c8cdf32458..7baa5e9686d9 100644 --- a/testing/web-platform/meta/content-security-policy/generic/generic-0_10_1.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/generic/generic-0_10_1.sub.html.ini @@ -1,5 +1,3 @@ [generic-0_10_1.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire violation events for every failed violation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/generic/generic-0_2_2.sub.html.ini b/testing/web-platform/meta/content-security-policy/generic/generic-0_2_2.sub.html.ini index 66a72f6b0f5c..f638456bbd2f 100644 --- a/testing/web-platform/meta/content-security-policy/generic/generic-0_2_2.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/generic/generic-0_2_2.sub.html.ini @@ -1,5 +1,3 @@ [generic-0_2_2.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire violation events for every failed violation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/generic/generic-0_2_3.html.ini b/testing/web-platform/meta/content-security-policy/generic/generic-0_2_3.html.ini index d6b857c21948..37b2564bce25 100644 --- a/testing/web-platform/meta/content-security-policy/generic/generic-0_2_3.html.ini +++ b/testing/web-platform/meta/content-security-policy/generic/generic-0_2_3.html.ini @@ -1,5 +1,3 @@ [generic-0_2_3.html] prefs: [security.csp.enable_violation_events:true] - [Should fire violation events for every failed violation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/generic/generic-0_8_1.sub.html.ini b/testing/web-platform/meta/content-security-policy/generic/generic-0_8_1.sub.html.ini index 03a1db9f4f34..0048dfcbd8ea 100644 --- a/testing/web-platform/meta/content-security-policy/generic/generic-0_8_1.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/generic/generic-0_8_1.sub.html.ini @@ -1,5 +1,3 @@ [generic-0_8_1.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire violation events for every failed violation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/img-src/report-blocked-data-uri.sub.html.ini b/testing/web-platform/meta/content-security-policy/img-src/report-blocked-data-uri.sub.html.ini index a312f653f376..c5ba7a741278 100644 --- a/testing/web-platform/meta/content-security-policy/img-src/report-blocked-data-uri.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/img-src/report-blocked-data-uri.sub.html.ini @@ -1,4 +1,3 @@ [report-blocked-data-uri.sub.html] - [Expecting logs: ["violated-directive=img-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/object-src/object-src-url-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/object-src/object-src-url-blocked.sub.html.ini index 22bd10785100..023c9d609d44 100644 --- a/testing/web-platform/meta/content-security-policy/object-src/object-src-url-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/object-src/object-src-url-blocked.sub.html.ini @@ -1,4 +1,3 @@ [object-src-url-blocked.sub.html] - [Expecting logs: ["violated-directive=object-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-only-sends-reports-on-violation.https.sub.html.ini b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-only-sends-reports-on-violation.https.sub.html.ini index a0bb8d5088e0..df26adaf6006 100644 --- a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-only-sends-reports-on-violation.https.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-only-sends-reports-on-violation.https.sub.html.ini @@ -1,8 +1,5 @@ [reporting-api-report-only-sends-reports-on-violation.https.sub.html] prefs: [security.csp.enable_violation_events:true] - [Event is fired] - expected: FAIL - [Violation report status OK.] expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-1.https.sub.html.ini b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-1.https.sub.html.ini index 8ed7ea7b023c..6b284398541d 100644 --- a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-1.https.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-1.https.sub.html.ini @@ -1,5 +1,3 @@ [reporting-api-report-to-overrides-report-uri-1.https.sub.html] prefs: [security.csp.enable_violation_events:true] - [Event is fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-2.https.sub.html.ini b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-2.https.sub.html.ini index 0e31e0a254a1..fd0ea2374cb0 100644 --- a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-2.https.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-report-to-overrides-report-uri-2.https.sub.html.ini @@ -1,5 +1,3 @@ [reporting-api-report-to-overrides-report-uri-2.https.sub.html] prefs: [security.csp.enable_violation_events:true] - [Event is fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-sends-reports-on-violation.https.sub.html.ini b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-sends-reports-on-violation.https.sub.html.ini index 11dcca55dd7a..5193a05f3cc0 100644 --- a/testing/web-platform/meta/content-security-policy/reporting/reporting-api-sends-reports-on-violation.https.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/reporting/reporting-api-sends-reports-on-violation.https.sub.html.ini @@ -1,8 +1,5 @@ [reporting-api-sends-reports-on-violation.https.sub.html] prefs: [security.csp.enable_violation_events:true] - [Event is fired] - expected: FAIL - [Violation report status OK.] expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/injected-inline-script-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/script-src/injected-inline-script-blocked.sub.html.ini index 303196d8833c..3227e75da61d 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/injected-inline-script-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/injected-inline-script-blocked.sub.html.ini @@ -1,4 +1,3 @@ [injected-inline-script-blocked.sub.html] - [Expecting logs: ["violated-directive=script-src",\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_1.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_1.html.ini index cbf4b1d1f108..db503c17b6ed 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_1.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_1.html.ini @@ -1,5 +1,3 @@ [script-src-1_1.html] prefs: [security.csp.enable_violation_events:true] - [Should not fire policy violation events] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2.html.ini index e70c9fd60957..544886175bb6 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2.html.ini @@ -2,6 +2,4 @@ disabled: if os == "win": bug 1172411 prefs: [security.csp.enable_violation_events:true] - [Should not fire policy violation events] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2_1.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2_1.html.ini index 9a300b4aec4b..563a9cd3b06f 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2_1.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_2_1.html.ini @@ -2,6 +2,4 @@ disabled: if os == "win": bug 1094323 prefs: [security.csp.enable_violation_events:true] - [Test that securitypolicyviolation event is fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4.html.ini index 4644eac40e73..a34ac5f9a2ba 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4.html.ini @@ -3,6 +3,3 @@ [eval() should throw without 'unsafe-eval' keyword source in script-src directive.] expected: FAIL - [Test that securitypolicyviolation event is fired] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_1.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_1.html.ini index 67eeb2550bc3..cf6e35f677e4 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_1.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_1.html.ini @@ -2,6 +2,4 @@ disabled: if os == "win": bug 1094323 prefs: [security.csp.enable_violation_events:true] - [Test that securitypolicyviolation event is fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_2.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_2.html.ini index 3027ef0d5c5e..86ddad79ed10 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_2.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-1_4_2.html.ini @@ -3,6 +3,3 @@ [Unsafe eval ran in Function() constructor.] expected: FAIL - [Test that securitypolicyviolation event is fired] - expected: FAIL - diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.ini index ecd5449d93b0..3364ac9041a2 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.ini @@ -1,5 +1,3 @@ [script-src-strict_dynamic_discard_whitelist.html] prefs: [security.csp.enable_violation_events:true] - [Whitelisted script without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.ini index fc0c433a1d80..6b282240eac0 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.ini @@ -1,5 +1,3 @@ [script-src-strict_dynamic_double_policy_different_nonce.html] prefs: [security.csp.enable_violation_events:true] - [Unnonced script injected via `appendChild` is not allowed with `strict-dynamic` + a nonce-only double policy.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.ini index e3b45fcbd7d9..7e6d1a302399 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.ini @@ -1,5 +1,4 @@ [script-src-strict_dynamic_double_policy_report_only.html] + type: testharness prefs: [security.csp.enable_violation_events:true] - [Script injected via `appendChild` is allowed with `strict-dynamic` + Report-Only `script-src 'none'` policy.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html.ini index b3d1a425c31b..1d73ff810539 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html.ini @@ -1,5 +1,3 @@ [script-src-strict_dynamic_javascript_uri.html] prefs: [security.csp.enable_violation_events:true] - [Script injected via `javascript:` URIs are not allowed with `strict-dynamic`.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.ini index 96aca788876f..14f5d166fd25 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.ini @@ -1,5 +1,3 @@ [script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html] prefs: [security.csp.enable_violation_events:true] - [All the expected CSP violation reports have been fired.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.ini b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.ini index 2cd6007dda52..ad37731cd25e 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.ini @@ -1,30 +1,6 @@ [script-src-strict_dynamic_parser_inserted.html] expected: TIMEOUT prefs: [security.csp.enable_violation_events:true] - [Parser-inserted script via `document.write` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted script via `document.writeln` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted deferred script via `document.write` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted deferred script via `document.writeln` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted async script via `document.write` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted async script via `document.writeln` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted deferred async script via `document.write` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - - [Parser-inserted deferred async script via `document.writeln` without a correct nonce is not allowed with `strict-dynamic`.] - expected: FAIL - [Script injected via `innerHTML` is not allowed with `strict-dynamic`.] expected: TIMEOUT diff --git a/testing/web-platform/meta/content-security-policy/script-src/scripthash-unicode-normalization.sub.html.ini b/testing/web-platform/meta/content-security-policy/script-src/scripthash-unicode-normalization.sub.html.ini index cce73aee9d23..ed42404431de 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/scripthash-unicode-normalization.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/scripthash-unicode-normalization.sub.html.ini @@ -1,5 +1,3 @@ [scripthash-unicode-normalization.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire securitypolicyviolation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html.ini b/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html.ini index a35097aaa127..155e0941ed18 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html.ini @@ -1,5 +1,3 @@ [scriptnonce-and-scripthash.sub.html] prefs: [security.csp.enable_violation_events:true] - [Expecting alerts: ["PASS (1/3)","PASS (2/3)","PASS (3/3)"\]] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html.ini b/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html.ini index ae69ab9b57b2..3d0cd56e9af3 100644 --- a/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html.ini @@ -1,5 +1,3 @@ [scriptnonce-ignore-unsafeinline.sub.html] prefs: [security.csp.enable_violation_events:true] - [Expecting alerts: ["PASS (1/2)","PASS (2/2)", "violated-directive=script-src"\]] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub.html.ini b/testing/web-platform/meta/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub.html.ini index 7b9372b5a687..5ffd0e930be2 100644 --- a/testing/web-platform/meta/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image.sub.html.ini @@ -1,5 +1,3 @@ [securitypolicyviolation-block-image.sub.html] prefs: [security.csp.enable_violation_events:true] - [Non-redirected same-origin URLs are not stripped.] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html.ini b/testing/web-platform/meta/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html.ini index 3991d67355b2..e7990febc646 100644 --- a/testing/web-platform/meta/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html.ini +++ b/testing/web-platform/meta/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html.ini @@ -1,11 +1,4 @@ [upgrade-insecure-requests-reporting.https.html] - expected: TIMEOUT - [Upgraded image is reported] - expected: TIMEOUT - - [Upgraded iframe is reported] - expected: TIMEOUT - - [Navigated iframe is upgraded and reported] - expected: TIMEOUT + type: testharness + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/style-src/injected-inline-style-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/injected-inline-style-blocked.sub.html.ini index 13dc001a23d8..67031bfacb4c 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/injected-inline-style-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/injected-inline-style-blocked.sub.html.ini @@ -1,4 +1,3 @@ [injected-inline-style-blocked.sub.html] - [Expecting logs: ["violated-directive=style-src","PASS"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini index 4fa1e49c217e..6b2760c4b70a 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini @@ -1,5 +1,3 @@ [inline-style-allowed-while-cloning-objects.sub.html] prefs: [security.csp.enable_violation_events:true] - [Test that violation report event was fired] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini index 56551afdc43a..f16cee58f5bb 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini @@ -1,4 +1,3 @@ [inline-style-attribute-blocked.sub.html] - [Expecting logs: ["violated-directive=style-src","PASS"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-blocked.sub.html.ini index 5e358cf9d9f8..4bb5cdb808f1 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-blocked.sub.html.ini @@ -1,4 +1,3 @@ [style-blocked.sub.html] - [Expecting logs: ["violated-directive=style-src","PASS"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-hash-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-hash-blocked.html.ini index 704c7c696e87..7d82ec7da8fe 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-hash-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-hash-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-hash-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-imported-style-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-imported-style-blocked.html.ini index 764dfdbee48a..13ed98046c77 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-imported-style-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-imported-style-blocked.html.ini @@ -1,5 +1,4 @@ [style-src-imported-style-blocked.html] + type: testharness prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-inline-style-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-inline-style-blocked.html.ini index 614cb92f57bd..e2124e8ccce4 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-inline-style-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-inline-style-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-injected-inline-style-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html.ini index ff923640a2b2..ce316baa3746 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html.ini @@ -1,5 +1,3 @@ [style-src-injected-stylesheet-blocked.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini index 8db863fd9584..e722c5ab5274 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-inline-style-attribute-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-blocked.html.ini index 927805ebfe46..6fed50d2779d 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-inline-style-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html.ini index 270e17f64d9a..8b06ebe3d4bc 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html.ini @@ -1,9 +1,6 @@ [style-src-inline-style-nonce-blocked-error-event.html] expected: TIMEOUT prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL - [Test that paragraph remains unmodified and error events received.] expected: NOTRUN diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html.ini index 037ada9b6b44..1920e1904f6b 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-inline-style-nonce-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-none-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-none-blocked.html.ini index 71bb34cb57ec..280fe00d3947 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-none-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-none-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-none-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html.ini b/testing/web-platform/meta/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html.ini index c6143973dc43..efb73617207b 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html.ini @@ -1,5 +1,3 @@ [style-src-stylesheet-nonce-blocked.html] prefs: [security.csp.enable_violation_events:true] - [Should fire a securitypolicyviolation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/stylehash-basic-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/stylehash-basic-blocked.sub.html.ini index 4e858573def3..5623b31472e4 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/stylehash-basic-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/stylehash-basic-blocked.sub.html.ini @@ -1,5 +1,3 @@ [stylehash-basic-blocked.sub.html] prefs: [security.csp.enable_violation_events:true] - [Expecting alerts: ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src"\]] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/stylenonce-allowed.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/stylenonce-allowed.sub.html.ini index 4aa93f53f027..4489c4a1e53d 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/stylenonce-allowed.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/stylenonce-allowed.sub.html.ini @@ -1,5 +1,4 @@ [stylenonce-allowed.sub.html] + type: testharness prefs: [security.csp.enable_violation_events:true] - [Should fire securitypolicyviolation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/style-src/stylenonce-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/style-src/stylenonce-blocked.sub.html.ini index 6da9c4640f81..05c8882972c6 100644 --- a/testing/web-platform/meta/content-security-policy/style-src/stylenonce-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/style-src/stylenonce-blocked.sub.html.ini @@ -1,5 +1,4 @@ [stylenonce-blocked.sub.html] + type: testharness prefs: [security.csp.enable_violation_events:true] - [Should fire securitypolicyviolation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/svg/object-in-svg-foreignobject.sub.html.ini b/testing/web-platform/meta/content-security-policy/svg/object-in-svg-foreignobject.sub.html.ini index 845a2e8f1e71..80c9eab7fa6d 100644 --- a/testing/web-platform/meta/content-security-policy/svg/object-in-svg-foreignobject.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/svg/object-in-svg-foreignobject.sub.html.ini @@ -1,5 +1,3 @@ [object-in-svg-foreignobject.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should throw a securitypolicyviolation] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/svg/svg-inline.sub.html.ini b/testing/web-platform/meta/content-security-policy/svg/svg-inline.sub.html.ini index ca5faf59d25d..9c49cf1bfd15 100644 --- a/testing/web-platform/meta/content-security-policy/svg/svg-inline.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/svg/svg-inline.sub.html.ini @@ -1,5 +1,3 @@ [svg-inline.sub.html] prefs: [security.csp.enable_violation_events:true] - [Should fire violation event] - expected: FAIL diff --git a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked-and-sends-report.sub.html.ini b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked-and-sends-report.sub.html.ini index 8370b0fc6c47..ad86a8a094a1 100644 --- a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked-and-sends-report.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked-and-sends-report.sub.html.ini @@ -1,4 +1,3 @@ [eval-blocked-and-sends-report.sub.html] - [Expecting logs: ["PASS: eval() blocked.","violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked.sub.html.ini index f5eab6bae070..830e9264badc 100644 --- a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-blocked.sub.html.ini @@ -1,4 +1,3 @@ [eval-blocked.sub.html] - [Expecting logs: ["PASS EvalError","PASS EvalError", "violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub.html.ini index 08d34752baff..1c8dff623dfb 100644 --- a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setInterval-blocked.sub.html.ini @@ -1,4 +1,3 @@ [eval-scripts-setInterval-blocked.sub.html] - [Expecting logs: ["PASS","violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub.html.ini index f5abc08e8e84..b0a81d72ba1e 100644 --- a/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub.html.ini @@ -1,4 +1,3 @@ [eval-scripts-setTimeout-blocked.sub.html] - [Expecting logs: ["PASS","violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] diff --git a/testing/web-platform/meta/content-security-policy/unsafe-eval/function-constructor-blocked.sub.html.ini b/testing/web-platform/meta/content-security-policy/unsafe-eval/function-constructor-blocked.sub.html.ini index 4bd3c37056bf..4e78816c948f 100644 --- a/testing/web-platform/meta/content-security-policy/unsafe-eval/function-constructor-blocked.sub.html.ini +++ b/testing/web-platform/meta/content-security-policy/unsafe-eval/function-constructor-blocked.sub.html.ini @@ -1,4 +1,3 @@ [function-constructor-blocked.sub.html] - [Expecting logs: ["PASS EvalError","violated-directive=script-src"\]] - expected: FAIL + prefs: [security.csp.enable_violation_events:true] From 0319902c5b6141f98c5f27ff660639208739c023 Mon Sep 17 00:00:00 2001 From: Chung-Sheng Fu Date: Tue, 16 Jan 2018 23:00:00 +0200 Subject: [PATCH 24/47] Bug 1418243 - Fix mochitest failures due to violationDirective change. r=ckerschb MozReview-Commit-ID: AphtAxYo6Hr --HG-- extra : rebase_source : 24cd7773cb1f3583c524d142908f859ff5e88e8a --- .../test/mochitest/browser_webconsole_cspro.js | 4 ++-- .../webconsole/test/browser_webconsole_bug_1010953_cspro.js | 4 ++-- .../test/browser_webconsole_bug_1247459_violation.js | 3 +-- .../test/browser_webconsole_bug_770099_violation.js | 3 +-- dom/security/test/csp/test_frame_ancestors_ro.html | 2 +- dom/security/test/csp/test_report.html | 2 +- dom/security/test/csp/test_report_for_import.html | 2 +- .../test/csp/test_security_policy_violation_event.html | 2 +- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_cspro.js b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_cspro.js index 99db421e251c..c5427da112aa 100644 --- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_cspro.js +++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_cspro.js @@ -21,11 +21,11 @@ const TEST_VIOLATION = "http://example.com/browser/devtools/client/webconsole/" "new-console-output/test/mochitest/test-cspro.html"; const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings blocked the loading of a resource " + - "at http://some.example.com/cspro.png (\u201cimg-src http://example.com\u201d)."; + "at http://some.example.com/cspro.png (\u201cimg-src\u201d)."; const CSP_REPORT_MSG = "Content Security Policy: The page\u2019s settings observed the loading of a " + "resource at http://some.example.com/cspro.js " + - "(\u201cscript-src http://example.com\u201d). A CSP report is being sent."; + "(\u201cscript-src\u201d). A CSP report is being sent."; add_task(async function () { let hud = await openNewTabAndConsole(TEST_URI); diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_1010953_cspro.js b/devtools/client/webconsole/test/browser_webconsole_bug_1010953_cspro.js index ace13f8d18c8..5c5c8ea6d7d5 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_1010953_cspro.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_1010953_cspro.js @@ -23,11 +23,11 @@ const TEST_VIOLATION = "http://example.com/browser/devtools/client/" + const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings " + "blocked the loading of a resource at " + "http://some.example.com/test.png " + - "(\u201cimg-src http://example.com\u201d)."; + "(\u201cimg-src\u201d)."; const CSP_REPORT_MSG = "Content Security Policy: The page\u2019s settings " + "observed the loading of a resource at " + "http://some.example.com/test_bug_1010953_cspro.js " + - "(\u201cscript-src http://example.com\u201d). A CSP report is " + + "(\u201cscript-src\u201d). A CSP report is " + "being sent."; add_task(function* () { diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js b/devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js index 26bac7f570d4..5c20dd2ad432 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_1247459_violation.js @@ -13,8 +13,7 @@ const TEST_VIOLATION = "https://example.com/browser/devtools/client/" + "webconsole/test/test_bug_1247459_violation.html"; const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings " + "blocked the loading of a resource at " + - "http://some.example.com/test.png (\u201cimg-src " + - "https://example.com\u201d)."; + "http://some.example.com/test.png (\u201cimg-src\u201d)."; add_task(function* () { let { browser } = yield loadTab(TEST_URI); diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_770099_violation.js b/devtools/client/webconsole/test/browser_webconsole_bug_770099_violation.js index 3a7134202d68..1d01c552a6ae 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_770099_violation.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_770099_violation.js @@ -12,8 +12,7 @@ const TEST_VIOLATION = "https://example.com/browser/devtools/client/" + "webconsole/test/test_bug_770099_violation.html"; const CSP_VIOLATION_MSG = "Content Security Policy: The page\u2019s settings " + "blocked the loading of a resource at " + - "http://some.example.com/test.png (\u201cdefault-src " + - "https://example.com\u201d)."; + "http://some.example.com/test.png (\u201cdefault-src\u201d)."; add_task(function* () { let { browser } = yield loadTab(TEST_URI); diff --git a/dom/security/test/csp/test_frame_ancestors_ro.html b/dom/security/test/csp/test_frame_ancestors_ro.html index 90f68e25ebd2..bd8b4d6168d0 100644 --- a/dom/security/test/csp/test_frame_ancestors_ro.html +++ b/dom/security/test/csp/test_frame_ancestors_ro.html @@ -23,7 +23,7 @@ function checkResults(reportObj) { // we can not test for the whole referrer since it includes platform specific information is(cspReport["referrer"], document.location.toString(), "Incorrect referrer"); is(cspReport["blocked-uri"], document.location.toString(), "Incorrect blocked-uri"); - is(cspReport["violated-directive"], "frame-ancestors 'none'", "Incorrect violated-directive"); + is(cspReport["violated-directive"], "frame-ancestors", "Incorrect violated-directive"); is(cspReport["original-policy"], "frame-ancestors 'none'; report-uri http://mochi.test:8888/foo.sjs", "Incorrect original-policy"); testResults.reportFired = true; } diff --git a/dom/security/test/csp/test_report.html b/dom/security/test/csp/test_report.html index 7d3bd7dcc085..5e034ebe899a 100644 --- a/dom/security/test/csp/test_report.html +++ b/dom/security/test/csp/test_report.html @@ -50,7 +50,7 @@ window.checkResults = function(reportObj) { is(cspReport["blocked-uri"], "self", "Incorrect blocked-uri"); - is(cspReport["violated-directive"], "default-src 'none'", "Incorrect violated-directive"); + is(cspReport["violated-directive"], "default-src", "Incorrect violated-directive"); is(cspReport["original-policy"], "default-src 'none'; report-uri http://mochi.test:8888/foo.sjs", "Incorrect original-policy"); diff --git a/dom/security/test/csp/test_report_for_import.html b/dom/security/test/csp/test_report_for_import.html index be112d51c06f..452dc5f745d0 100644 --- a/dom/security/test/csp/test_report_for_import.html +++ b/dom/security/test/csp/test_report_for_import.html @@ -50,7 +50,7 @@ function checkResults(reportStr) { "http://mochi.test:8888/tests/dom/security/test/csp/test_report_for_import.html", "Incorrect referrer"); is(cspReport["violated-directive"], - "style-src http://mochi.test:8888", + "style-src", "Incorrect violated-directive"); is(cspReport["original-policy"], "style-src http://mochi.test:8888; report-uri " + diff --git a/dom/security/test/csp/test_security_policy_violation_event.html b/dom/security/test/csp/test_security_policy_violation_event.html index db1ae9fa7a13..62abe9565d8a 100644 --- a/dom/security/test/csp/test_security_policy_violation_event.html +++ b/dom/security/test/csp/test_security_policy_violation_event.html @@ -11,7 +11,7 @@ SpecialPowers.pushPrefEnv({ }); document.addEventListener("securitypolicyviolation", (e) => { SimpleTest.is(e.blockedURI, "http://mochi.test:8888/foo/bar.jpg", "blockedURI"); - SimpleTest.todo_is(e.violatedDirective, "img-src", "violatedDirective") + SimpleTest.is(e.violatedDirective, "img-src", "violatedDirective") SimpleTest.is(e.originalPolicy, "img-src 'none'", "originalPolicy"); SimpleTest.finish(); }); From ef300e6ca6e80a7171e84be3cf5c3bbb31025220 Mon Sep 17 00:00:00 2001 From: Dragana Damjanovic Date: Wed, 20 Dec 2017 08:39:00 +0200 Subject: [PATCH 25/47] Bug 1426408 - Remove some code for the TCP fast open for Windows 10 that is not neede any more. r=mayhemer --HG-- extra : rebase_source : 8ab4fbe254eaaca0595cfbcd6ba527810ecc5102 --- netwerk/base/TCPFastOpenLayer.cpp | 3 +-- netwerk/protocol/http/nsHttpHandler.h | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/netwerk/base/TCPFastOpenLayer.cpp b/netwerk/base/TCPFastOpenLayer.cpp index c412aa4909f3..6cedc0ddd279 100644 --- a/netwerk/base/TCPFastOpenLayer.cpp +++ b/netwerk/base/TCPFastOpenLayer.cpp @@ -421,8 +421,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err, result = PR_GetError(); SOCKET_LOG(("TCPFastOpenFinish - sendto error=%d.\n", result)); - if (result == PR_NOT_IMPLEMENTED_ERROR || // When a windows version does not support Fast Open it will return this error. - result == PR_NOT_TCP_SOCKET_ERROR) { // SendTo will return PR_NOT_TCP_SOCKET_ERROR if TCP Fast Open is turned off on Linux. + if (result == PR_NOT_TCP_SOCKET_ERROR) { // SendTo will return PR_NOT_TCP_SOCKET_ERROR if TCP Fast Open is turned off on Linux. // We can call connect again. fastOpenNotSupported = true; rv = (tfoFd->lower->methods->connect)(tfoFd->lower, &secret->mAddr, diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h index 55853ee3c32c..852caeab6061 100644 --- a/netwerk/protocol/http/nsHttpHandler.h +++ b/netwerk/protocol/http/nsHttpHandler.h @@ -184,10 +184,6 @@ public: // If one of tcp connections return PR_NOT_TCP_SOCKET_ERROR while trying // fast open, it means that Fast Open is turned off so we will not try again // until a restart. This is only on Linux. - // For windows 10 we can only check whether a version of windows support - // Fast Open at run time, so if we get error PR_NOT_IMPLEMENTED_ERROR it - // means that Fast Open is not supported and we will set mFastOpenSupported - // to false. void SetFastOpenNotSupported() { mFastOpenSupported = false; } void IncrementFastOpenConsecutiveFailureCounter(); From 185603d39a9302634d1f92879b1271be3cbc9123 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Wed, 17 Jan 2018 14:46:06 +0100 Subject: [PATCH 26/47] Bug 1411956 - Disable scripts with GETELEM_SUPER on x86 when profiling. r=jandem --- js/src/jit-test/tests/ion/super-getelem-profiling.js | 12 ++++++++++++ js/src/jit/IonBuilder.cpp | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 js/src/jit-test/tests/ion/super-getelem-profiling.js diff --git a/js/src/jit-test/tests/ion/super-getelem-profiling.js b/js/src/jit-test/tests/ion/super-getelem-profiling.js new file mode 100644 index 000000000000..76aaf28707a2 --- /dev/null +++ b/js/src/jit-test/tests/ion/super-getelem-profiling.js @@ -0,0 +1,12 @@ +enableGeckoProfiling(); + +class base {} +class derived extends base { + testElem() { + super[ruin()]; + } +} +let instance = new derived(); +try { + instance.testElem(); +} catch { /* don't crash */ } diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 77d0678d5904..a12fc397de00 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -9820,6 +9820,11 @@ IonBuilder::jsop_getelem_super() MDefinition* receiver = current->pop(); MDefinition* id = current->pop(); +#if defined(JS_CODEGEN_X86) + if (instrumentedProfiling()) + return abort(AbortReason::Disable, "profiling functions with GETELEM_SUPER is disabled on x86"); +#endif + auto* ins = MGetPropSuperCache::New(alloc(), obj, receiver, id); current->add(ins); current->push(ins); From 6641e4d0f0d88db2763d94a8340c3b096f148d9a Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 17 Jan 2018 08:59:38 -0500 Subject: [PATCH 27/47] Bug 1430797 - Follow-up to address review comment. r=mstange MozReview-Commit-ID: 4DkzPSlDLwN --- widget/nsBaseWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 64b991fedb7e..f5d56d689a55 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -911,6 +911,7 @@ nsBaseWidget::AllowWebRenderForThisWindow() { return WindowType() == eWindowType_toplevel || WindowType() == eWindowType_child || + WindowType() == eWindowType_dialog || (WindowType() == eWindowType_popup && HasRemoteContent()); } From 231bd74b4d55df804738c75d3e62b3efd0e856e8 Mon Sep 17 00:00:00 2001 From: Honza Bambas Date: Tue, 16 Jan 2018 12:27:00 +0200 Subject: [PATCH 28/47] Bug 1417185 - Introduce MOZ_CONSOLESERVICE_DISABLE_DEBUGGER_OUTPUT env var to prevent nsConsoleService from flooding debugger's output window, r=jchen --- xpcom/base/nsConsoleService.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp index a09bf059a663..78404073c647 100644 --- a/xpcom/base/nsConsoleService.cpp +++ b/xpcom/base/nsConsoleService.cpp @@ -54,6 +54,9 @@ NS_IMPL_CI_INTERFACE_GETTER(nsConsoleService, nsIConsoleService, nsIObserver) static const bool gLoggingEnabled = true; static const bool gLoggingBuffered = true; +#ifdef XP_WIN +static bool gLoggingToDebugger = true; +#endif // XP_WIN #if defined(ANDROID) static bool gLoggingLogcat = false; #endif // defined(ANDROID) @@ -71,6 +74,18 @@ nsConsoleService::nsConsoleService() // hm, but worry about circularity, bc we want to be able to report // prefs errs... mMaximumSize = 250; + +#ifdef XP_WIN + // This environment variable controls whether the console service + // should be prevented from putting output to the attached debugger. + // It only affects the Windows platform. + // + // To disable OutputDebugString, set: + // MOZ_CONSOLESERVICE_DISABLE_DEBUGGER_OUTPUT=1 + // + const char* disableDebugLoggingVar = getenv("MOZ_CONSOLESERVICE_DISABLE_DEBUGGER_OUTPUT"); + gLoggingToDebugger = !disableDebugLoggingVar || (disableDebugLoggingVar[0] == '0'); +#endif // XP_WIN } @@ -286,7 +301,7 @@ nsConsoleService::LogMessageWithMode(nsIConsoleMessage* aMessage, } #endif #ifdef XP_WIN - if (IsDebuggerPresent()) { + if (gLoggingToDebugger && IsDebuggerPresent()) { nsString msg; aMessage->GetMessageMoz(getter_Copies(msg)); msg.Append('\n'); From 8c0406c6e23bc70457200d928d23583f0578ae3c Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 16 Jan 2018 06:41:00 +0200 Subject: [PATCH 29/47] Bug 1430752 - Fix GC zeal to not attempt to check gray marking state during incremental GC r=sfink --- js/src/jit-test/tests/gc/bug-1430752.js | 2 ++ js/src/jsgc.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 js/src/jit-test/tests/gc/bug-1430752.js diff --git a/js/src/jit-test/tests/gc/bug-1430752.js b/js/src/jit-test/tests/gc/bug-1430752.js new file mode 100644 index 000000000000..cb4986140f36 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1430752.js @@ -0,0 +1,2 @@ +gczeal(18); +gcslice(3); diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index f29fe79ef519..8ae1646feadc 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -7496,7 +7496,7 @@ GCRuntime::collect(bool nonincrementalByAPI, SliceBudget budget, JS::gcreason::R gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP); CheckHeapAfterGC(rt); } - if (rt->hasZealMode(ZealMode::CheckGrayMarking)) { + if (rt->hasZealMode(ZealMode::CheckGrayMarking) && !isIncrementalGCInProgress()) { MOZ_RELEASE_ASSERT(CheckGrayMarkingState(rt)); } #endif From d1d494ea5477684a7eebaef87546bcef9d24a505 Mon Sep 17 00:00:00 2001 From: Honza Bambas Date: Wed, 17 Jan 2018 06:23:00 +0200 Subject: [PATCH 30/47] Bug 1295941 - Let mozilla::Tokenizer read signed integers from the input, r=erahm --- xpcom/base/NSPRLogModulesParser.cpp | 10 +---- xpcom/ds/Tokenizer.h | 46 +++++++++++++++++++++- xpcom/tests/gtest/TestTokenizer.cpp | 61 +++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 9 deletions(-) diff --git a/xpcom/base/NSPRLogModulesParser.cpp b/xpcom/base/NSPRLogModulesParser.cpp index 2fb164e3865b..136bac4637c7 100644 --- a/xpcom/base/NSPRLogModulesParser.cpp +++ b/xpcom/base/NSPRLogModulesParser.cpp @@ -30,17 +30,11 @@ NSPRLogModulesParser(const char* aLogModules, LogLevel logLevel = LogLevel::Error; int32_t levelValue = 0; if (parser.CheckChar(':')) { - // Check if a negative value is provided. - int32_t multiplier = 1; - if (parser.CheckChar([](const char aChar) { return aChar == '-'; })) { - multiplier = -1; - } - // NB: If a level isn't provided after the ':' we assume the default // Error level is desired. This differs from NSPR which will stop // processing the log module string in this case. - if (parser.ReadInteger(&levelValue)) { - logLevel = ToLogLevel(levelValue * multiplier); + if (parser.ReadSignedInteger(&levelValue)) { + logLevel = ToLogLevel(levelValue); } } diff --git a/xpcom/ds/Tokenizer.h b/xpcom/ds/Tokenizer.h index b4aad9ed995f..64d0ed00ff9e 100644 --- a/xpcom/ds/Tokenizer.h +++ b/xpcom/ds/Tokenizer.h @@ -9,6 +9,8 @@ #include "nsString.h" #include "mozilla/CheckedInt.h" +#include "mozilla/ScopeExit.h" +#include "mozilla/TypeTraits.h" #include "mozilla/UniquePtr.h" #include "nsTArray.h" @@ -347,7 +349,7 @@ public: * and the cursor is moved forward. */ template - MOZ_MUST_USE bool ReadInteger(T* aValue) + MOZ_MUST_USE bool ReadInteger(T *aValue) { MOZ_RELEASE_ASSERT(aValue); @@ -371,6 +373,48 @@ public: return true; } + /** + * Same as above, but accepts an integer with an optional minus sign. + */ + template ::Type>::value, + typename RemovePointer::Type>::Type> + MOZ_MUST_USE bool ReadSignedInteger(T *aValue) + { + MOZ_RELEASE_ASSERT(aValue); + + nsACString::const_char_iterator rollback = mRollback; + nsACString::const_char_iterator cursor = mCursor; + auto revert = MakeScopeExit([&] { + // Move to a state as if Check() call has failed + mRollback = rollback; + mCursor = cursor; + mHasFailed = true; + }); + + // Using functional raw access because '-' could be part of the word set + // making CheckChar('-') not work. + bool minus = CheckChar([](const char aChar) { return aChar == '-'; }); + + Token t; + if (!Check(TOKEN_INTEGER, t)) { + return false; + } + + mozilla::CheckedInt checked(t.AsInteger()); + if (minus) { + checked *= -1; + } + + if (!checked.isValid()) { + return false; + } + + *aValue = checked.value(); + revert.release(); + return true; + } + /** * Returns the read cursor position back as it was before the last call of any parsing * method of Tokenizer (Next, Check*, Skip*, Read*) so that the last operation diff --git a/xpcom/tests/gtest/TestTokenizer.cpp b/xpcom/tests/gtest/TestTokenizer.cpp index 7a00427ebff6..38394bc3353e 100644 --- a/xpcom/tests/gtest/TestTokenizer.cpp +++ b/xpcom/tests/gtest/TestTokenizer.cpp @@ -1153,3 +1153,64 @@ TEST(Tokenizer, RecordAndReadUntil) EXPECT_TRUE(t.CheckEOF()); } + +TEST(Tokenizer, ReadIntegers) +{ + // Make sure that adding dash (the 'minus' sign) as an additional char + // doesn't break reading negative numbers. + Tokenizer t("100,-100,200,-200,4294967295,-4294967295,-2147483647", nullptr, "-"); + + uint32_t unsigned_value32; + int32_t signed_value32; + int64_t signed_value64; + + // "100," + EXPECT_TRUE(t.ReadInteger(&unsigned_value32)); + EXPECT_TRUE(unsigned_value32 == 100); + EXPECT_TRUE(t.CheckChar(',')); + + // "-100," + EXPECT_FALSE(t.ReadInteger(&unsigned_value32)); + EXPECT_FALSE(t.CheckChar(',')); + + EXPECT_TRUE(t.ReadSignedInteger(&signed_value32)); + EXPECT_TRUE(signed_value32 == -100); + EXPECT_TRUE(t.CheckChar(',')); + + // "200," + EXPECT_TRUE(t.ReadSignedInteger(&signed_value32)); + EXPECT_TRUE(signed_value32 == 200); + EXPECT_TRUE(t.CheckChar(',')); + + // "-200," + EXPECT_TRUE(t.ReadSignedInteger(&signed_value32)); + EXPECT_TRUE(signed_value32 == -200); + EXPECT_TRUE(t.CheckChar(',')); + + // "4294967295," + EXPECT_FALSE(t.ReadSignedInteger(&signed_value32)); + EXPECT_FALSE(t.CheckChar(',')); + + EXPECT_TRUE(t.ReadInteger(&unsigned_value32)); + EXPECT_TRUE(unsigned_value32 == 4294967295UL); + EXPECT_TRUE(t.CheckChar(',')); + + // "-4294967295," + EXPECT_FALSE(t.ReadSignedInteger(&signed_value32)); + EXPECT_FALSE(t.CheckChar(',')); + + EXPECT_FALSE(t.ReadInteger(&unsigned_value32)); + EXPECT_FALSE(t.CheckChar(',')); + + EXPECT_TRUE(t.ReadSignedInteger(&signed_value64)); + EXPECT_TRUE(signed_value64 == -4294967295LL); + EXPECT_TRUE(t.CheckChar(',')); + + // "-2147483647" + EXPECT_FALSE(t.ReadInteger(&unsigned_value32)); + EXPECT_FALSE(t.CheckChar(',')); + + EXPECT_TRUE(t.ReadSignedInteger(&signed_value32)); + EXPECT_TRUE(signed_value32 == -2147483647L); + EXPECT_TRUE(t.CheckEOF()); +} From 15d3611b38341687effab7d2f99f3e8a90f8e275 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Wed, 17 Jan 2018 15:59:36 +0100 Subject: [PATCH 31/47] Bug 1430810 - Prefix in Console when used by JSM, r=smaug --- dom/console/Console.cpp | 9 +++++---- dom/console/Console.h | 2 +- dom/console/ConsoleInstance.cpp | 2 +- dom/console/tests/test_jsm.xul | 3 +++ dom/webidl/Console.webidl | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index 6abeea731a84..4e60a0b139ab 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -1537,6 +1537,7 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx, event.mConsoleID = mConsoleID; event.mLevel = aData->mMethodString; event.mFilename = frame.mFilename; + event.mPrefix = mPrefix; nsCOMPtr filenameURI; nsAutoCString pass; @@ -2602,8 +2603,8 @@ Console::MaybeExecuteDumpFunction(JSContext* aCx, message.Append(aMethodName); message.AppendLiteral(": "); - if (!mDumpPrefix.IsEmpty()) { - message.Append(mDumpPrefix); + if (!mPrefix.IsEmpty()) { + message.Append(mPrefix); message.AppendLiteral(": "); } @@ -2640,8 +2641,8 @@ Console::MaybeExecuteDumpFunctionForTrace(JSContext* aCx, nsIStackFrame* aStack) nsAutoString message; message.AssignLiteral("console.trace:\n"); - if (!mDumpPrefix.IsEmpty()) { - message.Append(mDumpPrefix); + if (!mPrefix.IsEmpty()) { + message.Append(mPrefix); message.AppendLiteral(": "); } diff --git a/dom/console/Console.h b/dom/console/Console.h index 0f06c4fa469b..6bddeecb6879 100644 --- a/dom/console/Console.h +++ b/dom/console/Console.h @@ -444,7 +444,7 @@ private: nsString mPassedInnerID; RefPtr mDumpFunction; bool mDumpToStdout; - nsString mDumpPrefix; + nsString mPrefix; bool mChromeInstance; ConsoleLogLevel mMaxLogLevel; diff --git a/dom/console/ConsoleInstance.cpp b/dom/console/ConsoleInstance.cpp index dba879d24c11..91984b6362af 100644 --- a/dom/console/ConsoleInstance.cpp +++ b/dom/console/ConsoleInstance.cpp @@ -79,7 +79,7 @@ ConsoleInstance::ConsoleInstance(const ConsoleInstanceOptions& aOptions) mConsole->mDumpToStdout = true; } - mConsole->mDumpPrefix = aOptions.mPrefix; + mConsole->mPrefix = aOptions.mPrefix; // Let's inform that this is a custom instance. mConsole->mChromeInstance = true; diff --git a/dom/console/tests/test_jsm.xul b/dom/console/tests/test_jsm.xul index a4393bccdf82..35743912c30d 100644 --- a/dom/console/tests/test_jsm.xul +++ b/dom/console/tests/test_jsm.xul @@ -38,6 +38,7 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "", "No consoleID for console API"); + is(obj.prefix, "", "prefix is empty by default"); // We want to see 2 messages from this innerID, the first is generated // by console.log, the second one from createInstance().log(); @@ -46,11 +47,13 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "wow", "consoleID is set by consoleInstance"); + is(obj.prefix, "_PREFIX_", "prefix is set by consoleInstance"); ++this.count; } else if (obj.innerID == "LEVEL") { // Nothing special... just we don't want to see 'invisible' messages. is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); + is(obj.prefix, "", "prefix is empty by default"); ++this.count; } diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl index c95316d21d57..46532be3092e 100644 --- a/dom/webidl/Console.webidl +++ b/dom/webidl/Console.webidl @@ -78,6 +78,7 @@ dictionary ConsoleEvent { DOMString groupName = ""; any timer = null; any counter = null; + DOMString prefix = ""; }; // Event for profile operations From 856e142ec9f6c78345dfa0404b759e9cc92786df Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Wed, 17 Jan 2018 16:02:03 +0100 Subject: [PATCH 32/47] Backed out bug 1430810 - wrong bug ID in the patch --- dom/console/Console.cpp | 9 ++++----- dom/console/Console.h | 2 +- dom/console/ConsoleInstance.cpp | 2 +- dom/console/tests/test_jsm.xul | 3 --- dom/webidl/Console.webidl | 1 - 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index 4e60a0b139ab..6abeea731a84 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -1537,7 +1537,6 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx, event.mConsoleID = mConsoleID; event.mLevel = aData->mMethodString; event.mFilename = frame.mFilename; - event.mPrefix = mPrefix; nsCOMPtr filenameURI; nsAutoCString pass; @@ -2603,8 +2602,8 @@ Console::MaybeExecuteDumpFunction(JSContext* aCx, message.Append(aMethodName); message.AppendLiteral(": "); - if (!mPrefix.IsEmpty()) { - message.Append(mPrefix); + if (!mDumpPrefix.IsEmpty()) { + message.Append(mDumpPrefix); message.AppendLiteral(": "); } @@ -2641,8 +2640,8 @@ Console::MaybeExecuteDumpFunctionForTrace(JSContext* aCx, nsIStackFrame* aStack) nsAutoString message; message.AssignLiteral("console.trace:\n"); - if (!mPrefix.IsEmpty()) { - message.Append(mPrefix); + if (!mDumpPrefix.IsEmpty()) { + message.Append(mDumpPrefix); message.AppendLiteral(": "); } diff --git a/dom/console/Console.h b/dom/console/Console.h index 6bddeecb6879..0f06c4fa469b 100644 --- a/dom/console/Console.h +++ b/dom/console/Console.h @@ -444,7 +444,7 @@ private: nsString mPassedInnerID; RefPtr mDumpFunction; bool mDumpToStdout; - nsString mPrefix; + nsString mDumpPrefix; bool mChromeInstance; ConsoleLogLevel mMaxLogLevel; diff --git a/dom/console/ConsoleInstance.cpp b/dom/console/ConsoleInstance.cpp index 91984b6362af..dba879d24c11 100644 --- a/dom/console/ConsoleInstance.cpp +++ b/dom/console/ConsoleInstance.cpp @@ -79,7 +79,7 @@ ConsoleInstance::ConsoleInstance(const ConsoleInstanceOptions& aOptions) mConsole->mDumpToStdout = true; } - mConsole->mPrefix = aOptions.mPrefix; + mConsole->mDumpPrefix = aOptions.mPrefix; // Let's inform that this is a custom instance. mConsole->mChromeInstance = true; diff --git a/dom/console/tests/test_jsm.xul b/dom/console/tests/test_jsm.xul index 35743912c30d..a4393bccdf82 100644 --- a/dom/console/tests/test_jsm.xul +++ b/dom/console/tests/test_jsm.xul @@ -38,7 +38,6 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "", "No consoleID for console API"); - is(obj.prefix, "", "prefix is empty by default"); // We want to see 2 messages from this innerID, the first is generated // by console.log, the second one from createInstance().log(); @@ -47,13 +46,11 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "wow", "consoleID is set by consoleInstance"); - is(obj.prefix, "_PREFIX_", "prefix is set by consoleInstance"); ++this.count; } else if (obj.innerID == "LEVEL") { // Nothing special... just we don't want to see 'invisible' messages. is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); - is(obj.prefix, "", "prefix is empty by default"); ++this.count; } diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl index 46532be3092e..c95316d21d57 100644 --- a/dom/webidl/Console.webidl +++ b/dom/webidl/Console.webidl @@ -78,7 +78,6 @@ dictionary ConsoleEvent { DOMString groupName = ""; any timer = null; any counter = null; - DOMString prefix = ""; }; // Event for profile operations From f3bbd3b9dde1bc771de5c658e613f859e6925c22 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Wed, 17 Jan 2018 16:02:29 +0100 Subject: [PATCH 33/47] Bug 1431105 - Prefix in Console when used by JSM, r=smaug --- dom/console/Console.cpp | 9 +++++---- dom/console/Console.h | 2 +- dom/console/ConsoleInstance.cpp | 2 +- dom/console/tests/test_jsm.xul | 3 +++ dom/webidl/Console.webidl | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index 6abeea731a84..4e60a0b139ab 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -1537,6 +1537,7 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx, event.mConsoleID = mConsoleID; event.mLevel = aData->mMethodString; event.mFilename = frame.mFilename; + event.mPrefix = mPrefix; nsCOMPtr filenameURI; nsAutoCString pass; @@ -2602,8 +2603,8 @@ Console::MaybeExecuteDumpFunction(JSContext* aCx, message.Append(aMethodName); message.AppendLiteral(": "); - if (!mDumpPrefix.IsEmpty()) { - message.Append(mDumpPrefix); + if (!mPrefix.IsEmpty()) { + message.Append(mPrefix); message.AppendLiteral(": "); } @@ -2640,8 +2641,8 @@ Console::MaybeExecuteDumpFunctionForTrace(JSContext* aCx, nsIStackFrame* aStack) nsAutoString message; message.AssignLiteral("console.trace:\n"); - if (!mDumpPrefix.IsEmpty()) { - message.Append(mDumpPrefix); + if (!mPrefix.IsEmpty()) { + message.Append(mPrefix); message.AppendLiteral(": "); } diff --git a/dom/console/Console.h b/dom/console/Console.h index 0f06c4fa469b..6bddeecb6879 100644 --- a/dom/console/Console.h +++ b/dom/console/Console.h @@ -444,7 +444,7 @@ private: nsString mPassedInnerID; RefPtr mDumpFunction; bool mDumpToStdout; - nsString mDumpPrefix; + nsString mPrefix; bool mChromeInstance; ConsoleLogLevel mMaxLogLevel; diff --git a/dom/console/ConsoleInstance.cpp b/dom/console/ConsoleInstance.cpp index dba879d24c11..91984b6362af 100644 --- a/dom/console/ConsoleInstance.cpp +++ b/dom/console/ConsoleInstance.cpp @@ -79,7 +79,7 @@ ConsoleInstance::ConsoleInstance(const ConsoleInstanceOptions& aOptions) mConsole->mDumpToStdout = true; } - mConsole->mDumpPrefix = aOptions.mPrefix; + mConsole->mPrefix = aOptions.mPrefix; // Let's inform that this is a custom instance. mConsole->mChromeInstance = true; diff --git a/dom/console/tests/test_jsm.xul b/dom/console/tests/test_jsm.xul index a4393bccdf82..35743912c30d 100644 --- a/dom/console/tests/test_jsm.xul +++ b/dom/console/tests/test_jsm.xul @@ -38,6 +38,7 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "", "No consoleID for console API"); + is(obj.prefix, "", "prefix is empty by default"); // We want to see 2 messages from this innerID, the first is generated // by console.log, the second one from createInstance().log(); @@ -46,11 +47,13 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "wow", "consoleID is set by consoleInstance"); + is(obj.prefix, "_PREFIX_", "prefix is set by consoleInstance"); ++this.count; } else if (obj.innerID == "LEVEL") { // Nothing special... just we don't want to see 'invisible' messages. is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); + is(obj.prefix, "", "prefix is empty by default"); ++this.count; } diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl index c95316d21d57..46532be3092e 100644 --- a/dom/webidl/Console.webidl +++ b/dom/webidl/Console.webidl @@ -78,6 +78,7 @@ dictionary ConsoleEvent { DOMString groupName = ""; any timer = null; any counter = null; + DOMString prefix = ""; }; // Event for profile operations From 2515e7e53f7e11ba11f25576382b32f3b074e6ab Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 17 Jan 2018 10:08:02 -0500 Subject: [PATCH 34/47] Bug 1431114 - Update pdf.js to version 2.0.274. r=bdahl --- browser/extensions/pdfjs/README.mozilla | 4 +- browser/extensions/pdfjs/content/build/pdf.js | 37 ++++++---- .../pdfjs/content/build/pdf.worker.js | 67 +++++++++++++------ .../extensions/pdfjs/content/web/viewer.js | 8 ++- 4 files changed, 79 insertions(+), 37 deletions(-) diff --git a/browser/extensions/pdfjs/README.mozilla b/browser/extensions/pdfjs/README.mozilla index 0b1a17f64c5a..570c07da4f64 100644 --- a/browser/extensions/pdfjs/README.mozilla +++ b/browser/extensions/pdfjs/README.mozilla @@ -1,5 +1,5 @@ This is the PDF.js project output, https://github.com/mozilla/pdf.js -Current extension version is: 2.0.258 +Current extension version is: 2.0.274 -Taken from upstream commit: 5a52ee0a +Taken from upstream commit: f774abc8 diff --git a/browser/extensions/pdfjs/content/build/pdf.js b/browser/extensions/pdfjs/content/build/pdf.js index f85f214a8127..b0cd564174bb 100644 --- a/browser/extensions/pdfjs/content/build/pdf.js +++ b/browser/extensions/pdfjs/content/build/pdf.js @@ -105,7 +105,7 @@ return /******/ (function(modules) { // webpackBootstrap Object.defineProperty(exports, "__esModule", { value: true }); -exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; +exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; __w_pdfjs_require__(9); @@ -897,9 +897,6 @@ function isArrayBuffer(v) { function isSpace(ch) { return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; } -function isNodeJS() { - return typeof process === 'object' && process + '' === '[object process]'; -} function createPromiseCapability() { var capability = {}; capability.promise = new Promise(function (resolve, reject) { @@ -1370,7 +1367,6 @@ exports.isEmptyObj = isEmptyObj; exports.isNum = isNum; exports.isString = isString; exports.isSpace = isSpace; -exports.isNodeJS = isNodeJS; exports.isSameOrigin = isSameOrigin; exports.createValidAbsoluteUrl = createValidAbsoluteUrl; exports.isLittleEndian = isLittleEndian; @@ -1936,7 +1932,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { if (worker.destroyed) { return Promise.reject(new Error('Worker was destroyed')); } - let apiVersion = '2.0.258'; + let apiVersion = '2.0.274'; source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); @@ -3230,8 +3226,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { }(); var version, build; { - exports.version = version = '2.0.258'; - exports.build = build = '5a52ee0a'; + exports.version = version = '2.0.274'; + exports.build = build = 'f774abc8'; } exports.getDocument = getDocument; exports.LoopbackPort = LoopbackPort; @@ -4605,6 +4601,12 @@ var _util = __w_pdfjs_require__(0); var _dom_utils = __w_pdfjs_require__(1); +var _is_node = __w_pdfjs_require__(18); + +var _is_node2 = _interopRequireDefault(_is_node); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var SVGGraphics = function () { throw new Error('Not implemented: SVGGraphics'); }; @@ -4618,8 +4620,8 @@ exports.SVGGraphics = SVGGraphics; "use strict"; -var pdfjsVersion = '2.0.258'; -var pdfjsBuild = '5a52ee0a'; +var pdfjsVersion = '2.0.274'; +var pdfjsBuild = 'f774abc8'; var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsDisplayGlobal = __w_pdfjs_require__(12); var pdfjsDisplayAPI = __w_pdfjs_require__(3); @@ -7741,8 +7743,8 @@ if (!_global_scope2.default.PDFJS) { } var PDFJS = _global_scope2.default.PDFJS; { - PDFJS.version = '2.0.258'; - PDFJS.build = '5a52ee0a'; + PDFJS.version = '2.0.274'; + PDFJS.build = 'f774abc8'; } PDFJS.pdfBug = false; if (PDFJS.verbosity !== undefined) { @@ -10684,6 +10686,17 @@ var WebGLUtils = function WebGLUtilsClosure() { }(); exports.WebGLContext = WebGLContext; +/***/ }), +/* 18 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +module.exports = function isNodeJS() { + return typeof process === 'object' && process + '' === '[object process]'; +}; + /***/ }) /******/ ]); }); \ No newline at end of file diff --git a/browser/extensions/pdfjs/content/build/pdf.worker.js b/browser/extensions/pdfjs/content/build/pdf.worker.js index e7ab9ba5fb9e..868918e8a19e 100644 --- a/browser/extensions/pdfjs/content/build/pdf.worker.js +++ b/browser/extensions/pdfjs/content/build/pdf.worker.js @@ -105,7 +105,7 @@ return /******/ (function(modules) { // webpackBootstrap Object.defineProperty(exports, "__esModule", { value: true }); -exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; +exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; __w_pdfjs_require__(20); @@ -897,9 +897,6 @@ function isArrayBuffer(v) { function isSpace(ch) { return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; } -function isNodeJS() { - return typeof process === 'object' && process + '' === '[object process]'; -} function createPromiseCapability() { var capability = {}; capability.promise = new Promise(function (resolve, reject) { @@ -1370,7 +1367,6 @@ exports.isEmptyObj = isEmptyObj; exports.isNum = isNum; exports.isString = isString; exports.isSpace = isSpace; -exports.isNodeJS = isNodeJS; exports.isSameOrigin = isSameOrigin; exports.createValidAbsoluteUrl = createValidAbsoluteUrl; exports.isLittleEndian = isLittleEndian; @@ -2805,16 +2801,7 @@ var ColorSpace = function ColorSpaceClosure() { throw new _util.FormatError(`Unknown colorspace name: ${name}`); } }; - ColorSpace.parseToIR = function (cs, xref, res, pdfFunctionFactory) { - if ((0, _primitives.isName)(cs)) { - var colorSpaces = res.get('ColorSpace'); - if ((0, _primitives.isDict)(colorSpaces)) { - var refcs = colorSpaces.get(cs.name); - if (refcs) { - cs = refcs; - } - } - } + ColorSpace.parseToIR = function (cs, xref, res = null, pdfFunctionFactory) { cs = xref.fetchIfRef(cs); if ((0, _primitives.isName)(cs)) { switch (cs.name) { @@ -2830,6 +2817,19 @@ var ColorSpace = function ColorSpaceClosure() { case 'Pattern': return ['PatternCS', null]; default: + if ((0, _primitives.isDict)(res)) { + let colorSpaces = res.get('ColorSpace'); + if ((0, _primitives.isDict)(colorSpaces)) { + let resCS = colorSpaces.get(cs.name); + if (resCS) { + if ((0, _primitives.isName)(resCS)) { + return ColorSpace.parseToIR(resCS, xref, res, pdfFunctionFactory); + } + cs = resCS; + break; + } + } + } throw new _util.FormatError(`unrecognized colorspace ${cs.name}`); } } @@ -20784,8 +20784,8 @@ exports.PostScriptCompiler = PostScriptCompiler; "use strict"; -var pdfjsVersion = '2.0.258'; -var pdfjsBuild = '5a52ee0a'; +var pdfjsVersion = '2.0.274'; +var pdfjsBuild = 'f774abc8'; var pdfjsCoreWorker = __w_pdfjs_require__(19); exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; @@ -20805,8 +20805,14 @@ var _util = __w_pdfjs_require__(0); var _pdf_manager = __w_pdfjs_require__(23); +var _is_node = __w_pdfjs_require__(44); + +var _is_node2 = _interopRequireDefault(_is_node); + var _primitives = __w_pdfjs_require__(1); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var WorkerTask = function WorkerTaskClosure() { function WorkerTask(name) { this.name = name; @@ -20980,7 +20986,7 @@ var WorkerMessageHandler = { var cancelXHRs = null; var WorkerTasks = []; let apiVersion = docParams.apiVersion; - let workerVersion = '2.0.258'; + let workerVersion = '2.0.274'; if (apiVersion !== null && apiVersion !== workerVersion) { throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); } @@ -21357,7 +21363,7 @@ var WorkerMessageHandler = { function isMessagePort(maybePort) { return typeof maybePort.postMessage === 'function' && 'onmessage' in maybePort; } -if (typeof window === 'undefined' && !(0, _util.isNodeJS)() && typeof self !== 'undefined' && isMessagePort(self)) { +if (typeof window === 'undefined' && !(0, _is_node2.default)() && typeof self !== 'undefined' && isMessagePort(self)) { WorkerMessageHandler.initializeFromPort(self); } exports.WorkerTask = WorkerTask; @@ -29023,6 +29029,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { xref: this.xref, res: resources, image, + isInline: inline, pdfFunctionFactory: this.pdfFunctionFactory }); imgData = imageObj.createImageData(true); @@ -29059,6 +29066,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { xref: this.xref, res: resources, image, + isInline: inline, nativeDecoder: nativeImageDecoder, pdfFunctionFactory: this.pdfFunctionFactory }).then(imageObj => { @@ -40305,7 +40313,7 @@ var PDFImage = function PDFImageClosure() { } return dest; } - function PDFImage({ xref, res, image, smask = null, mask = null, isMask = false, pdfFunctionFactory }) { + function PDFImage({ xref, res, image, isInline = false, smask = null, mask = null, isMask = false, pdfFunctionFactory }) { this.image = image; var dict = image.dict; if (dict.has('Filter')) { @@ -40359,7 +40367,8 @@ var PDFImage = function PDFImageClosure() { throw new Error(`JPX images with ${this.numComps} ` + 'color components not supported.'); } } - this.colorSpace = _colorspace.ColorSpace.parse(colorSpace, xref, res, pdfFunctionFactory); + let resources = isInline ? res : null; + this.colorSpace = _colorspace.ColorSpace.parse(colorSpace, xref, resources, pdfFunctionFactory); this.numComps = this.colorSpace.numComps; } this.decode = dict.getArray('Decode', 'D'); @@ -40381,6 +40390,7 @@ var PDFImage = function PDFImageClosure() { xref, res, image: smask, + isInline, pdfFunctionFactory }); } else if (mask) { @@ -40394,6 +40404,7 @@ var PDFImage = function PDFImageClosure() { xref, res, image: mask, + isInline, isMask: true, pdfFunctionFactory }); @@ -40403,7 +40414,7 @@ var PDFImage = function PDFImageClosure() { } } } - PDFImage.buildImage = function ({ handler, xref, res, image, nativeDecoder = null, pdfFunctionFactory }) { + PDFImage.buildImage = function ({ handler, xref, res, image, isInline = false, nativeDecoder = null, pdfFunctionFactory }) { var imagePromise = handleImageData(image, nativeDecoder); var smaskPromise; var maskPromise; @@ -40432,6 +40443,7 @@ var PDFImage = function PDFImageClosure() { xref, res, image: imageData, + isInline, smask: smaskData, mask: maskData, pdfFunctionFactory @@ -40763,6 +40775,17 @@ var PDFImage = function PDFImageClosure() { }(); exports.PDFImage = PDFImage; +/***/ }), +/* 44 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +module.exports = function isNodeJS() { + return typeof process === 'object' && process + '' === '[object process]'; +}; + /***/ }) /******/ ]); }); \ No newline at end of file diff --git a/browser/extensions/pdfjs/content/web/viewer.js b/browser/extensions/pdfjs/content/web/viewer.js index 8ce6f66da42a..4fb7880da273 100644 --- a/browser/extensions/pdfjs/content/web/viewer.js +++ b/browser/extensions/pdfjs/content/web/viewer.js @@ -4481,6 +4481,9 @@ class PDFHistory { } let destination = state.destination; this._updateInternalState(destination, state.uid, true); + if (this._uid > this._maxUid) { + this._maxUid = this._uid; + } if (destination.rotation !== undefined) { this.initialRotation = destination.rotation; } @@ -4685,6 +4688,9 @@ class PDFHistory { } let destination = state.destination; this._updateInternalState(destination, state.uid, true); + if (this._uid > this._maxUid) { + this._maxUid = this._uid; + } if ((0, _ui_utils.isValidRotation)(destination.rotation)) { this.linkService.rotation = destination.rotation; } @@ -4704,7 +4710,7 @@ class PDFHistory { _boundEvents.updateViewarea = this._updateViewarea.bind(this); _boundEvents.popState = this._popState.bind(this); _boundEvents.pageHide = evt => { - if (!this._destination) { + if (!this._destination || this._destination.temporary) { this._tryPushCurrentPosition(); } }; From 67b4ae20e831a7888729690eebe58bdc7c006d5a Mon Sep 17 00:00:00 2001 From: "Dragana Damjanovic dd.mozilla@gmail.com" Date: Wed, 17 Jan 2018 06:58:00 +0200 Subject: [PATCH 35/47] Bug 1425097 - We do not to close h2 connection in case one stream gets 425. r=mcmanus --HG-- extra : rebase_source : 68ee6e8b59821adc13a5fb6077af28c32e16c338 --- netwerk/protocol/http/nsHttpTransaction.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index 326f463233ff..3bc733cd2485 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -1665,6 +1665,9 @@ nsHttpTransaction::HandleContentStart() if ((mEarlyDataDisposition == EARLY_425) && !mDoNotTryEarlyData) { mDoNotTryEarlyData = true; mForceRestart = true; // force restart has built in loop protection + if (mConnection->Version() == HTTP_VERSION_2) { + mReuseOnRestart = true; + } return NS_ERROR_NET_RESET; } break; From 0b2d0cc55f3c665f0d69939b90b5584d4dac69ae Mon Sep 17 00:00:00 2001 From: Nika Layzell Date: Fri, 12 Jan 2018 18:15:43 -0500 Subject: [PATCH 36/47] Bug 1430306 - Continue recording the sync IPC telemetry, and update my email, r=rweiss MozReview-Commit-ID: JxaU4edkcdL --- toolkit/components/telemetry/Histograms.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 6c70124e68f5..6ff25d0e166c 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -12138,7 +12138,7 @@ }, "PERMISSIONS_REMIGRATION_COMPARISON": { "record_in_processes": ["main", "content"], - "alert_emails": ["michael@thelayzells.com"], + "alert_emails": ["nika@thelayzells.com"], "expires_in_version": "44", "kind": "enumerated", "n_values": 10, @@ -12146,7 +12146,7 @@ }, "PERMISSIONS_MIGRATION_7_ERROR": { "record_in_processes": ["main", "content"], - "alert_emails": ["michael@thelayzells.com"], + "alert_emails": ["nika@thelayzells.com"], "expires_in_version": "44", "kind": "boolean", "description": "Was there an error while performing the v7 permissions DB migration?" @@ -13217,9 +13217,9 @@ }, "IPC_SYNC_MESSAGE_MANAGER_LATENCY_MS": { "record_in_processes": ["main", "content"], - "alert_emails": ["michael@thelayzells.com"], + "alert_emails": ["nika@thelayzells.com"], "bug_numbers": [1348113], - "expires_in_version": "60", + "expires_in_version": "70", "kind": "exponential", "low": 32, "high": 750, @@ -13541,9 +13541,9 @@ }, "IPC_SYNC_RECEIVE_MS": { "record_in_processes": ["main", "content", "gpu"], - "alert_emails": ["michael@thelayzells.com"], + "alert_emails": ["nika@thelayzells.com"], "bug_numbers": [1365719], - "expires_in_version": "60", + "expires_in_version": "70", "kind": "exponential", "low": 32, "high": 750, @@ -13651,9 +13651,9 @@ }, "NOTIFY_OBSERVERS_LATENCY_MS": { "record_in_processes": ["main", "content", "gpu"], - "alert_emails": ["michael@thelayzells.com"], + "alert_emails": ["nika@thelayzells.com"], "bug_numbers": [1368524], - "expires_in_version": "60", + "expires_in_version": "70", "kind": "exponential", "low": 3, "high": 512, From 245134e169bacc06afaf53e075f79331f7a8676c Mon Sep 17 00:00:00 2001 From: Heiher Date: Wed, 17 Jan 2018 23:17:28 +0800 Subject: [PATCH 37/47] Bug 1430745 - IPC: Fix unaligned accesses in DirReaderLinux. r=froydnj --- ipc/chromium/src/base/dir_reader_linux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- ipc/chromium/src/base/dir_reader_linux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipc/chromium/src/base/dir_reader_linux.h b/ipc/chromium/src/base/dir_reader_linux.h index 530fe2e01524..e0466fc4c92c 100644 --- a/ipc/chromium/src/base/dir_reader_linux.h +++ b/ipc/chromium/src/base/dir_reader_linux.h @@ -90,7 +90,10 @@ class DirReaderLinux { private: const int fd_; - unsigned char buf_[512]; + union { + linux_dirent dirent_; + unsigned char buf_[512]; + }; size_t offset_, size_; DISALLOW_COPY_AND_ASSIGN(DirReaderLinux); From 6193e706670b1b5d12a8e80786c7a5da6248b7fe Mon Sep 17 00:00:00 2001 From: "qiaopengcheng-hf@loongson.cn" Date: Mon, 15 Jan 2018 09:59:11 +0800 Subject: [PATCH 38/47] Bug 1429650 - mips64-linux PrepareAndDispatch float-formate data error when running xpcshell-test js/xpconnect/tests/unit/test_attribute.js and test_params.js r=froydnj --- xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp | 2 ++ xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp b/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp index 1dd54f96f560..f6f7245fc8bc 100644 --- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp +++ b/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp @@ -90,6 +90,8 @@ invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, *d++ = s->val.u64; break; case nsXPTType::T_FLOAT: + // the float data formate must not be converted! + // Just only copy without conversion. if (i < N_ARG_REGS) *(float*)®s[i] = s->val.f; else diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp index a4b5539406fc..ea625306ed0e 100644 --- a/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp +++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp @@ -125,10 +125,12 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, break; case nsXPTType::T_FLOAT: + // the float data formate must not be converted! + // Just only copy without conversion. if (iCount < PARAM_FPR_COUNT) - dp->val.f = (double)fprData[iCount++]; + dp->val.f = *(float*)&fprData[iCount++]; else - dp->val.f = *((double*)ap++); + dp->val.f = *((float*)ap++); break; case nsXPTType::T_DOUBLE: From f0fa7217bd30d776aa521e41af5cdd6b4823f33d Mon Sep 17 00:00:00 2001 From: Narcis Beleuzu Date: Wed, 17 Jan 2018 17:52:13 +0200 Subject: [PATCH 39/47] Backed out changeset 056265a8a2ff (bug 1431105) for devtools failures on browser_webconsole_check_stubs_console_api.js. on a CLOSED TREE --- dom/console/Console.cpp | 9 ++++----- dom/console/Console.h | 2 +- dom/console/ConsoleInstance.cpp | 2 +- dom/console/tests/test_jsm.xul | 3 --- dom/webidl/Console.webidl | 1 - 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index 4e60a0b139ab..6abeea731a84 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -1537,7 +1537,6 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx, event.mConsoleID = mConsoleID; event.mLevel = aData->mMethodString; event.mFilename = frame.mFilename; - event.mPrefix = mPrefix; nsCOMPtr filenameURI; nsAutoCString pass; @@ -2603,8 +2602,8 @@ Console::MaybeExecuteDumpFunction(JSContext* aCx, message.Append(aMethodName); message.AppendLiteral(": "); - if (!mPrefix.IsEmpty()) { - message.Append(mPrefix); + if (!mDumpPrefix.IsEmpty()) { + message.Append(mDumpPrefix); message.AppendLiteral(": "); } @@ -2641,8 +2640,8 @@ Console::MaybeExecuteDumpFunctionForTrace(JSContext* aCx, nsIStackFrame* aStack) nsAutoString message; message.AssignLiteral("console.trace:\n"); - if (!mPrefix.IsEmpty()) { - message.Append(mPrefix); + if (!mDumpPrefix.IsEmpty()) { + message.Append(mDumpPrefix); message.AppendLiteral(": "); } diff --git a/dom/console/Console.h b/dom/console/Console.h index 6bddeecb6879..0f06c4fa469b 100644 --- a/dom/console/Console.h +++ b/dom/console/Console.h @@ -444,7 +444,7 @@ private: nsString mPassedInnerID; RefPtr mDumpFunction; bool mDumpToStdout; - nsString mPrefix; + nsString mDumpPrefix; bool mChromeInstance; ConsoleLogLevel mMaxLogLevel; diff --git a/dom/console/ConsoleInstance.cpp b/dom/console/ConsoleInstance.cpp index 91984b6362af..dba879d24c11 100644 --- a/dom/console/ConsoleInstance.cpp +++ b/dom/console/ConsoleInstance.cpp @@ -79,7 +79,7 @@ ConsoleInstance::ConsoleInstance(const ConsoleInstanceOptions& aOptions) mConsole->mDumpToStdout = true; } - mConsole->mPrefix = aOptions.mPrefix; + mConsole->mDumpPrefix = aOptions.mPrefix; // Let's inform that this is a custom instance. mConsole->mChromeInstance = true; diff --git a/dom/console/tests/test_jsm.xul b/dom/console/tests/test_jsm.xul index 35743912c30d..a4393bccdf82 100644 --- a/dom/console/tests/test_jsm.xul +++ b/dom/console/tests/test_jsm.xul @@ -38,7 +38,6 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "", "No consoleID for console API"); - is(obj.prefix, "", "prefix is empty by default"); // We want to see 2 messages from this innerID, the first is generated // by console.log, the second one from createInstance().log(); @@ -47,13 +46,11 @@ consoleListener.prototype = { is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); is(obj.consoleID, "wow", "consoleID is set by consoleInstance"); - is(obj.prefix, "_PREFIX_", "prefix is set by consoleInstance"); ++this.count; } else if (obj.innerID == "LEVEL") { // Nothing special... just we don't want to see 'invisible' messages. is(obj.ID, "jsm", "ID and InnerID are correctly set."); is(obj.arguments[0], "Hello world!", "Message matches"); - is(obj.prefix, "", "prefix is empty by default"); ++this.count; } diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl index 46532be3092e..c95316d21d57 100644 --- a/dom/webidl/Console.webidl +++ b/dom/webidl/Console.webidl @@ -78,7 +78,6 @@ dictionary ConsoleEvent { DOMString groupName = ""; any timer = null; any counter = null; - DOMString prefix = ""; }; // Event for profile operations From 2568dc9ebb61b17367f19a370c076cdbc2997baa Mon Sep 17 00:00:00 2001 From: Cosmin Sabou Date: Wed, 17 Jan 2018 18:32:25 +0200 Subject: [PATCH 40/47] Backed out 11 changesets (bug 1207734) for asserting at layout/painting/nsDisplayList.h:2835 while running mda's dom/media/tests/mochitest/test_getUserMedia_peerIdentity.html on a CLOSED TREE Backed out changeset 4efc37f978d2 (bug 1207734) Backed out changeset a42b83c0d1b4 (bug 1207734) Backed out changeset 5b3dfc8f3031 (bug 1207734) Backed out changeset a4626910ce09 (bug 1207734) Backed out changeset 8991d0468642 (bug 1207734) Backed out changeset 2bc1fdf79e03 (bug 1207734) Backed out changeset 7d5913531948 (bug 1207734) Backed out changeset c6be6571ad12 (bug 1207734) Backed out changeset cfa892d6aa84 (bug 1207734) Backed out changeset 71f635d9a86f (bug 1207734) Backed out changeset 3f27af783ce1 (bug 1207734) --- dom/animation/KeyframeEffectReadOnly.cpp | 6 - dom/ipc/ContentPrefs.cpp | 1 - layout/painting/ActiveLayerTracker.cpp | 5 +- layout/painting/nsDisplayList.cpp | 2 +- layout/style/StyleAnimationValue.cpp | 5 +- layout/style/nsCSSParser.cpp | 5 - layout/style/nsCSSPropList.h | 39 ---- layout/style/nsComputedDOMStyle.cpp | 207 ------------------ layout/style/nsComputedDOMStyle.h | 3 - layout/style/nsComputedDOMStylePropertyList.h | 3 - layout/style/nsStyleStruct.cpp | 134 +++--------- layout/style/nsStyleStruct.h | 31 +-- modules/libpref/init/all.js | 3 - 13 files changed, 37 insertions(+), 407 deletions(-) diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index b137d4cb2919..bc476d8523e5 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -1670,12 +1670,6 @@ KeyframeEffectReadOnly::ShouldBlockAsyncTransformAnimations( } } - // XXX cku temporarily disable async-animation when this frame has any - // individual transforms before bug 1425837 been fixed. - if (aFrame->StyleDisplay()->HasIndividualTransform()) { - return true; - } - return false; } diff --git a/dom/ipc/ContentPrefs.cpp b/dom/ipc/ContentPrefs.cpp index 133061cf5e89..9af730e9c623 100644 --- a/dom/ipc/ContentPrefs.cpp +++ b/dom/ipc/ContentPrefs.cpp @@ -152,7 +152,6 @@ const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = { "layout.css.grid-template-subgrid-value.enabled", "layout.css.grid.enabled", "layout.css.image-orientation.enabled", - "layout.css.individual-transform.enabled", "layout.css.initial-letter.enabled", "layout.css.isolation.enabled", "layout.css.mix-blend-mode.enabled", diff --git a/layout/painting/ActiveLayerTracker.cpp b/layout/painting/ActiveLayerTracker.cpp index dcdd1fb13cc1..ce7561d7c84b 100644 --- a/layout/painting/ActiveLayerTracker.cpp +++ b/layout/painting/ActiveLayerTracker.cpp @@ -248,8 +248,7 @@ static void IncrementScaleRestyleCountIfNeeded(nsIFrame* aFrame, LayerActivity* aActivity) { const nsStyleDisplay* display = aFrame->StyleDisplay(); - RefPtr transformList = display->GetCombinedTransform(); - if (!transformList) { + if (!display->mSpecifiedTransform) { // The transform was removed. aActivity->mPreviousTransformScale = Nothing(); IncrementMutationCount(&aActivity->mRestyleCounts[LayerActivity::ACTIVITY_SCALE]); @@ -262,7 +261,7 @@ IncrementScaleRestyleCountIfNeeded(nsIFrame* aFrame, LayerActivity* aActivity) bool dummyBool; nsStyleTransformMatrix::TransformReferenceBox refBox(aFrame); Matrix4x4 transform = - nsStyleTransformMatrix::ReadTransforms(transformList->mHead, + nsStyleTransformMatrix::ReadTransforms(display->mSpecifiedTransform->mHead, aFrame->StyleContext(), presContext, dummy, refBox, diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 76f9cb865783..0c9149c767d8 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -8100,7 +8100,7 @@ nsDisplayTransform::FrameTransformProperties::FrameTransformProperties(const nsI float aAppUnitsPerPixel, const nsRect* aBoundsOverride) : mFrame(aFrame) - , mTransformList(aFrame->StyleDisplay()->GetCombinedTransform()) + , mTransformList(aFrame->StyleDisplay()->mSpecifiedTransform) , mToTransformOrigin(GetDeltaToTransformOrigin(aFrame, aAppUnitsPerPixel, aBoundsOverride)) { } diff --git a/layout/style/StyleAnimationValue.cpp b/layout/style/StyleAnimationValue.cpp index 41461d3d988f..184a73912b7a 100644 --- a/layout/style/StyleAnimationValue.cpp +++ b/layout/style/StyleAnimationValue.cpp @@ -4636,11 +4636,10 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty, const nsStyleDisplay *display = static_cast(styleStruct); nsAutoPtr result; - RefPtr transformList = display->GetCombinedTransform(); - if (transformList) { + if (display->mSpecifiedTransform) { // Clone, and convert all lengths (not percents) to pixels. nsCSSValueList **resultTail = getter_Transfers(result); - for (const nsCSSValueList *l = transformList->mHead; + for (const nsCSSValueList *l = display->mSpecifiedTransform->mHead; l; l = l->mNext) { nsCSSValueList *clone = new nsCSSValueList; *resultTail = clone; diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index f09bd58f596d..c1d8d5e02ba6 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -11831,11 +11831,6 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSPropertyID aPropID) return ParseWebkitTextStroke(); case eCSSProperty_all: return ParseAll(); - case eCSSProperty_translate: - case eCSSProperty_rotate: - case eCSSProperty_scale: - // These properties aren't implemented in the old style system. - return false; default: MOZ_ASSERT(false, "should not be called"); return false; diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 2accf63bc3ec..5656f7d70c3c 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -3611,19 +3611,6 @@ CSS_PROP_POSITION( nullptr, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Right) -CSS_PROP_DISPLAY( - rotate, - rotate, - Rotate, - CSS_PROPERTY_PARSE_FUNCTION | - CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | - CSS_PROPERTY_CREATES_STACKING_CONTEXT | - CSS_PROPERTY_FIXPOS_CB, - "layout.css.individual-transform.enabled", - 0, - nullptr, - offsetof(nsStyleDisplay, mSpecifiedRotate), - eStyleAnimType_None) CSS_PROP_TEXT( ruby-align, ruby_align, @@ -4253,19 +4240,6 @@ CSS_PROP_TEXT( kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Discrete) -CSS_PROP_DISPLAY( - scale, - scale, - Scale, - CSS_PROPERTY_PARSE_FUNCTION | - CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | - CSS_PROPERTY_CREATES_STACKING_CONTEXT | - CSS_PROPERTY_FIXPOS_CB, - "layout.css.individual-transform.enabled", - 0, - nullptr, - offsetof(nsStyleDisplay, mSpecifiedScale), - eStyleAnimType_None) CSS_PROP_TEXT( text-transform, text_transform, @@ -4438,19 +4412,6 @@ CSS_PROP_DISPLAY( kTransitionTimingFunctionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) -CSS_PROP_DISPLAY( - translate, - translate, - Translate, - CSS_PROPERTY_PARSE_FUNCTION | - CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | - CSS_PROPERTY_CREATES_STACKING_CONTEXT | - CSS_PROPERTY_FIXPOS_CB, - "layout.css.individual-transform.enabled", - 0, - nullptr, - offsetof(nsStyleDisplay, mSpecifiedTranslate), - eStyleAnimType_None) #ifndef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND CSS_PROP_TEXTRESET( unicode-bidi, diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 02636defa534..d63396abefb7 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1735,213 +1735,6 @@ nsComputedDOMStyle::DoGetTransformBox() return val.forget(); } -static already_AddRefed -ReadIndividualTransformValue(nsCSSValueSharedList* aList, - const std::function& aCallback) -{ - if (!aList) { - RefPtr val = new nsROCSSPrimitiveValue; - val->SetIdent(eCSSKeyword_none); - return val.forget(); - } - - nsAutoString result; - const nsCSSValue::Array* data = aList->mHead->mValue.GetArrayValue(); - aCallback(data, result); - - RefPtr val = new nsROCSSPrimitiveValue; - val->SetString(result); - return val.forget(); -} - -already_AddRefed -nsComputedDOMStyle::DoGetTranslate() -{ - typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox; - - RefPtr self(this); - return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedTranslate, - [self](const nsCSSValue::Array* aData, nsString& aResult) { - GeckoStyleContext* contextIfGecko = - self->mStyleContext ? self->mStyleContext->GetAsGecko() : nullptr; - TransformReferenceBox refBox(self->mInnerFrame, nsSize(0, 0)); - RuleNodeCacheConditions dummy; - - // Even though the spec doesn't say to resolve percentage values, Blink - // and Edge do and so until that is clarified we do as well: - // - // https://github.com/w3c/csswg-drafts/issues/2124 - switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { - /* translate : */ - case eCSSKeyword_translatex: { - NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); - float tx = ProcessTranslatePart(aData->Item(1), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - &TransformReferenceBox::Width); - aResult.AppendFloat(tx); - aResult.AppendLiteral("px"); - break; - } - /* translate : */ - case eCSSKeyword_translate: { - NS_PRECONDITION(aData->Count() == 3, "Invalid array!"); - float tx = ProcessTranslatePart(aData->Item(1), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - &TransformReferenceBox::Width); - aResult.AppendFloat(tx); - aResult.AppendLiteral("px"); - - float ty = ProcessTranslatePart(aData->Item(2), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - &TransformReferenceBox::Height); - if (ty != 0) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(ty); - aResult.AppendLiteral("px"); - } - break; - } - /* translate : */ - case eCSSKeyword_translate3d: { - NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); - float tx = ProcessTranslatePart(aData->Item(1), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - &TransformReferenceBox::Width); - aResult.AppendFloat(tx); - aResult.AppendLiteral("px"); - - float ty = ProcessTranslatePart(aData->Item(2), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - &TransformReferenceBox::Height); - - float tz = ProcessTranslatePart(aData->Item(3), - contextIfGecko, - self->mStyleContext->PresContext(), - dummy, - &refBox, - nullptr); - if (ty != 0. || tz != 0.) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(ty); - aResult.AppendLiteral("px"); - } - if (tz != 0.) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(tz); - aResult.AppendLiteral("px"); - } - - break; - } - default: - MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); - } - }); -} - -already_AddRefed -nsComputedDOMStyle::DoGetScale() -{ - return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedScale, - [](const nsCSSValue::Array* aData, nsString& aResult) { - switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { - /* scale : */ - case eCSSKeyword_scalex: - NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); - aResult.AppendFloat(aData->Item(1).GetFloatValue()); - break; - /* scale : */ - case eCSSKeyword_scale: { - NS_PRECONDITION(aData->Count() == 3, "Invalid array!"); - aResult.AppendFloat(aData->Item(1).GetFloatValue()); - - float sy = aData->Item(2).GetFloatValue(); - if (sy != 1.) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(sy); - } - break; - } - /* scale : */ - case eCSSKeyword_scale3d: { - NS_PRECONDITION(aData->Count() == 4, "Invalid array!"); - aResult.AppendFloat(aData->Item(1).GetFloatValue()); - - float sy = aData->Item(2).GetFloatValue(); - float sz = aData->Item(3).GetFloatValue(); - - if (sy != 1. || sz != 1.) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(sy); - } - if (sz != 1.) { - aResult.AppendLiteral(" "); - aResult.AppendFloat(sz); - } - break; - } - default: - MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); - } - }); -} - -already_AddRefed -nsComputedDOMStyle::DoGetRotate() -{ - return ReadIndividualTransformValue(StyleDisplay()->mSpecifiedRotate, - [](const nsCSSValue::Array* aData, nsString& aResult) { - - switch (nsStyleTransformMatrix::TransformFunctionOf(aData)) { - /* rotate : */ - case eCSSKeyword_rotate: { - NS_PRECONDITION(aData->Count() == 2, "Invalid array!"); - double theta = aData->Item(1).GetAngleValueInDegrees(); - aResult.AppendFloat(theta); - aResult.AppendLiteral("deg"); - break; - } - /* rotate : */ - case eCSSKeyword_rotate3d: { - NS_PRECONDITION(aData->Count() == 5, "Invalid array!"); - float rx = aData->Item(1).GetFloatValue(); - float ry = aData->Item(2).GetFloatValue(); - float rz = aData->Item(3).GetFloatValue(); - if (rx != 0. || ry != 0. || rz != 1.) { - aResult.AppendFloat(rx); - aResult.AppendLiteral(" "); - aResult.AppendFloat(ry); - aResult.AppendLiteral(" "); - aResult.AppendFloat(rz); - aResult.AppendLiteral(" "); - } - double theta = aData->Item(4).GetAngleValueInDegrees(); - aResult.AppendFloat(theta); - aResult.AppendLiteral("deg"); - break; - } - default: - MOZ_ASSERT_UNREACHABLE("Unexpected CSS keyword."); - } - }); -} - /* static */ already_AddRefed nsComputedDOMStyle::MatrixToCSSValue(const mozilla::gfx::Matrix4x4& matrix) { diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index eaf488d0f9fd..6b324c10ae77 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -515,9 +515,6 @@ private: already_AddRefed DoGetPageBreakInside(); already_AddRefed DoGetTouchAction(); already_AddRefed DoGetTransform(); - already_AddRefed DoGetTranslate(); - already_AddRefed DoGetRotate(); - already_AddRefed DoGetScale(); already_AddRefed DoGetTransformBox(); already_AddRefed DoGetTransformOrigin(); already_AddRefed DoGetPerspective(); diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index 330d5f578cfe..be0f2c67d656 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -222,10 +222,8 @@ COMPUTED_STYLE_PROP(position, Position) COMPUTED_STYLE_PROP(quotes, Quotes) COMPUTED_STYLE_PROP(resize, Resize) COMPUTED_STYLE_PROP(right, Right) -COMPUTED_STYLE_PROP(rotate, Rotate) COMPUTED_STYLE_PROP(ruby_align, RubyAlign) COMPUTED_STYLE_PROP(ruby_position, RubyPosition) -COMPUTED_STYLE_PROP(scale, Scale) COMPUTED_STYLE_PROP(scroll_behavior, ScrollBehavior) COMPUTED_STYLE_PROP(scroll_snap_coordinate, ScrollSnapCoordinate) COMPUTED_STYLE_PROP(scroll_snap_destination, ScrollSnapDestination) @@ -265,7 +263,6 @@ COMPUTED_STYLE_PROP(transition_delay, TransitionDelay) COMPUTED_STYLE_PROP(transition_duration, TransitionDuration) COMPUTED_STYLE_PROP(transition_property, TransitionProperty) COMPUTED_STYLE_PROP(transition_timing_function, TransitionTimingFunction) -COMPUTED_STYLE_PROP(translate, Translate) COMPUTED_STYLE_PROP(unicode_bidi, UnicodeBidi) COMPUTED_STYLE_PROP(vertical_align, VerticalAlign) COMPUTED_STYLE_PROP(visibility, Visibility) diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index d19577e9f9d3..426d4bd194d9 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3596,6 +3596,7 @@ nsStyleDisplay::nsStyleDisplay(const nsPresContext* aContext) , mBackfaceVisibility(NS_STYLE_BACKFACE_VISIBILITY_VISIBLE) , mTransformStyle(NS_STYLE_TRANSFORM_STYLE_FLAT) , mTransformBox(StyleGeometryBox::BorderBox) + , mSpecifiedTransform(nullptr) , mTransformOrigin{ {0.5f, eStyleUnit_Percent}, // Transform is centered on origin {0.5f, eStyleUnit_Percent}, {0, nsStyleCoord::CoordConstructor} } @@ -3664,10 +3665,6 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) , mTransformStyle(aSource.mTransformStyle) , mTransformBox(aSource.mTransformBox) , mSpecifiedTransform(aSource.mSpecifiedTransform) - , mSpecifiedRotate(aSource.mSpecifiedRotate) - , mSpecifiedTranslate(aSource.mSpecifiedTranslate) - , mSpecifiedScale(aSource.mSpecifiedScale) - , mCombinedTransform(aSource.mCombinedTransform) , mTransformOrigin{ aSource.mTransformOrigin[0], aSource.mTransformOrigin[1], aSource.mTransformOrigin[2] } @@ -3695,16 +3692,13 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) MOZ_COUNT_CTOR(nsStyleDisplay); } - -static -void ReleaseSharedListOnMainThread(const char* aName, - RefPtr& aList) +nsStyleDisplay::~nsStyleDisplay() { // We don't allow releasing nsCSSValues with refcounted data in the Servo // traversal, since the refcounts aren't threadsafe. Since Servo may trigger // the deallocation of style structs during styling, we need to handle it // here. - if (aList && ServoStyleSet::IsInServoTraversal()) { + if (mSpecifiedTransform && ServoStyleSet::IsInServoTraversal()) { // The default behavior of NS_ReleaseOnMainThreadSystemGroup is to only // proxy the release if we're not already on the main thread. This is a nice // optimization for the cases we happen to be doing a sequential traversal @@ -3717,22 +3711,10 @@ void ReleaseSharedListOnMainThread(const char* aName, #else false; #endif - NS_ReleaseOnMainThreadSystemGroup(aName, aList.forget(), alwaysProxy); + NS_ReleaseOnMainThreadSystemGroup( + "nsStyleDisplay::mSpecifiedTransform", + mSpecifiedTransform.forget(), alwaysProxy); } -} - -nsStyleDisplay::~nsStyleDisplay() -{ - ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedTransform", - mSpecifiedTransform); - ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedRotate", - mSpecifiedRotate); - ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedTranslate", - mSpecifiedTranslate); - ReleaseSharedListOnMainThread("nsStyleDisplay::mSpecifiedScale", - mSpecifiedScale); - ReleaseSharedListOnMainThread("nsStyleDisplay::mCombinedTransform", - mCombinedTransform); MOZ_COUNT_DTOR(nsStyleDisplay); } @@ -3749,25 +3731,6 @@ nsStyleDisplay::FinishStyle(nsPresContext* aPresContext) shapeImage->ResolveImage(aPresContext); } } - - GenerateCombinedTransform(); -} - -static inline nsChangeHint -CompareTransformValues(const RefPtr& aList, - const RefPtr& aNewList) -{ - nsChangeHint result = nsChangeHint(0); - if (!aList != !aNewList || (aList && *aList != *aNewList)) { - result |= nsChangeHint_UpdateTransformLayer; - if (aList && aNewList) { - result |= nsChangeHint_UpdatePostTransformOverflow; - } else { - result |= nsChangeHint_UpdateOverflow; - } - } - - return result; } nsChangeHint @@ -3898,14 +3861,18 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const */ nsChangeHint transformHint = nsChangeHint(0); - transformHint |= CompareTransformValues(mSpecifiedTransform, - aNewData.mSpecifiedTransform); - transformHint |= CompareTransformValues(mSpecifiedRotate, aNewData. - mSpecifiedRotate); - transformHint |= CompareTransformValues(mSpecifiedTranslate, - aNewData.mSpecifiedTranslate); - transformHint |= CompareTransformValues(mSpecifiedScale, - aNewData.mSpecifiedScale); + if (!mSpecifiedTransform != !aNewData.mSpecifiedTransform || + (mSpecifiedTransform && + *mSpecifiedTransform != *aNewData.mSpecifiedTransform)) { + transformHint |= nsChangeHint_UpdateTransformLayer; + + if (mSpecifiedTransform && + aNewData.mSpecifiedTransform) { + transformHint |= nsChangeHint_UpdatePostTransformOverflow; + } else { + transformHint |= nsChangeHint_UpdateOverflow; + } + } const nsChangeHint kUpdateOverflowAndRepaintHint = nsChangeHint_UpdateOverflow | nsChangeHint_RepaintFrame; @@ -4020,57 +3987,6 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const return hint; } -void -nsStyleDisplay::GenerateCombinedTransform() -{ - mCombinedTransform = nullptr; - - // Follow the order defined in the spec to append transform functions. - // https://drafts.csswg.org/css-transforms-2/#ctm - AutoTArray shareLists; - if (mSpecifiedTranslate) { - shareLists.AppendElement(mSpecifiedTranslate.get()); - } - if (mSpecifiedRotate) { - shareLists.AppendElement(mSpecifiedRotate.get()); - } - if (mSpecifiedScale) { - shareLists.AppendElement(mSpecifiedScale.get()); - } - if (mSpecifiedTransform) { - shareLists.AppendElement(mSpecifiedTransform.get()); - } - - if (shareLists.Length() == 0) { - return; - } - - if (shareLists.Length() == 1) { - mCombinedTransform = shareLists[0]; - return; - } - - // In common, we may have 3 transform functions(for rotate, translate and - // scale) in mSpecifiedTransform, one rotate function in mSpecifiedRotate, - // one translate function in mSpecifiedTranslate, and one scale function in - // mSpecifiedScale. So 6 slots are enough for the most cases. - AutoTArray valueLists; - for (auto list: shareLists) { - if (list) { - valueLists.AppendElement(list->mHead->Clone()); - } - } - - // Check we have at least one list or else valueLists.Length() - 1 below will - // underflow. - MOZ_ASSERT(valueLists.Length()); - - for (uint32_t i = 0; i < valueLists.Length() - 1; i++) { - valueLists[i]->mNext = valueLists[i + 1]; - } - - mCombinedTransform = new nsCSSValueSharedList(valueLists[0]); -} // -------------------- // nsStyleVisibility // @@ -4728,8 +4644,18 @@ nsStyleUIReset::~nsStyleUIReset() { MOZ_COUNT_DTOR(nsStyleUIReset); - ReleaseSharedListOnMainThread("nsStyleUIReset::mSpecifiedWindowTransform", - mSpecifiedWindowTransform); + // See the nsStyleDisplay destructor for why we're doing this. + if (mSpecifiedWindowTransform && ServoStyleSet::IsInServoTraversal()) { + bool alwaysProxy = +#ifdef DEBUG + true; +#else + false; +#endif + NS_ReleaseOnMainThreadSystemGroup( + "nsStyleUIReset::mSpecifiedWindowTransform", + mSpecifiedWindowTransform.forget(), alwaysProxy); + } } nsChangeHint diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 0643d8e82c71..0ef67b5c84b0 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2590,16 +2590,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay uint8_t mTransformStyle; StyleGeometryBox mTransformBox; // [reset] see nsStyleConsts.h RefPtr mSpecifiedTransform; // [reset] - RefPtr mSpecifiedRotate; // [reset] - RefPtr mSpecifiedTranslate; // [reset] - RefPtr mSpecifiedScale; // [reset] - - // Used to store the final combination of mSpecifiedTranslate, - // mSpecifiedRotate, mSpecifiedScale and mSpecifiedTransform. - // Use GetCombinedTransform() to get the final transform, instead of - // accessing mCombinedTransform directly. - RefPtr mCombinedTransform; - nsStyleCoord mTransformOrigin[3]; // [reset] percent, coord, calc, 3rd param is coord, calc only nsStyleCoord mChildPerspective; // [reset] none, coord nsStyleCoord mPerspectiveOrigin[2]; // [reset] percent, coord, calc @@ -2797,16 +2787,11 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay /* Returns whether the element has the -moz-transform property * or a related property. */ bool HasTransformStyle() const { - return mSpecifiedTransform || mSpecifiedRotate || mSpecifiedTranslate || - mSpecifiedScale || + return mSpecifiedTransform != nullptr || mTransformStyle == NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D || (mWillChangeBitField & NS_STYLE_WILL_CHANGE_TRANSFORM); } - bool HasIndividualTransform() const { - return mSpecifiedRotate || mSpecifiedTranslate || mSpecifiedScale; - } - bool HasPerspectiveStyle() const { return mChildPerspective.GetUnit() == eStyleUnit_Coord; } @@ -2871,18 +2856,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay inline bool IsFixedPosContainingBlockForAppropriateFrame( StyleContextLike* aStyleContext) const; - /** - * Returns the final combined transform. - **/ - already_AddRefed GetCombinedTransform() const { - if (mCombinedTransform) { - return do_AddRef(mCombinedTransform); - } - - // backward compatible to gecko-backed style system. - return mSpecifiedTransform ? do_AddRef(mSpecifiedTransform) : nullptr; - } - private: // Helpers for above functions, which do some but not all of the tests // for them (since transform must be tested separately for each). @@ -2892,7 +2865,7 @@ private: template inline bool HasFixedPosContainingBlockStyleInternal( StyleContextLike* aStyleContext) const; - void GenerateCombinedTransform(); + public: // Return the 'float' and 'clear' properties, with inline-{start,end} values // resolved to {left,right} according to the given writing mode. These are diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index cc9993d00de6..b13d67828fa0 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2920,9 +2920,6 @@ pref("layout.css.dpi", -1); // of a CSS "px". This is only used for windows on the screen, not for printing. pref("layout.css.devPixelsPerPx", "-1.0"); -// Is support for CSS individual transform enabled? -pref("layout.css.individual-transform.enabled", false); - // Is support for CSS initial-letter property enabled? pref("layout.css.initial-letter.enabled", false); From 866b3991062bb3fae0ad2b70fc2d92c79111ef2c Mon Sep 17 00:00:00 2001 From: ffxbld Date: Wed, 17 Jan 2018 11:37:00 -0800 Subject: [PATCH 41/47] No bug, Automated HSTS preload list update from host bld-linux64-spot-324 - a=hsts-update --- security/manager/ssl/nsSTSPreloadList.errors | 251 ++++++++++--------- security/manager/ssl/nsSTSPreloadList.inc | 82 +++--- 2 files changed, 167 insertions(+), 166 deletions(-) diff --git a/security/manager/ssl/nsSTSPreloadList.errors b/security/manager/ssl/nsSTSPreloadList.errors index 31a92cb1f6e9..5bd888c25d07 100644 --- a/security/manager/ssl/nsSTSPreloadList.errors +++ b/security/manager/ssl/nsSTSPreloadList.errors @@ -49,6 +49,7 @@ accwing.com: could not connect to host acg.sb: could not connect to host acgaudio.com: could not connect to host achterhoekseveiligheidsbeurs.nl: could not connect to host +acpinformatique.fr: could not connect to host acrossgw.com: could not connect to host adamdixon.co.uk: could not connect to host adec-emsa.ae: could not connect to host @@ -77,7 +78,6 @@ alilialili.ga: could not connect to host alldm.ru: could not connect to host allscammers.exposed: could not connect to host altahrim.net: could not connect to host -alwaysdry.com.au: could not connect to host amdouglas.uk: could not connect to host ameho.me: could not connect to host americandistribuidora.com: could not connect to host @@ -104,11 +104,10 @@ anttitenhunen.com: could not connect to host anyways.at: could not connect to host aojiao.org: could not connect to host apkoyunlar.club: could not connect to host +apmpproject.org: could not connect to host apparels24.com: could not connect to host appdrinks.com: could not connect to host apple.ax: could not connect to host -aquitainebrasserie.com.au: could not connect to host -arbitrarion.com: could not connect to host area3.org: could not connect to host arenlor.com: could not connect to host arenlor.info: could not connect to host @@ -151,7 +150,6 @@ avonlearningcampus.com: could not connect to host awan.tech: could not connect to host awf0.xyz: could not connect to host axel-fischer.science: could not connect to host -azabani.com: could not connect to host b8a.me: could not connect to host babelfisch.eu: could not connect to host bad.pet: could not connect to host @@ -167,6 +165,7 @@ batfoundry.com: could not connect to host bbb1991.me: could not connect to host bbdos.ru: could not connect to host bbka.org.uk: could not connect to host +bbnx.net: could not connect to host bdsmxxxpics.com: could not connect to host bdvg.org: could not connect to host beamitapp.com: could not connect to host @@ -212,6 +211,7 @@ blinkenlight.co.uk: could not connect to host blinkenlight.com.au: could not connect to host blog.gparent.org: could not connect to host blokuhaka.fr: could not connect to host +bluepearl.tk: could not connect to host blumen-garage.de: could not connect to host bm-i.ch: could not connect to host bodrumfarm.com: could not connect to host @@ -240,7 +240,6 @@ bsalyzer.com: could not connect to host bsktweetup.info: could not connect to host bslim-e-boutique.com: could not connect to host bsuess.de: could not connect to host -budgetlovers.nl: could not connect to host bugginslab.co.uk: could not connect to host bugsmashed.com: could not connect to host buka.jp: could not connect to host @@ -253,8 +252,10 @@ buyshoe.org: could not connect to host bvexplained.co.uk: could not connect to host by1898.com: could not connect to host byji.com: could not connect to host +bynet.cz: could not connect to host bypass.kr: could not connect to host byteshift.ca: could not connect to host +cachetagalong.com: could not connect to host cafesg.net: could not connect to host caipai.fm: could not connect to host calculatoaresecondhand.xyz: could not connect to host @@ -270,6 +271,8 @@ cardse.net: could not connect to host carloshmm.stream: could not connect to host carlovanwyk.com: could not connect to host casinoreal.com: could not connect to host +casjay.com: could not connect to host +casjay.info: could not connect to host catsmagic.pp.ua: could not connect to host caughtredhanded.co.nz: could not connect to host cctld.com: could not connect to host @@ -299,13 +302,10 @@ christianhoffmann.info: could not connect to host christophersole.com: could not connect to host chromaryu.net: could not connect to host chziyue.com: could not connect to host -cinemysticism.com: could not connect to host cipher.land: could not connect to host citywalkr.com: could not connect to host cjr.host: could not connect to host cjtkfan.club: could not connect to host -claytonstowing.com.au: could not connect to host -cleanbeautymarket.com.au: could not connect to host clearchatsandbox.com: could not connect to host clearviewwealthprojector.com.au: could not connect to host clintonbloodworth.com: could not connect to host @@ -329,7 +329,6 @@ cogumelosmagicos.org: could not connect to host colleencornez.com: could not connect to host collins.kg: could not connect to host combatshield.cz: could not connect to host -cometonovascotia.ca: could not connect to host complt.xyz: could not connect to host comprehensiveihc.com: could not connect to host conception.sk: could not connect to host @@ -342,7 +341,6 @@ corinnanese.de: could not connect to host correct.horse: could not connect to host corsa-b.uk: could not connect to host cosmeticosdelivery.com.br: could not connect to host -cosni.co: could not connect to host cosplayer.com: could not connect to host coumoul.fr: could not connect to host cpaneltips.com: could not connect to host @@ -386,8 +384,6 @@ davidscherzer.at: could not connect to host davidstuff.net: could not connect to host davros.eu: could not connect to host davros.ru: could not connect to host -dawnson.is: could not connect to host -day.vip: could not connect to host days.one: could not connect to host dbcom.ru: could not connect to host dbox.ga: could not connect to host @@ -398,7 +394,6 @@ de-servers.de: could not connect to host decoyrouting.com: could not connect to host dedietrich-asia.com: could not connect to host deepcreampie.com: could not connect to host -deepsouthsounds.com: could not connect to host deloittequant.com: could not connect to host derchris.me: could not connect to host derivativeshub.pro: could not connect to host @@ -408,7 +403,6 @@ detecte-fuite.ch: could not connect to host detecte.ch: could not connect to host detectefuite.ch: could not connect to host dev-talk.eu: could not connect to host -devafterdark.com: could not connect to host devcu.net: could not connect to host developersclub.website: could not connect to host deviltraxxx.de: could not connect to host @@ -428,6 +422,7 @@ digioccumss.ddns.net: could not connect to host digitalhurricane.io: could not connect to host diguass.us: could not connect to host dijks.com: could not connect to host +dimonb.com: could not connect to host dirtycat.ru: could not connect to host disability.gov: could not connect to host disadattamentolavorativo.it: could not connect to host @@ -438,6 +433,7 @@ ditch.ch: could not connect to host dixmag.com: could not connect to host dlouwrink.nl: could not connect to host dlyl888.com: could not connect to host +dm4productions.com: could not connect to host dnscrypt.org: could not connect to host dobrisan.ro: could not connect to host dogcratereview.info: could not connect to host @@ -468,16 +464,15 @@ dubrovskiy.net: could not connect to host dubrovskiy.pro: could not connect to host duch.cloud: could not connect to host duelsow.eu: could not connect to host -duesee.org: could not connect to host duks.com.br: could not connect to host duo.money: could not connect to host durangoenergyllc.com: could not connect to host dwnld.me: could not connect to host -dyn.im: could not connect to host e-mak.eu: could not connect to host e-wishlist.net: could not connect to host eatfitoutlet.com.br: could not connect to host eatry.io: could not connect to host +ebonyriddle.com: could not connect to host ectora.com: could not connect to host edgecustomersportal.com: could not connect to host eduif.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] @@ -495,6 +490,8 @@ elisabeth-strunz.de: could not connect to host elonbase.com: could not connect to host elsword.moe: could not connect to host eltransportquevolem.org: could not connect to host +embellir-aroma.com: could not connect to host +embellir-kyujin.com: could not connect to host emilyjohnson.ga: could not connect to host emrenovation.com: could not connect to host endspamwith.us: could not connect to host @@ -506,6 +503,7 @@ erspro.net: could not connect to host erwinwensveen.nl: could not connect to host ethiobaba.com: could not connect to host euexia.fr: could not connect to host +eugenekay.com: could not connect to host eurostrategy.vn.ua: could not connect to host ev-zertifikate.de: could not connect to host evankurniawan.com: could not connect to host @@ -513,12 +511,12 @@ eveshaiwu.com: could not connect to host evileden.com: could not connect to host exceptionalservices.us: could not connect to host exo.do: could not connect to host +extensiblewebreportcard.org: could not connect to host exteriorservices.io: could not connect to host eytosh.net: could not connect to host f8842.com: could not connect to host faber.org.ru: could not connect to host fabian-kluge.de: could not connect to host -fabrysociety.org: could not connect to host facebook.ax: could not connect to host facilitrak.com: could not connect to host factureenlinea.com: could not connect to host @@ -540,7 +538,6 @@ feedstringer.com: could not connect to host feirlane.org: could not connect to host feist.io: could not connect to host fengyadi.com: could not connect to host -fensterbau-mutscheller.de: could not connect to host feras-alhajjaji.com: could not connect to host fetclips.se: could not connect to host ficklenote.net: could not connect to host @@ -559,12 +556,10 @@ fix-the-timeline.org: could not connect to host fixmyglitch.com: could not connect to host fixthetimeline.com: could not connect to host fixthetimeline.org: could not connect to host -flopy.club: could not connect to host flow.su: could not connect to host flugplatz-edvc.de: could not connect to host flygpost.com: could not connect to host flyingdoggy.net: could not connect to host -flyss.net: could not connect to host focalforest.com: could not connect to host folioapp.io: could not connect to host forcamp.ga: could not connect to host @@ -586,7 +581,6 @@ fredtec.ru: could not connect to host freejidi.com: could not connect to host freelansir.com: could not connect to host freeshkre.li: could not connect to host -freesounding.ru: could not connect to host freshcode.nl: could not connect to host frickenate.com: could not connect to host friedhelm-wolf.de: could not connect to host @@ -610,6 +604,7 @@ fun99.cc: could not connect to host funksteckdosen24.de: could not connect to host funspins.com: could not connect to host futos.de: could not connect to host +fuzoku-sodan.com: could not connect to host fyol.pw: could not connect to host g1jeu.com: could not connect to host g4w.co: could not connect to host @@ -656,8 +651,10 @@ getwarden.net: could not connect to host gevaulug.fr: could not connect to host gfoss.gr: could not connect to host gglks.com: could not connect to host +ggrks-asano.com: could not connect to host ggss.cf: could not connect to host gifzilla.net: could not connect to host +gigiscloud.servebeer.com: could not connect to host gina-architektur.design: could not connect to host git.co: could not connect to host glasner.photo: could not connect to host @@ -697,6 +694,7 @@ habeo.si: could not connect to host hakugin.me: could not connect to host halcyonsbastion.com: could not connect to host halkyon.net: could not connect to host +hamu.blue: could not connect to host hang333.pw: could not connect to host hapijs.cn: could not connect to host harmfarm.nl: could not connect to host @@ -713,7 +711,6 @@ healthyandnaturalliving.com: could not connect to host hearingshofar.com: could not connect to host hearty.ink: could not connect to host heavenlysmokenc.com: could not connect to host -hedgeschool.ie: could not connect to host heisenberg.co: could not connect to host hejahanif.se: could not connect to host hejsupport.se: could not connect to host @@ -743,6 +740,7 @@ holidayincotswolds.co.uk: could not connect to host homoglyph.net: could not connect to host hoodoo.io: could not connect to host hoodoo.tech: could not connect to host +hopesb.org: could not connect to host horvathd.eu: could not connect to host hosted-oswa.org: could not connect to host hotelmadhuwanvihar.com: could not connect to host @@ -809,6 +807,7 @@ its-schindler.de: could not connect to host itsatrap.nl: could not connect to host ivanilla.org: could not connect to host ivanpolchenko.com: could not connect to host +iwizerunek.pl: could not connect to host j0ng.xyz: could not connect to host jacobdevans.com: could not connect to host jaimechanaga.com: could not connect to host @@ -823,6 +822,7 @@ javascriptlab.fr: could not connect to host jccars-occasions.be: could not connect to host jccrew.org: could not connect to host jcraft.us: could not connect to host +jd1.de: could not connect to host jean-remy.ch: could not connect to host jeffersonregan.org: could not connect to host jens.hk: could not connect to host @@ -836,7 +836,6 @@ jobmedic.com: could not connect to host joecod.es: could not connect to host joetyson.io: could not connect to host johngo.tk: could not connect to host -jonarcher.info: could not connect to host jonathansanchez.pro: could not connect to host jordanhamilton.me: could not connect to host js88.sg: could not connect to host @@ -869,7 +868,6 @@ kawaii.io: could not connect to host kawaiiku.com: could not connect to host kawaiiku.de: could not connect to host kcsordparticipation.org: could not connect to host -kearney.io: could not connect to host kelm.me: could not connect to host kenyons.info: could not connect to host kevinbowers.me: could not connect to host @@ -885,6 +883,7 @@ kinepolis-studio.ga: could not connect to host kingbird.me: could not connect to host kingclass.cn: could not connect to host kirill.ws: could not connect to host +kitchenpunx.com: could not connect to host kj1396.net: could not connect to host kjchernov.info: could not connect to host kjoglum.me: could not connect to host @@ -917,6 +916,7 @@ kylebaldw.in: could not connect to host kylling.io: could not connect to host kyujin-office.net: could not connect to host l18.io: could not connect to host +l2guru.ru: could not connect to host laboutiquemarocaineduconvoyeur.com: could not connect to host laboutiquemarocaineduconvoyeur.ma: could not connect to host lacasa.fr: could not connect to host @@ -983,14 +983,13 @@ locker3.com: could not connect to host logcat.info: could not connect to host logic8.ml: could not connect to host logimagine.com: could not connect to host +logue.be: could not connect to host loothole.com: could not connect to host loqyu.co: could not connect to host losebellyfat.pro: could not connect to host loveandloyalty.se: could not connect to host lovelive.us: could not connect to host -lovelivewiki.com: could not connect to host lowt.us: could not connect to host -lowtherpavilion.co.uk: could not connect to host loyaltech.ch: could not connect to host ltransferts.com: could not connect to host lucascodes.com: could not connect to host @@ -1009,6 +1008,7 @@ magnacumlaude.co: could not connect to host mahefa.co.uk: could not connect to host maik-mahlow.de: could not connect to host mailon.ga: could not connect to host +malash.me: could not connect to host malesbdsm.com: could not connect to host malgraph.net: could not connect to host marcelmarnitz.com: could not connect to host @@ -1016,6 +1016,7 @@ marche-nordic-jorat.ch: could not connect to host mare92.cz: could not connect to host marketingdesignu.cz: could not connect to host marko-fenster24.de: could not connect to host +markprof.ru: could not connect to host marktcontact.com: could not connect to host martynhare.co.uk: could not connect to host martynhare.uk: could not connect to host @@ -1074,7 +1075,6 @@ modded-minecraft-server-list.com: could not connect to host moderntld.net: could not connect to host moe-max.jp: could not connect to host moeyi.xyz: could not connect to host -mokote.com: could not connect to host mongla168.net: could not connect to host mongla88.net: could not connect to host monitori.ng: could not connect to host @@ -1103,12 +1103,15 @@ muj-svet.cz: could not connect to host munch.me: could not connect to host munduch.cz: could not connect to host murraycolin.org: could not connect to host +murz.tv: could not connect to host muslimbanter.co.za: could not connect to host mybeautyjobs.de: could not connect to host mycamda.com: could not connect to host mycustomwriting.com: could not connect to host myfappening.org: could not connect to host mykeepsake.xyz: could not connect to host +mymed.de: could not connect to host +mymed.eu: could not connect to host mynetworkingbuddy.com: could not connect to host myshirtsize.com: could not connect to host mytravelblog.de: could not connect to host @@ -1122,12 +1125,12 @@ ncdesigns-studio.com: could not connect to host neer.io: could not connect to host negativecurvature.net: could not connect to host nejnamc.org: could not connect to host +nephy.jp: could not connect to host nerdhouse.io: could not connect to host nestone.ru: could not connect to host netsystems.pro: could not connect to host nevadafiber.net: could not connect to host newcityinfo.info: could not connect to host -newjianzhi.com: could not connect to host nexgeneration-solutions.com: could not connect to host nexusbyte.de: could not connect to host nexuscorporation.in: could not connect to host @@ -1163,19 +1166,18 @@ nyxi.eu: could not connect to host obdolbacca.ru: could not connect to host oberam.de: could not connect to host oberhof.co: could not connect to host -oblondata.io: could not connect to host off-the-clock.us: could not connect to host offgames.pro: could not connect to host office-ruru.com: could not connect to host ohyooo.com: could not connect to host oliverspringer.eu: could not connect to host omnibot.tv: could not connect to host +onedot.nl: could not connect to host onewebdev.info: could not connect to host onstud.com: could not connect to host onwie.fr: could not connect to host ooeste.com: could not connect to host oogami.name: could not connect to host -opatut.de: could not connect to host opium.io: could not connect to host oscsdp.cz: could not connect to host osmanlitorunu.com: could not connect to host @@ -1184,7 +1186,15 @@ ourchoice2016.com: could not connect to host outetc.com: could not connect to host owlscrap.ru: could not connect to host oxynux.xyz: could not connect to host +ozonitron.com: could not connect to host +ozonitron.de: could not connect to host +ozonitron.eu: could not connect to host +ozonytron.com: could not connect to host +ozonytron.de: could not connect to host +ozonytron.eu: could not connect to host paichai.space: could not connect to host +paio2-rec.com: could not connect to host +paio2.com: could not connect to host panasca.is: could not connect to host panascais.co: could not connect to host panascais.com: could not connect to host @@ -1199,7 +1209,6 @@ panascais.tech: could not connect to host panascais.us: could not connect to host pandapsy.com: could not connect to host pardnoy.com: could not connect to host -pascalspoerri.ch: could not connect to host passrhce.com: could not connect to host passrhcsa.com: could not connect to host pastie.se: could not connect to host @@ -1213,7 +1222,6 @@ paulshir.com: could not connect to host paulshir.is: could not connect to host paymon.tj: could not connect to host paypod.org: could not connect to host -pcmr.info: could not connect to host pcvirusclear.com: could not connect to host pear2pear.de: could not connect to host peirong.me: could not connect to host @@ -1228,6 +1236,7 @@ phdwuda.com: could not connect to host phil.tw: could not connect to host philippa.cool: could not connect to host photops.fr: could not connect to host +pianetaottica.eu: could not connect to host picallo.es: could not connect to host picone.com.au: could not connect to host pierrejeansuau.fr: could not connect to host @@ -1237,8 +1246,6 @@ pinebaylibrary.org: could not connect to host piwko.co: could not connect to host pixelgliders.de: could not connect to host plaasprodukte.com: could not connect to host -placefade.com: could not connect to host -plae.com.au: could not connect to host planbox.info: could not connect to host playsharp.com: could not connect to host plussizereviews.com: could not connect to host @@ -1256,7 +1263,6 @@ potlytics.com: could not connect to host pouets.ovh: could not connect to host powerentertainment.tv: could not connect to host poy-tech.com: could not connect to host -prepaid-cards.xyz: could not connect to host princessbackpack.de: could not connect to host printsos.com: could not connect to host prism-communication.com: could not connect to host @@ -1296,12 +1302,10 @@ qscloud.de: could not connect to host qto.net: could not connect to host quay.net: could not connect to host rackblue.com: could not connect to host -radeticlaw.com: could not connect to host rainbin.com: could not connect to host ranos.org: could not connect to host rantanda.com: could not connect to host rapdogg.com: could not connect to host -rapidstone.com: could not connect to host ravengergaming.net: could not connect to host ravse.dk: could not connect to host raxion.cf: could not connect to host @@ -1314,7 +1318,6 @@ realcli.com: could not connect to host realraghavgupta.com: could not connect to host realwoo.com: could not connect to host reevu.net: could not connect to host -refactor.zone: could not connect to host reflecton.io: could not connect to host regendevices.eu: could not connect to host regio-salland.nl: could not connect to host @@ -1355,6 +1358,7 @@ rs-devdemo.host: could not connect to host rsldb.com: could not connect to host rtc.fun: could not connect to host rubendv.be: could not connect to host +rucnerobene.eu: could not connect to host ruhr3.de: could not connect to host runcarina.com: could not connect to host rundumcolumn.xyz: could not connect to host @@ -1378,6 +1382,7 @@ sarindia.com: could not connect to host sarindia.de: could not connect to host sarndipity.com: could not connect to host satragreen.com: could not connect to host +savecashindia.com: could not connect to host sbiewald.de: could not connect to host sbm.cloud: could not connect to host schaafenstrasse.koeln: could not connect to host @@ -1405,6 +1410,7 @@ seleondar.ru: could not connect to host selfserverx.com: could not connect to host sellmoretires.com: could not connect to host seoscribe.net: could not connect to host +seproco.com: could not connect to host servecrypt.com: could not connect to host server-essentials.com: could not connect to host serverlauget.no: could not connect to host @@ -1426,7 +1432,6 @@ shorten.ninja: could not connect to host shortr.li: could not connect to host shred.ch: could not connect to host shredoptics.ch: could not connect to host -shulan.moe: could not connect to host shuzicai.cn: could not connect to host shymeck.pw: could not connect to host siamega.com: could not connect to host @@ -1440,6 +1445,7 @@ simplerses.com: could not connect to host sims4hub.ga: could not connect to host sinfulforums.net: could not connect to host siqi.wang: could not connect to host +sitemaxiphilippe.ch: could not connect to host skarox.ru: could not connect to host sky-aroma.com: could not connect to host skylocker.net: could not connect to host @@ -1464,7 +1470,6 @@ solidtuesday.com: could not connect to host solymar.co: could not connect to host sonafe.info: could not connect to host sortaweird.net: could not connect to host -soubriquet.org: could not connect to host sowingseasons.com: could not connect to host sowncloud.de: could not connect to host sp.rw: could not connect to host @@ -1481,7 +1486,7 @@ srvonfire.com: could not connect to host stadionmanager.com: could not connect to host stadtgartenla.com: could not connect to host stamonicatourandtravel.com: could not connect to host -startup.melbourne: could not connect to host +starsam80.net: could not connect to host statgram.me: could not connect to host static-assets.io: could not connect to host static.hosting: could not connect to host @@ -1507,12 +1512,15 @@ summer.ga: could not connect to host suneilpatel.com: could not connect to host sunfireshop.com.br: could not connect to host sunxchina.com: could not connect to host +superbdistribute.com: could not connect to host superpase.com: could not connect to host surdam.casa: could not connect to host susconam.org: could not connect to host suspiciousdarknet.xyz: could not connect to host swaggerdile.com: could not connect to host +sweetlegs.jp: could not connect to host synergisticsoccer.com: could not connect to host +sysdb.io: could not connect to host t3rror.net: could not connect to host taboragroup.com: could not connect to host takusan.ru: could not connect to host @@ -1534,9 +1542,9 @@ techpit.us: could not connect to host tektoria.de: could not connect to host telekollektiv.org: could not connect to host tenispopular.com: could not connect to host -tequilazor.com: could not connect to host terra-x.net: could not connect to host terrax.net: could not connect to host +tescoludia.sk: could not connect to host testovaci.ml: could not connect to host tetsai.com: could not connect to host teulon.eu: could not connect to host @@ -1547,7 +1555,6 @@ the-gist.io: could not connect to host thedarkartsandcrafts.com: could not connect to host thefox.co: could not connect to host thefrk.xyz: could not connect to host -thehiddenbay.info: could not connect to host thenrdhrd.nl: could not connect to host theprincegame.com: could not connect to host theprivacysolution.com: could not connect to host @@ -1560,12 +1567,11 @@ thinkcash.nl: could not connect to host thompsonfamily.cloud: could not connect to host tianxicaipiao.win: could not connect to host tianxicp.com: could not connect to host -timtj.ca: could not connect to host -timweb.ca: could not connect to host tink.network: could not connect to host tkn.tokyo: could not connect to host tnb-plattform.de: could not connect to host todosrv.com: could not connect to host +tokkee.org: could not connect to host tokoindo.top: could not connect to host tollsjekk.no: could not connect to host tomm.yt: could not connect to host @@ -1575,12 +1581,11 @@ topdetoxcleanse.com: could not connect to host topdevbox.net: could not connect to host topnotchendings.com: could not connect to host tor2web.org: could not connect to host +torrentpier.me: could not connect to host totallynotaserver.com: could not connect to host -totalsystemcare.com: could not connect to host totch.de: could not connect to host totot.net: could not connect to host touch-up-net.com: could not connect to host -townofbridgewater.ca: could not connect to host toxicip.com: could not connect to host tpblist.xyz: could not connect to host track.plus: could not connect to host @@ -1611,23 +1616,18 @@ tysye.ca: could not connect to host tzwe.com: could not connect to host ubi.gg: could not connect to host ubicv.com: could not connect to host -uborcare.com: could not connect to host udo-luetkemeier.de: could not connect to host ueu.me: could not connect to host ulti.gq: could not connect to host -ultieme.be: could not connect to host -umisonoda.com: could not connect to host umsapi.com: could not connect to host unefuite.ch: could not connect to host unhu.fr: could not connect to host uni2share.com: could not connect to host unicorn.li: could not connect to host -unleash.pw: could not connect to host uploadbro.com: could not connect to host urcentral.org: could not connect to host uscp8.com: could not connect to host usportsgo.com: could not connect to host -utdsgda.com: could not connect to host uwesander.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] uygindir.ml: could not connect to host vaaddress.co: could not connect to host @@ -1658,9 +1658,10 @@ visiongamestudios.com: could not connect to host visionthroughknowledge.com: could not connect to host visiontree.eu: could not connect to host vlogge.com: could not connect to host -vmgirls.com: could not connect to host +vlsk.eu: could not connect to host voeux.io: could not connect to host vogt.tech: could not connect to host +voidi.ca: could not connect to host volcain.io: could not connect to host vorlif.org: could not connect to host vorodevops.com: could not connect to host @@ -1668,6 +1669,7 @@ votresiteweb.ch: could not connect to host vrtouring.org: could not connect to host vsx.ch: could not connect to host vxapps.com: could not connect to host +w4nvu.org: could not connect to host wabifoggynuts.com: could not connect to host waixingrenfuli.vip: could not connect to host wallpapers.pub: could not connect to host @@ -1698,7 +1700,6 @@ webtech.com.br: could not connect to host webthings.com.br: could not connect to host wecanvisit.com: could not connect to host weebsr.us: could not connect to host -weed.ren: could not connect to host weiji.ga: could not connect to host weiler.xyz: could not connect to host wejumall.com: could not connect to host @@ -1709,11 +1710,11 @@ werhatunsverraten.eu: could not connect to host wespeakgeek.co.za: could not connect to host wetthost.com: could not connect to host wevg.org: could not connect to host -weyland.tech: could not connect to host wg-tools.de: could not connect to host whereisjason.com: could not connect to host whereismyorigin.cf: could not connect to host whilsttraveling.com: could not connect to host +whitworth.nyc: could not connect to host wibuw.com: could not connect to host wilhelm-nathan.de: could not connect to host willkommen-fuerstenberg.de: could not connect to host @@ -1728,7 +1729,6 @@ wmawri.com: could not connect to host wolfemg.com: could not connect to host wolfenland.net: could not connect to host wolfwings.us: could not connect to host -wonabo.com: could not connect to host wonderbooks.club: could not connect to host woomu.me: could not connect to host workemy.com: could not connect to host @@ -1756,7 +1756,6 @@ xn--t8j2a3042d.xyz: could not connect to host xn--yj8h0m.ws: could not connect to host xn--ykrp42k.com: could not connect to host xpwn.cz: could not connect to host -xqin.net: could not connect to host xuntaosms.com: could not connect to host xwaretech.info: could not connect to host y3451.com: could not connect to host @@ -1764,6 +1763,7 @@ yabrt.cn: could not connect to host yahoo.ax: could not connect to host yarchives.jp: could not connect to host yaucy.win: could not connect to host +ybresson.com: could not connect to host yd.io: could not connect to host yellowcar.website: could not connect to host yemekbaz.az: could not connect to host @@ -1808,7 +1808,6 @@ zuefle.net: could not connect to host zuehlcke.de: could not connect to host zuviel.space: could not connect to host zwy.me: could not connect to host -zxtcode.com: could not connect to host zyx.im: could not connect to host zzw.ca: could not connect to host 0-1.party: did not receive HSTS header @@ -1818,7 +1817,7 @@ zzw.ca: could not connect to host 0005aa.com: could not connect to host 007sascha.de: did not receive HSTS header 020wifi.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] -0222aa.com: could not connect to host +0222aa.com: did not receive HSTS header 040fit.nl: did not receive HSTS header 048.ag: could not connect to host 050508.com: could not connect to host @@ -1925,7 +1924,6 @@ zzw.ca: could not connect to host 3wecommerce.com.br: could not connect to host 404.sh: could not connect to host 404404.info: could not connect to host -411movie.com: did not receive HSTS header 420dongstorm.com: could not connect to host 42ms.org: could not connect to host 440hz-radio.de: did not receive HSTS header @@ -2112,6 +2110,7 @@ agentseeker.ca: could not connect to host agevio.com: could not connect to host agonswim.com: could not connect to host agrias.com.br: did not receive HSTS header +agridir.site: did not receive HSTS header agrimap.com: did not receive HSTS header agro-id.gov.ua: did not receive HSTS header agtv.com.br: did not receive HSTS header @@ -2151,6 +2150,7 @@ akstudentsfirst.org: did not receive HSTS header aktivist.in: did not receive HSTS header al-shami.net: could not connect to host aladdin.ie: did not receive HSTS header +alair.cn: did not receive HSTS header alanlee.net: could not connect to host alanrickmanflipstable.com: could not connect to host alariel.de: did not receive HSTS header @@ -2198,6 +2198,7 @@ alpha.irccloud.com: could not connect to host alphabit-secure.com: could not connect to host alphabuild.io: could not connect to host alphagamers.net: did not receive HSTS header +alphahunks.com: did not receive HSTS header alphalabs.xyz: could not connect to host alphasall.com: could not connect to host als-hardware.co.za: did not receive HSTS header @@ -2349,6 +2350,7 @@ apps-for-fishing.com: could not connect to host appsbystudio.co.uk: did not receive HSTS header appsdash.io: could not connect to host appuro.com: did not receive HSTS header +aqualogy.de: did not receive HSTS header aquariumaccessories.shop: did not receive HSTS header aquilalab.com: could not connect to host arabdigitalexpression.org: did not receive HSTS header @@ -2535,7 +2537,6 @@ baff.lu: could not connect to host bageez.us: did not receive HSTS header bagiobella.com: max-age too low: 0 baiduaccount.com: could not connect to host -bailbondsaffordable.com: did not receive HSTS header bair.io: could not connect to host baito-j.jp: did not receive HSTS header bakaweb.fr: could not connect to host @@ -2557,6 +2558,7 @@ banchethai.com: could not connect to host bandb.xyz: could not connect to host bandrcrafts.com: did not receive HSTS header bangzafran.com: did not receive HSTS header +bank: could not connect to host bankmilhas.com.br: did not receive HSTS header banksaround.com: did not receive HSTS header banqingdiao.com: could not connect to host @@ -2673,7 +2675,6 @@ beulahtabernacle.com: could not connect to host bevapehappy.com: did not receive HSTS header bewerbungsfibel.de: did not receive HSTS header beyond-edge.com: could not connect to host -beyondpricing.com: did not receive HSTS header beyuna.co.uk: did not receive HSTS header beyuna.eu: did not receive HSTS header beyuna.nl: did not receive HSTS header @@ -2688,6 +2689,7 @@ bgcparkstad.nl: did not receive HSTS header bgmn.net: could not connect to host bhatia.at: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no] biapinheiro.com.br: max-age too low: 5184000 +biblerhymes.com: did not receive HSTS header bidon.ca: did not receive HSTS header bieberium.de: could not connect to host biego.cn: did not receive HSTS header @@ -2739,7 +2741,6 @@ bitfarm-archiv.de: did not receive HSTS header bitheus.com: could not connect to host bithosting.io: did not receive HSTS header bitlish.com: max-age too low: 86400 -bitmon.net: did not receive HSTS header bitnet.io: did not receive HSTS header bitrage.de: could not connect to host bitraum.io: could not connect to host @@ -2823,6 +2824,7 @@ book-of-ra.de: did not receive HSTS header bookcelerator.com: did not receive HSTS header booked.holiday: could not connect to host bookofraonlinecasinos.com: did not receive HSTS header +booktracker-org.appspot.com: did not receive HSTS header boomerang.com: did not receive HSTS header boosterlearnpro.com: did not receive HSTS header booth.in.th: could not connect to host @@ -2850,7 +2852,6 @@ boyfriendhusband.men: did not receive HSTS header bp-wahl.at: did not receive HSTS header bqtoolbox.com: could not connect to host bragasoft.com.br: did not receive HSTS header -brain-e.co: did not receive HSTS header braineet.com: did not receive HSTS header brainfork.ml: could not connect to host brainfpv.com: did not receive HSTS header @@ -3041,7 +3042,7 @@ candygirl.shop: could not connect to host canyonshoa.com: did not receive HSTS header capecycles.co.za: did not receive HSTS header capeyorkfire.com.au: did not receive HSTS header -capogna.com: could not connect to host +capogna.com: did not receive HSTS header capsogusto.com: did not receive HSTS header captchatheprize.com: could not connect to host captianseb.de: could not connect to host @@ -3086,6 +3087,7 @@ cavaleria.ro: did not receive HSTS header caveclan.org: did not receive HSTS header cavedevs.de: could not connect to host cavedroid.xyz: could not connect to host +cavern.tv: did not receive HSTS header cayafashion.de: did not receive HSTS header cbengineeringinc.com: could not connect to host cbhq.net: could not connect to host @@ -3256,6 +3258,7 @@ cliftons.com: did not receive HSTS header clinicaferrusbratos.com: did not receive HSTS header clintonbloodworth.io: could not connect to host clintwilson.technology: max-age too low: 2592000 +clip.ovh: did not receive HSTS header clipped4u.com: could not connect to host closient.com: did not receive HSTS header cloud-crowd.com.au: did not receive HSTS header @@ -3280,7 +3283,7 @@ cloudstorm.me: could not connect to host cloudstrike.co: could not connect to host cloudwalk.io: did not receive HSTS header clounix.online: could not connect to host -clovissantos.com: could not connect to host +clovissantos.com: did not receive HSTS header clowde.in: could not connect to host clownaroundbouncycastles.co.uk: did not receive HSTS header club-adulti.ro: did not receive HSTS header @@ -3315,7 +3318,7 @@ codeforhakodate.org: did not receive HSTS header codejunkie.de: did not receive HSTS header codelayer.ca: could not connect to host codelitmus.com: did not receive HSTS header -codelove.de: could not connect to host +codelove.de: did not receive HSTS header codemonkeyrawks.net: could not connect to host codepoet.de: did not receive HSTS header codepx.com: did not receive HSTS header @@ -3353,6 +3356,7 @@ comico.info: did not receive HSTS header comicspines.com: could not connect to host comitesaustria.at: could not connect to host comiteshopping.com: could not connect to host +commerciallocker.com: did not receive HSTS header commercialplanet.eu: could not connect to host commune-preuilly.fr: did not receive HSTS header comocurarlashemorroides.org: could not connect to host @@ -3576,7 +3580,7 @@ dabbot.org: did not receive HSTS header dad256.tk: could not connect to host dadtheimpaler.com: could not connect to host dah5.com: did not receive HSTS header -dahl-pind.dk: could not connect to host +dahl-pind.dk: did not receive HSTS header dai-rin.co.jp: could not connect to host dailystormerpodcasts.com: could not connect to host daimadi.com: could not connect to host @@ -3602,7 +3606,6 @@ danishenanigans.com: could not connect to host dankeblog.com: could not connect to host danmark.guide: could not connect to host dannycrichton.com: did not receive HSTS header -danonsecurity.com: did not receive HSTS header danrl.de: could not connect to host danwillenberg.com: did not receive HSTS header daolerp.xyz: could not connect to host @@ -3645,6 +3648,7 @@ davidglidden.eu: did not receive HSTS header davidhunter.scot: did not receive HSTS header davidnoren.com: did not receive HSTS header davidreinhardt.de: could not connect to host +day.vip: did not receive HSTS header daylightcompany.com: did not receive HSTS header daytonaseaside.com: did not receive HSTS header db.gy: could not connect to host @@ -3658,7 +3662,7 @@ dcpower.eu: max-age too low: 600 dctxf.com: did not receive HSTS header dcuofriends.net: could not connect to host dcurt.is: did not receive HSTS header -dcw.io: did not receive HSTS header +dcw.io: could not connect to host ddatsh.com: could not connect to host ddepot.us: did not receive HSTS header deadsoul.net: max-age too low: 0 @@ -3776,6 +3780,7 @@ digitalbank.kz: could not connect to host digitaldaddy.net: could not connect to host digitalero.rip: did not receive HSTS header digitaljungle.net: could not connect to host +digitallocker.com: did not receive HSTS header digitalnonplus.com: could not connect to host digitalquery.com: did not receive HSTS header digitalriver.tk: did not receive HSTS header @@ -3799,7 +3804,6 @@ disclosure.io: did not receive HSTS header discotek.club: did not receive HSTS header discovery.lookout.com: did not receive HSTS header discoveryottawa.ca: could not connect to host -discoveryrom.org: did not receive HSTS header dise-online.de: did not receive HSTS header disking.co.uk: did not receive HSTS header dislocated.de: did not receive HSTS header @@ -3916,6 +3920,7 @@ dreamcatcherblog.de: could not connect to host dreamlighteyeserum.com: could not connect to host dreamsforabetterworld.com.au: did not receive HSTS header dredgepress.com: did not receive HSTS header +dress-cons.com: did not receive HSTS header drewgle.net: could not connect to host drhopeson.com: could not connect to host drinknaturespower.com: could not connect to host @@ -3968,7 +3973,6 @@ dylanscott.com.au: did not receive HSTS header dymersion.com: did not receive HSTS header dynamic-innovations.net: could not connect to host dynamize.solutions: did not receive HSTS header -dyrkar.com: did not receive HSTS header dzimejl.sk: did not receive HSTS header dzlibs.io: could not connect to host e-aut.net: could not connect to host @@ -4044,7 +4048,7 @@ edsh.de: did not receive HSTS header eduardnikolenko.ru: could not connect to host educatio.tech: could not connect to host educourse.ga: could not connect to host -eduvance.in: did not receive HSTS header +eduvance.in: could not connect to host eengezinswoning-in-alphen-aan-den-rijn-kopen.nl: could not connect to host eengezinswoning-in-de-friese-meren-kopen.nl: could not connect to host eengezinswoning-in-friesland-kopen.nl: could not connect to host @@ -4196,6 +4200,7 @@ ernaehrungsberatung-zurich.ch: could not connect to host ernesto.at: could not connect to host eromixx.com: did not receive HSTS header erotalia.es: could not connect to host +eroticforce.com: did not receive HSTS header erotische-aanbiedingen.nl: could not connect to host errolz.com: could not connect to host errors.zenpayroll.com: could not connect to host @@ -4263,6 +4268,7 @@ events12.com: did not receive HSTS header eventsafrica.net: did not receive HSTS header everybooks.com: could not connect to host everydaytherich.com: max-age too low: 7776000 +everygayporn.xyz: did not receive HSTS header everylab.org: could not connect to host everything.place: did not receive HSTS header everytrycounts.gov: could not connect to host @@ -4333,7 +4339,7 @@ falkp.no: did not receive HSTS header fallenangelspirits.uk: could not connect to host fallofthecitadel.com: did not receive HSTS header faluninfo.ba: did not receive HSTS header -fam-weyer.de: could not connect to host +fam-weyer.de: did not receive HSTS header fame-agency.net: could not connect to host famep.gov: could not connect to host familie-sprink.de: could not connect to host @@ -4384,12 +4390,14 @@ femaledom.xyz: could not connect to host feminists.co: could not connect to host fenno.net: could not connect to host fensdorf.de: did not receive HSTS header +fensterbau-mutscheller.de: did not receive HSTS header fenteo.com: could not connect to host feragon.net: did not receive HSTS header feriahuamantla.com: could not connect to host fernangp.com: did not receive HSTS header fernseher-kauf.de: could not connect to host ferrolatino.com: could not connect to host +feschiyan.com: did not receive HSTS header festember.com: did not receive HSTS header festrip.com: could not connect to host fettbrot.tk: did not receive HSTS header @@ -4464,6 +4472,7 @@ fl0777.com: did not receive HSTS header fl0888.com: did not receive HSTS header fl0999.com: did not receive HSTS header flags.ninja: could not connect to host +flagspot.net: max-age too low: 129600 flairbros.at: could not connect to host flajshans.cz: did not receive HSTS header flamewall.net: could not connect to host @@ -4714,6 +4723,7 @@ gesiwista.net: could not connect to host gesunde-smoothies.de: did not receive HSTS header get-cctv.com: could not connect to host get.zenpayroll.com: did not receive HSTS header +geta.pub: did not receive HSTS header getable.com: did not receive HSTS header getblys.com.au: did not receive HSTS header getbooks.co.il: did not receive HSTS header @@ -4782,7 +4792,6 @@ glass.google.com: did not receive HSTS header (error ignored - included regardle glasslikes.com: did not receive HSTS header glbg.eu: did not receive HSTS header glentakahashi.com: could not connect to host -glittersjabloon.nl: did not receive HSTS header glitzmirror.com: could not connect to host global-adult-webcams.com: did not receive HSTS header globalado.com: could not connect to host @@ -4957,7 +4966,7 @@ guso.gq: could not connect to host guso.ml: could not connect to host guso.site: could not connect to host guso.tech: could not connect to host -gussi.is: did not receive HSTS header +gussi.is: could not connect to host gvpt.sk: did not receive HSTS header gvt2.com: could not connect to host (error ignored - included regardless) gvt3.com: could not connect to host (error ignored - included regardless) @@ -5032,13 +5041,13 @@ haobo6666.com: could not connect to host haobo7777.com: could not connect to host haomwei.com: could not connect to host haoyugao.com: could not connect to host -haozi.me: did not receive HSTS header happist.com: did not receive HSTS header happix.nl: did not receive HSTS header happyfabric.me: did not receive HSTS header happygastro.com: could not connect to host harambe.site: could not connect to host harbourweb.net: did not receive HSTS header +hardergayporn.com: did not receive HSTS header hardline.xyz: could not connect to host haribosupermix.com: could not connect to host harisht.me: could not connect to host @@ -5051,6 +5060,7 @@ harvestrenewal.org: did not receive HSTS header harz.cloud: could not connect to host has.vision: could not connect to host hash-list.com: could not connect to host +hashidays.com: did not receive HSTS header hasilocke.de: did not receive HSTS header hasinase.de: could not connect to host haste.ch: could not connect to host @@ -5214,7 +5224,6 @@ hostingfj.com: could not connect to host hostisan.com: could not connect to host hostworkz.com: did not receive HSTS header hotartup.com: could not connect to host -hotchillibox.com: max-age too low: 0 hotchoc.io: did not receive HSTS header hotel-tongruben.de: max-age too low: 0 hotelaustria-wien.at: did not receive HSTS header @@ -5222,7 +5231,7 @@ hotelvictoriaoax-mailing.com: did not receive HSTS header hotelvillahermosa-mailing.com: did not receive HSTS header hotelvue.nl: could not connect to host houkago-step.com: did not receive HSTS header -housemaadiah.org: could not connect to host +housemaadiah.org: did not receive HSTS header housingstudents.org.uk: could not connect to host howfargames.com: could not connect to host howrandom.org: could not connect to host @@ -5334,7 +5343,7 @@ ifastuniversity.com: did not receive HSTS header ifleurs.com: could not connect to host ifx.ee: could not connect to host igforums.com: could not connect to host -igi.codes: max-age too low: 0 +igi.codes: did not receive HSTS header igiftcards.nl: did not receive HSTS header ignatisd.gr: did not receive HSTS header igule.net: could not connect to host @@ -5455,6 +5464,7 @@ instantdev.io: could not connect to host institutoflordelavida.com: could not connect to host institutolancaster.com: did not receive HSTS header instruktor.io: could not connect to host +insurance: could not connect to host intel.gov: did not receive HSTS header intel.li: could not connect to host interboursegeneva.ch: did not receive HSTS header @@ -5614,14 +5624,14 @@ jamesbywater.me: could not connect to host jamesbywater.me.uk: could not connect to host jamesbywater.uk: could not connect to host jamesconroyfinn.com: did not receive HSTS header -jamescostian.com: could not connect to host +jamescostian.com: did not receive HSTS header jamesdoell.com: could not connect to host jamesdoylephoto.com: did not receive HSTS header jamesf.xyz: could not connect to host jamesforman.co.nz: did not receive HSTS header jameshale.me: did not receive HSTS header jamesmaurer.com: did not receive HSTS header -jami.am: could not connect to host +jami.am: did not receive HSTS header jamourtney.com: could not connect to host jan-cermak.cz: did not receive HSTS header jan-daniels.de: did not receive HSTS header @@ -5754,6 +5764,7 @@ jonathanreyes.com: did not receive HSTS header jongha.me: could not connect to host jonn.me: could not connect to host jonnichols.info: did not receive HSTS header +jonnybarnes.uk: did not receive HSTS header jonsno.ws: could not connect to host joostbovee.nl: could not connect to host jordanstrustcompany.cn: could not connect to host @@ -5903,10 +5914,11 @@ kickasstorrents.gq: did not receive HSTS header kickstart.com.pk: did not receive HSTS header kid-dachau.de: did not receive HSTS header kidkat.cn: could not connect to host +kids2day.in: did not receive HSTS header kiel-media.de: did not receive HSTS header kieranjones.uk: did not receive HSTS header kimana.pe: could not connect to host -kimberg.co.uk: could not connect to host +kimberg.co.uk: did not receive HSTS header kimpost.org: could not connect to host kina.guide: could not connect to host kinderly.co.uk: did not receive HSTS header @@ -5923,6 +5935,7 @@ kintrip.com: did not receive HSTS header kionetworks.com: did not receive HSTS header kipin.fr: did not receive HSTS header kipira.com: could not connect to host +kiragameforum.net: did not receive HSTS header kirainmoe.com: max-age too low: 233000 kirara.eu: could not connect to host kirkforcongress.com: could not connect to host @@ -5972,7 +5985,6 @@ knowledgesnap.com: could not connect to host knowledgesnapsites.com: could not connect to host kodakit.com: could not connect to host koddsson.com: did not receive HSTS header -kode-it.de: did not receive HSTS header kodexplorer.ml: could not connect to host kodiaklabs.org: could not connect to host kodokushi.fr: could not connect to host @@ -5989,7 +6001,6 @@ kolozsvaricsuhe.hu: did not receive HSTS header komikito.com: could not connect to host kompetenzwerft.de: did not receive HSTS header konata.us: could not connect to host -konings.it: did not receive HSTS header kontaxis.network: could not connect to host koopjesnel.nl: did not receive HSTS header koordinate.net: could not connect to host @@ -6147,7 +6158,6 @@ lecourtier.fr: did not receive HSTS header leddruckalarm.de: did not receive HSTS header ledgerscope.net: could not connect to host leen.io: did not receive HSTS header -leet2.com: did not receive HSTS header legarage.org: could not connect to host legavenue.com.br: did not receive HSTS header legitaxi.com: could not connect to host @@ -6173,6 +6183,7 @@ leonmahler.consulting: did not receive HSTS header leopold.email: could not connect to host leopotamgroup.com: could not connect to host lepont.pl: could not connect to host +leppis-it.de: did not receive HSTS header lerasenglish.com: max-age too low: 0 lerner.moscow: did not receive HSTS header les-corsaires.net: could not connect to host @@ -6305,7 +6316,6 @@ log2n.uk: could not connect to host logario.com.br: could not connect to host logicaladvertising.com: could not connect to host login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless) -login.gov: did not receive HSTS header login.persona.org: could not connect to host loginseite.com: could not connect to host logistify.com.mx: did not receive HSTS header @@ -6331,7 +6341,7 @@ looktothestars.org: did not receive HSTS header lookupclose.com: did not receive HSTS header lookzook.com: did not receive HSTS header loongsg.xyz: could not connect to host -lordjevington.co.uk: could not connect to host +lordjevington.co.uk: did not receive HSTS header lostg.com: did not receive HSTS header lostinsecurity.com: could not connect to host lostinweb.eu: could not connect to host @@ -6344,6 +6354,7 @@ louduniverse.net: did not receive HSTS header louiewatch.com: could not connect to host loveable.de: could not connect to host lovelifelovelive.com: could not connect to host +lovelivewiki.com: did not receive HSTS header lovelyblogacademy.com: did not receive HSTS header lovelycorral.com: did not receive HSTS header lovelyfriends.org: did not receive HSTS header @@ -6351,6 +6362,7 @@ lovelytimes.net: did not receive HSTS header loveto.at: could not connect to host lovingearth.net: max-age too low: 0 lowhangingfruitgrabber.com: could not connect to host +lowtherpavilion.co.uk: did not receive HSTS header loxis.be: did not receive HSTS header lpak.nl: could not connect to host lpgram.ga: could not connect to host @@ -6491,7 +6503,7 @@ mandpress.com: did not receive HSTS header mangazuki.co: did not receive HSTS header maniadeprazer.com.br: could not connect to host manifestbin.com: did not receive HSTS header -manipulatedtme.com: did not receive HSTS header +manipulatedtme.com: could not connect to host manitasicily.com: did not receive HSTS header manningbrothers.com: did not receive HSTS header manns-solutions.com: did not receive HSTS header @@ -6604,7 +6616,7 @@ maya.mg: could not connect to host mazyun.com: max-age too low: 3600 mazz-tech.com: could not connect to host mbconsultancy.nu: did not receive HSTS header -mc81.com: could not connect to host +mc81.com: did not receive HSTS header mca2017.org: did not receive HSTS header mcard.vn: did not receive HSTS header mcb-bank.com: did not receive HSTS header @@ -6630,7 +6642,6 @@ medallia.io: could not connect to host mediacru.sh: could not connect to host mediafinancelab.org: did not receive HSTS header mediamag.am: max-age too low: 0 -mediastorm.us: could not connect to host mediawikicn.org: could not connect to host medienservice-fritz.de: did not receive HSTS header medirich.co: could not connect to host @@ -6748,7 +6759,7 @@ mikepair.net: could not connect to host mikii.club: could not connect to host mikk.cz: could not connect to host miku.be: could not connect to host -miku.hatsune.my: did not receive HSTS header +miku.hatsune.my: max-age too low: 5184000 mikusinec.com: could not connect to host milang.xyz: could not connect to host milanpala.cz: did not receive HSTS header @@ -6796,7 +6807,6 @@ mironized.com: did not receive HSTS header mirrorx.com: did not receive HSTS header misgluteosperfectos.com: did not receive HSTS header misiondelosangeles-mailing.com: did not receive HSTS header -misskey.xyz: did not receive HSTS header missrain.tw: could not connect to host mist.ink: could not connect to host mister.hosting: did not receive HSTS header @@ -6813,7 +6823,6 @@ mjcaffarattilaw.com: did not receive HSTS header mjhsc.nl: could not connect to host mk-dizajn.com: did not receive HSTS header mkfs.be: could not connect to host -mkw.st: could not connect to host mlcdn.co: could not connect to host mlp.ee: did not receive HSTS header mlpchan.net: could not connect to host @@ -6875,6 +6884,7 @@ mona.lu: could not connect to host monarca.systems: could not connect to host monasterialis.eu: could not connect to host monautoneuve.fr: did not receive HSTS header +moncoach.ch: did not receive HSTS header mondar.io: could not connect to host mondopoint.com: did not receive HSTS header mondwandler.de: could not connect to host @@ -6923,6 +6933,7 @@ moviedollars.com: did not receive HSTS header moviesabout.net: could not connect to host movio.ga: did not receive HSTS header moy-gorod.od.ua: did not receive HSTS header +moy.cat: did not receive HSTS header mozart-game.cz: did not receive HSTS header mozartgame.cz: did not receive HSTS header mozoa.net: could not connect to host @@ -7311,6 +7322,7 @@ nusatrip-api.com: did not receive HSTS header nutricuerpo.com: did not receive HSTS header nutritionculture.com: could not connect to host nutsandboltsmedia.com: did not receive HSTS header +nuttyveg.com: did not receive HSTS header nwa.xyz: could not connect to host nweb.co.nz: could not connect to host nwork.media: could not connect to host @@ -7357,7 +7369,7 @@ oganek.ie: could not connect to host oganime.com: could not connect to host ogogoshop.com: could not connect to host ohm2013.org: could not connect to host -ohsocool.org: could not connect to host +ohsocool.org: did not receive HSTS header oiepoie.nl: could not connect to host oishioffice.com: did not receive HSTS header ojls.co: could not connect to host @@ -7648,6 +7660,7 @@ pekkarik.ru: could not connect to host peliculasaudiolatinoonline.com: could not connect to host peliseries24.com: did not receive HSTS header pemberton.at: did not receive HSTS header +penablog.com: did not receive HSTS header pengui.uk: could not connect to host penguinclientsystem.com: did not receive HSTS header pennylane.me.uk: did not receive HSTS header @@ -7827,6 +7840,7 @@ polimat.org: could not connect to host politically-incorrect.xyz: could not connect to host politiewervingshop.nl: did not receive HSTS header politologos.org: did not receive HSTS header +polkam.go.id: did not receive HSTS header polycoise.com: could not connect to host polycrypt.us: could not connect to host polypho.nyc: could not connect to host @@ -7898,6 +7912,7 @@ prezola.com: max-age too low: 0 prgslab.net: could not connect to host pridoc.se: did not receive HSTS header prilock.com: did not receive HSTS header +primecaplending.com: did not receive HSTS header prinbanat.ngo: did not receive HSTS header printerest.io: could not connect to host printersonline.be: did not receive HSTS header @@ -8044,7 +8059,7 @@ quizmemes.org: could not connect to host quotehex.com: could not connect to host quotemaster.co.za: could not connect to host quranserver.net: could not connect to host -qvi.st: could not connect to host +qvi.st: did not receive HSTS header qwilink.me: did not receive HSTS header r-ay.club: did not receive HSTS header r-ay.cn: could not connect to host @@ -8055,6 +8070,7 @@ r15.me: did not receive HSTS header r3bl.me: did not receive HSTS header ra-schaal.de: did not receive HSTS header raajheshkannaa.com: could not connect to host +radeticlaw.com: max-age too low: 0 radicaleducation.net: could not connect to host radioheteroglossia.com: did not receive HSTS header radishmoon.com: max-age too low: 0 @@ -8070,7 +8086,7 @@ ramatola.uk: did not receive HSTS header ramon-c.nl: could not connect to host ramonj.nl: could not connect to host randomcage.com: did not receive HSTS header -randomcloud.net: did not receive HSTS header +randomcloud.net: could not connect to host randomhero.cloud: could not connect to host randomwinpicker.de: could not connect to host randy.pw: could not connect to host @@ -8096,7 +8112,7 @@ raulfraile.net: could not connect to host ravage.fm: did not receive HSTS header raven.lipetsk.ru: could not connect to host ravengergaming.ga: did not receive HSTS header -ravkr.duckdns.org: max-age too low: 30 +ravkr.duckdns.org: max-age too low: 360000 raw-diets.com: did not receive HSTS header rawet.se: could not connect to host rawoil.com: could not connect to host @@ -8215,7 +8231,7 @@ residentsinsurance.co.uk: did not receive HSTS header resl20.servehttp.com: could not connect to host respice.xyz: could not connect to host restaurace-klokocka.cz: did not receive HSTS header -restchart.com: could not connect to host +restchart.com: did not receive HSTS header retroarms.com: did not receive HSTS header retroarms.cz: did not receive HSTS header returnofwar.com: could not connect to host @@ -8481,6 +8497,7 @@ schroepfglas-versand.de: did not receive HSTS header schroettle.com: did not receive HSTS header schulterglatzen-altenwalde.de: could not connect to host schultzflorists.com: could not connect to host +schuppentier.org: did not receive HSTS header schwarzkopfforyou.de: did not receive HSTS header schweiz.guide: could not connect to host schweizerbolzonello.net: could not connect to host @@ -8513,6 +8530,7 @@ script.google.com: did not receive HSTS header (error ignored - included regardl scriptenforcer.net: could not connect to host scriptict.nl: could not connect to host scrollstory.com: did not receive HSTS header +scruffymen.com: did not receive HSTS header sdhmanagementgroup.com: could not connect to host sdia.ru: could not connect to host sdmoscow.ru: could not connect to host @@ -8647,6 +8665,7 @@ shadowsoks.com: could not connect to host shadowsu.info: did not receive HSTS header shadowsu.top: did not receive HSTS header shagi29.ru: did not receive HSTS header +shahbeat.com: did not receive HSTS header shakebox.de: could not connect to host shanekoster.net: could not connect to host shanesage.com: could not connect to host @@ -8725,7 +8744,6 @@ silicagelpackets.ca: did not receive HSTS header silver-drachenkrieger.de: did not receive HSTS header silverhome.ninja: could not connect to host silverpvp.com: could not connect to host -sim-sim.appspot.com: did not receive HSTS header simbast.com: could not connect to host simbihaiti.com: max-age too low: 7889238 simccorp.com: did not receive HSTS header @@ -8877,6 +8895,7 @@ soldbygold.net: did not receive HSTS header solentes.com.br: could not connect to host solidfuelappliancespares.co.uk: did not receive HSTS header solidus.systems: did not receive HSTS header +solinter.com.br: did not receive HSTS header soljem.com: did not receive HSTS header soll-i.ch: did not receive HSTS header solosmusic.xyz: could not connect to host @@ -9115,7 +9134,6 @@ summitbankofkc.com: did not receive HSTS header sumoatm.com: did not receive HSTS header sumoscout.de: could not connect to host sun-wellness-online.com.vn: did not receive HSTS header -sunboxstore.jp: did not receive HSTS header suncountrymarine.com: did not receive HSTS header sunflyer.cn: did not receive HSTS header sungo.wtf: did not receive HSTS header @@ -9231,7 +9249,7 @@ tangibilizing.com: could not connect to host taniesianie.pl: did not receive HSTS header tankfreunde.de: did not receive HSTS header tante-bugil.net: could not connect to host -tantotiempo.de: did not receive HSTS header +tantotiempo.de: could not connect to host tanze-jetzt.de: could not connect to host taotuba.net: did not receive HSTS header taozj.org: did not receive HSTS header @@ -9318,7 +9336,7 @@ teknotes.co.uk: could not connect to host tekshrek.com: did not receive HSTS header tel-dithmarschen.de: did not receive HSTS header teleallarme.ch: could not connect to host -telefisk.org: could not connect to host +telefisk.org: did not receive HSTS header telefonnummer.online: could not connect to host telefoonnummerinfo.nl: could not connect to host telescam.com: could not connect to host @@ -9340,7 +9358,7 @@ tensionup.com: could not connect to host tentins.com: could not connect to host teoleonie.com: did not receive HSTS header teos.online: could not connect to host -terra.by: did not receive HSTS header +terra.by: could not connect to host terrax.berlin: could not connect to host terrax.info: could not connect to host teru.com.br: could not connect to host @@ -9445,7 +9463,7 @@ thesplit.is: could not connect to host thestack.xyz: could not connect to host thestagchorleywood.co.uk: did not receive HSTS header thetechnical.me: did not receive HSTS header -thethirdroad.com: did not receive HSTS header +thethirdroad.com: could not connect to host thetradinghall.com: could not connect to host theurbanyoga.com: did not receive HSTS header thevintagenews.com: did not receive HSTS header @@ -9526,7 +9544,6 @@ timvandekamp.nl: did not receive HSTS header timwittenberg.com: could not connect to host tinchbear.xyz: could not connect to host tindewen.net: could not connect to host -tintenprofi.de: max-age too low: 6307200 tipsyk.ru: could not connect to host tiredofeating.com: could not connect to host tiremoni.ch: did not receive HSTS header @@ -9541,7 +9558,6 @@ tjeckien.guide: could not connect to host tkappertjedemetamorfose.nl: could not connect to host tkarstens.de: did not receive HSTS header tkonstantopoulos.tk: could not connect to host -tlach.cz: did not receive HSTS header tlcdn.net: could not connect to host tlo.hosting: could not connect to host tlo.link: could not connect to host @@ -9599,6 +9615,7 @@ topbestsellerproduct.com: did not receive HSTS header topdeskdev.net: could not connect to host topmarine.se: could not connect to host topnewstoday.org: could not connect to host +topnovini.com: did not receive HSTS header toppik.com.br: could not connect to host topshelfguild.com: could not connect to host toptenthebest.com: did not receive HSTS header @@ -9617,6 +9634,7 @@ tosecure.link: could not connect to host toshnix.com: could not connect to host toshub.com: could not connect to host totalle.com.br: could not connect to host +totalsystemcare.com: did not receive HSTS header totalworkout.fitness: did not receive HSTS header totem-eshop.cz: could not connect to host totoro.pub: did not receive HSTS header @@ -9675,6 +9693,7 @@ treino.blog.br: could not connect to host trell.co.in: did not receive HSTS header trendberry.ru: could not connect to host triadwars.com: did not receive HSTS header +trickedguys.com: did not receive HSTS header tridimage.com: did not receive HSTS header trileg.net: could not connect to host trinityaffirmations.com: max-age too low: 0 @@ -9752,6 +9771,7 @@ twillionmas.com: could not connect to host twinkseason.ca: could not connect to host twinkseason.co: could not connect to host twinkseason.co.uk: could not connect to host +twinkseason.com: did not receive HSTS header twinkseason.net: could not connect to host twinkseason.org: could not connect to host twinkseason.xyz: could not connect to host @@ -9796,7 +9816,6 @@ ukdropshipment.co.uk: did not receive HSTS header ukdropshipment.com: did not receive HSTS header ukk.dk: did not receive HSTS header ukrgadget.com: could not connect to host -ukrnet.co.uk: did not receive HSTS header ulabox.cat: did not receive HSTS header ulabox.es: did not receive HSTS header ullamodaintima.com.br: could not connect to host @@ -9875,12 +9894,10 @@ uporoops.com: could not connect to host uprotect.it: could not connect to host upstats.eu: could not connect to host uptic.net: did not receive HSTS header -uptimed.com: did not receive HSTS header ur-lauber.de: did not receive HSTS header urandom.eu.org: did not receive HSTS header urban-garden.lt: could not connect to host urban-garden.lv: could not connect to host -urbanstylestaging.com: did not receive HSTS header urbpic.com: could not connect to host urlchomp.com: did not receive HSTS header urphp.com: could not connect to host @@ -9974,6 +9991,7 @@ vehent.org: did not receive HSTS header vehicleuplift.co.uk: did not receive HSTS header velonustraduction.com: did not receive HSTS header vemokin.net: could not connect to host +venicefloridawebsitedesign.com: did not receive HSTS header venixplays-stream.ml: could not connect to host venmos.com: did not receive HSTS header vennet.fr: max-age too low: 0 @@ -10076,6 +10094,7 @@ voicesuk.co.uk: did not receive HSTS header voidserv.net: could not connect to host volcrado.com: did not receive HSTS header volkden.com: could not connect to host +vomitb.in: did not receive HSTS header vonavy-cukor.sk: could not connect to host vonavycukor.sk: could not connect to host vonterra.us: did not receive HSTS header @@ -10151,12 +10170,11 @@ warandpeace.xyz: could not connect to host wardsegers.be: did not receive HSTS header warehost.de: did not receive HSTS header warhistoryonline.com: did not receive HSTS header -warped.com: did not receive HSTS header +warped.com: could not connect to host warrencreative.com: did not receive HSTS header warsentech.com: could not connect to host warsh.moe: did not receive HSTS header warumsuchen.at: max-age too low: 0 -watchinventory.com: did not receive HSTS header watchium.com: did not receive HSTS header waterforlife.net.au: did not receive HSTS header waterpoint.com.br: could not connect to host @@ -10217,7 +10235,7 @@ weekly.fyi: could not connect to host wegenaer.nl: could not connect to host weiyuz.com: max-age too low: 6585555 welkers.org: could not connect to host -wellastore.ru: did not receive HSTS header +wellastore.ru: could not connect to host wellcomp.com.br: did not receive HSTS header wellies.com.au: max-age too low: 7889238 wellness.so: could not connect to host @@ -10238,7 +10256,7 @@ westerhoud.nl: did not receive HSTS header westlinwinds.com: did not receive HSTS header westsussexconnecttosupport.org: could not connect to host wetoxic.com: did not receive HSTS header -wettbonus.info: did not receive HSTS header +wettbonus.info: max-age too low: 0 wettbuero.de: did not receive HSTS header wetten.eu: did not receive HSTS header wettertoertchen.com: could not connect to host @@ -10286,7 +10304,6 @@ winaes.com: did not receive HSTS header winclient.cn: could not connect to host windowsforum.com: max-age too low: 0 winds.cf: could not connect to host -windycitydubfest.com: did not receive HSTS header winecodeavocado.com: could not connect to host winfield.me.uk: did not receive HSTS header winged.io: could not connect to host @@ -10514,6 +10531,7 @@ xtreamhosting.eu: could not connect to host xtrim.ru: did not receive HSTS header xuexb.com: did not receive HSTS header xunn.io: did not receive HSTS header +xuwei.de: max-age too low: 0 xuyh0120.win: did not receive HSTS header xxbase.com: could not connect to host xynex.us: could not connect to host @@ -10544,7 +10562,6 @@ yesdevnull.net: did not receive HSTS header yestees.com: did not receive HSTS header yetcore.io: could not connect to host yhrd.org: did not receive HSTS header -yicknam.my: did not receive HSTS header yikzu.cn: could not connect to host yin.roma.it: did not receive HSTS header yingsuo.ltd: could not connect to host @@ -10557,7 +10574,6 @@ ynsn.nl: could not connect to host yntongji.com: could not connect to host yob.vn: could not connect to host yoga-in-aying.de: did not receive HSTS header -yogabhawnamission.com: did not receive HSTS header yogeshbeniwal.com: did not receive HSTS header yohanesmario.com: did not receive HSTS header yoiyado.info: did not receive HSTS header @@ -10658,6 +10674,7 @@ zhuji.com.cn: could not connect to host zi0r.com: did not receive HSTS header zian.online: could not connect to host zicklam.com: could not connect to host +zifb.in: did not receive HSTS header zigcore.com.br: could not connect to host zihao.me: did not receive HSTS header zinc-x.com: did not receive HSTS header diff --git a/security/manager/ssl/nsSTSPreloadList.inc b/security/manager/ssl/nsSTSPreloadList.inc index df1d8422be49..f86128fc4a69 100644 --- a/security/manager/ssl/nsSTSPreloadList.inc +++ b/security/manager/ssl/nsSTSPreloadList.inc @@ -8,7 +8,7 @@ /*****************************************************************************/ #include -const PRTime gPreloadListExpirationTime = INT64_C(1527022571784000); +const PRTime gPreloadListExpirationTime = INT64_C(1527104005617000); %% 0.me.uk, 1 0005pay.com, 1 @@ -329,6 +329,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1527022571784000); 41-where.com, 1 41199.com, 1 411film.com, 1 +411movie.com, 1 41844.de, 1 41where.com, 1 420java.com, 1 @@ -1032,7 +1033,6 @@ agrarshop4u.de, 1 agrekov.ru, 1 agreor.com, 1 agricolo.ch, 1 -agridir.site, 1 agrikulturchic.com, 1 agrilinks.org, 1 agrios.de, 1 @@ -1184,7 +1184,6 @@ alainbaechlerphotography.ch, 1 alainmargot.ch, 1 alainwolf.ch, 1 alainwolf.net, 1 -alair.cn, 0 alamgir.works, 1 alanhuang.name, 1 alaninkenya.org, 1 @@ -1399,7 +1398,6 @@ alphabouncycastles.co.uk, 1 alphabrock.cn, 1 alphachat.net, 1 alphafiduciaryservices.ch, 1 -alphahunks.com, 1 alphainflatablehire.com, 1 alphapengu.in, 1 alpharotary.com, 1 @@ -1994,7 +1992,6 @@ aquadonis.ch, 1 aquahomo.com, 1 aqualife.com.gr, 1 aqualifeprojects.com, 1 -aqualogy.de, 1 aquapoint.kiev.ua, 1 aquarium-supplement.net, 1 aquaron.com, 1 @@ -2133,7 +2130,7 @@ arnoudvandalen.nl, 1 arocloud.de, 0 arod.tk, 1 arokha.com, 1 -aroonchande.com, 1 +aroonchande.com, 0 around-the-blog.com, 1 arox.eu, 1 arqueo-ecuatoriana.ec, 1 @@ -2739,6 +2736,7 @@ bahnbonus-praemienwelt.de, 1 baifubao.com, 1 baiker.info, 1 bailakomigo.com.br, 1 +bailbondsaffordable.com, 1 baildonbouncycastles.co.uk, 1 baildonhottubs.co.uk, 1 baileebee.com, 1 @@ -3321,6 +3319,7 @@ beyond-infinity.org, 1 beyond-rational.com, 1 beyondalderaan.net, 1 beyondbounce.co.uk, 1 +beyondpricing.com, 1 beyondthecode.io, 1 beyondtodaymediagroup.com, 1 beyondtrust.com, 1 @@ -3365,7 +3364,6 @@ biathloncup.ru, 1 bible-maroc.com, 1 bible.ru, 1 bibleonline.ru, 1 -biblerhymes.com, 1 bibliaon.com, 1 biblio.wiki, 1 biblioblog.fr, 1 @@ -3592,6 +3590,7 @@ bitmessage.ch, 1 bitmex.com, 1 bitminter.com, 1 bitmoe.com, 1 +bitmon.net, 1 bitok.com, 1 bitplay.space, 1 bitpod.de, 1 @@ -3960,7 +3959,6 @@ bookmein.in, 1 bookourdjs.com, 1 bookreport.ga, 1 bookshopofindia.com, 1 -booktracker-org.appspot.com, 1 bookwitty.social, 1 bool.be, 1 boomersurf.com, 1 @@ -4204,6 +4202,7 @@ brahmins.com, 1 brahmstaedt.de, 1 braiampeguero.xyz, 1 brailsford.xyz, 1 +brain-e.co, 1 brain-force.ch, 1 brainball.fr, 1 brainfork.org, 1 @@ -5078,7 +5077,6 @@ cav.ac, 1 cavac.at, 1 cavalierkingcharlesspaniel.com.br, 1 cave-reynard.ch, 1 -cavern.tv, 1 cavevinsdefrance.fr, 1 cavzodiaco.com.br, 1 caylercapital.com, 1 @@ -5829,7 +5827,6 @@ clintonbloodworth.com, 1 clintonlibrary.gov, 1 clintonplasticsurgery.com, 1 clip.mx, 0 -clip.ovh, 1 clipclip.com, 1 clmde.de, 1 clnet.com.au, 1 @@ -6181,7 +6178,6 @@ comm.cx, 1 commania.co.kr, 1 commechezvous.ch, 1 commencepayments.com, 1 -commerciallocker.com, 0 commitsandrebases.com, 1 common.io, 1 commoncode.com.au, 1 @@ -7111,6 +7107,7 @@ danna-salary.com, 1 danny.fm, 1 dannyrohde.de, 1 dannystevens.co.uk, 1 +danonsecurity.com, 1 danotage.tv, 1 danova.de, 1 danoz.net, 1 @@ -7296,7 +7293,6 @@ dawnson.is, 1 dawnsonb.com, 1 dawson-floridavilla.co.uk, 1 day-peak.com, 1 -day.vip, 1 daylightpirates.org, 1 dayman.net, 1 days.one, 1 @@ -7895,7 +7891,6 @@ digitalewelten.de, 1 digitalgov.gov, 1 digitalhurricane.io, 1 digitalimpostor.co.uk, 1 -digitallocker.com, 0 digitalmarketingindallas.com, 1 digitalrights.center, 1 digitalrights.fund, 1 @@ -7993,6 +7988,7 @@ discoveringdocker.com, 1 discoverrsv.com, 1 discoverwellness.center, 1 discoveryballoon.org, 1 +discoveryrom.org, 1 discreet-condooms.nl, 1 disinclined.org, 1 disinfesta.it, 1 @@ -8424,7 +8420,6 @@ drei01.de, 1 dreid.org, 1 dreiweiden.de, 1 dreizwosechs.de, 1 -dress-cons.com, 1 drevo-door.cz, 1 drew.beer, 1 drew.red, 1 @@ -8657,6 +8652,7 @@ dynorphins.com, 1 dynts.pro, 0 dynx.pl, 1 dyrenesverden.no, 1 +dyrkar.com, 1 dysthymia.com, 1 dyyn.de, 1 dyz.pw, 1 @@ -9504,7 +9500,6 @@ ernest.ly, 1 eron.info, 1 erotic4me.ch, 1 eroticen.com, 1 -eroticforce.com, 1 erotpo.cz, 1 erp-band.ru, 1 erp.band, 1 @@ -9786,7 +9781,6 @@ everyday.eu.org, 1 everydaywot.com, 1 everyex.com, 1 everygayporn.com, 1 -everygayporn.xyz, 1 everymove.org, 1 everytruckjob.com, 1 everywhere.cloud, 1 @@ -10277,7 +10271,6 @@ fengyadi.com, 1 fengyi.tel, 1 fenster-bank.at, 1 fenster-bank.de, 1 -fensterbau-mutscheller.de, 1 feras-alhajjaji.com, 1 ferdies.co.za, 1 fergusoncastle.com, 1 @@ -10297,7 +10290,6 @@ ferreteriaxerez.com, 1 ferrolatino.ch, 1 ferticare.pt, 1 fertila.de, 1 -feschiyan.com, 1 festaprylar.se, 1 festival-tipps.com, 1 festival.house, 1 @@ -10539,7 +10531,6 @@ flaemig42.de, 1 flagburningworld.com, 1 flagfic.com, 1 flagshop.jp, 1 -flagspot.net, 1 flair.co, 1 flam.io, 1 flamer-scene.com, 0 @@ -11651,7 +11642,6 @@ get-link.info, 1 get-on.bid, 1 get-refer.com, 1 get4x.com, 1 -geta.pub, 1 getbox.me, 1 getbutterfly.com, 1 getcloak.com, 0 @@ -11870,6 +11860,7 @@ glenhuntlyapartments.com.au, 1 glidingshop.cz, 1 glidingshop.de, 1 glidingshop.eu, 1 +glittersjabloon.nl, 1 glloq.org, 1 glob-coin.com, 1 global-lights.ma, 1 @@ -12601,6 +12592,7 @@ hanzubon.jp, 1 hao-zhang.com, 1 haogoodair.ca, 1 haozhang.org, 1 +haozi.me, 1 hapijs.cn, 1 hapissl.com, 1 hapivm.com, 1 @@ -12628,7 +12620,6 @@ harapecorita.com, 1 harbor-light.net, 1 hardeman.nu, 1 hardenize.com, 1 -hardergayporn.com, 1 hardertimes.com, 1 hardesec.com, 1 hardfalcon.net, 1 @@ -12682,7 +12673,6 @@ hashi.dk, 1 hashiconf.com, 1 hashiconf.eu, 1 hashicorp.com, 1 -hashidays.com, 1 hashimah.ca, 1 hashinteractive.com, 1 hashish.net, 1 @@ -13363,6 +13353,7 @@ hosyaku.gr.jp, 1 hot-spa.ch, 1 hotcandlestick.com, 1 hotchillibox.co.za, 1 +hotchillibox.com, 1 hotel-huberhof.at, 1 hotel-kronjuwel.de, 1 hotel-le-vaisseau.ch, 1 @@ -15294,7 +15285,6 @@ jonilar.com, 1 jonirrings.com, 1 jonkermedia.nl, 1 jonlabelle.com, 1 -jonnybarnes.uk, 1 jonnystoten.com, 1 jonoalderson.com, 1 jonpads.com, 1 @@ -15960,7 +15950,6 @@ kidbacker.com, 1 kiddyboom.ua, 1 kids-at-home.ch, 1 kids-castles.com, 1 -kids2day.in, 1 kidsforsavingearth.org, 1 kidsinwoods-interfacesouth.org, 1 kidsmark.net, 1 @@ -16056,7 +16045,6 @@ kionetworks.es, 1 kippenbart.gq, 1 kipriakipita.gr, 1 kiraboshi.xyz, 1 -kiragameforum.net, 1 kiraku.co, 1 kirbear.com, 1 kirche-dortmund-ost.de, 1 @@ -16222,6 +16210,7 @@ koboldcraft.ch, 1 kobolya.hu, 1 kodak-ism.com, 1 kodden.com.br, 1 +kode-it.de, 1 kode.ch, 1 koebbes.de, 1 koelbli.ch, 1 @@ -16284,6 +16273,7 @@ kongbaofang.com, 1 konicaprinterdriver.com, 1 koniecfica.sk, 1 konijntjes.nl, 1 +konings.it, 1 koningskwartiertje.nl, 1 konklone.com, 1 konkurs.ba, 1 @@ -16950,6 +16940,7 @@ leerkotte.eu, 1 leerliga.de, 1 leertipp.de, 1 leesilvey.com, 1 +leet2.com, 1 leetcode.com, 1 leetcode.net, 1 leetgamers.asia, 1 @@ -17048,7 +17039,6 @@ lep.gov, 1 lepenetapeti.com, 1 lepiquillo.fr, 1 leponton-lorient.fr, 1 -leppis-it.de, 1 leprado.com, 1 lepsos.com, 1 lereporter.ma, 1 @@ -17558,6 +17548,7 @@ logicsale.fr, 1 logicsale.it, 1 logimagine.com, 1 login.corp.google.com, 1 +login.gov, 0 login.launchpad.net, 1 login.sapo.pt, 1 login.ubuntu.com, 1 @@ -17702,7 +17693,6 @@ lovelens.ch, 1 lovelens.li, 1 lovelive-anime.tk, 1 lovelive.us, 1 -lovelivewiki.com, 1 lovemomiji.com, 1 lovemysafetynet.com, 1 lovenwishes.com, 1 @@ -17725,7 +17715,6 @@ lowsec.space, 1 lowsidetna.com, 1 lowson.ca, 1 lowt.us, 1 -lowtherpavilion.co.uk, 1 loyaleco.it, 1 loyaltech.ch, 1 lp-support.nl, 1 @@ -18706,6 +18695,7 @@ medialab.nrw, 1 mediamarkt.pl, 1 mediapart.fr, 1 mediaselection.eu, 1 +mediastorm.us, 1 mediationculturelleclp.ch, 1 mediatorzy.waw.pl, 1 mediawiki.org, 1 @@ -19261,6 +19251,7 @@ mission-orange.de, 1 missionsgemeinde.de, 1 missip.nl, 1 missjoias.com.br, 1 +misskey.xyz, 1 missoy.me, 1 misssex.de, 1 missualready.com, 1 @@ -19339,6 +19330,7 @@ mkset.ru, 1 mktdigital.info, 1 mktemp.org, 1 mkuznets.com, 1 +mkw.st, 1 mlcambiental.com.br, 1 mlcnfriends.com, 1 mlemay.com, 1 @@ -19484,7 +19476,6 @@ mona-dress.com, 1 monachatdeco.com, 1 monalisa.wtf, 1 monbudget.org, 1 -moncoach.ch, 1 mondedesnovels.com, 1 mondedie.fr, 1 mondial-movers.nl, 1 @@ -19667,7 +19658,6 @@ movingoklahoma.org, 1 movingtohttps.com, 1 movlib.org, 1 mowalls.net, 1 -moy.cat, 1 moyer.pub, 1 moylen.eu, 1 moyoo.net, 1 @@ -21183,7 +21173,6 @@ nutrienti.eu, 0 nutrifyyourself.com, 1 nutripedia.gr, 1 nutrivisa.com.br, 1 -nuttyveg.com, 1 nuvechtdal.nl, 1 nuvini.com, 1 nuxer.fr, 1 @@ -22363,7 +22352,6 @@ pelletsprice.com, 1 pelopogrund.com, 1 pelopoplot.com, 1 pemagrid.org, 1 -penablog.com, 1 penaugustin.com, 1 pencepay.com, 1 pencillab.cn, 1 @@ -23010,7 +22998,6 @@ politeiaudesa.org, 1 politic.org.ua, 1 politik-bei-uns.de, 1 polizeiwallis.ch, 1 -polkam.go.id, 0 pollet-ghijs.be, 1 pollet-ghys.be, 1 polletmera.com, 1 @@ -23298,7 +23285,6 @@ prifo.se, 1 primaconsulting.net, 1 primalinea.pro, 1 primates.com, 1 -primecaplending.com, 1 primewho.org, 1 primordialsnooze.com, 1 primotiles.co.uk, 1 @@ -23907,7 +23893,6 @@ radar.sx, 1 radaravia.ru, 1 radcube.hu, 1 raddavarden.nu, 1 -radeticlaw.com, 1 radfieldhomecare.co.uk, 1 radfieldhomecarefranchising.co.uk, 1 radical.org, 1 @@ -24651,7 +24636,7 @@ rld.org, 1 rlds.ch, 1 rleh.de, 1 rlove.org, 1 -rlsnet.ru, 1 +rlsnet.ru, 0 rm-it.de, 1 rmb.li, 1 rmcbs.de, 1 @@ -25566,7 +25551,6 @@ schum.world, 1 schumanandmonnet.eu, 1 schummar.de, 1 schunako.ch, 1 -schuppentier.org, 1 schurkenstaat.net, 1 schutznetze24.de, 1 schutzwerk.com, 1 @@ -25640,7 +25624,6 @@ scripthost.org, 1 scriptjunkie.us, 1 scriptum.gr, 1 scrisulfacebine.ro, 1 -scruffymen.com, 1 scrumbleship.com, 1 scrumstack.co.uk, 1 scryfall.com, 1 @@ -26091,7 +26074,6 @@ shadowsocks.software, 1 shadowsworldonline.co.uk, 1 shag-shag.ru, 1 shaharyaranjum.com, 1 -shahbeat.com, 1 shaicoleman.com, 1 shaitan.eu, 1 shakan.ch, 1 @@ -26436,6 +26418,7 @@ silviamacallister.com, 1 silvine.xyz, 1 silvistefi.com, 1 sim-karten.net, 1 +sim-sim.appspot.com, 1 sim4seed.org, 1 simam.de, 1 simbeton.nl, 1 @@ -27007,7 +26990,6 @@ solidwebnetworks.co.uk, 1 solihullcarnival.co.uk, 1 solihullinflatables.com, 1 solihulllionsclub.org.uk, 1 -solinter.com.br, 1 solipym.net, 1 solisrey.es, 1 solit.systems, 1 @@ -27880,6 +27862,7 @@ summer.ga, 1 summercampthailand.com, 1 summitmasters.net, 1 sumthing.com, 1 +sunboxstore.jp, 1 sunbritetv.com, 1 sundanceusa.com, 1 sundaycooks.com, 1 @@ -29192,6 +29175,7 @@ tintencenter.com, 1 tintenfix.net, 1 tintenfux.de, 1 tintenland.de, 1 +tintenprofi.de, 1 tinyhousefinance.com.au, 1 tinylan.com, 1 tinyspeck.com, 1 @@ -29243,6 +29227,7 @@ tkn.tokyo, 1 tkts.cl, 1 tkusano.jp, 1 tkw01536.de, 1 +tlach.cz, 1 tlca.org, 1 tlcnet.info, 1 tlehseasyads.com, 1 @@ -29482,7 +29467,6 @@ topjobs.ch, 1 toplist.eu, 1 topnotchendings.com, 1 topnotepad.com, 1 -topnovini.com, 1 topodin.com, 1 topprice.ua, 1 topshelfcommercial.com, 1 @@ -29534,7 +29518,6 @@ totallynotaserver.com, 1 totalpahire.com, 1 totalparts.com.au, 1 totalprint.hu, 1 -totalsystemcare.com, 1 totaltriathlon.com, 1 totch.de, 1 totem-international.com, 1 @@ -29770,7 +29753,6 @@ tribac.de, 1 tribaldos.com, 1 tribut.de, 1 tributh.net, 1 -trickedguys.com, 1 triddi.com, 1 trident-online.de, 1 tridentflood.com, 1 @@ -30002,7 +29984,6 @@ twentymilliseconds.com, 1 twilleys.com, 1 twincitynissantxparts.com, 1 twinkieman.com, 1 -twinkseason.com, 1 twiri.net, 1 twisata.com, 1 twistapp.com, 1 @@ -30156,6 +30137,7 @@ ukozliku.cz, 1 ukpirate.org, 1 ukrainians.ch, 1 ukrigging.net, 1 +ukrnet.co.uk, 1 ukwct.org.uk, 1 ulabox.com, 1 ulalau.com, 1 @@ -30341,6 +30323,7 @@ upplevelse.com, 1 upr-info.org, 1 upr.com.ua, 1 upsiteseo.com, 1 +uptimed.com, 1 uptimenotguaranteed.com, 1 uptodateinteriors.com, 1 uptogood.org, 1 @@ -30364,6 +30347,7 @@ urbanietz-immobilien.de, 1 urbanmelbourne.info, 1 urbannewsservice.com, 1 urbansparrow.in, 1 +urbanstylestaging.com, 1 urbanwildlifealliance.org, 1 urbexdk.nl, 1 urcentral.com, 1 @@ -30669,7 +30653,6 @@ vendigital.com, 1 vendorconnect.nyc, 1 vendserve.eu, 1 venicecomputerrepair.com, 1 -venicefloridawebsitedesign.com, 1 venicerealdeal.com, 1 venirextra.com, 1 venirideal.com, 1 @@ -31034,7 +31017,6 @@ volta.io, 1 voltimax.com, 1 volto.io, 1 voltotc.com, 1 -vomitb.in, 1 vonauw.com, 1 vonborstelboerner.de, 1 vonedelmann.de, 0 @@ -31052,7 +31034,7 @@ vorodevops.com, 1 vos-fleurs.ch, 1 vos-fleurs.com, 1 vosgym.jp, 1 -voshod.org, 1 +voshod.org, 0 vosky.fr, 1 vostronet.com, 1 voter-info.uk, 1 @@ -31260,6 +31242,7 @@ watashi.bid, 1 watch-wiki.org, 1 watchface.watch, 1 watchfreeonline.co.uk, 1 +watchinventory.com, 1 watchparts-and-tools-okayama.co.jp, 1 watchstyle.com, 1 watchtv-online.pw, 1 @@ -31838,6 +31821,7 @@ windscribe.com, 1 windsock-app.com, 1 windwoodmedia.com, 1 windwoodweb.com, 1 +windycitydubfest.com, 1 wine-importer.ru, 1 winebid.com, 1 wineworksonline.com, 1 @@ -32568,7 +32552,6 @@ xuntaosms.com, 1 xuntier.ch, 1 xupeng.me, 1 xuri.me, 0 -xuwei.de, 1 xvt-blog.tk, 1 xwalck.se, 1 xwaretech.info, 1 @@ -32704,6 +32687,7 @@ yhori.xyz, 1 yhwj.top, 1 yibaoweilong.top, 1 yibin0831.com, 1 +yicknam.my, 1 yii2.cc, 1 yikeyong.com, 1 yin8888.tv, 1 @@ -32738,6 +32722,7 @@ yoga-schwerin.de, 1 yoga-sky.de, 1 yoga-zentrum-narayani.de, 1 yoga.is-an-engineer.com, 1 +yogabhawnamission.com, 1 yogananda-roma.org, 1 yogaschoolrishikesh.com, 1 yogoeasy.com, 1 @@ -33089,7 +33074,6 @@ ziegler-family.com, 1 ziegler-heizung-frankfurt.de, 1 ziemlich-zackig.de, 1 ziemlichzackig.de, 1 -zifb.in, 1 zigi.io, 1 zigzagmart.com, 1 ziin.de, 0 From 37e9f519f9837b60f1da61d623e5e11b2140b1e3 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Wed, 17 Jan 2018 11:37:03 -0800 Subject: [PATCH 42/47] No bug, Automated HPKP preload list update from host bld-linux64-spot-324 - a=hpkp-update --- security/manager/ssl/StaticHPKPins.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/manager/ssl/StaticHPKPins.h b/security/manager/ssl/StaticHPKPins.h index beb393dc2ca3..3569bca58342 100644 --- a/security/manager/ssl/StaticHPKPins.h +++ b/security/manager/ssl/StaticHPKPins.h @@ -1161,4 +1161,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = { static const int32_t kUnknownId = -1; -static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1524603384405000); +static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1524684818266000); From cd76e29a4842db40114109800c764b76faaf84f0 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Wed, 17 Jan 2018 11:37:07 -0800 Subject: [PATCH 43/47] No bug, Automated blocklist update from host bld-linux64-spot-324 - a=blocklist-update --- browser/app/blocklist.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browser/app/blocklist.xml b/browser/app/blocklist.xml index 0f1ff0c4e837..2753992a55cc 100644 --- a/browser/app/blocklist.xml +++ b/browser/app/blocklist.xml @@ -4430,6 +4430,9 @@ AwBGo0Zmp6KRryAguuMvXATI + + AJk3QFH13eHUHHVnsvwS0Vo= + U3t2Vk8pfxTcaUPpIq0seQ== From 8ac2db0699f6a8751b6e91a30b2fdb6dca251734 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 17 Jan 2018 15:54:22 -0500 Subject: [PATCH 44/47] Backed out 7 changesets (bug 1419581) for incorrect android:debuggable. r=nalexander Backed out changeset bd1e3857b5ba (bug 1419581) Backed out changeset be888fa125dc (bug 1419581) Backed out changeset 44bcb609e721 (bug 1419581) Backed out changeset a7d75667c58b (bug 1419581) Backed out changeset 2ea82ff4a757 (bug 1419581) Backed out changeset 8f1655752d43 (bug 1419581) Backed out changeset 65195aae48d8 (bug 1419581) --- mobile/android/app/build.gradle | 2 - .../mozilla/gecko/push/TestPushManager.java | 2 +- mobile/android/base/AndroidManifest.xml.in | 6 +- mobile/android/base/AppConstants.java.in | 6 +- mobile/android/base/Makefile.in | 21 ++---- .../gecko/PresentationMediaPlayerManager.java | 2 - .../org/mozilla/gecko/mma/MmaDelegate.java | 6 ++ .../org/mozilla/gecko/mma/MmaInterface.java | 4 ++ .../org/mozilla/gecko/mma/MmaLeanplumImp.java | 12 +++- .../org/mozilla/gecko/mma/MmaStubImp.java | 10 +++ .../org/mozilla/gecko/push/PushManager.java | 13 +++- .../nightly-without-google-play-services | 12 ---- mobile/android/docs/mma.rst | 2 +- mobile/android/moz.configure | 64 ++++++------------- taskcluster/ci/build/android.yml | 49 -------------- .../64_api_16_without_google_play_services.py | 8 --- .../mozharness/mozilla/building/buildbase.py | 1 - widget/android/fennec/FennecJNINatives.h | 2 - widget/android/fennec/FennecJNIWrappers.cpp | 2 - widget/android/fennec/FennecJNIWrappers.h | 2 - widget/android/nsWindow.cpp | 8 --- widget/android/nsWindow.h | 2 - 22 files changed, 72 insertions(+), 164 deletions(-) delete mode 100644 mobile/android/config/mozconfigs/android-api-16/nightly-without-google-play-services delete mode 100644 testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_without_google_play_services.py diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index fbecee7399be..6858c22b5b06 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -123,8 +123,6 @@ android { exclude 'org/mozilla/gecko/GeckoMediaPlayer.java' exclude 'org/mozilla/gecko/GeckoPresentationDisplay.java' exclude 'org/mozilla/gecko/MediaPlayerManager.java' - exclude 'org/mozilla/gecko/PresentationMediaPlayerManager.java' - exclude 'org/mozilla/gecko/RemotePresentationService.java' } if (mozconfig.substs.MOZ_INSTALL_TRACKING) { diff --git a/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java b/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java index 4be60e70beda..42ae0f543fa7 100644 --- a/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java +++ b/mobile/android/app/src/test/java/org/mozilla/gecko/push/TestPushManager.java @@ -190,7 +190,7 @@ public class TestPushManager { public void testStartupBeforeConfiguration() throws Exception { verify(gcmTokenClient, never()).getToken(anyString(), anyBoolean()); manager.startup(System.currentTimeMillis()); - verify(gcmTokenClient, times(1)).getToken(AppConstants.MOZ_ANDROID_GCM_SENDERIDS, false); + verify(gcmTokenClient, times(1)).getToken(AppConstants.MOZ_ANDROID_GCM_SENDERID, false); } @Test diff --git a/mobile/android/base/AndroidManifest.xml.in b/mobile/android/base/AndroidManifest.xml.in index f1d1280484f5..8f1add6c14dd 100644 --- a/mobile/android/base/AndroidManifest.xml.in +++ b/mobile/android/base/AndroidManifest.xml.in @@ -43,13 +43,11 @@ -#ifdef MOZ_ANDROID_GOOGLE_PLAY_SERVICES +#ifdef MOZ_NATIVE_DEVICES -#endif - -#ifdef MOZ_NATIVE_DEVICES + #endif diff --git a/mobile/android/base/AppConstants.java.in b/mobile/android/base/AppConstants.java.in index 34e483a6db77..02cc4a70981f 100644 --- a/mobile/android/base/AppConstants.java.in +++ b/mobile/android/base/AppConstants.java.in @@ -114,15 +114,11 @@ public class AppConstants { false; //#endif - public static final String MOZ_ANDROID_GCM_SENDERIDS = -//#ifdef MOZ_MMA_GCM_SENDERID - "@MOZ_ANDROID_GCM_SENDERID@,@MOZ_MMA_GCM_SENDERID@"; -//#else + public static final String MOZ_ANDROID_GCM_SENDERID = //#ifdef MOZ_ANDROID_GCM_SENDERID "@MOZ_ANDROID_GCM_SENDERID@"; //#else null; -//#endif //#endif public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@"; diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index bfdaf4d8dfaa..a67f972aec12 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -54,15 +54,12 @@ JAVA_CLASSPATH += \ $(ANDROID_PALETTE_V7_AAR_LIB) \ $(NULL) -ifdef MOZ_ANDROID_GOOGLE_PLAY_SERVICES +# If native devices are enabled, add Google Play Services and some of the v7 +# compat libraries. +ifdef MOZ_NATIVE_DEVICES JAVA_CLASSPATH += \ $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \ $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \ - $(NULL) -endif - -ifdef MOZ_NATIVE_DEVICES - JAVA_CLASSPATH += \ $(ANDROID_PLAY_SERVICES_CAST_AAR_LIB) \ $(ANDROID_MEDIAROUTER_V7_AAR_LIB) \ $(ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB) \ @@ -85,7 +82,7 @@ ifdef MOZ_INSTALL_TRACKING $(NULL) endif -# MOZ_ANDROID_MMA requires MOZ_ANDROID_GCM and MOZ_ANDROID_GOOGLE_PLAY_SERVICES, +# MOZ_ANDROID_MMA requires MOZ_ANDROID_GCM and MOZ_NATIVE_DEVICES, # which take care of the Play Services requirements in JAVA_CLASSPATH. # Based on the import of # `com.google.android.gms.ads.identifier.AdvertisingIdClient` in @@ -112,13 +109,6 @@ java_bundled_libs := \ $(ANDROID_PALETTE_V7_AAR_LIB) \ $(NULL) -ifdef MOZ_ANDROID_GOOGLE_PLAY_SERVICES - java_bundled_libs += \ - $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \ - $(ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB) \ - $(NULL) -endif - ifdef MOZ_NATIVE_DEVICES java_bundled_libs += \ $(ANDROID_PLAY_SERVICES_BASE_AAR_LIB) \ @@ -145,7 +135,7 @@ ifdef MOZ_INSTALL_TRACKING $(NULL) endif -# MOZ_ANDROID_MMA requires MOZ_ANDROID_GCM and MOZ_ANDROID_GOOGLE_PLAY_SERVICES, +# MOZ_ANDROID_MMA requires MOZ_ANDROID_GCM and MOZ_NATIVE_DEVICES, # which take care of the Play Services requirements in # java_bundled_libs. See the note above. @@ -560,7 +550,6 @@ endif # @BuildFlag annotation in Java). For example, add a "MOZ_FOO \" line to this # list to support @BuildFlag(MOZ_FOO). BINDING_BUILD_FLAGS = \ - MOZ_NATIVE_DEVICES \ $(NULL) # Preprocess a JNI binding file using the build flags defined above. diff --git a/mobile/android/base/java/org/mozilla/gecko/PresentationMediaPlayerManager.java b/mobile/android/base/java/org/mozilla/gecko/PresentationMediaPlayerManager.java index 5daff8f9d284..46be429cd0b9 100644 --- a/mobile/android/base/java/org/mozilla/gecko/PresentationMediaPlayerManager.java +++ b/mobile/android/base/java/org/mozilla/gecko/PresentationMediaPlayerManager.java @@ -20,13 +20,11 @@ import android.view.WindowManager; import org.mozilla.gecko.AppConstants.Versions; -import org.mozilla.gecko.annotation.BuildFlag; import org.mozilla.gecko.annotation.WrapForJNI; /** * A MediaPlayerManager with API 17+ Presentation support. */ -@BuildFlag("MOZ_NATIVE_DEVICES") @TargetApi(17) public class PresentationMediaPlayerManager extends MediaPlayerManager { diff --git a/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java b/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java index fd248df0dd61..1d203d183696 100644 --- a/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java @@ -25,6 +25,7 @@ import org.mozilla.gecko.Tab; import org.mozilla.gecko.Tabs; import org.mozilla.gecko.fxa.FirefoxAccounts; import org.mozilla.gecko.preferences.GeckoPreferences; +import org.mozilla.gecko.push.PushManager; import org.mozilla.gecko.switchboard.SwitchBoard; import org.mozilla.gecko.util.ContextUtils; @@ -74,6 +75,7 @@ public class MmaDelegate { // we gather the information here then pass to mmaHelper.init() // Note that generateUserAttribute always return a non null HashMap. final Map attributes = gatherUserAttributes(activity); + mmaHelper.setGcmSenderId(PushManager.getSenderIds()); final String deviceId = getDeviceId(activity); mmaHelper.setDeviceId(deviceId); PrefsHelper.setPref(GeckoPreferences.PREFS_MMA_DEVICE_ID, deviceId); @@ -159,6 +161,10 @@ public class MmaDelegate { } } + public static String getMmaSenderId() { + return mmaHelper.getMmaSenderId(); + } + private static String getDeviceId(Activity activity) { if (SwitchBoard.isInExperiment(activity, Experiments.LEANPLUM_DEBUG)) { return DEBUG_LEANPLUM_DEVICE_ID; diff --git a/mobile/android/base/java/org/mozilla/gecko/mma/MmaInterface.java b/mobile/android/base/java/org/mozilla/gecko/mma/MmaInterface.java index c5c20ade6090..317922f2fe71 100644 --- a/mobile/android/base/java/org/mozilla/gecko/mma/MmaInterface.java +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaInterface.java @@ -20,6 +20,8 @@ public interface MmaInterface { void init(Activity Activity, Map attributes); + void setGcmSenderId(String senderIds); + void setCustomIcon(@DrawableRes int iconResId); void start(Context context); @@ -32,5 +34,7 @@ public interface MmaInterface { @CheckResult boolean handleGcmMessage(Context context, String from, Bundle bundle); + String getMmaSenderId(); + void setDeviceId(@NonNull String deviceId); } diff --git a/mobile/android/base/java/org/mozilla/gecko/mma/MmaLeanplumImp.java b/mobile/android/base/java/org/mozilla/gecko/mma/MmaLeanplumImp.java index 8da751b3c9b0..b7943f0bc528 100644 --- a/mobile/android/base/java/org/mozilla/gecko/mma/MmaLeanplumImp.java +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaLeanplumImp.java @@ -46,8 +46,6 @@ public class MmaLeanplumImp implements MmaInterface { Leanplum.setAppIdForDevelopmentMode(MmaConstants.MOZ_LEANPLUM_SDK_CLIENTID, MmaConstants.MOZ_LEANPLUM_SDK_KEY); } - LeanplumPushService.setGcmSenderId(AppConstants.MOZ_ANDROID_GCM_SENDERIDS); - if (attributes != null) { Leanplum.start(activity, attributes); } else { @@ -71,6 +69,11 @@ public class MmaLeanplumImp implements MmaInterface { }); } + @Override + public void setGcmSenderId(String senderIds) { + LeanplumPushService.setGcmSenderId(senderIds); + } + @Override public void setCustomIcon(@DrawableRes final int iconResId) { LeanplumPushService.setCustomizer(new LeanplumPushNotificationCustomizer() { @@ -114,6 +117,11 @@ public class MmaLeanplumImp implements MmaInterface { return false; } + @Override + public String getMmaSenderId() { + return MmaConstants.MOZ_MMA_SENDER_ID; + } + @Override public void setDeviceId(@NonNull String deviceId) { Leanplum.setDeviceId(deviceId); diff --git a/mobile/android/base/java/org/mozilla/gecko/mma/MmaStubImp.java b/mobile/android/base/java/org/mozilla/gecko/mma/MmaStubImp.java index b84de3b9d386..fec85177f94c 100644 --- a/mobile/android/base/java/org/mozilla/gecko/mma/MmaStubImp.java +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaStubImp.java @@ -21,6 +21,11 @@ public class MmaStubImp implements MmaInterface { } + @Override + public void setGcmSenderId(String senderIds) { + + } + @Override public void setCustomIcon(@DrawableRes int iconResId) { @@ -51,6 +56,11 @@ public class MmaStubImp implements MmaInterface { return false; } + @Override + public String getMmaSenderId() { + return ""; + } + @Override public void setDeviceId(@NonNull String deviceId) { diff --git a/mobile/android/base/java/org/mozilla/gecko/push/PushManager.java b/mobile/android/base/java/org/mozilla/gecko/push/PushManager.java index 47b18e5d96d3..0522ac2b6139 100644 --- a/mobile/android/base/java/org/mozilla/gecko/push/PushManager.java +++ b/mobile/android/base/java/org/mozilla/gecko/push/PushManager.java @@ -57,6 +57,15 @@ public class PushManager { this.pushClientFactory = pushClientFactory; } + public static String getSenderIds() { + final String mmaSenderId = MmaDelegate.getMmaSenderId(); + if (mmaSenderId != null && mmaSenderId.length() > 0) { + return AppConstants.MOZ_ANDROID_GCM_SENDERID + "," + mmaSenderId; + } else { + return AppConstants.MOZ_ANDROID_GCM_SENDERID; + } + } + public PushRegistration registrationForSubscription(String chid) { // chids are globally unique, so we're not concerned about finding a chid associated to // any particular profile. @@ -244,7 +253,7 @@ public class PushManager { } protected @NonNull PushRegistration advanceRegistration(final PushRegistration registration, final @NonNull String profileName, final long now) throws AutopushClientException, PushClient.LocalException, GcmTokenClient.NeedsGooglePlayServicesException, IOException { - final Fetched gcmToken = gcmClient.getToken(AppConstants.MOZ_ANDROID_GCM_SENDERIDS, registration.debug); + final Fetched gcmToken = gcmClient.getToken(getSenderIds(), registration.debug); final PushClient pushClient = pushClientFactory.getPushClient(registration.autopushEndpoint, registration.debug); @@ -296,7 +305,7 @@ public class PushManager { public void startup(long now) { try { Log.i(LOG_TAG, "Startup: requesting GCM token."); - gcmClient.getToken(AppConstants.MOZ_ANDROID_GCM_SENDERIDS, false); // For side-effects. + gcmClient.getToken(getSenderIds(), false); // For side-effects. } catch (GcmTokenClient.NeedsGooglePlayServicesException e) { // Requires user intervention. At App startup, we don't want to address this. In // response to user activity, we do want to try to have the user address this. diff --git a/mobile/android/config/mozconfigs/android-api-16/nightly-without-google-play-services b/mobile/android/config/mozconfigs/android-api-16/nightly-without-google-play-services deleted file mode 100644 index 2d980f1f172c..000000000000 --- a/mobile/android/config/mozconfigs/android-api-16/nightly-without-google-play-services +++ /dev/null @@ -1,12 +0,0 @@ -. "$topsrcdir/build/mozconfig.artifact.automation" - -. "$topsrcdir/mobile/android/config/mozconfigs/common" - -. "$topsrcdir/mobile/android/config/mozconfigs/android-api-16/nightly" - -ac_add_options --without-google-play-services - -unset MOZ_ANDROID_MMA -unset MOZ_ANDROID_POCKET - -. "$topsrcdir/mobile/android/config/mozconfigs/common.override" diff --git a/mobile/android/docs/mma.rst b/mobile/android/docs/mma.rst index b80b58099450..7f201f69a117 100644 --- a/mobile/android/docs/mma.rst +++ b/mobile/android/docs/mma.rst @@ -202,7 +202,7 @@ To test this locally, add lines like: export MOZ_ANDROID_MMA=1 ac_add_options --with-leanplum-sdk-keyfile=/path/to/leanplum-sdk-developer.token -MOZ_ANDROID_MMA depends on MOZ_ANDROID_GOOGLE_PLAY_SERVICES and MOZ_ANDROID_GCM. +MOZ_ANDROID_MMA depends on MOZ_NATIVE_DEVICES and MOZ_ANDROID_GCM. Since Leanplum requires Google Play Services library, those flags are a proxy for it, and enable respectively. We want to enable MOZ_ANDROID_MMA in Nightly, but only for diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure index 034810e966dc..11ee3a5f33af 100644 --- a/mobile/android/moz.configure +++ b/mobile/android/moz.configure @@ -8,41 +8,25 @@ project_flag('MOZ_ANDROID_EXCLUDE_FONTS', help='Whether to exclude font files from the build', default=True) -option('--with-google-play-services', - help='Enable features that depend on non-free Google Play Services', - default=True) - -@depends('--with-google-play-services') -def google_play_services(value): - return bool(value) - -set_config('MOZ_ANDROID_GOOGLE_PLAY_SERVICES', depends_if(google_play_services)(lambda _: True)) - -set_config('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0') -add_old_configure_assignment('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0') - -option(env='MOZ_ANDROID_GCM', - help='Enable GCM (Google Cloud Messaging) registration', - default=google_play_services) - -set_config('MOZ_ANDROID_GCM', - depends_if('MOZ_ANDROID_GCM')(lambda _: True)) -add_old_configure_assignment('MOZ_ANDROID_GCM', - depends_if('MOZ_ANDROID_GCM')(lambda _: True)) +project_flag('MOZ_ANDROID_GCM', + help='Enable GCM (Google Cloud Messaging) registration', + default=True, + set_for_old_configure=True) option(env='MOZ_NATIVE_DEVICES', help='Enable second screen support using native Android libraries.', - default=google_play_services) + default=True) set_config('MOZ_NATIVE_DEVICES', depends_if('MOZ_NATIVE_DEVICES')(lambda _: True)) add_old_configure_assignment('MOZ_NATIVE_DEVICES', depends_if('MOZ_NATIVE_DEVICES')(lambda _: True)) -# Enable install tracking SDK if we have Google Play support. -@depends(milestone, google_play_services, '--help') -def install_tracking_default(milestone, google_play_services, help): - return bool(milestone.is_release_or_beta and google_play_services) +# Enable install tracking SDK if we have Google Play support; MOZ_NATIVE_DEVICES +# is a proxy flag for that support. +@depends(milestone, 'MOZ_NATIVE_DEVICES', '--help') +def install_tracking_default(milestone, native_devices, help): + return bool(milestone.is_release_or_beta and native_devices) option(env='MOZ_INSTALL_TRACKING', help='Enable install tracking (currently using the Adjust SDK).', @@ -119,6 +103,9 @@ imply_option('--enable-small-chunk-size', True) set_config('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0') add_old_configure_assignment('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0') +set_config('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0') +add_old_configure_assignment('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0') + @depends(target) def check_target(target): if target.os != 'Android': @@ -133,13 +120,13 @@ include('../../build/moz.configure/java.configure') include('gradle.configure') # Must come after the ../../toolkit/moz.configure. -@depends('MOZ_INSTALL_TRACKING', google_play_services, '--with-adjust-sdk-keyfile') +@depends('MOZ_INSTALL_TRACKING', 'MOZ_NATIVE_DEVICES', '--with-adjust-sdk-keyfile') def check_install_tracking(install_tracking, - google_play_services, + native_devices, adjust_sdk_keyfile): if install_tracking: - if not google_play_services: - die('You must specify --with-google-play-services when' + if not native_devices: + die('You must specify MOZ_NATIVE_DEVICES=1 when' ' building with MOZ_INSTALL_TRACKING=1') if not adjust_sdk_keyfile: die('You must specify --with-adjust-sdk-keyfile=/path/to/keyfile when' @@ -147,16 +134,16 @@ def check_install_tracking(install_tracking, # Must come after the ../../toolkit/moz.configure. @depends('MOZ_ANDROID_MMA', - google_play_services, + 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_GCM', '--with-leanplum-sdk-keyfile') def check_android_mma(android_mma, - google_play_services, + native_devices, android_gcm, leanplum_sdk_keyfile): if android_mma: - if not google_play_services: - die('You must specify --with-google-play-services when' + if not native_devices: + die('You must specify MOZ_NATIVE_DEVICES=1 when' ' building with MOZ_ANDROID_MMA=1') if not android_gcm: die('You must specify MOZ_ANDROID_GCM=1 when' @@ -171,12 +158,3 @@ def check_android_pocket(android_pocket, pocket_api_keyfile): if android_pocket and not pocket_api_keyfile: die('You must specify --with-pocket-api-keyfile=/path/to/keyfile when' ' building with MOZ_ANDROID_POCKET=1') - -# Must come after the ../../toolkit/moz.configure. -@depends('MOZ_ANDROID_GCM', google_play_services) -def check_android_gcm(android_gcm, - google_play_services): - if android_gcm: - if not google_play_services: - die('You must specify --with-google-play-services when' - ' building with MOZ_ANDROID_GCM=1') diff --git a/taskcluster/ci/build/android.yml b/taskcluster/ci/build/android.yml index e1bd89ecd278..6be1f1f4f50b 100644 --- a/taskcluster/ci/build/android.yml +++ b/taskcluster/ci/build/android.yml @@ -202,55 +202,6 @@ android-api-16/opt: - linux64-sccache - proguard-jar -android-api-16-without-google-play-services/opt: - description: "Android 4.0 api-16+ (without Google Play Services) Opt" - index: - product: mobile - job-name: android-api-16-without-google-play-services-opt - treeherder: - platform: android-4-0-armv7-api16/opt - symbol: tc(BnoGPS) - worker-type: aws-provisioner-v1/gecko-{level}-b-android - worker: - docker-image: {in-tree: android-build} - max-run-time: 7200 - env: - GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline" - PERFHERDER_EXTRA_OPTIONS: android-api-16-without-google-play-services - TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest" - artifacts: - - name: public/android/R - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R - type: directory - - name: public/android/maven - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ - type: directory - - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk - type: file - - name: public/build - path: /builds/worker/artifacts/ - type: directory - run: - using: mozharness - actions: [get-secrets build multi-l10n update] - config: - - builds/releng_base_android_64_builds.py - - disable_signing.py - - platform_supports_post_upload_to_latest.py - script: "mozharness/scripts/fx_desktop_build.py" - secrets: true - custom-build-variant-cfg: api-16-without-google-play-services - tooltool-downloads: internal - run-on-projects: ['mozilla-central'] - toolchains: - - android-gradle-dependencies - - android-sdk-linux - - linux64-clang - - linux64-rust-android - - linux64-sccache - - proguard-jar - android-api-16-nightly/opt: description: "Android 4.0 api-16+ Nightly" attributes: diff --git a/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_without_google_play_services.py b/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_without_google_play_services.py deleted file mode 100644 index 5d385eb314fb..000000000000 --- a/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_16_without_google_play_services.py +++ /dev/null @@ -1,8 +0,0 @@ -config = { - 'base_name': 'Android armv7 api-16+ %(branch)s --without-google-play-services', - 'stage_platform': 'android-api-16', - 'build_type': 'api-16-opt', - 'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-16/nightly-without-google-play-services', - 'multi_locale_config_platform': 'android', - 'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent. -} diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py index 989604c65038..be14a31c02a6 100755 --- a/testing/mozharness/mozharness/mozilla/building/buildbase.py +++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py @@ -434,7 +434,6 @@ class BuildOptionParser(object): 'api-16-debug-artifact': 'builds/releng_sub_%s_configs/%s_api_16_debug_artifact.py', 'api-16-gradle': 'builds/releng_sub_%s_configs/%s_api_16_gradle.py', 'api-16-gradle-artifact': 'builds/releng_sub_%s_configs/%s_api_16_gradle_artifact.py', - 'api-16-without-google-play-services': 'builds/releng_sub_%s_configs/%s_api_16_without_google_play_services.py', 'rusttests': 'builds/releng_sub_%s_configs/%s_rusttests.py', 'rusttests-debug': 'builds/releng_sub_%s_configs/%s_rusttests_debug.py', 'x86': 'builds/releng_sub_%s_configs/%s_x86.py', diff --git a/widget/android/fennec/FennecJNINatives.h b/widget/android/fennec/FennecJNINatives.h index 8c5fc9a18757..1f537bf4ee0d 100644 --- a/widget/android/fennec/FennecJNINatives.h +++ b/widget/android/fennec/FennecJNINatives.h @@ -83,7 +83,6 @@ const JNINativeMethod MemoryMonitor::Natives::methods[] = { ::template Wrap<&Impl::DispatchMemoryPressure>) }; -#ifdef MOZ_NATIVE_DEVICES template class PresentationMediaPlayerManager::Natives : public mozilla::jni::NativeImpl { @@ -107,7 +106,6 @@ const JNINativeMethod PresentationMediaPlayerManager::Natives::methods[] = ::template Wrap<&Impl::RemovePresentationSurface>) }; -#endif // MOZ_NATIVE_DEVICES template class Telemetry::Natives : public mozilla::jni::NativeImpl { diff --git a/widget/android/fennec/FennecJNIWrappers.cpp b/widget/android/fennec/FennecJNIWrappers.cpp index 54a442627fdf..b29dd14d1c4b 100644 --- a/widget/android/fennec/FennecJNIWrappers.cpp +++ b/widget/android/fennec/FennecJNIWrappers.cpp @@ -174,7 +174,6 @@ const char MemoryMonitor::name[] = constexpr char MemoryMonitor::DispatchMemoryPressure_t::name[]; constexpr char MemoryMonitor::DispatchMemoryPressure_t::signature[]; -#ifdef MOZ_NATIVE_DEVICES const char PresentationMediaPlayerManager::name[] = "org/mozilla/gecko/PresentationMediaPlayerManager"; @@ -187,7 +186,6 @@ constexpr char PresentationMediaPlayerManager::InvalidateAndScheduleComposite_t: constexpr char PresentationMediaPlayerManager::RemovePresentationSurface_t::name[]; constexpr char PresentationMediaPlayerManager::RemovePresentationSurface_t::signature[]; -#endif // MOZ_NATIVE_DEVICES const char Telemetry::name[] = "org/mozilla/gecko/Telemetry"; diff --git a/widget/android/fennec/FennecJNIWrappers.h b/widget/android/fennec/FennecJNIWrappers.h index 9c6eb4fe5187..56865b1852c9 100644 --- a/widget/android/fennec/FennecJNIWrappers.h +++ b/widget/android/fennec/FennecJNIWrappers.h @@ -518,7 +518,6 @@ public: template class Natives; }; -#ifdef MOZ_NATIVE_DEVICES class PresentationMediaPlayerManager : public mozilla::jni::ObjectBase { public: @@ -586,7 +585,6 @@ public: template class Natives; }; -#endif // MOZ_NATIVE_DEVICES class Telemetry : public mozilla::jni::ObjectBase { public: diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index 0063f392dcac..cf4617511110 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -1139,7 +1139,6 @@ public: template<> const char nsWindow::NativePtr::sName[] = "LayerViewSupport"; -#ifdef MOZ_NATIVE_DEVICES /* PresentationMediaPlayerManager native calls access inner nsWindow functionality so PMPMSupport is a child class of nsWindow */ class nsWindow::PMPMSupport final : public PresentationMediaPlayerManager::Natives @@ -1224,7 +1223,6 @@ public: ANativeWindow* nsWindow::PMPMSupport::sWindow; EGLSurface nsWindow::PMPMSupport::sSurface; -#endif nsWindow::GeckoViewSupport::~GeckoViewSupport() @@ -1392,11 +1390,9 @@ nsWindow::InitNatives() nsWindow::GeckoViewSupport::Base::Init(); nsWindow::LayerViewSupport::Init(); nsWindow::NPZCSupport::Init(); -#ifdef MOZ_NATIVE_DEVICES if (jni::IsFennec()) { nsWindow::PMPMSupport::Init(); } -#endif GeckoEditableSupport::Init(); } @@ -2078,13 +2074,11 @@ nsWindow::GetNativeData(uint32_t aDataType) } return nullptr; -#ifdef MOZ_NATIVE_DEVICES case NS_PRESENTATION_WINDOW: return PMPMSupport::sWindow; case NS_PRESENTATION_SURFACE: return PMPMSupport::sSurface; -#endif } return nullptr; @@ -2094,11 +2088,9 @@ void nsWindow::SetNativeData(uint32_t aDataType, uintptr_t aVal) { switch (aDataType) { -#ifdef MOZ_NATIVE_DEVICES case NS_PRESENTATION_SURFACE: PMPMSupport::sSurface = reinterpret_cast(aVal); break; -#endif } } diff --git a/widget/android/nsWindow.h b/widget/android/nsWindow.h index 43b9e17ff553..0dc25d10b7bb 100644 --- a/widget/android/nsWindow.h +++ b/widget/android/nsWindow.h @@ -193,10 +193,8 @@ private: // keep it last in the list, so its destructor is called first. mozilla::UniquePtr mGeckoViewSupport; -#ifdef MOZ_NATIVE_DEVICES // Class that implements native PresentationMediaPlayerManager calls. class PMPMSupport; -#endif mozilla::Atomic mContentDocumentDisplayed; From f40d9dac13faac2b77d761dc7740dfca99fc2ea7 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 17 Jan 2018 15:54:42 -0500 Subject: [PATCH 45/47] Backed out changeset f5c4825b6ae8 (bug 1430417) for incorrect android:debuggable. r=nalexander --- mobile/android/app/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index 6858c22b5b06..5859e951fd42 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -231,11 +231,11 @@ dependencies { implementation "com.google.android.gms:play-services-measurement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" } - // Include LeakCanary in local builds, but not in official builds. Mach - // builds target the official audience, so LeakCanary will not be included - // in any Mach build. - localImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1' - officialImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' + // Include LeakCanary in most gradle based builds. Gradle based tests + // include the no-op version. Mach based builds only include the no-op + // version of this library. + debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1' + releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' implementation project(path: ':geckoview') From ac18fd51527bdc21112fc1dc7856b5b7cd3fb09c Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 17 Jan 2018 15:55:38 -0500 Subject: [PATCH 46/47] Backed out 20 changesets (bug 1411654) for incorrect android:debuggable. r=nalexander, a=RyanVM Backed out changeset cfad693be918 (bug 1411654) Backed out changeset 55776829a744 (bug 1411654) Backed out changeset c5bf85d56fed (bug 1411654) Backed out changeset c270f97bb0da (bug 1411654) Backed out changeset fde9bf9c14c3 (bug 1411654) Backed out changeset 01836fd98c63 (bug 1411654) Backed out changeset 730a70767743 (bug 1411654) Backed out changeset 690e265c684c (bug 1411654) Backed out changeset f918500d9cf5 (bug 1411654) Backed out changeset cec2b8828cc8 (bug 1411654) Backed out changeset 76085ddd5ac7 (bug 1411654) Backed out changeset 2b37201606f5 (bug 1411654) Backed out changeset d0d513d1c379 (bug 1411654) Backed out changeset e7b0cc801cf1 (bug 1411654) Backed out changeset 901b304603d9 (bug 1411654) Backed out changeset 373c9a71d945 (bug 1411654) Backed out changeset 3dc3beab95f8 (bug 1411654) Backed out changeset 22a861db1573 (bug 1411654) Backed out changeset 0850b319efd4 (bug 1411654) Backed out changeset d276d3deba05 (bug 1411654) --HG-- rename : mobile/android/app/src/main/res/values-v17/themes.xml => mobile/android/base/resources/values-v17/themes.xml --- build.gradle | 3 +- build/docs/toolchains.rst | 54 ++-- gradle.properties | 1 - gradle/wrapper/gradle-wrapper.properties | 4 +- mobile/android/app/build.gradle | 240 ++++++++++-------- mobile/android/app/lint.xml | 2 + .../src/main/res/drawable/ic_as_trending.xml | 2 +- .../customtabs_action_bar_custom_view.xml | 3 +- .../app/src/main/res/values-v11/themes.xml | 9 + .../src/main/res/values-v13/search_styles.xml | 15 ++ .../src/main/res/values-v16/search_styles.xml | 19 ++ .../app/src/main/res/values/themes.xml | 17 +- .../app/src/photon/res/values-v11/styles.xml | 21 +- .../app/src/photon/res/values-v16/styles.xml | 8 + .../app/src/photon/res/values/styles.xml | 56 ++-- .../mozilla/gecko/GlobalPageMetadataTest.java | 14 +- .../gecko/icons/loader/TestLegacyLoader.java | 16 +- .../icons/preparation/TestLookupIconUrl.java | 1 - .../mozilla/gecko/util/NetworkUtilsTest.java | 14 +- .../src/test/resources/robolectric.properties | 2 +- mobile/android/base/AndroidManifest.xml.in | 7 +- mobile/android/base/Makefile.in | 21 +- .../java/org/mozilla/gecko/CrashReporter.java | 4 +- .../ActivityStreamTelemetry.java | 4 +- .../homepanel/model/Highlight.java | 3 +- .../gecko/customtabs/ActionBarPresenter.java | 1 + .../customtabs/CustomTabsSecurityPopup.java | 2 +- .../db/AbstractTransactionalProvider.java | 4 +- .../org/mozilla/gecko/db/LocalBrowserDB.java | 14 +- .../gecko/db/PerProfileDatabaseProvider.java | 55 ++++ .../org/mozilla/gecko/dlc/BaseAction.java | 3 +- .../org/mozilla/gecko/dlc/DownloadAction.java | 3 +- .../gecko/home/HomeExpandableListView.java | 68 +++++ .../mozilla/gecko/updater/UpdateService.java | 6 +- .../gecko/util/UnusedResourcesUtil.java | 4 - mobile/android/base/moz.build | 4 +- .../resources}/values-v17/themes.xml | 0 mobile/android/docs/gradle.rst | 101 -------- mobile/android/docs/index.rst | 1 - mobile/android/geckoview/build.gradle | 45 ++-- .../mozilla/gecko/media/GeckoHlsPlayer.java | 2 +- mobile/android/geckoview_example/build.gradle | 46 +++- mobile/android/gradle.configure | 60 ++--- mobile/android/gradle/debug_level.gradle | 7 +- mobile/android/gradle/product_flavors.gradle | 48 ---- .../android/gradle/with_gecko_binaries.gradle | 232 ++++++++--------- mobile/android/mach_commands.py | 4 +- .../db/DelegatingTestContentProvider.java | 49 +--- .../gecko/background/db/TestTabsProvider.java | 8 +- .../testhelpers/MockGlobalSession.java | 4 +- .../testhelpers/MockPrefsGlobalSession.java | 5 + .../db/BrowserProviderBookmarksTest.java | 13 +- .../gecko/db/BrowserProviderGeneralTest.java | 9 +- .../BrowserProviderHistoryVisitsTestBase.java | 9 +- .../mozilla/gecko/db/LocalBrowserDBTest.java | 7 +- .../TestFxAccountDeviceListUpdater.java | 7 +- .../android/VisitsHelperTest.java | 7 +- mobile/android/thirdparty/build.gradle | 12 +- old-configure.in | 2 +- python/mozboot/mozboot/android-packages.txt | 2 +- python/mozbuild/mozbuild/config_status.py | 7 +- taskcluster/ci/build/android.yml | 24 +- .../misc/android-gradle-dependencies/after.sh | 2 +- .../android-gradle-dependencies/nexus.xml | 3 +- 64 files changed, 756 insertions(+), 664 deletions(-) create mode 100644 mobile/android/app/src/main/res/values-v13/search_styles.xml create mode 100644 mobile/android/app/src/main/res/values-v16/search_styles.xml create mode 100644 mobile/android/base/java/org/mozilla/gecko/db/PerProfileDatabaseProvider.java create mode 100644 mobile/android/base/java/org/mozilla/gecko/home/HomeExpandableListView.java rename mobile/android/{app/src/main/res => base/resources}/values-v17/themes.xml (100%) delete mode 100644 mobile/android/docs/gradle.rst delete mode 100644 mobile/android/gradle/product_flavors.gradle diff --git a/build.gradle b/build.gradle index 1b9a1e598682..d39a6c271bab 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,7 @@ allprojects { topobjdir = gradle.mozconfig.topobjdir compileSdkVersion = tryInt(mozconfig.substs.ANDROID_COMPILE_SDK_VERSION) + buildToolsVersion = tryInt(mozconfig.substs.ANDROID_BUILD_TOOLS_VERSION) targetSdkVersion = tryInt(mozconfig.substs.ANDROID_TARGET_SDK) minSdkVersion = tryInt(mozconfig.substs.MOZ_ANDROID_MIN_SDK_VERSION) manifestPlaceholders = [ @@ -51,7 +52,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:2.3.3' // Provided in tree. classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.7.3' } diff --git a/build/docs/toolchains.rst b/build/docs/toolchains.rst index f0ac69cef3ed..ea2bded60226 100644 --- a/build/docs/toolchains.rst +++ b/build/docs/toolchains.rst @@ -70,18 +70,28 @@ redistributed publicly.) Archiving the Gradle executable is straight-forward, but archiving a local Maven repository is not. Therefore a special Task Cluster -Docker image and toolchain job exist for producing the required -archives. The Docker image definition is rooted in -``taskcluster/docker/android-build``. The Task Cluster toolchain job -is named `android-gradle-dependencies`. The job runs in a container -based on the custom Docker image and spawns a Sonatype Nexus proxying -Maven repository process in the background. The job builds Firefox -for Android using Gradle and the in-tree Gradle configuration rooted -at ``build.gradle``. The spawned proxying Maven repository downloads -external dependencies and collects them. After the Gradle build -completes, the job archives the Gradle version used to build, and the -downloaded Maven repository, and exposes them as Task Cluster -artifacts. +Docker image and job exist for producing the required archives. The +Docker image definition is rooted in +``taskcluster/docker/android-build``. The Task Cluster job +definition is in +``testing/taskcluster/tasks/builds/android_api_16_gradle_dependencies.yml``. +The job runs in a container based on the custom Docker image and +spawns a Sonatype Nexus proxying Maven repository process in the +background. The job builds Firefox for Android using Gradle and the +in-tree Gradle configuration rooted at ``build.gradle``. The spawned +proxying Maven repository downloads external dependencies and collects +them. After the Gradle build completes, the job archives the Gradle +version used to build, and the downloaded Maven repository, and +exposes them as Task Cluster artifacts. + +Here is `an example try job fetching these dependencies +`_. +The resulting task produced a `Gradle archive +`_ +and a `Maven repository archive +`_. +These archives were then uploaded (manually) to Mozilla automation +using tooltool for consumption in Gradle builds. To update the version of Gradle in the archive produced, update ``gradle/wrapper/gradle-wrapper.properties``. Be sure to also update @@ -90,18 +100,12 @@ the SHA256 checksum to prevent poisoning the build machines! To update the versions of Gradle dependencies used, update ``dependencies`` sections in the in-tree Gradle configuration rooted at ``build.gradle``. Once you are confident your changes build -locally, push a fresh build to try. The `android-gradle-dependencies` -toolchain should run automatically, fetching your new dependencies and -wiring them into the appropriate try build jobs. +locally, push a fresh try build with an invocation like:: -To update the version of Sonatype Nexus, update `NEXUS_VERSION` in the -`android-build` Docker image. + $ hg push-to-try -m "try: -b o -p android-api-16-gradle-dependencies" -To modify the Sonatype Nexus configuration, typically to proxy a new -remote Maven repository, modify -`taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml`. - -There is also a toolchain job that fetches the Android SDK and related -packages. To update the versions of packaged fetched, modify -`python/mozboot/mozboot/android-packages.txt` and update the various -in-tree versions accordingly. +Then `upload your archives to tooltool +`_, +update the in-tree manifests in +``mobile/android/config/tooltool-manifests``, and push a fresh try +build. diff --git a/gradle.properties b/gradle.properties index 4f89f18a5261..71b53e053b3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,3 @@ org.gradle.parallel=true org.gradle.daemon=true org.gradle.jvmargs=-Xmx2560M -android.enableAapt2=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8d366b57c92f..bfd67896af13 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip -distributionSha256Sum=5c07b3bac2209fbc98fb1fdf6fd831f72429cdf8c503807404eae03d8c8099e5 +distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip +distributionSha256Sum=ed7e9c8bb41bd10d4c9339c95b2f8b122f5bf13188bd90504a26e0f00b123b0d diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index 5859e951fd42..67f59443f69f 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -5,14 +5,13 @@ apply plugin: 'checkstyle' apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'findbugs' -apply from: "${topsrcdir}/mobile/android/gradle/product_flavors.gradle" - dexcount { format = "tree" } android { compileSdkVersion project.ext.compileSdkVersion + buildToolsVersion project.ext.buildToolsVersion defaultConfig { targetSdkVersion project.ext.targetSdkVersion @@ -85,13 +84,35 @@ android { // want to develop significant new user interface pieces in-tree that don't ship (even in the // Nightly channel) while under development. A new "skin" flavour allows us to develop such // pieces in Gradle without changing the mainline configuration. - - project.configureProductFlavors.delegate = it - project.configureProductFlavors() - - flavorDimensions "audience", "geckoBinaries", "minApi", "skin" + flavorDimensions "audience", "skin" productFlavors { + // For API 21+ - with pre-dexing, this will be faster for local development. + local { + dimension "audience" + + // For pre-dexing, setting `minSdkVersion 21` allows the Android gradle plugin to + // pre-DEX each module and produce an APK that can be tested on + // Android Lollipop without time consuming DEX merging processes. + minSdkVersion 21 + dexOptions { + preDexLibraries true + } + } + // For API < 21 - does not support pre-dexing because local development + // is slow in that case. + localOld { + dimension "audience" + } + + // Automation builds. We use "official" rather than "automation" to drive these builds down + // the list of configurations that Android Studio offers, thereby making it _not_ the + // default. This avoids a common issue with "omni.ja" not being packed into the default APK + // built and deployed by Android Studio. + official { + dimension "audience" + } + // Since Firefox 57, the mobile user interface has followed the Photon design. // Before Firefox 57, the user interface followed the Australis design. photon { @@ -141,10 +162,13 @@ android { exclude 'org/mozilla/gecko/gcm/**/*.java' exclude 'org/mozilla/gecko/push/**/*.java' } + + srcDir "${project.buildDir}/generated/source/preprocessed_code" // See syncPreprocessedCode. } res { srcDir "${topsrcdir}/${mozconfig.substs.MOZ_BRANDING_DIRECTORY}/res" + srcDir "${project.buildDir}/generated/source/preprocessed_resources" // See syncPreprocessedResources. srcDir "${topsrcdir}/mobile/android/services/src/main/res" if (mozconfig.substs.MOZ_CRASHREPORTER) { srcDir "${topsrcdir}/mobile/android/base/crashreporter/res" @@ -158,6 +182,18 @@ android { } } + // Every configuration needs the stub manifest at + // src/main/AndroidManifest.xml and the generated manifest. We can't + // use the main sourceSet without losing the stub, so we cover all the + // configurations by enumerating the buildTypes here. + debug { + manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml" + } + + release { + manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml" + } + test { java { // Bug 1229149 tracks pushing this into a :services Gradle project. @@ -191,9 +227,6 @@ android { } testOptions { - // For Robolectric: see https://github.com/robolectric/robolectric/issues/3333#issuecomment-324300418. - unitTests.includeAndroidResources true - unitTests.all { // We'd like to use (Runtime.runtime.availableProcessors()/2), but // we have tests that start test servers and the bound ports @@ -204,50 +237,72 @@ android { } dependencies { - implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:cardview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:recyclerview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:cardview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:recyclerview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" if (mozconfig.substs.MOZ_NATIVE_DEVICES) { - implementation "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-cast:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-cast:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" } if (mozconfig.substs.MOZ_INSTALL_TRACKING) { - implementation "com.google.android.gms:play-services-analytics:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-analytics:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" } if (mozconfig.substs.MOZ_ANDROID_GCM) { - implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-measurement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-measurement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" } - // Include LeakCanary in most gradle based builds. Gradle based tests - // include the no-op version. Mach based builds only include the no-op - // version of this library. - debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1' - releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' - testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' + // Include LeakCanary in most gradle based builds. LeakCanary adds about 5k methods, so we disable + // it for the (non-proguarded, non-predex) localOld builds to allow space for other libraries. + // Gradle based tests include the no-op version. Mach based builds only include the no-op version + // of this library. + // It doesn't seem like there is a non-trivial way to be conditional on 'localOld', so instead we explicitly + // define a version of leakcanary for every flavor: + localCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1' + localOldCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' + officialCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' + officialCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' + testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1' - implementation project(path: ':geckoview') - implementation project(path: ':thirdparty') + // With a simple "compile", Gradle will always build these libraries in their default configuration + // (i.e. release), so we need to explicitly forward our own build configuration here (bug 1385695). + // + // Official builds compile a hacked up app:Official..Debug, but need the + // release versions of the dependencies, in order to not have debugging + // information. It's not yet possible to specify just officialDebug, so we + // hack around it here. + if (mozconfig.substs.MOZILLA_OFFICIAL) { + debugCompile project(path: ':geckoview', configuration: "release") + } else { + debugCompile project(path: ':geckoview', configuration: "debug") + } + releaseCompile project(path: ':geckoview', configuration: "release") - testImplementation 'junit:junit:4.12' - testImplementation 'org.robolectric:robolectric:3.5.1' - testImplementation 'org.simpleframework:simple-http:6.0.1' - testImplementation 'org.mockito:mockito-core:1.10.19' + if (mozconfig.substs.MOZILLA_OFFICIAL) { + debugCompile project(path: ':thirdparty', configuration: "release") + } else { + debugCompile project(path: ':thirdparty', configuration: "debug") + } + releaseCompile project(path: ':thirdparty', configuration: "release") + + testCompile 'junit:junit:4.12' + testCompile 'org.robolectric:robolectric:3.1.2' + testCompile 'org.simpleframework:simple-http:6.0.1' + testCompile 'org.mockito:mockito-core:1.10.19' // Including the Robotium JAR directly can cause issues with dexing. - androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4' + androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.5.4' } // TODO: (bug 1261486): This impl is not robust - @@ -262,6 +317,11 @@ task checkstyle(type: Checkstyle) { classpath = files() } +task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) { + into("${project.buildDir}/generated/source/preprocessed_code") + from("${topobjdir}/mobile/android/base/generated/preprocessed") +} + // The localization system uses the moz.build preprocessor to interpolate a .dtd // file of XML entity definitions into an XML file of elements referencing those // entities. (Each locale produces its own .dtd file, backstopped by the en-US @@ -277,80 +337,49 @@ class ExpandXMLEntitiesFilter extends FilterReader { } } +task syncPreprocessedResources(type: Sync, dependsOn: rootProject.generateCodeAndResources) { + into("${project.buildDir}/generated/source/preprocessed_resources") + from("${topobjdir}/mobile/android/base/res") + filesMatching('**/strings.xml') { + filter(ExpandXMLEntitiesFilter) + } +} + +// It's not easy -- see the backout in Bug 1242213 -- to change the +// package for Fennec. Gradle has grown a mechanism to achieve what we want for +// Fennec, however, with applicationId. To use the same manifest as moz.build, +// we replace the package with org.mozilla.gecko (the eventual package) here. +task rewriteManifestPackage(type: Copy, dependsOn: rootProject.generateCodeAndResources) { + into("${project.buildDir}/generated/source/preprocessed_manifest") + from("${topobjdir}/mobile/android/base/AndroidManifest.xml") + filter { it.replaceFirst(/package=".*?"/, 'package="org.mozilla.gecko"') } +} + apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle" android.applicationVariants.all { variant -> - def syncPreprocessedJava = task("syncPreprocessedJavaFor${variant.name.capitalize()}", type: Sync) { - into("${project.buildDir}/moz.build/src/${variant.name}/java") - from("${topobjdir}/mobile/android/base/generated/preprocessed") - exclude('**/*.mkdir.done') - } - // This is an Android-Gradle plugin 3+-ism. Culted from reading the source, - // searching for "registerJavaGeneratingTask", and finding - // https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/commit/2f2b91476fb1c6647791e2c6fe531a47615a1e85. - // The added directory doesn't appear in the paths listed by the - // `sourceSets` task, for reasons unknown. - variant.registerJavaGeneratingTask(syncPreprocessedJava, syncPreprocessedJava.destinationDir) - - def syncPreprocessedRes = task("syncPreprocessedResFor${variant.name.capitalize()}", type: Sync) { - into("${project.buildDir}/moz.build/src/${variant.name}/res") - from("${topobjdir}/mobile/android/base/res") - filesMatching('**/strings.xml') { - filter(ExpandXMLEntitiesFilter) - } - exclude('**/*.mkdir.done') - } - // This is an Android-Gradle plugin 3+-ism. Determined by reading the - // source. The added directory doesn't appear in the paths listed by the - // `sourceSets` task, for reasons unknown. - variant.registerGeneratedResFolders(project.files(syncPreprocessedRes.destinationDir).builtBy(syncPreprocessedRes)) - - // It's not easy -- see the backout in Bug 1242213 -- to change the - // package for Fennec. Gradle has grown a mechanism to achieve - // what we want for Fennec, however, with applicationId. To use the same - // manifest as moz.build, we replace the package with org.mozilla.gecko (the - // eventual package) here. - def rewriteManifestPackage = task("rewriteManifestPackageFor${variant.name.capitalize()}", type: Copy, dependsOn: rootProject.generateCodeAndResources) { - into("${project.buildDir}/moz.build/src/${variant.name}") - from("${topobjdir}/mobile/android/base/AndroidManifest.xml") - filter { it.replaceFirst(/package=".*?"/, 'package="org.mozilla.gecko"') } - exclude('**/*.mkdir.done') - } - - // Every configuration needs the stub manifest at - // src/main/AndroidManifest.xml and the generated manifest. We can't use - // the main sourceSet without losing the stub, so we cover all the - // configurations here. - android.sourceSets."${variant.name}".manifest.srcFile "${rewriteManifestPackage.destinationDir}/AndroidManifest.xml" variant.preBuild.dependsOn rewriteManifestPackage + variant.preBuild.dependsOn syncPreprocessedCode + variant.preBuild.dependsOn syncPreprocessedResources + // Official automation builds don't include Gecko binaries, since those binaries are not + // produced until after build time (at package time). official Therefore, automation builds + // include the Gecko binaries into the APK at package time. The "withGeckoBinaries" variant of + // the :geckoview project also does this. (It does what it says on the tin!) For notes on this + // approach, see mobile/android/gradle/with_gecko_binaries.gradle. - // Local (read, not 'official') builds want to reflect developer changes to - // AndroidManifest.xml.in, strings.xml, and preprocessed Java code. To do - // this, the Gradle build calls out to the moz.build system, which can be - // re-entrant. Official builds are driven by the moz.build system and - // should never be re-entrant in this way. - if (!((variant.productFlavors*.name).contains('official'))) { - syncPreprocessedJava.dependsOn rootProject.generateCodeAndResources - syncPreprocessedRes.dependsOn rootProject.generateCodeAndResources - rewriteManifestPackage.dependsOn rootProject.generateCodeAndResources - } + // Like 'local' or 'localOld'. + def audienceDimension = variant.productFlavors[0].name - // When driven from moz.build via |mach build|, Gradle does not require or - // use Gecko binaries. It's only |mach package| that packs the Gecko - // binaries into the resulting APK. The "withoutGeckoBinaries" variants - // handle this. When driven from Android Studio or Gradle, the - // "withGeckoBinaries" variants handle packing the Gecko binaries into the - // resulting APK (for on-device deployment). They also update the Omnijars - // as necessary, smoothing out the edit-compile-test development cycle. - // They do what they say on the tin! - if ((variant.productFlavors*.name).contains('withGeckoBinaries')) { + // :app uses :geckoview:release and handles it's own Gecko binary inclusion, + // even though this would be most naturally done in the :geckoview project. + if (!audienceDimension.equals('official')) { configureVariantWithGeckoBinaries(variant) } } android.applicationVariants.all { variant -> - configureApplicationVariantWithJNIWrappers(variant, "Fennec") + configureVariantWithJNIWrappers(variant, "Fennec") } if (gradle.startParameter.taskNames.any { it.endsWith('UnitTest') }) { @@ -387,7 +416,7 @@ android.applicationVariants.all { variant -> reports { html.enabled = true // HTML reports for humans. - html.destination = file("$project.buildDir/reports/findbugs/findbugs-${variant.name}-output.html") + html.destination = "$project.buildDir/reports/findbugs/findbugs-${variant.name}-output.html" xml.enabled = false } } @@ -411,7 +440,7 @@ android.applicationVariants.all { variant -> reports { xml.enabled = true // XML reports for machines. - xml.destination = file("$project.buildDir/reports/findbugs/findbugs-${variant.name}-output.xml") + xml.destination = "$project.buildDir/reports/findbugs/findbugs-${variant.name}-output.xml" html.enabled = false } } @@ -437,7 +466,8 @@ android.applicationVariants.all { variant -> variant.outputs.each { output -> output.processManifest.doLast { - [file("${manifestOutputDirectory}/AndroidManifest.xml"), + [output.processManifest.manifestOutputFile, + output.processManifest.instantRunManifestOutputFile, ].each({ File manifestOutFile -> if (manifestOutFile.exists()) { def contents = manifestOutFile.getText('UTF-8') diff --git a/mobile/android/app/lint.xml b/mobile/android/app/lint.xml index 04ae0bd8a5cd..1ee77837fdd9 100644 --- a/mobile/android/app/lint.xml +++ b/mobile/android/app/lint.xml @@ -38,6 +38,7 @@ + @@ -50,6 +51,7 @@ + diff --git a/mobile/android/app/src/main/res/drawable/ic_as_trending.xml b/mobile/android/app/src/main/res/drawable/ic_as_trending.xml index fd0e3ea85114..5e0ff19d5342 100644 --- a/mobile/android/app/src/main/res/drawable/ic_as_trending.xml +++ b/mobile/android/app/src/main/res/drawable/ic_as_trending.xml @@ -5,5 +5,5 @@ android:viewportHeight="12.0"> + android:pathData="M4.97.151l-2.819,6.5A.25.25,0,0,0,2.381,7H4.029a.25.25,0,0,1,.225.359L2,12,9.4,5.437A.25.25,0,0,0,9.234,5H6.791a.25.25,0,0,1-.19-.412L10.15.412A.25.25,0,0,0,9.959,0H5.2A.25.25,0,0,0,4.97.151Z"/> diff --git a/mobile/android/app/src/main/res/layout/customtabs_action_bar_custom_view.xml b/mobile/android/app/src/main/res/layout/customtabs_action_bar_custom_view.xml index ad68a04246e7..350f37d2ec4b 100644 --- a/mobile/android/app/src/main/res/layout/customtabs_action_bar_custom_view.xml +++ b/mobile/android/app/src/main/res/layout/customtabs_action_bar_custom_view.xml @@ -40,7 +40,7 @@ android:id="@+id/custom_tabs_action_bar_title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:singleLine="true" + android:lines="1" android:textColor="?android:textColorPrimary" android:textSize="14sp" tools:text="Mozilla.org"/> @@ -49,6 +49,7 @@ android:id="@+id/custom_tabs_action_bar_url" android:layout_width="match_parent" android:layout_height="wrap_content" + android:lines="1" android:singleLine="true" android:textColor="?android:textColorPrimary" android:textSize="10sp" diff --git a/mobile/android/app/src/main/res/values-v11/themes.xml b/mobile/android/app/src/main/res/values-v11/themes.xml index ad14e2d0160c..d53aed28dbae 100644 --- a/mobile/android/app/src/main/res/values-v11/themes.xml +++ b/mobile/android/app/src/main/res/values-v11/themes.xml @@ -15,6 +15,15 @@ true + + + + + + + + + diff --git a/mobile/android/app/src/main/res/values/themes.xml b/mobile/android/app/src/main/res/values/themes.xml index 68f48ef6ad78..a14f76810f9b 100644 --- a/mobile/android/app/src/main/res/values/themes.xml +++ b/mobile/android/app/src/main/res/values/themes.xml @@ -3,8 +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/. --> - + - + + + + diff --git a/mobile/android/app/src/photon/res/values-v16/styles.xml b/mobile/android/app/src/photon/res/values-v16/styles.xml index ba4d29ebe53e..0686ab2c35c6 100644 --- a/mobile/android/app/src/photon/res/values-v16/styles.xml +++ b/mobile/android/app/src/photon/res/values-v16/styles.xml @@ -14,6 +14,14 @@ sans-serif-light + + + + diff --git a/mobile/android/app/src/photon/res/values/styles.xml b/mobile/android/app/src/photon/res/values/styles.xml index 2bbfa52e129f..f3032693ee84 100644 --- a/mobile/android/app/src/photon/res/values/styles.xml +++ b/mobile/android/app/src/photon/res/values/styles.xml @@ -25,6 +25,8 @@ + + + + @@ -359,8 +370,7 @@ ?android:attr/textColorTertiary - - - @@ -519,21 +527,30 @@ 6dp + + + + + - - @@ -562,8 +579,8 @@ - - + @@ -814,8 +831,7 @@ @drawable/as_contextmenu_divider - diff --git a/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java b/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java index e3fccbd4bf3c..f30ee7a2c0c1 100644 --- a/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java +++ b/mobile/android/app/src/test/java/org/mozilla/gecko/GlobalPageMetadataTest.java @@ -3,7 +3,6 @@ package org.mozilla.gecko; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentValues; import android.database.Cursor; @@ -16,6 +15,7 @@ import org.mozilla.gecko.background.testhelpers.TestRunner; import org.mozilla.gecko.db.BrowserContract; import org.mozilla.gecko.db.BrowserContract.PageMetadata; import org.mozilla.gecko.db.BrowserDB; +import org.mozilla.gecko.db.BrowserProvider; import org.mozilla.gecko.db.LocalBrowserDB; import org.robolectric.shadows.ShadowContentResolver; @@ -27,8 +27,11 @@ public class GlobalPageMetadataTest { public void testQueueing() throws Exception { BrowserDB db = new LocalBrowserDB("default"); - final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + BrowserProvider provider = new BrowserProvider(); try { + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); + ShadowContentResolver cr = new ShadowContentResolver(); ContentProviderClient pageMetadataClient = cr.acquireContentProviderClient(PageMetadata.CONTENT_URI); @@ -61,8 +64,11 @@ public class GlobalPageMetadataTest { // Start listening for events. GlobalPageMetadata.getInstance().init(); - final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + BrowserProvider provider = new BrowserProvider(); try { + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); + ShadowContentResolver cr = new ShadowContentResolver(); ContentProviderClient historyClient = cr.acquireContentProviderClient(BrowserContract.History.CONTENT_URI); ContentProviderClient pageMetadataClient = cr.acquireContentProviderClient(PageMetadata.CONTENT_URI); @@ -165,4 +171,4 @@ public class GlobalPageMetadataTest { cursor.close(); } } -} +} \ No newline at end of file diff --git a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java index 515926157bdc..eecf76788cd3 100644 --- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java +++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/loader/TestLegacyLoader.java @@ -3,21 +3,29 @@ package org.mozilla.gecko.icons.loader; -import android.content.ContentProvider; import android.graphics.Bitmap; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mozilla.gecko.GeckoProfile; import org.mozilla.gecko.background.db.DelegatingTestContentProvider; import org.mozilla.gecko.background.testhelpers.TestRunner; +import org.mozilla.gecko.db.BrowserContract; +import org.mozilla.gecko.db.BrowserDB; +import org.mozilla.gecko.db.BrowserProvider; import org.mozilla.gecko.icons.IconDescriptor; import org.mozilla.gecko.icons.IconRequest; import org.mozilla.gecko.icons.IconResponse; import org.mozilla.gecko.icons.Icons; import org.robolectric.RuntimeEnvironment; +import org.robolectric.shadows.ShadowContentResolver; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.Iterator; +import java.util.concurrent.ConcurrentHashMap; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; @@ -38,7 +46,9 @@ public class TestLegacyLoader { // We need to ensure we close our db connection properly. // This is the only test in this class that actually accesses a database. If that changes, // move BrowserProvider registration into a @Before method, and provider.shutdown into @After. - final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + final BrowserProvider provider = new BrowserProvider(); + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); try { final IconRequest request = Icons.with(RuntimeEnvironment.application) .pageUrl(TEST_PAGE_URL) @@ -51,8 +61,8 @@ public class TestLegacyLoader { verify(loader).loadBitmapFromDatabase(request); Assert.assertNull(response); + // Close any open db connections. } finally { - // Close any open db connections. provider.shutdown(); } } diff --git a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java index 9fcbdabf0419..99bac076bb7d 100644 --- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java +++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java @@ -28,7 +28,6 @@ public class TestLookupIconUrl { @Before public void setUp() { MemoryStorage.get().evictAll(); - DiskStorage.get(RuntimeEnvironment.application).evictAll(); } @Test diff --git a/mobile/android/app/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java b/mobile/android/app/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java index 706dc8eda814..fb2cffc9208e 100644 --- a/mobile/android/app/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java +++ b/mobile/android/app/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java @@ -12,17 +12,13 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mozilla.gecko.background.testhelpers.TestRunner; -import org.mozilla.gecko.util.NetworkUtils.ConnectionSubType; -import org.mozilla.gecko.util.NetworkUtils.ConnectionType; -import org.mozilla.gecko.util.NetworkUtils.NetworkStatus; +import org.mozilla.gecko.util.NetworkUtils.*; import org.robolectric.RuntimeEnvironment; -import org.robolectric.shadow.api.Shadow; +import org.robolectric.internal.ShadowExtractor; import org.robolectric.shadows.ShadowConnectivityManager; import org.robolectric.shadows.ShadowNetworkInfo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; @RunWith(TestRunner.class) public class NetworkUtilsTest { @@ -35,7 +31,7 @@ public class NetworkUtilsTest { // Not using Shadows.shadowOf(connectivityManager) because of Robolectric bug when using API23+ // See: https://github.com/robolectric/robolectric/issues/1862 - shadowConnectivityManager = (ShadowConnectivityManager) Shadow.extract(connectivityManager); + shadowConnectivityManager = (ShadowConnectivityManager) ShadowExtractor.extract(connectivityManager); } @Test @@ -186,4 +182,4 @@ public class NetworkUtilsTest { ); assertEquals(NetworkStatus.UP, NetworkUtils.getNetworkStatus(connectivityManager)); } -} +} \ No newline at end of file diff --git a/mobile/android/app/src/test/resources/robolectric.properties b/mobile/android/app/src/test/resources/robolectric.properties index f83ed7ff6b3f..a809da730fb1 100644 --- a/mobile/android/app/src/test/resources/robolectric.properties +++ b/mobile/android/app/src/test/resources/robolectric.properties @@ -1,3 +1,3 @@ -sdk=23 +sdk=21 constants=org.mozilla.gecko.BuildConfig packageName=org.mozilla.gecko diff --git a/mobile/android/base/AndroidManifest.xml.in b/mobile/android/base/AndroidManifest.xml.in index 8f1add6c14dd..5801ce4da2f0 100644 --- a/mobile/android/base/AndroidManifest.xml.in +++ b/mobile/android/base/AndroidManifest.xml.in @@ -1,7 +1,6 @@ #filter substitution - + @@ -160,7 +159,7 @@ android:resource="@integer/assist_launch_icon_res"/> - + @@ -170,7 +169,7 @@ - + diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index a67f972aec12..0b9885d57347 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -27,8 +27,6 @@ GARBAGE_DIRS += classes db jars res sync services generated gradle_dir := $(topobjdir)/gradle/build/mobile/android -ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE - # The bootclasspath is functionally identical to the classpath, but allows the # classes given to redefine classes in core packages, such as java.lang. # android.jar is here as it provides Android's definition of the Java Standard @@ -145,6 +143,7 @@ uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) java_bundled_libs := $(call uniq,$(java_bundled_libs)) java_bundled_libs := $(subst $(NULL) ,:,$(strip $(java_bundled_libs))) +ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE GECKOVIEW_JARS = \ constants.jar \ gecko-R.jar \ @@ -176,6 +175,16 @@ ifdef MOZ_ANDROID_MLS_STUMBLER FENNEC_JARS += ../stumbler/stumbler.jar endif +else # MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE + +GECKOVIEW_JARS := $(gradle_dir)/geckoview/intermediates/bundles/debug/classes.jar +FENNEC_JARS := $(gradle_dir)/app/intermediates/packaged/officialPhoton/debug/classes.jar + +$(GECKOVIEW_JARS): .gradle.deps +$(FENNEC_JARS): .gradle.deps + +endif # MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE + geckoview_jars_classpath := $(subst $(NULL) ,:,$(strip $(GECKOVIEW_JARS))) # All the jars we're compiling from source. (not to be confused with @@ -223,8 +232,6 @@ endif # MOZ_INSTALL_TRACKING library_jars := $(subst $(NULL) ,:,$(strip $(library_jars))) -endif # MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE - ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE define gradle_command $(1): $(2) @@ -237,7 +244,7 @@ $(eval $(call gradle_command,.gradle.deps,.aapt.deps FORCE)) classes.dex: .gradle.deps $(REPORT_BUILD) - cp $(gradle_dir)/app/intermediates/transforms/dexMerger/officialWithoutGeckoBinariesNoMinApiPhoton/debug/0/classes.dex classes.dex + cp $(gradle_dir)/app/intermediates/transforms/dex/officialPhoton/debug/folders/1000/1f/main/classes.dex $@ GeneratedJNIWrappers.cpp GeneratedJNIWrappers.h GeneratedJNINatives.h : .gradle.deps $(REPORT_BUILD) @@ -245,7 +252,7 @@ GeneratedJNIWrappers.cpp GeneratedJNIWrappers.h GeneratedJNINatives.h : .gradle. FennecJNIWrappers.cpp FennecJNIWrappers.h FennecJNINatives.h: .gradle.deps $(REPORT_BUILD) -else # MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE +else classes.dex: .proguard.deps $(REPORT_BUILD) $(DX) --dex --output=classes.dex --force-jumbo jars-proguarded @@ -484,7 +491,7 @@ $(eval $(call gradle_command,.gradle.nodeps,AndroidManifest.xml $(constants_PP_J .aapt.nodeps: .gradle.nodeps FORCE @$(TOUCH) $@ cp $(GRADLE_ANDROID_APP_APK) gecko-nodeps.ap_ - cp $(gradle_dir)/app/intermediates/transforms/dexMerger/officialWithoutGeckoBinariesNoMinApiPhoton/debug/0/classes.dex classes.dex + cp $(gradle_dir)/app/intermediates/transforms/dex/officialPhoton/debug/folders/1000/1f/main/classes.dex classes.dex else # .aapt.nodeps: AndroidManifest.xml FORCE $(eval $(call aapt_command,.aapt.nodeps,AndroidManifest.xml FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/)) diff --git a/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java b/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java index 9a9f07aef63b..20fcbe89622b 100644 --- a/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java +++ b/mobile/android/base/java/org/mozilla/gecko/CrashReporter.java @@ -46,9 +46,7 @@ import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditText; -// Registered: This activity is only registered in the manifest if MOZ_CRASHREPORTER is set. -// CutPasteId: This lint is not worth fixing. To fix it, cache all the findViewById results. -@SuppressLint("Registered,CutPasteId") +@SuppressLint("Registered") // This activity is only registered in the manifest if MOZ_CRASHREPORTER is set public class CrashReporter extends AppCompatActivity { private static final String LOGTAG = "GeckoCrashReporter"; diff --git a/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamTelemetry.java b/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamTelemetry.java index 402cc2dac7bd..f4253947b42e 100644 --- a/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamTelemetry.java +++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamTelemetry.java @@ -5,7 +5,6 @@ package org.mozilla.gecko.activitystream; -import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; @@ -217,7 +216,8 @@ public class ActivityStreamTelemetry { break; // While we also have a "blank" type, it is not used by Activity Stream. case BrowserContract.TopSites.TYPE_BLANK: - throw new IllegalStateException("Unknown top site type :" + (int) topSite.getType()); + default: + throw new IllegalStateException("Unknown top site type: " + topSite.getType()); } return this; diff --git a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Highlight.java b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Highlight.java index 70b2015c30c8..c301bf69e9a9 100644 --- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Highlight.java +++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Highlight.java @@ -226,5 +226,4 @@ public class Highlight implements WebpageRowModel { // The Highlights cursor automatically notifies of data changes, so nothing needs to be done here. @Override - public void onStateCommitted() {} -} + public void onStateCommitted() {}} diff --git a/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java b/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java index 0f3ddcc2275c..bca8f25ae905 100644 --- a/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java +++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java @@ -34,6 +34,7 @@ import org.mozilla.gecko.R; import org.mozilla.gecko.SiteIdentity; import org.mozilla.gecko.Tab; import org.mozilla.gecko.toolbar.SecurityModeUtil; +import org.mozilla.gecko.toolbar.CustomTabsSecurityPopup; import org.mozilla.gecko.util.ColorUtil; /** diff --git a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsSecurityPopup.java b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsSecurityPopup.java index fbb1f0a2e686..6df2791a1bf3 100644 --- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsSecurityPopup.java +++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsSecurityPopup.java @@ -2,7 +2,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/. */ -package org.mozilla.gecko.customtabs; +package org.mozilla.gecko.toolbar; import android.content.ClipData; import android.content.ClipboardManager; diff --git a/mobile/android/base/java/org/mozilla/gecko/db/AbstractTransactionalProvider.java b/mobile/android/base/java/org/mozilla/gecko/db/AbstractTransactionalProvider.java index 9665a148abed..19a58a39e4ac 100644 --- a/mobile/android/base/java/org/mozilla/gecko/db/AbstractTransactionalProvider.java +++ b/mobile/android/base/java/org/mozilla/gecko/db/AbstractTransactionalProvider.java @@ -42,6 +42,8 @@ import java.util.Arrays; * * * {@link AbstractPerProfileDatabaseProvider} provides a simple abstraction for * querying databases that are stored in the user's profile directory. + * * {@link PerProfileDatabaseProvider} is a simple version that only allows a + * single ContentProvider to access each per-profile database. * * {@link SharedBrowserDatabaseProvider} is an example of a per-profile provider * that allows for multiple providers to safely work with the same databases. */ @@ -132,7 +134,7 @@ public abstract class AbstractTransactionalProvider extends ContentProvider { * If we're not in a batch, but we are in a write transaction, * end it. * - * @see AbstractTransactionalProvider#markWriteSuccessful(SQLiteDatabase) + * @see PerProfileDatabaseProvider#markWriteSuccessful(SQLiteDatabase) */ protected void endWrite(final SQLiteDatabase db) { if (isInBatch()) { diff --git a/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java b/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java index adc12578fd24..adf04d62e7a7 100644 --- a/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java +++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java @@ -306,11 +306,7 @@ public class LocalBrowserDB extends BrowserDB { bookmarkValue.put(Bookmarks.FAVICON_ID, faviconID); faviconValues.add(iconValue); } - } catch (IllegalAccessException e) { - Log.wtf(LOGTAG, "Reflection failure.", e); - } catch (IllegalArgumentException e) { - Log.wtf(LOGTAG, "Reflection failure.", e); - } catch (NoSuchFieldException e) { + } catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException e) { Log.wtf(LOGTAG, "Reflection failure.", e); } } @@ -506,13 +502,7 @@ public class LocalBrowserDB extends BrowserDB { faviconField.setAccessible(true); return faviconField.getInt(null); - } catch (IllegalAccessException e) { - // We'll end up here for any default bookmark that doesn't have a favicon in - // resources/raw/ (i.e., about:firefox). When this happens, the Favicons service will - // fall back to the default branding icon for about pages. Non-about pages should always - // specify an icon; otherwise, the placeholder globe favicon will be used. - Log.d(LOGTAG, "No raw favicon resource found for " + name); - } catch (NoSuchFieldException e) { + } catch (IllegalAccessException | NoSuchFieldException e) { // We'll end up here for any default bookmark that doesn't have a favicon in // resources/raw/ (i.e., about:firefox). When this happens, the Favicons service will // fall back to the default branding icon for about pages. Non-about pages should always diff --git a/mobile/android/base/java/org/mozilla/gecko/db/PerProfileDatabaseProvider.java b/mobile/android/base/java/org/mozilla/gecko/db/PerProfileDatabaseProvider.java new file mode 100644 index 000000000000..7075c6e8ac13 --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/db/PerProfileDatabaseProvider.java @@ -0,0 +1,55 @@ +/* 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/. */ + +package org.mozilla.gecko.db; + +import org.mozilla.gecko.AppConstants.Versions; +import org.mozilla.gecko.db.PerProfileDatabases.DatabaseHelperFactory; + +import android.content.Context; +import android.database.sqlite.SQLiteOpenHelper; + +/** + * Abstract class containing methods needed to make a SQLite-based content + * provider with a database helper of type T, where one database helper is + * held per profile. + */ +public abstract class PerProfileDatabaseProvider extends AbstractPerProfileDatabaseProvider { + private PerProfileDatabases databases; + + @Override + protected PerProfileDatabases getDatabases() { + return databases; + } + + protected abstract String getDatabaseName(); + + /** + * Creates and returns an instance of the appropriate DB helper. + * + * @param context to use to create the database helper + * @param databasePath path to the DB file + * @return instance of the database helper + */ + protected abstract T createDatabaseHelper(Context context, String databasePath); + + @Override + public boolean onCreate() { + synchronized (this) { + databases = new PerProfileDatabases( + getContext(), getDatabaseName(), new DatabaseHelperFactory() { + @Override + public T makeDatabaseHelper(Context context, String databasePath) { + final T helper = createDatabaseHelper(context, databasePath); + if (Versions.feature16Plus) { + helper.setWriteAheadLoggingEnabled(true); + } + return helper; + } + }); + } + + return true; + } +} diff --git a/mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java b/mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java index 5b1e0004fef1..8c76ab35afff 100644 --- a/mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java +++ b/mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java @@ -5,7 +5,6 @@ package org.mozilla.gecko.dlc; -import android.annotation.SuppressLint; import android.content.Context; import android.support.annotation.IntDef; import android.util.Log; @@ -101,7 +100,7 @@ public abstract class BaseAction { } else if (content.isHyphenationDictionary()) { destinationDirectory = new File(context.getApplicationInfo().dataDir, "hyphenation"); } else { - throw new UnrecoverableDownloadContentException("Can't determine destination for kind: " + (String) content.getKind()); + throw new UnrecoverableDownloadContentException("Can't determine destination for kind: " + content.getKind()); } if (!destinationDirectory.exists() && !destinationDirectory.mkdirs()) { diff --git a/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadAction.java b/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadAction.java index 0487d99ff18e..69e2d9e8d665 100644 --- a/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadAction.java +++ b/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadAction.java @@ -5,7 +5,6 @@ package org.mozilla.gecko.dlc; -import android.annotation.SuppressLint; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; @@ -107,7 +106,7 @@ public class DownloadAction extends BaseAction { } if (!content.isAssetArchive()) { - Log.e(LOGTAG, "Downloaded content is not of type 'asset-archive': " + (String) content.getType()); + Log.e(LOGTAG, "Downloaded content is not of type 'asset-archive': " + content.getType()); temporaryFile.delete(); DownloadContentTelemetry.eventDownloadFailure(content, DownloadContentTelemetry.ERROR_LOGIC); continue; diff --git a/mobile/android/base/java/org/mozilla/gecko/home/HomeExpandableListView.java b/mobile/android/base/java/org/mozilla/gecko/home/HomeExpandableListView.java new file mode 100644 index 000000000000..7badd692909c --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeExpandableListView.java @@ -0,0 +1,68 @@ +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ + +package org.mozilla.gecko.home; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.ContextMenu.ContextMenuInfo; +import android.view.View; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemLongClickListener; +import android.widget.ExpandableListView; + +/** + * HomeExpandableListView is a custom extension of + * ExpandableListView, that packs a HomeContextMenuInfo + * when any of its rows is long pressed. + *

+ * This is the ExpandableListView equivalent of + * HomeListView. + */ +public class HomeExpandableListView extends ExpandableListView + implements OnItemLongClickListener { + + // ContextMenuInfo associated with the currently long pressed list item. + private HomeContextMenuInfo mContextMenuInfo; + + // ContextMenuInfo factory. + private HomeContextMenuInfo.ExpandableFactory mContextMenuInfoFactory; + + public HomeExpandableListView(Context context) { + this(context, null); + } + + public HomeExpandableListView(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + public HomeExpandableListView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + + setOnItemLongClickListener(this); + } + + @Override + public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { + if (mContextMenuInfoFactory == null) { + return false; + } + + // HomeExpandableListView items can correspond to groups and children. + // The factory can determine whether to add context menu for either, + // both, or none by unpacking the given position. + mContextMenuInfo = mContextMenuInfoFactory.makeInfoForAdapter(view, position, id, getExpandableListAdapter()); + return showContextMenuForChild(HomeExpandableListView.this); + } + + @Override + public ContextMenuInfo getContextMenuInfo() { + return mContextMenuInfo; + } + + public void setContextMenuInfoFactory(final HomeContextMenuInfo.ExpandableFactory factory) { + mContextMenuInfoFactory = factory; + } +} diff --git a/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java b/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java index 0598105fe108..12068c741b3d 100644 --- a/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java +++ b/mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java @@ -294,14 +294,12 @@ public class UpdateService extends IntentService { public void run() { showPermissionNotification(); sendCheckUpdateResult(CheckUpdateResult.NOT_AVAILABLE); - } - }) + }}) .run(new Runnable() { @Override public void run() { startDownload(info, flags); - } - }); + }}); } private void startDownload(UpdateInfo info, int flags) { diff --git a/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java b/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java index 8f68e29ba069..7abe104de8c4 100644 --- a/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java +++ b/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java @@ -101,8 +101,4 @@ final class UnusedResourcesUtil { public static final int[] USED_IN_PAGE_ACTION = { R.drawable.add_to_homescreen }; - - public static final int[] USED_IN_LEANPLUM_EXPANDABLE_LIST_ACTIVITY = { - R.style.Widget_ExpandableListView, - }; } diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index b89f43d0ca2f..2d1aaa90790d 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -565,6 +565,7 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'db/LocalURLMetadata.java', 'db/LoginsProvider.java', 'db/PasswordsProvider.java', + 'db/PerProfileDatabaseProvider.java', 'db/PerProfileDatabases.java', 'db/RemoteClient.java', 'db/RemoteTab.java', @@ -662,6 +663,7 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'home/HomeConfigLoader.java', 'home/HomeConfigPrefsBackend.java', 'home/HomeContextMenuInfo.java', + 'home/HomeExpandableListView.java', 'home/HomeFragment.java', 'home/HomeListView.java', 'home/HomePager.java', @@ -1160,7 +1162,7 @@ gbjar.extra_jars += [CONFIG['ANDROID_DESIGN_AAR_LIB']] gbjar.extra_jars += [CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_LIB']] gbjar.extra_jars += [CONFIG['ANDROID_CUSTOMTABS_AAR_LIB']] -gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough,-cast', '-J-Xmx512m', '-J-Xms128m'] +gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough', '-J-Xmx512m', '-J-Xms128m'] # gecko-thirdparty is a good place to put small independent libraries gtjar = add_java_jar('gecko-thirdparty') diff --git a/mobile/android/app/src/main/res/values-v17/themes.xml b/mobile/android/base/resources/values-v17/themes.xml similarity index 100% rename from mobile/android/app/src/main/res/values-v17/themes.xml rename to mobile/android/base/resources/values-v17/themes.xml diff --git a/mobile/android/docs/gradle.rst b/mobile/android/docs/gradle.rst deleted file mode 100644 index 745453ff20b6..000000000000 --- a/mobile/android/docs/gradle.rst +++ /dev/null @@ -1,101 +0,0 @@ -.. -*- Mode: rst; fill-column: 80; -*- - -================================= - The Fennec Gradle configuration -================================= - -The Fennec Gradle configuration has three major facets: - -1. separation into Gradle projects; -2. Android-Gradle build configurations using `flavorDimensions`; -3. integration into the larger `moz.build` build system. - -Separation into Gradle projects -=============================== - -The Fennec source code is separated into multiple Gradle projects. Right now, -there are only a few: `:app`, `:geckoview`, `:thirdparty`, etc. Over time, pieces -of the Fennec source code will be extracted into separate, more-or-less -stand-alone Gradle projects (e.g., `:services`, `:stumbler`, `:media`) and use -modern techniques such as dependency injection to configure themselves at -runtime. - -The `:omnijar` project is special and exists only to support integration with -Android Studio. - -The details of the Gradle projects are reflected in the root `settings.gradle` -and the `**/build.gradle` files throughout the tree. - -Android-Gradle build configurations -=================================== - -The Fennec `:app` project uses the Android-Gradle build plugin -`flavorDimensions` feature set to support many different configurations. The -Gradle integration must support many often conflicting requirements; the flavor -dimensions chosen support these requirements. - -Version 3.0+ of the Android-Gradle build plugin improves support for "variant -dependencies". This makes it easier for a consuming application (for us, -`:app`) to use the appropriate configuration of consumed libraries (for us, -`:geckoview`). This allows us to simplify the logic around packaging the Gecko -libraries and Omnijar. - -The details of the Android-Gradle build configurations are reflected -`**/build.gradle` files throughout the tree, in the -`mobile/android/gradle/*.gradle` files, and in the configuration baked into -`mobile/android/gradle.configure`. - -The notable flavor dimensions are: - -audience --------- - -The `audience` flavor dimension determines who the build is for. "local" -audiences are developers: they should get extra logging and as much support for -building Fennec as possible. In particular, "local" audiences get support for -modifying the Android manifest and regenerating the pre-processed `strings.xml` -files while building with Gradle from within Android Studio. - -"official" audiences are end users: they should get Mozilla's official branding -and have security-sensitive developer features disabled. The "official" -audience corresponds roughly to the `MOZILLA_OFFICIAL=1` build setting. - -**Builds shipped to the Google Play Store are always for "official" audiences.** - -geckoBinaries -------------- - -For deep historical reasons, Mozilla's build system has multiple stages, the -most important of which are the build stage and the package stage. During the -build stage, the Gecko compiled libraries (e.g., `libxul.so`) and the Omnijar -have not yet been built. These libraries are only available during the package -stage. Gradle builds always want to include the Gecko libraries and the -Omnijar. - -To accommodate the different stages, the build stage always invokes -"withoutGeckoBinaries" Gradle configurations. These configurations don't expect -or use the Gecko libraries or Omnijar. At the moment, the package stage also -invokes "withoutGeckoBinaries", but in the future, the package stage will invoke -"withGeckoBinaries" Gradle configurations to simplify the packaging of libraries -and the omnijar. - -**Local developers almost always want to build "withGeckoBinaries", so that the -APK files produced can be run on device.** - -minApi ------- - -At various times in the past, Fennec has supported APK splits, producing APKs -that support only specific Android versions. While this is not used at this -time, there are certain developer options (i.e., options that should only apply -to "local" audiences) that *also* depend on the target Android version. This -flavor dimension allows to opt in to those options, improving the speed of -development. - -Integration into the larger `moz.build` build system -==================================================== - -The details of the Gradle integration into the larger `moz.build` system are -mostly captured in configuration baked into `mobile/android/gradle.configure`. -This configuration is reflected in the Android-specific `mach android *` -commands defined in `mobile/android/mach_commands.py`. diff --git a/mobile/android/docs/index.rst b/mobile/android/docs/index.rst index 9a65d19a8393..ec94a05bc59b 100644 --- a/mobile/android/docs/index.rst +++ b/mobile/android/docs/index.rst @@ -20,7 +20,6 @@ Contents: defaultdomains shutdown push - gradle Indices and tables ================== diff --git a/mobile/android/geckoview/build.gradle b/mobile/android/geckoview/build.gradle index 2e81365e993a..5df55e1a9330 100644 --- a/mobile/android/geckoview/build.gradle +++ b/mobile/android/geckoview/build.gradle @@ -2,8 +2,6 @@ buildDir "${topobjdir}/gradle/build/mobile/android/geckoview" apply plugin: 'com.android.library' -apply from: "${topsrcdir}/mobile/android/gradle/product_flavors.gradle" - // This converts MOZ_APP_VERSION into an integer // version code. // @@ -40,8 +38,12 @@ def computeVersionCode() { android { compileSdkVersion project.ext.compileSdkVersion + buildToolsVersion project.ext.buildToolsVersion defaultConfig { + defaultPublishConfig 'release' + publishNonDefault true + targetSdkVersion project.ext.targetSdkVersion minSdkVersion project.ext.minSdkVersion manifestPlaceholders = project.ext.manifestPlaceholders @@ -101,8 +103,14 @@ android { buildConfigField 'boolean', 'MOZILLA_OFFICIAL', mozconfig.substs.MOZILLA_OFFICIAL ? 'true' : 'false'; } - project.configureProductFlavors.delegate = it - project.configureProductFlavors() + buildTypes { + withGeckoBinaries { + initWith release + } + withoutGeckoBinaries { // For clarity and consistency throughout the tree. + initWith release + } + } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 @@ -146,16 +154,21 @@ android { } dependencies { - implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" } apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle" android.libraryVariants.all { variant -> - // See the notes in mobile/android/app/build.gradle for details on including - // Gecko binaries and the Omnijar. - if ((variant.productFlavors*.name).contains('withGeckoBinaries')) { + // Like 'debug', 'release', or 'withGeckoBinaries'. + def buildType = variant.buildType.name + + // It would be most natural for :geckoview to always include the Gecko + // binaries, but that's difficult; see the notes in + // mobile/android/gradle/with_gecko_binaries.gradle. Instead :app uses + // :geckoview:release and handles it's own Gecko binary inclusion. + if (buildType.equals('withGeckoBinaries')) { configureVariantWithGeckoBinaries(variant) } @@ -189,12 +202,12 @@ android.libraryVariants.all { variant -> options.addStringOption('noqualifier', 'java.lang'); } - def javadocJar = task("javadocJar${name.capitalize()}", type: Jar, dependsOn: javadoc) { + task "javadocJar${name.capitalize()}"(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } - def sourcesJar = task("sourcesJar${name.capitalize()}", type: Jar) { + task "sourcesJar${name.capitalize()}"(type: Jar) { classifier 'sources' description = "Generate Javadoc for build variant $name" destinationDir = new File(destinationDir, variant.baseName) @@ -203,7 +216,7 @@ android.libraryVariants.all { variant -> } android.libraryVariants.all { variant -> - configureLibraryVariantWithJNIWrappers(variant, "Generated") + configureVariantWithJNIWrappers(variant, "Generated") } apply plugin: 'maven' @@ -232,7 +245,7 @@ afterEvaluate { // The bundle tasks are only present when the particular configuration is // being built, so this task might not exist. (This is due to the way the // Android Gradle plugin defines things during configuration.) - def bundleWithGeckoBinaries = tasks.findByName('bundleOfficialWithGeckoBinariesNoMinApiRelease') + def bundleWithGeckoBinaries = tasks.findByName('bundleWithGeckoBinaries') if (!bundleWithGeckoBinaries) { return } @@ -246,10 +259,10 @@ afterEvaluate { artifacts { // Instead of default (release) configuration, publish one with Gecko binaries. - archives bundleOfficialWithGeckoBinariesNoMinApiRelease + archives bundleWithGeckoBinaries // Javadoc and sources for developer ergononomics. - archives javadocJarOfficialWithGeckoBinariesNoMinApiRelease - archives sourcesJarOfficialWithGeckoBinariesNoMinApiRelease + archives javadocJarWithGeckoBinaries + archives sourcesJarWithGeckoBinaries } } diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java index 0bb3dcf7627f..d5a363a37e9d 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java @@ -64,7 +64,7 @@ public class GeckoHlsPlayer implements BaseHlsPlayer, ExoPlayer.EventListener { private final int mPlayerId; private boolean mExoplayerSuspended = false; - private enum MediaDecoderPlayState { + private enum MediaDecoderPlayState{ PLAY_STATE_PREPARING, PLAY_STATE_PAUSED, PLAY_STATE_PLAYING diff --git a/mobile/android/geckoview_example/build.gradle b/mobile/android/geckoview_example/build.gradle index 3743ae5ea9cd..daa984863571 100644 --- a/mobile/android/geckoview_example/build.gradle +++ b/mobile/android/geckoview_example/build.gradle @@ -2,10 +2,9 @@ buildDir "${topobjdir}/gradle/build/mobile/android/geckoview_example" apply plugin: 'com.android.application' -apply from: "${topsrcdir}/mobile/android/gradle/product_flavors.gradle" - android { compileSdkVersion project.ext.compileSdkVersion + buildToolsVersion project.ext.buildToolsVersion defaultConfig { targetSdkVersion project.ext.targetSdkVersion @@ -18,27 +17,52 @@ android { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + // This is extremely frustrating, but the only way to do it automation for + // now. Without this, we only get a "debugAndroidTest" configuration; we + // have no "withoutGeckoBinariesAndroidTest" configuration. + testBuildType "withoutGeckoBinaries" buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } + withGeckoBinaries { // For consistency with :geckoview project in Task Cluster invocations. + initWith debug + } + withoutGeckoBinaries { // Logical negation of withGeckoBinaries. + initWith debug + } } - - project.configureProductFlavors.delegate = it - project.configureProductFlavors() } dependencies { - testImplementation 'junit:junit:4.12' + testCompile 'junit:junit:4.12' - implementation 'com.android.support:support-annotations:23.4.0' + compile 'com.android.support:support-annotations:23.4.0' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2' - androidTestImplementation 'com.android.support.test:runner:0.5' + androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' + androidTestCompile 'com.android.support.test:runner:0.5' // Not defining this library again results in test-app assuming 23.1.1, and the following errors: // "Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.4.0) and test app (23.1.1) differ." - androidTestImplementation 'com.android.support:support-annotations:23.4.0' + androidTestCompile 'com.android.support:support-annotations:23.4.0' - implementation project(path: ':geckoview') + debugCompile project(path: ':geckoview', configuration: "debug") + releaseCompile project(path: ':geckoview', configuration: "release") + withGeckoBinariesCompile project(path: ':geckoview', configuration: "withGeckoBinaries") + withoutGeckoBinariesCompile project(path: ':geckoview', configuration: "withoutGeckoBinaries") +} + +apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle" + +android.applicationVariants.all { variant -> + // Like 'debug', 'release', or 'withoutGeckoBinaries'. + def buildType = variant.buildType.name + + // It would be most natural for :geckoview to always include the Gecko + // binaries, but that's difficult; see the notes in + // mobile/android/gradle/with_gecko_binaries.gradle. Instead we handle our + // own Gecko binary inclusion. + if (!buildType.equals('withoutGeckoBinaries')) { + configureVariantWithGeckoBinaries(variant) + } } diff --git a/mobile/android/gradle.configure b/mobile/android/gradle.configure index 47416e40db33..926c63557857 100644 --- a/mobile/android/gradle.configure +++ b/mobile/android/gradle.configure @@ -46,6 +46,9 @@ def gradle_android_build_config(): else: return s + # It's not really possible to abstract the GeckoView details just yet; post + # Android-Gradle plugin 3.0+, the configurations can be more sensible and + # we'll do this work. def variant(productFlavors, buildType): return namespace( productFlavors=productFlavors, @@ -56,13 +59,7 @@ def gradle_android_build_config(): return namespace( app=namespace( - variant=variant(('official', 'withoutGeckoBinaries', 'noMinApi', 'photon'), 'debug'), - ), - geckoview=namespace( - variant=variant(('official', 'withGeckoBinaries', 'noMinApi'), 'release'), - ), - geckoview_example=namespace( - variant=variant(('official', 'withGeckoBinaries', 'noMinApi'), 'debug'), + variant=variant(('official', 'photon'), 'debug'), ), ) @@ -85,7 +82,7 @@ set_config('GRADLE_ANDROID_APP_VARIANT_NAME', gradle_android_app_variant_name) def gradle_android_app_tasks(build_config): '''Gradle tasks run by |mach android assemble-app|.''' return [ - 'geckoview:generateJNIWrappersForGenerated{geckoview.variant.name}'.format(geckoview=build_config.geckoview), + 'geckoview:generateJNIWrappersForGeneratedRelease', 'app:generateJNIWrappersForFennec{app.variant.name}'.format(app=build_config.app), 'app:assemble{app.variant.name}'.format(app=build_config.app), 'app:assemble{app.variant.name}AndroidTest'.format(app=build_config.app), @@ -95,39 +92,14 @@ set_config('GRADLE_ANDROID_APP_TASKS', gradle_android_app_tasks) @depends(gradle_android_build_config, check_build_environment) -@imports(_from='itertools', _import='imap') def gradle_android_app_apks(build_config, build_env): '''Paths to APK files produced by |mach android assemble-app|.''' - def capitalize(s): - # str.capitalize lower cases trailing letters. - if s: - return s[0].upper() + s[1:] - else: - return s - - def uncapitalize(s): - if s: - return s[0].lower() + s[1:] - else: - return s - - # Like 'officialPhoton'. - productFlavor = uncapitalize(''.join(imap(capitalize, build_config.app.variant.productFlavors))) - # Like 'official-photon'. - product_flavor = '-'.join(build_config.app.variant.productFlavors) - - substs = { - 'topobjdir': build_env.topobjdir, - 'productFlavor': productFlavor, - 'product_flavor': product_flavor, - 'buildType': build_config.app.variant.buildType, - } - - f = '{topobjdir}/gradle/build/mobile/android/app/outputs/apk/{productFlavor}/{buildType}/app-{product_flavor}-{buildType}.apk' - g = '{topobjdir}/gradle/build/mobile/android/app/outputs/apk/androidTest/{productFlavor}/{buildType}/app-{product_flavor}-{buildType}-androidTest.apk' - - return namespace(app_apk=f.format(**substs), - app_androidTest_apk=g.format(**substs)) + flavor = '-'.join(build_config.app.variant.productFlavors) + buildType = build_config.app.variant.buildType + f = '{}/gradle/build/mobile/android/app/outputs/apk/app-{}-{}.apk' + g = '{}/gradle/build/mobile/android/app/outputs/apk/app-{}-{}-androidTest.apk' + return namespace(app_apk=f.format(build_env.topobjdir, flavor, buildType), + app_androidTest_apk=g.format(build_env.topobjdir, flavor, buildType)) set_config('GRADLE_ANDROID_APP_APK', gradle_android_app_apks.app_apk) set_config('GRADLE_ANDROID_APP_ANDROIDTEST_APK', gradle_android_app_apks.app_androidTest_apk) @@ -174,13 +146,13 @@ def gradle_android_findbugs_tasks(build_config): set_config('GRADLE_ANDROID_FINDBUGS_TASKS', gradle_android_findbugs_tasks) -@depends(gradle_android_build_config) -def gradle_android_archive_geckoview_tasks(build_config): +@dependable +def gradle_android_archive_geckoview_tasks(): '''Gradle tasks run by |mach android archive-geckoview|.''' return [ - 'geckoview:assemble{geckoview.variant.name}'.format(geckoview=build_config.geckoview), - 'geckoview_example:assemble{geckoview_example.variant.name}'.format(geckoview_example=build_config.geckoview_example), - 'geckoview_example:assemble{geckoview_example.variant.name}AndroidTest'.format(geckoview_example=build_config.geckoview_example), + 'geckoview:assembleWithGeckoBinaries', + 'geckoview_example:assembleWithGeckoBinaries', + 'geckoview_example:assembleWithGeckoBinariesAndroidTest', 'geckoview:uploadArchives', ] diff --git a/mobile/android/gradle/debug_level.gradle b/mobile/android/gradle/debug_level.gradle index c9f8f232a201..e02dbcbc3895 100644 --- a/mobile/android/gradle/debug_level.gradle +++ b/mobile/android/gradle/debug_level.gradle @@ -5,13 +5,16 @@ // Bug 1353055 - Strip 'vars' debugging information to agree with moz.build. ext.configureVariantDebugLevel = { variant -> - // Like 'debug' or 'release'. + // Like 'debug', 'release', or 'withGeckoBinaries'. def buildType = variant.buildType.name + // For :app, like 'local', 'localOld', or 'official'. For other projects, null. + def audienceDimension = variant.productFlavors[0]?.name + // The default is 'lines,source,vars', which includes debugging information // that is quite large: roughly 500kb for Fennec. Therefore we remove // 'vars' unless we're producing a debug build, where it is useful. - if (!'debug'.equals(buildType) || (variant.productFlavors*.name).contains('official')) { + if (!'debug'.equals(buildType) || 'official'.equals(audienceDimension)) { variant.javaCompile.options.debugOptions.debugLevel = 'lines,source' } } diff --git a/mobile/android/gradle/product_flavors.gradle b/mobile/android/gradle/product_flavors.gradle deleted file mode 100644 index 4adf049fd4b1..000000000000 --- a/mobile/android/gradle/product_flavors.gradle +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: Groovy; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- - * 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/. */ - -ext.configureProductFlavors = { - flavorDimensions "audience", "geckoBinaries", "minApi" - productFlavors { - local { - dimension "audience" - } - - // Automation builds. We use "official" rather than "automation" to drive these builds down - // the list of configurations that Android Studio offers, thereby making it _not_ the - // default. This avoids a common issue with "omni.ja" not being packed into the default APK - // built and deployed by Android Studio. - official { - dimension "audience" - } - - withGeckoBinaries { - dimension "geckoBinaries" - } - - withoutGeckoBinaries { - dimension "geckoBinaries" - } - - // For API 21+ - with pre-dexing, this will be faster for local development. - minApi21 { - dimension "minApi" - - // For pre-dexing, setting `minSdkVersion 21` allows the Android gradle plugin to - // pre-DEX each module and produce an APK that can be tested on - // Android Lollipop without time consuming DEX merging processes. - minSdkVersion 21 - dexOptions { - preDexLibraries true - } - } - - // For API < 21 - does not support pre-dexing because local development - // is slow in that case. - noMinApi { - dimension "minApi" - } - } -} diff --git a/mobile/android/gradle/with_gecko_binaries.gradle b/mobile/android/gradle/with_gecko_binaries.gradle index 3128aa8f274f..9b8bc53074f1 100644 --- a/mobile/android/gradle/with_gecko_binaries.gradle +++ b/mobile/android/gradle/with_gecko_binaries.gradle @@ -1,22 +1,46 @@ -/* -*- Mode: Groovy; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- * 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/. */ +// We run fairly hard into a fundamental limitation of the Android Gradle +// plugin. There are many bugs filed about this, but +// https://code.google.com/p/android/issues/detail?id=216978#c6 is a reason one. +// The issue is that we need fine-grained control over when to include Gecko's +// binary libraries into the GeckoView AAR and the Fennec APK, and that's hard +// to achieve. In particular: +// +// * :app:official* wants :geckoview to not include Gecko binaries (official +// * automation build, before package) +// +// * :geckoview:withLibraries wants :geckoview to include Gecko binaries +// * (automation build, after package) +// +// * non-:app:official* wants :geckoview to include Gecko binaries (local +// * build, always after package) +// +// publishNonDefault (see +// http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication) +// is intended to address this, but doesn't handle our case. That option always +// builds *all* configurations, which fails when the required Gecko binaries +// don't exist (automation build, before package). So instead, we make both +// :app and :geckoview both know how to include the Gecko binaries, and use a +// non-default, non-published :geckoview:withGeckoBinaries configuration to +// handle automation's needs. Simple, right? + // The omnijar inputs are listed as resource directory inputs to a dummy JAR. // That arrangement labels them nicely in IntelliJ. See the comment in the // :omnijar project for more context. evaluationDependsOn(':omnijar') -task buildOmnijars(type:Exec) { +task buildOmnijar(type:Exec) { dependsOn rootProject.generateCodeAndResources // See comment in :omnijar project regarding interface mismatches here. inputs.file(project(':omnijar').sourceSets.main.resources.srcDirs).skipWhenEmpty() - // Produce both the Fennec and the GeckoView omnijars. + // Produce a single output file. outputs.file "${topobjdir}/dist/fennec/assets/omni.ja" - outputs.file "${topobjdir}/dist/geckoview/assets/omni.ja" workingDir "${topobjdir}" @@ -36,85 +60,97 @@ task buildOmnijars(type:Exec) { } } -ext.configureVariantWithGeckoBinaries = { variant -> - // :app needs the full Fennec omni.ja, whereas other projects need the - // GeckoView-specific omni.ja. +task syncOmnijarFromDistDir(type: Sync) { + // :app needs the full Fennec omni.ja, whereas other projects need the GeckoView-specific omni.ja. def omnijar_dir = "app".equals(project.name) ? "fennec" : "geckoview" - def distDir = "${topobjdir}/dist/${omnijar_dir}" - - def syncOmnijarFromDistDir = task("syncOmnijarFromDistDirFor${variant.name.capitalize()}", type: Sync) { - doFirst { - if (source.empty) { - throw new GradleException("Required omnijar not found in ${source.asPath}. Have you built and packaged?") - } - } - - into("${project.buildDir}/moz.build/src/${variant.name}/omnijar") - from("${distDir}/omni.ja", - "${distDir}/assets/omni.ja") { - // Throw an exception if we find multiple, potentially conflicting omni.ja files. - duplicatesStrategy 'fail' - } - } - - def syncLibsFromDistDir = task("syncLibsFromDistDirFor${variant.name.capitalize()}", type: Sync) { - doFirst { - if (source.empty) { - throw new GradleException("Required JNI libraries not found in ${source.asPath}. Have you built and packaged?") - } - } - - into("${project.buildDir}/moz.build/src/${variant.name}/jniLibs") - from("${distDir}/lib") - } - - def syncAssetsFromDistDir = task("syncAssetsFromDistDirFor${variant.name.capitalize()}", type: Sync) { - doFirst { - if (source.empty) { - throw new GradleException("Required assets not found in ${source.asPath}. Have you built and packaged?") - } - } - - into("${project.buildDir}/moz.build/src/${variant.name}/assets") - from("${distDir}/assets") { - exclude 'omni.ja' - } - } - - // Local (read, not 'official') builds want to reflect developer changes to - // the Omnijar sources. To do this, the Gradle build calls out to the - // moz.build system, which can be re-entrant. Official builds are driven by - // the moz.build system and should never be re-entrant in this way. - if (!((variant.productFlavors*.name).contains('official'))) { - syncOmnijarFromDistDir.dependsOn buildOmnijars - } - - def assetGenTask = tasks.findByName("generate${variant.name.capitalize()}Assets") - if ((variant.productFlavors*.name).contains('withGeckoBinaries')) { - assetGenTask.dependsOn syncOmnijarFromDistDir - assetGenTask.dependsOn syncLibsFromDistDir - assetGenTask.dependsOn syncAssetsFromDistDir - - android.sourceSets."${variant.name}".assets.srcDir syncOmnijarFromDistDir.destinationDir - android.sourceSets."${variant.name}".assets.srcDir syncAssetsFromDistDir.destinationDir - android.sourceSets."${variant.name}".jniLibs.srcDir syncLibsFromDistDir.destinationDir + into("${project.buildDir}/generated/omnijar") + from("${topobjdir}/dist/${omnijar_dir}/omni.ja", + "${topobjdir}/dist/${omnijar_dir}/assets/omni.ja") { + // Throw an exception if we find multiple, potentially conflicting omni.ja files. + duplicatesStrategy 'fail' } } -ext.configureLibraryVariantWithJNIWrappers = { variant, module -> - // Library variants have two essentially independent transform* tasks: +task checkLibsExistInDistDir { + doLast { + if (syncLibsFromDistDir.source.empty) { + throw new GradleException("Required JNI libraries not found in ${topobjdir}/dist/fennec/lib. Have you built and packaged?") + } + } +} + +task syncLibsFromDistDir(type: Sync, dependsOn: checkLibsExistInDistDir) { + into("${project.buildDir}/generated/jniLibs") + from("${topobjdir}/dist/fennec/lib") +} + +task checkAssetsExistInDistDir { + doLast { + if (syncAssetsFromDistDir.source.empty) { + throw new GradleException("Required assets not found in ${topobjdir}/dist/fennec/assets. Have you built and packaged?") + } + } +} + +task syncAssetsFromDistDir(type: Sync, dependsOn: checkAssetsExistInDistDir) { + into("${project.buildDir}/generated/assets") + from("${topobjdir}/dist/fennec/assets") { + exclude 'omni.ja' + } +} + +ext.configureVariantWithGeckoBinaries = { variant -> + // Like 'localPhoton' or 'localOldPhoton'; may be null. + def productFlavor = "" + def productFlavorNames = variant.productFlavors.collect { it.name.capitalize() } + if (!productFlavorNames.isEmpty()) { + productFlavor = productFlavorNames.join() + // Groovy's `uncapitilize` is not yet available. + def c = productFlavor.toCharArray() + c[0] = Character.toLowerCase(c[0]) + productFlavor = new String(c) + } + + // Like 'debug' or 'release'. + def buildType = variant.buildType.name + + syncOmnijarFromDistDir.dependsOn buildOmnijar + def generateAssetsTask = tasks.findByName("generate${productFlavor.capitalize()}${buildType.capitalize()}Assets") + generateAssetsTask.dependsOn syncOmnijarFromDistDir + generateAssetsTask.dependsOn syncLibsFromDistDir + generateAssetsTask.dependsOn syncAssetsFromDistDir + + def sourceSet = productFlavor ? "${productFlavor}${buildType.capitalize()}" : buildType + android.sourceSets."${sourceSet}".assets.srcDir syncOmnijarFromDistDir.destinationDir + android.sourceSets."${sourceSet}".assets.srcDir syncAssetsFromDistDir.destinationDir + android.sourceSets."${sourceSet}".jniLibs.srcDir syncLibsFromDistDir.destinationDir +} + +ext.configureVariantWithJNIWrappers = { variant, module -> + def jarTask + if (module == 'Generated') { + jarTask = tasks["package${variant.name.capitalize()}JarArtifact"] + } else { + jarTask = tasks["jar${variant.name.capitalize()}Classes"] + } + + if (jarTask.outputs.files.size() != 1) { + throw new GradleException("Jar task output multiple files other than one single jar") + } + + // At configuration time, the classpath of dependencies with internal_impl + // JAR files may not be correct. This manifests in // - // - ...WithSyncLibJars... is used by assemble* and bundle* - // - ...WithPrepareIntermediateJars... is used by consuming applications. + // 'Exception in thread "main" java.lang.NoClassDefFoundError: android/support/v4/app/ActivityCompatApi23$RequestPermissionsRequestCodeValidator' // - // It's not really possible to insert something immediately _after_ - // ...WithPrepareIntermediateJars..., so we make the consuming moz.build - // system invoke this target directly, and force the - // ...WithPrepareIntermediateJars... dependency. The real consumer of the - // JNI wrappers is the moz.build system, which always builds geckoview to - // consume from Fennec, so that dependency likely adds less to the build time. - def jarTask = tasks["transformClassesAndResourcesWithPrepareIntermediateJarsFor${variant.name.capitalize()}"] - def output = jarTask.outputs.files.find({ it.absolutePath.contains('/classes.jar') }) + // when running |mach gradle clean app:generateJNI...|. We work around this + // by configuring the classpath at evaluation-time, not configuration-time. + // + // The specific dependency on the `prepareDependencies` task may not be + // necessary, but commits like + // https://github.com/evant/gradle-retrolambda/commit/15108c65ee43be499a1359d9d4f88b0851d46769 + // suggest that it is. It certainly doesn't hurt. + def prepareDependenciesTask = tasks.getByName("prepare${variant.name.capitalize()}Dependencies") def wrapperTask if (System.env.IS_LANGUAGE_REPACK == '1') { @@ -124,7 +160,7 @@ ext.configureLibraryVariantWithJNIWrappers = { variant, module -> } else { wrapperTask = task("generateJNIWrappersFor${module}${variant.name.capitalize()}", type: JavaExec) { classpath "${topobjdir}/build/annotationProcessors/annotationProcessors.jar" - + // Configure the classpath at evaluation-time, not at // configuration-time: see above comment. doFirst { @@ -135,11 +171,12 @@ ext.configureLibraryVariantWithJNIWrappers = { variant, module -> main = 'org.mozilla.gecko.annotationProcessors.AnnotationProcessor' args module - args output - + args jarTask.outputs.files.iterator().next() + workingDir "${topobjdir}/mobile/android/base" - + dependsOn jarTask + dependsOn prepareDependenciesTask } } @@ -149,36 +186,3 @@ ext.configureLibraryVariantWithJNIWrappers = { variant, module -> tasks["assemble${variant.name.capitalize()}"].dependsOn wrapperTask } } - -ext.configureApplicationVariantWithJNIWrappers = { variant, module -> - def jarTask = tasks["bundleAppClasses${variant.name.capitalize()}"] - def output = jarTask.outputs.files.find({ it.absolutePath.contains('/classes.jar') }) - - def wrapperTask - if (System.env.IS_LANGUAGE_REPACK == '1') { - // Single-locale l10n repacks set `IS_LANGUAGE_REPACK=1` and don't - // really have a build environment. - wrapperTask = task("generateJNIWrappersFor${module}${variant.name.capitalize()}") - } else { - wrapperTask = task("generateJNIWrappersFor${module}${variant.name.capitalize()}", type: JavaExec) { - classpath "${topobjdir}/build/annotationProcessors/annotationProcessors.jar" - - // Configure the classpath at evaluation-time, not at - // configuration-time: see above comment. - doFirst { - classpath variant.javaCompile.classpath - // Include android.jar. - classpath variant.javaCompile.options.bootClasspath - } - - main = 'org.mozilla.gecko.annotationProcessors.AnnotationProcessor' - args module - args output - - workingDir "${topobjdir}/mobile/android/base" - - // This forces bundling, which isn't usually part of the assemble* process. - dependsOn jarTask - } - } -} diff --git a/mobile/android/mach_commands.py b/mobile/android/mach_commands.py index c3c697851b09..f29c52cd294b 100755 --- a/mobile/android/mach_commands.py +++ b/mobile/android/mach_commands.py @@ -414,9 +414,7 @@ class MachCommands(MachCommandBase): # $JAVA_HOME/bin/java into $JAVA_HOME. java_home = os.path.dirname(os.path.dirname(self.substs['JAVA'])) - gradle_flags = self.substs.get('GRADLE_FLAGS', '') or \ - os.environ.get('GRADLE_FLAGS', '') - gradle_flags = shell_split(gradle_flags) + gradle_flags = shell_split(self.substs.get('GRADLE_FLAGS', '')) # We force the Gradle JVM to run with the UTF-8 encoding, since we # filter strings.xml, which is really UTF-8; the ellipsis character is diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/DelegatingTestContentProvider.java b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/DelegatingTestContentProvider.java index ed970cc400ca..b1d52f49dbd2 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/DelegatingTestContentProvider.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/DelegatingTestContentProvider.java @@ -8,19 +8,13 @@ import android.content.ContentProvider; import android.content.ContentProviderOperation; import android.content.ContentProviderResult; import android.content.ContentValues; -import android.content.Context; import android.content.OperationApplicationException; -import android.content.pm.ProviderInfo; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserProvider; -import org.mozilla.gecko.db.TabsProvider; -import org.robolectric.android.controller.ContentProviderController; -import org.robolectric.util.ReflectionHelpers; import java.util.ArrayList; @@ -28,54 +22,17 @@ import java.util.ArrayList; * Wrap a ContentProvider, appending &test=1 to all queries. */ public class DelegatingTestContentProvider extends ContentProvider { - protected ContentProvider mTargetProvider; + protected final ContentProvider mTargetProvider; protected static Uri appendUriParam(Uri uri, String param, String value) { return uri.buildUpon().appendQueryParameter(param, value).build(); } - /** - * Create and register a new BrowserProvider that has test delegation. - *

- * Robolectric doesn't make it easy to parameterize a created - * ContentProvider, so we modify a built-in helper to do it. - * @return delegated ContentProvider. - */ - public static ContentProvider createDelegatingBrowserProvider() { - final ContentProviderController contentProviderController - = ContentProviderController.of(ReflectionHelpers.callConstructor(DelegatingTestContentProvider.class, - ReflectionHelpers.ClassParameter.from(ContentProvider.class, new BrowserProvider()))); - return contentProviderController.create(BrowserContract.AUTHORITY).get(); - } - - /** - * Create and register a new TabsProvider that has test delegation. - *

- * Robolectric doesn't make it easy to parameterize a created - * ContentProvider, so we modify a built-in helper to do it. - * @return delegated ContentProvider. - */ - public static ContentProvider createDelegatingTabsProvider() { - final ContentProviderController contentProviderController - = ContentProviderController.of(ReflectionHelpers.callConstructor(DelegatingTestContentProvider.class, - ReflectionHelpers.ClassParameter.from(ContentProvider.class, new TabsProvider()))); - return contentProviderController.create(BrowserContract.TABS_AUTHORITY).get(); - } - public DelegatingTestContentProvider(ContentProvider targetProvider) { super(); mTargetProvider = targetProvider; } - public void attachInfo(Context context, ProviderInfo info) { - // With newer Robolectric versions, we must create the target provider - // before calling into super. If we don't do this, the target - // provider's onCreate() will witness a null getContext(), which the - // Android documentation guarantees never happens on device. - mTargetProvider.attachInfo(context, null); - super.attachInfo(context, info); - } - private Uri appendTestParam(Uri uri) { return appendUriParam(uri, BrowserContract.PARAM_IS_TEST, "1"); } @@ -131,10 +88,6 @@ public class DelegatingTestContentProvider extends ContentProvider { return mTargetProvider.call(method, arg, extras); } - public void shutdown() { - mTargetProvider.shutdown(); - } - public ContentProvider getTargetProvider() { return mTargetProvider; } diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java index d6f36d8e1969..4ae48dea8248 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/db/TestTabsProvider.java @@ -3,7 +3,6 @@ package org.mozilla.gecko.background.db; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentValues; import android.database.Cursor; @@ -18,6 +17,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mozilla.gecko.background.testhelpers.TestRunner; import org.mozilla.gecko.db.BrowserContract; +import org.mozilla.gecko.db.TabsProvider; import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers; import org.mozilla.gecko.sync.repositories.android.FennecTabsRepository; import org.mozilla.gecko.sync.repositories.domain.TabsRecord; @@ -35,11 +35,13 @@ public class TestTabsProvider { protected Tab testTab2; protected Tab testTab3; - protected ContentProvider provider; + protected TabsProvider provider; @Before public void setUp() { - provider = DelegatingTestContentProvider.createDelegatingTabsProvider(); + provider = new TabsProvider(); + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.TABS_AUTHORITY, new DelegatingTestContentProvider(provider)); } @After diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockGlobalSession.java b/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockGlobalSession.java index 948248a05a82..63afdd1ac054 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockGlobalSession.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockGlobalSession.java @@ -13,8 +13,6 @@ import org.mozilla.gecko.sync.net.BasicAuthHeaderProvider; import org.mozilla.gecko.sync.stage.CompletedStage; import org.mozilla.gecko.sync.stage.GlobalSyncStage; import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage; -import org.robolectric.Robolectric; -import org.robolectric.RuntimeEnvironment; import java.io.IOException; import java.util.HashMap; @@ -28,7 +26,7 @@ public class MockGlobalSession extends MockPrefsGlobalSession { public MockGlobalSession(SyncConfiguration config, GlobalSessionCallback callback) throws SyncConfigurationException, IllegalArgumentException, IOException, NonObjectJSONException { - super(config, callback, RuntimeEnvironment.application, null); + super(config, callback, null, null); } @Override diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockPrefsGlobalSession.java b/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockPrefsGlobalSession.java index 9c6339e8bb0b..72b924dd8e6b 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockPrefsGlobalSession.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/background/testhelpers/MockPrefsGlobalSession.java @@ -53,4 +53,9 @@ public class MockPrefsGlobalSession extends GlobalSession { config.syncKeyBundle = syncKeyBundle; return new MockPrefsGlobalSession(config, callback, context, clientsDelegate); } + + @Override + public Context getContext() { + return null; + } } diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java index c57b84697e30..289b12eb8966 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderBookmarksTest.java @@ -3,7 +3,6 @@ package org.mozilla.gecko.db; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentUris; import android.content.ContentValues; @@ -18,11 +17,12 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mozilla.gecko.background.db.DelegatingTestContentProvider; import org.mozilla.gecko.background.testhelpers.TestRunner; -import org.mozilla.gecko.db.BrowserContract.Bookmarks; import org.mozilla.gecko.sync.Utils; import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers; import org.robolectric.shadows.ShadowContentResolver; +import org.mozilla.gecko.db.BrowserContract.Bookmarks; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -41,9 +41,8 @@ import static org.mozilla.gecko.db.BrowserProviderGeneralTest.INVALID_TIMESTAMP; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.assertVersionsForSelection; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.bookmarksTestSyncUri; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.bookmarksTestUri; +import static org.mozilla.gecko.db.BrowserProviderGeneralTest.getBookmarksTestSyncIncrementLocalVersionUri; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.getBookmarkIdFromGuid; -import static org.mozilla.gecko.db.BrowserProviderGeneralTest - .getBookmarksTestSyncIncrementLocalVersionUri; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.insertBookmark; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.withDeleted; import static org.mozilla.gecko.db.BrowserProviderGeneralTest.withSync; @@ -54,11 +53,13 @@ import static org.mozilla.gecko.db.BrowserProviderGeneralTest.withSync; @RunWith(TestRunner.class) public class BrowserProviderBookmarksTest { private ContentProviderClient bookmarksClient; - private ContentProvider provider; + private BrowserProvider provider; @Before public void setUp() throws Exception { - provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + provider = new BrowserProvider(); + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); ShadowContentResolver contentResolver = new ShadowContentResolver(); bookmarksClient = contentResolver.acquireContentProviderClient(BrowserContractHelpers.BOOKMARKS_CONTENT_URI); diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java index 38db7aa14af5..035e600b4256 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderGeneralTest.java @@ -3,13 +3,13 @@ package org.mozilla.gecko.db; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.os.RemoteException; +import android.provider.Browser; import org.junit.After; import org.junit.Before; @@ -41,12 +41,15 @@ public class BrowserProviderGeneralTest { private static final long INVALID_ID = -1; - private ContentProvider provider; + private BrowserProvider provider; private ContentProviderClient browserClient; @Before public void setUp() throws Exception { - provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + provider = new BrowserProvider(); + provider.onCreate(); + + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); ShadowContentResolver contentResolver = new ShadowContentResolver(); browserClient = contentResolver.acquireContentProviderClient(BrowserContractHelpers.BOOKMARKS_CONTENT_URI); diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTestBase.java b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTestBase.java index 765ca0f75b16..808a71aaefab 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTestBase.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/BrowserProviderHistoryVisitsTestBase.java @@ -3,7 +3,6 @@ package org.mozilla.gecko.db; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentValues; import android.net.Uri; @@ -15,17 +14,21 @@ import org.mozilla.gecko.background.db.DelegatingTestContentProvider; import org.mozilla.gecko.sync.repositories.android.BrowserContractHelpers; import org.robolectric.shadows.ShadowContentResolver; +import java.util.UUID; + public class BrowserProviderHistoryVisitsTestBase { /* package-private */ ShadowContentResolver contentResolver; /* package-private */ ContentProviderClient historyClient; /* package-private */ ContentProviderClient visitsClient; /* package-private */ Uri historyTestUri; /* package-private */ Uri visitsTestUri; - /* package-private */ ContentProvider provider; + /* package-private */ BrowserProvider provider; @Before public void setUp() throws Exception { - provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + provider = new BrowserProvider(); + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); contentResolver = new ShadowContentResolver(); historyClient = contentResolver.acquireContentProviderClient(BrowserContractHelpers.HISTORY_CONTENT_URI); diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java b/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java index 095d19c450c9..0440f6414292 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/db/LocalBrowserDBTest.java @@ -4,7 +4,6 @@ package org.mozilla.gecko.db; import android.annotation.SuppressLint; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentResolver; import android.content.ContentValues; @@ -45,13 +44,15 @@ public class LocalBrowserDBTest { private static final String FOLDER_NAME = "folder1"; private Context context; - private ContentProvider provider; + private BrowserProvider provider; private ContentProviderClient bookmarkClient; @Before public void setUp() throws Exception { context = RuntimeEnvironment.application; - provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + provider = new BrowserProvider(); + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); ShadowContentResolver contentResolver = new ShadowContentResolver(); bookmarkClient = contentResolver.acquireContentProviderClient(BrowserContractHelpers.BOOKMARKS_CONTENT_URI); diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java index d2832da8c45f..872b0107b7ae 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceListUpdater.java @@ -3,7 +3,6 @@ package org.mozilla.gecko.fxa.devices; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentResolver; import android.content.ContentValues; @@ -22,6 +21,7 @@ import org.mozilla.gecko.background.db.DelegatingTestContentProvider; import org.mozilla.gecko.background.fxa.FxAccountClient; import org.mozilla.gecko.background.testhelpers.TestRunner; import org.mozilla.gecko.db.BrowserContract; +import org.mozilla.gecko.db.BrowserProvider; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; import org.mozilla.gecko.fxa.login.State; import org.robolectric.shadows.ShadowContentResolver; @@ -119,9 +119,12 @@ public class TestFxAccountDeviceListUpdater { public void testBrowserProvider() { Uri uri = testUri(BrowserContract.RemoteDevices.CONTENT_URI); - final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + BrowserProvider provider = new BrowserProvider(); Cursor c = null; try { + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); + final ShadowContentResolver cr = new ShadowContentResolver(); ContentProviderClient remoteDevicesClient = cr.acquireContentProviderClient(BrowserContract.RemoteDevices.CONTENT_URI); diff --git a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java index dedf2c8068d2..67bbca089855 100644 --- a/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java +++ b/mobile/android/services/src/test/java/org/mozilla/gecko/sync/repositories/android/VisitsHelperTest.java @@ -3,7 +3,6 @@ package org.mozilla.gecko.sync.repositories.android; -import android.content.ContentProvider; import android.content.ContentProviderClient; import android.content.ContentValues; import android.net.Uri; @@ -17,6 +16,7 @@ import org.junit.runner.RunWith; import org.mozilla.gecko.background.db.DelegatingTestContentProvider; import org.mozilla.gecko.background.testhelpers.TestRunner; import org.mozilla.gecko.db.BrowserContract; +import org.mozilla.gecko.db.BrowserProvider; import org.robolectric.shadows.ShadowContentResolver; import static org.junit.Assert.assertEquals; @@ -56,8 +56,11 @@ public class VisitsHelperTest { Uri historyTestUri = testUri(BrowserContract.History.CONTENT_URI); Uri visitsTestUri = testUri(BrowserContract.Visits.CONTENT_URI); - final ContentProvider provider = DelegatingTestContentProvider.createDelegatingBrowserProvider(); + BrowserProvider provider = new BrowserProvider(); try { + provider.onCreate(); + ShadowContentResolver.registerProvider(BrowserContract.AUTHORITY, new DelegatingTestContentProvider(provider)); + final ShadowContentResolver cr = new ShadowContentResolver(); ContentProviderClient historyClient = cr.acquireContentProviderClient(BrowserContractHelpers.HISTORY_CONTENT_URI); ContentProviderClient visitsClient = cr.acquireContentProviderClient(BrowserContractHelpers.VISITS_CONTENT_URI); diff --git a/mobile/android/thirdparty/build.gradle b/mobile/android/thirdparty/build.gradle index ff8e227a0dcb..c80938e93ff5 100644 --- a/mobile/android/thirdparty/build.gradle +++ b/mobile/android/thirdparty/build.gradle @@ -4,8 +4,12 @@ apply plugin: 'com.android.library' android { compileSdkVersion project.ext.compileSdkVersion + buildToolsVersion project.ext.buildToolsVersion defaultConfig { + defaultPublishConfig 'release' + publishNonDefault true + targetSdkVersion project.ext.targetSdkVersion minSdkVersion project.ext.minSdkVersion manifestPlaceholders = project.ext.manifestPlaceholders @@ -43,11 +47,11 @@ android { } dependencies { - implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" if (mozconfig.substs.MOZ_ANDROID_MMA) { - implementation "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" - implementation "com.android.support:support-annotations:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" - implementation "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" + compile "com.android.support:support-annotations:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" + compile "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}" } } diff --git a/old-configure.in b/old-configure.in index 15f5ac452187..85f4863543fb 100644 --- a/old-configure.in +++ b/old-configure.in @@ -2133,7 +2133,7 @@ dnl ======================================================== case "$MOZ_BUILD_APP" in mobile/android) - MOZ_ANDROID_SDK(23, 23, 26.0.2, 26.0.0 26.0.0-dev 25.3.2 25.3.1) + MOZ_ANDROID_SDK(23, 23, 25.0.3, 26.0.0 26.0.0-dev 25.3.2 25.3.1) ;; esac diff --git a/python/mozboot/mozboot/android-packages.txt b/python/mozboot/mozboot/android-packages.txt index 3d7601bc24f8..f09995deb2e1 100644 --- a/python/mozboot/mozboot/android-packages.txt +++ b/python/mozboot/mozboot/android-packages.txt @@ -1,5 +1,5 @@ platform-tools -build-tools;26.0.2 +build-tools;25.0.3 platforms;android-23 extras;android;m2repository extras;google;m2repository diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py index d46f1332dbb6..c9f1585fc564 100644 --- a/python/mozbuild/mozbuild/config_status.py +++ b/python/mozbuild/mozbuild/config_status.py @@ -38,10 +38,13 @@ ANDROID_IDE_ADVERTISEMENT = ''' ADVERTISEMENT You are building Firefox for Android. After your build completes, you can open -the top source directory in Android Studio directly and build using Gradle. -See the documentation at +the top source directory in IntelliJ or Android Studio directly and build using +Gradle. See the documentation at https://developer.mozilla.org/en-US/docs/Simple_Firefox_for_Android_build + +PLEASE BE AWARE THAT GRADLE AND INTELLIJ/ANDROID STUDIO SUPPORT IS EXPERIMENTAL. +You should verify any changes using |mach build|. ============= '''.strip() diff --git a/taskcluster/ci/build/android.yml b/taskcluster/ci/build/android.yml index 6be1f1f4f50b..61e99cd3f859 100644 --- a/taskcluster/ci/build/android.yml +++ b/taskcluster/ci/build/android.yml @@ -21,7 +21,7 @@ android-api-16/debug: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -73,7 +73,7 @@ android-x86/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -130,7 +130,7 @@ android-x86-nightly/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -178,7 +178,7 @@ android-api-16/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -230,7 +230,7 @@ android-api-16-nightly/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -283,7 +283,7 @@ android-x86-old-id/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -339,7 +339,7 @@ android-x86-old-id-nightly/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -388,7 +388,7 @@ android-api-16-old-id/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -439,7 +439,7 @@ android-api-16-old-id-nightly/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -488,7 +488,7 @@ android-api-16-gradle/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -534,7 +534,7 @@ android-aarch64/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ @@ -586,7 +586,7 @@ android-aarch64-nightly/opt: path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ type: directory - name: public/build/geckoview_example.apk - path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/geckoview_example-withGeckoBinaries.apk type: file - name: public/build path: /builds/worker/artifacts/ diff --git a/taskcluster/scripts/misc/android-gradle-dependencies/after.sh b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh index 34dac0352863..cf100e953f8b 100755 --- a/taskcluster/scripts/misc/android-gradle-dependencies/after.sh +++ b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh @@ -5,7 +5,7 @@ set -x -e echo "running as" $(id) : WORKSPACE ${WORKSPACE:=/builds/worker/workspace} -: GRADLE_VERSION ${GRADLE_VERSION:=4.1} +: GRADLE_VERSION ${GRADLE_VERSION:=3.4.1} set -v diff --git a/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml b/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml index b1e9a161c4ac..215cc860284b 100644 --- a/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml +++ b/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml @@ -72,8 +72,7 @@ RELEASE - - STRICT_IF_EXISTS + STRICT true false -1 From 4fc6ee24c9fa292ba01aba890090748f21b5ae63 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 17 Jan 2018 16:08:13 -0500 Subject: [PATCH 47/47] Backed out changeset ff731fad7630 (bug 1420737) for causing bug 1431064. a=RyanVM --- .../painting/RetainedDisplayListBuilder.cpp | 122 ++++++------------ layout/reftests/display-list/reftest.list | 2 - .../retained-dl-zindex-1-ref.html | 27 ---- .../display-list/retained-dl-zindex-1.html | 35 ----- .../retained-dl-zindex-2-ref.html | 33 ----- .../display-list/retained-dl-zindex-2.html | 41 ------ 6 files changed, 37 insertions(+), 223 deletions(-) delete mode 100644 layout/reftests/display-list/retained-dl-zindex-1-ref.html delete mode 100644 layout/reftests/display-list/retained-dl-zindex-1.html delete mode 100644 layout/reftests/display-list/retained-dl-zindex-2-ref.html delete mode 100644 layout/reftests/display-list/retained-dl-zindex-2.html diff --git a/layout/painting/RetainedDisplayListBuilder.cpp b/layout/painting/RetainedDisplayListBuilder.cpp index 5f59d6dcdd09..e1d04abb6041 100644 --- a/layout/painting/RetainedDisplayListBuilder.cpp +++ b/layout/painting/RetainedDisplayListBuilder.cpp @@ -306,13 +306,13 @@ void UpdateASR(nsDisplayItem* aItem, * * The basic algorithm is: * - * For-each item i in the new list: + * For-each item in the new list: * If the item has a matching item in the old list: - * Remove items from the start of the old list up until we reach an item that also exists in the new list (leaving the matched item in place): + * Remove items from the bottom of the old list until we reach the matching item: * Add valid items to the merged list, destroy invalid items. - * Add i into the merged list. - * If the start of the old list matches i, remove and destroy it, otherwise mark the old version of i as used. - * Add all remaining valid items from the old list into the merged list, skipping over (and destroying) any that are marked as used. + * Destroy the matching item from the old list. + * Add the item from the new list into the merged list. + * Add all remaining valid items from the old list into the merged list. * * If any item has a child display list, then we recurse into the merge * algorithm once we match up the new/old versions (if present). @@ -320,7 +320,7 @@ void UpdateASR(nsDisplayItem* aItem, * Example 1: * * Old List: A,B,C,D - * Modified List: A,D + * New List: A,D * Invalidations: C,D * * We first match the A items, and add the new one to the merged list. @@ -330,23 +330,10 @@ void UpdateASR(nsDisplayItem* aItem, * * Merged List: A,B,D * - * Example 2 (layout/reftests/retained-dl-zindex-1.html): + * Example 2: * * Old List: A, B - * Modified List: B, A - * Invalidations: A - * - * In this example A has been explicitly moved to the back. - * - * We match the B items, but don't copy A since it's invalid, and then add the - * new B into the merged list. We then add A, and we're done. - * - * Merged List: B, A - * - * Example 3: - * - * Old List: A, B - * Modified List: B, A + * New List, B, A * Invalidations: - * * This can happen because a prior merge might have changed the ordering @@ -356,28 +343,6 @@ void UpdateASR(nsDisplayItem* aItem, * and then add the new B into the merged list. We then add A, and we're done. * * Merged List: B, A - * - * Example 4 (layout/reftests/retained-dl-zindex-2.html): - * - * Element A has two elements covering it (B and C), that don't intersect each - * other. We then move C to the back. - * - * The correct initial ordering has B and C after A, in any order. - * - * Old List: A, B, C - * Modified List: C, A - * Invalidations: C - * - * We match the C items, but don't add anything from the old list because A is present - * in both lists. We add C to the merged list, and mark the old version of C as reused. - * - * We then match A, add the new version the merged list and delete the old version. - * - * We then process the remainder of the old list, B is added (since it is valid, - * and hasn't been mark as reused), C is destroyed since it's marked as reused and - * is already present in the merged list. - * - * Merged List: C, A, B */ void RetainedDisplayListBuilder::MergeDisplayLists(nsDisplayList* aNewList, @@ -442,49 +407,39 @@ RetainedDisplayListBuilder::MergeDisplayLists(nsDisplayList* aNewList, // The new item has a matching counterpart in the old list that we haven't yet reached, // so copy all valid items from the old list into the merged list until we get to the // matched item. - nsDisplayItem* old = nullptr; - while ((old = aOldList->GetBottom()) && old != oldItem) { - if (IsAnyAncestorModified(old->FrameForInvalidation())) { - // The old item is invalid, discard it. - oldListLookup.Remove({ old->Frame(), old->GetPerFrameKey() }); - aOldList->RemoveBottom(); - old->Destroy(&mBuilder); - } else if (newListLookup.Get({ old->Frame(), old->GetPerFrameKey() })) { - // This old item is also in the new list, but we haven't got to it yet. - // Stop now, and we'll deal with it when we get to the new entry. - break; - } else { - // Recurse into the child list (without a matching new list) to - // ensure that we find and remove any invalidated items. - if (old->GetChildren()) { - nsDisplayList empty; - Maybe containerASRForChildren; - MergeDisplayLists(&empty, old->GetChildren(), - old->GetChildren(), containerASRForChildren); - UpdateASR(old, containerASRForChildren); - old->UpdateBounds(&mBuilder); + if (!oldItem->IsReused()) { + nsDisplayItem* old = nullptr; + while ((old = aOldList->RemoveBottom()) && !IsSameItem(newItem, old)) { + if (IsAnyAncestorModified(old->FrameForInvalidation())) { + // The old item is invalid, discard it. + oldListLookup.Remove({ old->Frame(), old->GetPerFrameKey() }); + old->Destroy(&mBuilder); + } else if (newListLookup.Get({ old->Frame(), old->GetPerFrameKey() })) { + // The old item is also in the new list, but we haven't got to it yet. + // Mark that we've found it, and we'll deal with it when we get to the new + // entry. + old->SetReused(true); + } else { + // Recurse into the child list (without a matching new list) to + // ensure that we find and remove any invalidated items. + if (old->GetChildren()) { + nsDisplayList empty; + Maybe containerASRForChildren; + MergeDisplayLists(&empty, old->GetChildren(), + old->GetChildren(), containerASRForChildren); + UpdateASR(old, containerASRForChildren); + old->UpdateBounds(&mBuilder); + } + ReuseItem(old); } - aOldList->RemoveBottom(); - ReuseItem(old); } - } - bool destroy = false; - if (old == oldItem) { - // If we advanced the old list until the matching item then we can pop - // the matching item off the old list and make sure we clean it up. - aOldList->RemoveBottom(); - destroy = true; - } else { - // If we didn't get to the matching item, then mark the old item - // as being reused (since we're adding the new version to the new - // list now) so that we don't add it twice at the end. - oldItem->SetReused(true); + MOZ_ASSERT(old && IsSameItem(newItem, old)); + MOZ_ASSERT(old == oldItem); } // Recursively merge any child lists, destroy the old item and add // the new one to the list. - if (!destroy && - oldItem->GetType() == DisplayItemType::TYPE_LAYER_EVENT_REGIONS && + if (oldItem->GetType() == DisplayItemType::TYPE_LAYER_EVENT_REGIONS && !IsAnyAncestorModified(oldItem->FrameForInvalidation())) { // Event regions items don't have anything interesting other than // the lists of regions and frames, so we have no need to use the @@ -504,9 +459,7 @@ RetainedDisplayListBuilder::MergeDisplayLists(nsDisplayList* aNewList, newItem->UpdateBounds(&mBuilder); } - if (destroy) { - oldItem->Destroy(&mBuilder); - } + oldItem->Destroy(&mBuilder); UseItem(newItem); } } else { @@ -518,8 +471,7 @@ RetainedDisplayListBuilder::MergeDisplayLists(nsDisplayList* aNewList, // Reuse the remaining valid items from the old display list. while (nsDisplayItem* old = aOldList->RemoveBottom()) { - if (!IsAnyAncestorModified(old->FrameForInvalidation()) && - !old->IsReused()) { + if (!IsAnyAncestorModified(old->FrameForInvalidation())) { if (old->GetChildren()) { // We are calling MergeDisplayLists() to ensure that the display items // with modified or deleted children will be correctly handled. diff --git a/layout/reftests/display-list/reftest.list b/layout/reftests/display-list/reftest.list index fed01b2caa71..63b40e7e2c4e 100644 --- a/layout/reftests/display-list/reftest.list +++ b/layout/reftests/display-list/reftest.list @@ -8,8 +8,6 @@ skip-if(!retainedDisplayList) == retained-dl-scroll-out-of-view-1.html retained- skip-if(!retainedDisplayList) == retained-dl-displayport-1.html retained-dl-displayport-1-ref.html skip-if(!retainedDisplayList) == retained-dl-prerender-transform-1.html retained-dl-prerender-transform-1-ref.html == retained-dl-wrap-list.html retained-dl-wrap-list-ref.html -== retained-dl-zindex-1.html retained-dl-zindex-1-ref.html -== retained-dl-zindex-2.html retained-dl-zindex-2-ref.html fuzzy(1,235200) == 1413073.html 1413073-ref.html == 1416291.html 1416291-ref.html == 1417601-1.html 1417601-1-ref.html diff --git a/layout/reftests/display-list/retained-dl-zindex-1-ref.html b/layout/reftests/display-list/retained-dl-zindex-1-ref.html deleted file mode 100644 index d9cd43b5e99b..000000000000 --- a/layout/reftests/display-list/retained-dl-zindex-1-ref.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -

-
- - diff --git a/layout/reftests/display-list/retained-dl-zindex-1.html b/layout/reftests/display-list/retained-dl-zindex-1.html deleted file mode 100644 index dd640539c9f5..000000000000 --- a/layout/reftests/display-list/retained-dl-zindex-1.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - -
-
- - - diff --git a/layout/reftests/display-list/retained-dl-zindex-2-ref.html b/layout/reftests/display-list/retained-dl-zindex-2-ref.html deleted file mode 100644 index 1eac061a7ee1..000000000000 --- a/layout/reftests/display-list/retained-dl-zindex-2-ref.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - -
-
-
- - diff --git a/layout/reftests/display-list/retained-dl-zindex-2.html b/layout/reftests/display-list/retained-dl-zindex-2.html deleted file mode 100644 index db3b6e75b63b..000000000000 --- a/layout/reftests/display-list/retained-dl-zindex-2.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
-
-
- - -