diff --git a/config/external/moz.build b/config/external/moz.build index 89378dafd1..de16793c84 100644 --- a/config/external/moz.build +++ b/config/external/moz.build @@ -55,7 +55,7 @@ external_dirs += [ 'media/psshparser' ] -if CONFIG['MOZ_LINKER']: +if CONFIG['MOZ_UPDATER']: external_dirs += ['modules/xz-embedded'] DIRS += ['../../' + i for i in external_dirs] diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index bb88befb7e..dc4df73b39 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -2073,6 +2073,7 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "auto", "calc", + "content", "inherit", "initial", "unset" @@ -2095,6 +2096,7 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "auto", "calc", + "content", "inherit", "initial", "unset" @@ -2931,10 +2933,8 @@ exports.CSS_PROPERTIES = { "grid-auto-flow", "grid-auto-rows", "grid-column-end", - "grid-column-gap", "grid-column-start", "grid-row-end", - "grid-row-gap", "grid-row-start", "grid-template-areas", "grid-template-columns", @@ -3029,6 +3029,7 @@ exports.CSS_PROPERTIES = { "quotes", "resize", "right", + "row-gap", "ruby-align", "ruby-position", "scroll-behavior", @@ -3232,6 +3233,7 @@ exports.CSS_PROPERTIES = { "column-reverse", "condensed", "contain", + "content", "content-box", "contents", "cover", @@ -5841,6 +5843,7 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "auto", "calc", + "content", "inherit", "initial", "unset" @@ -5863,6 +5866,7 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "auto", "calc", + "content", "inherit", "initial", "unset" @@ -6328,17 +6332,11 @@ exports.CSS_PROPERTIES = { "unset" ] }, - "grid": { + "gap": { "isInherited": false, "subproperties": [ - "grid-template-areas", - "grid-template-rows", - "grid-template-columns", - "grid-auto-flow", - "grid-auto-rows", - "grid-auto-columns", - "grid-row-gap", - "grid-column-gap" + "row-gap", + "column-gap" ], "supports": [ 6, @@ -6347,6 +6345,27 @@ exports.CSS_PROPERTIES = { "values": [ "-moz-calc", "calc", + "inherit", + "initial", + "normal", + "unset" + ] + }, + "grid": { + "isInherited": false, + "subproperties": [ + "grid-template-areas", + "grid-template-rows", + "grid-template-columns", + "grid-auto-flow", + "grid-auto-rows", + "grid-auto-columns" + ], + "supports": [ + 6, + 8 + ], + "values": [ "inherit", "initial", "unset" @@ -6443,7 +6462,7 @@ exports.CSS_PROPERTIES = { "grid-column-gap": { "isInherited": false, "subproperties": [ - "grid-column-gap" + "column-gap" ], "supports": [ 6, @@ -6454,6 +6473,7 @@ exports.CSS_PROPERTIES = { "calc", "inherit", "initial", + "normal", "unset" ] }, @@ -6474,8 +6494,8 @@ exports.CSS_PROPERTIES = { "grid-gap": { "isInherited": false, "subproperties": [ - "grid-row-gap", - "grid-column-gap" + "row-gap", + "column-gap" ], "supports": [ 6, @@ -6486,6 +6506,7 @@ exports.CSS_PROPERTIES = { "calc", "inherit", "initial", + "normal", "unset" ] }, @@ -6521,7 +6542,7 @@ exports.CSS_PROPERTIES = { "grid-row-gap": { "isInherited": false, "subproperties": [ - "grid-row-gap" + "row-gap" ], "supports": [ 6, @@ -6532,6 +6553,7 @@ exports.CSS_PROPERTIES = { "calc", "inherit", "initial", + "normal", "unset" ] }, @@ -8335,6 +8357,24 @@ exports.CSS_PROPERTIES = { "unset" ] }, + "row-gap": { + "isInherited": false, + "subproperties": [ + "row-gap" + ], + "supports": [ + 6, + 8 + ], + "values": [ + "-moz-calc", + "calc", + "inherit", + "initial", + "normal", + "unset" + ] + }, "ruby-align": { "isInherited": true, "subproperties": [ diff --git a/gfx/2d/BaseRect.h b/gfx/2d/BaseRect.h index 57d01ba09b..b1eed9ddb9 100644 --- a/gfx/2d/BaseRect.h +++ b/gfx/2d/BaseRect.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "mozilla/Assertions.h" #include "mozilla/FloatingPoint.h" diff --git a/js/src/builtin/String.js b/js/src/builtin/String.js index c70f8558be..233a7323b2 100644 --- a/js/src/builtin/String.js +++ b/js/src/builtin/String.js @@ -969,12 +969,14 @@ function String_static_trimStart(string) { ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimStart'); return callFunction(std_String_trimStart, string); } +_SetCanonicalName(String_static_trimStart, "trimStart"); function String_static_trimEnd(string) { if (arguments.length < 1) ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimEnd'); return callFunction(std_String_trimEnd, string); } +_SetCanonicalName(String_static_trimEnd, "trimEnd"); function String_static_toLocaleLowerCase(string) { if (arguments.length < 1) diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 2b7ac6b9ce..dae86fd92a 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -8181,12 +8181,14 @@ IonBuilder::maybeMarkEmpty(MDefinition* ins) // as having no possible types too. This is to avoid degrading // subsequent analysis. for (size_t i = 0; i < ins->numOperands(); i++) { - if (!ins->emptyResultTypeSet()) + if (!ins->getOperand(i)->emptyResultTypeSet()) continue; TemporaryTypeSet* types = alloc().lifoAlloc()->new_(); - if (types) + if (types) { ins->setResultTypeSet(types); + return; + } } } diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index d38b17adc4..993572cf3a 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -162,7 +162,12 @@ void FrameLayerBuilder::DisplayItemData::AddFrame(nsIFrame* aFrame) { MOZ_RELEASE_ASSERT(mLayer); - mFrameList.AppendElement(aFrame); + + // Make sure we don't add duplicate frames as we're storing these as vectors. + // See UXP Issue #1860 + if (!mFrameList.Contains(aFrame)) { + mFrameList.AppendElement(aFrame); + } nsTArray* array = aFrame->GetProperty(FrameLayerBuilder::LayerManagerDataProperty()); @@ -328,8 +333,7 @@ public: void Dump(const char *aPrefix = "") { printf_stderr("%sLayerManagerData %p\n", aPrefix, this); - for (auto iter = mDisplayItems.Iter(); !iter.Done(); iter.Next()) { - FrameLayerBuilder::DisplayItemData* data = iter.Get()->GetKey(); + for (auto& data : mDisplayItems) { nsAutoCString prefix; prefix += aPrefix; @@ -388,7 +392,7 @@ public: #ifdef DEBUG_DISPLAY_ITEM_DATA LayerManagerData *mParent; #endif - nsTHashtable > mDisplayItems; + std::vector > mDisplayItems; bool mInvalidateAllLayers; }; @@ -1971,7 +1975,12 @@ FrameLayerBuilder::RemoveFrameFromLayerManager(const nsIFrame* aFrame, } } - data->mParent->mDisplayItems.RemoveEntry(data); + auto it = std::find(data->mParent->mDisplayItems.begin(), + data->mParent->mDisplayItems.end(), + data); + MOZ_ASSERT(it != data->mParent->mDisplayItems.end()); + std::iter_swap(it, data->mParent->mDisplayItems.end() - 1); + data->mParent->mDisplayItems.pop_back(); } arrayCopy.Clear(); @@ -2024,27 +2033,40 @@ FrameLayerBuilder::WillEndTransaction() NS_ASSERTION(data, "Must have data!"); // Update all the frames that used to have layers. - for (auto iter = data->mDisplayItems.Iter(); !iter.Done(); iter.Next()) { - DisplayItemData* data = iter.Get()->GetKey(); - if (!data->mUsed) { + auto iter = data->mDisplayItems.begin(); + while (iter != data->mDisplayItems.end()) { + DisplayItemData* did = iter->get(); + if (!did->mUsed) { // This item was visible, but isn't anymore. - PaintedLayer* t = data->mLayer->AsPaintedLayer(); - if (t && data->mGeometry) { + PaintedLayer* t = did->mLayer->AsPaintedLayer(); + if (t && did->mGeometry) { #ifdef MOZ_DUMP_PAINTING if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { - printf_stderr("Invalidating unused display item (%i) belonging to frame %p from layer %p\n", data->mDisplayItemKey, data->mFrameList[0], t); + printf_stderr("Invalidating unused display item (%i) belonging to frame %p from layer %p\n", did->mDisplayItemKey, did->mFrameList[0], t); } #endif InvalidatePostTransformRegion(t, - data->mGeometry->ComputeInvalidationRegion(), - data->mClip, + did->mGeometry->ComputeInvalidationRegion(), + did->mClip, GetLastPaintOffset(t)); } - data->ClearAnimationCompositorState(); - iter.Remove(); + did->ClearAnimationCompositorState(); + + // Remove this item. Swapping it with the last element first is + // quicker than erasing from the middle. + if (iter != data->mDisplayItems.end() - 1) { + std::iter_swap(iter, data->mDisplayItems.end() - 1); + data->mDisplayItems.pop_back(); + } else { + data->mDisplayItems.pop_back(); + break; + } + + // Don't increment iter because we still need to process the item which was moved. } else { - ComputeGeometryChangeForItem(data); + ComputeGeometryChangeForItem(did); + iter++; } } @@ -4800,7 +4822,7 @@ FrameLayerBuilder::StoreDataForFrame(nsDisplayItem* aItem, Layer* aLayer, LayerS data->BeginUpdate(aLayer, aState, mContainerLayerGeneration, aItem); - lmd->mDisplayItems.PutEntry(data); + lmd->mDisplayItems.push_back(data); return data; } @@ -4824,7 +4846,7 @@ FrameLayerBuilder::StoreDataForFrame(nsIFrame* aFrame, data->BeginUpdate(aLayer, aState, mContainerLayerGeneration); - lmd->mDisplayItems.PutEntry(data); + lmd->mDisplayItems.push_back(data); } FrameLayerBuilder::ClippedDisplayItem::ClippedDisplayItem(nsDisplayItem* aItem, @@ -5558,10 +5580,19 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder, flattenToSingleLayer = true; // Restore DisplayItemData - for (auto iter = data->mDisplayItems.Iter(); !iter.Done(); iter.Next()) { - DisplayItemData* data = iter.Get()->GetKey(); - if (data->mUsed && data->mContainerLayerGeneration >= mContainerLayerGeneration) { - iter.Remove(); + auto iter = data->mDisplayItems.begin(); + while (iter != data->mDisplayItems.end()) { + DisplayItemData* did = iter->get(); + if (did->mUsed && did->mContainerLayerGeneration >= mContainerLayerGeneration) { + if (iter != data->mDisplayItems.end() - 1) { + std::iter_swap(iter, data->mDisplayItems.end() - 1); + data->mDisplayItems.pop_back(); + } else { + data->mDisplayItems.pop_back(); + break; + } + } else { + iter++; } } diff --git a/layout/base/crashtests/1156588.html b/layout/base/crashtests/1156588.html index ed0098f79a..b48bc3af25 100644 --- a/layout/base/crashtests/1156588.html +++ b/layout/base/crashtests/1156588.html @@ -2,9 +2,6 @@ -