diff --git a/application/basilisk/fonts/README.txt b/application/basilisk/fonts/README.txt deleted file mode 100644 index ac1f6d9de2..0000000000 --- a/application/basilisk/fonts/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -Twemoji Mozilla -================ - -The upstream repository of Twemoji Mozilla can be found at - - https://github.com/mozilla/twemoji-colr - -Please refer commit history for the current version of the font. -This file purposely omit the version, so there is no need to update it here. diff --git a/application/basilisk/fonts/moz.build b/application/basilisk/fonts/moz.build deleted file mode 100644 index 5cb98333b2..0000000000 --- a/application/basilisk/fonts/moz.build +++ /dev/null @@ -1,11 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -if CONFIG['OS_ARCH'] in ('WINNT', 'Linux'): - DIST_SUBDIR = '' - FINAL_TARGET_FILES.fonts += [ - 'TwemojiMozilla.ttf' - ] diff --git a/application/basilisk/moz.build b/application/basilisk/moz.build index 7274f48fce..2c3c95fa2c 100644 --- a/application/basilisk/moz.build +++ b/application/basilisk/moz.build @@ -11,7 +11,6 @@ SPHINX_TREES['browser'] = 'docs' DIRS += [ 'base', 'components', - 'fonts', 'locales', 'modules', 'themes', diff --git a/application/palemoon/fonts/TwemojiMozilla.ttf b/application/palemoon/fonts/TwemojiMozilla.ttf deleted file mode 100644 index d79250cb03..0000000000 Binary files a/application/palemoon/fonts/TwemojiMozilla.ttf and /dev/null differ diff --git a/application/palemoon/moz.build b/application/palemoon/moz.build index 72e37673cc..f04ad1c7d0 100644 --- a/application/palemoon/moz.build +++ b/application/palemoon/moz.build @@ -9,7 +9,6 @@ CONFIGURE_SUBST_FILES += ['installer/Makefile'] DIRS += [ 'base', 'components', - 'fonts', 'locales', 'modules', 'themes', diff --git a/config/config.mk b/config/config.mk index 24442bfe99..5a352e5296 100644 --- a/config/config.mk +++ b/config/config.mk @@ -107,7 +107,7 @@ ifeq ($(HOST_OS_ARCH),WINNT) # This means we're in comm-central's topsrcdir, so we need to adjust # WIN_TOP_SRC (which points to mozilla's topsrcdir) for the substitution # to win_srcdir. - cc_WIN_TOP_SRC := $(WIN_TOP_SRC:%/mozilla=%) + cc_WIN_TOP_SRC := $(WIN_TOP_SRC:%$(subst $(topsrcdir),,$(MOZILLA_DIR))=%) win_srcdir := $(subst $(topsrcdir),$(cc_WIN_TOP_SRC),$(srcdir)) endif BUILD_TOOLS = $(WIN_TOP_SRC)/build/unix diff --git a/js/src/builtin/RegExp.js b/js/src/builtin/RegExp.js index 25827743ea..91212066c8 100644 --- a/js/src/builtin/RegExp.js +++ b/js/src/builtin/RegExp.js @@ -1042,6 +1042,9 @@ function RegExpMatchAll(string) { // Step 2. if (!IsObject(rx)) ThrowTypeError(JSMSG_NOT_NONNULL_OBJECT, rx === null ? "null" : typeof rx); + + if (rx.flags === undefined || rx.flags === null) + ThrowTypeError(JSMSG_FLAGS_UNDEFINED_OR_NULL); // Step 3. var str = ToString(string); @@ -1052,9 +1055,9 @@ function RegExpMatchAll(string) { // Step 5. var flags = ToString(rx.flags); - // Step 2.b.iii; located here because it needs |flags|. + // Step 2.b.iii; located here because it needs to check |flags|. if (!callFunction(std_String_includes, flags, "g")) { - ThrowTypeError(JSMSG_BAD_REGEXP_FLAG, "- matchAll requires g"); + ThrowTypeError(JSMSG_REQUIRES_GLOBAL_REGEXP, "matchAll"); } // Step 6. diff --git a/js/src/js.msg b/js/src/js.msg index 1612c831d7..e2d923bc4f 100644 --- a/js/src/js.msg +++ b/js/src/js.msg @@ -132,6 +132,8 @@ MSG_DEF(JSMSG_INVALID_NORMALIZE_FORM, 0, JSEXN_RANGEERR, "form must be one of ' MSG_DEF(JSMSG_NEGATIVE_REPETITION_COUNT, 0, JSEXN_RANGEERR, "repeat count must be non-negative") MSG_DEF(JSMSG_NOT_A_CODEPOINT, 1, JSEXN_RANGEERR, "{0} is not a valid code point") MSG_DEF(JSMSG_RESULTING_STRING_TOO_LARGE, 0, JSEXN_RANGEERR, "repeat count must be less than infinity and not overflow maximum string size") +MSG_DEF(JSMSG_FLAGS_UNDEFINED_OR_NULL, 0, JSEXN_TYPEERR, "'flags' property must neither be undefined nor null") +MSG_DEF(JSMSG_REQUIRES_GLOBAL_REGEXP, 1, JSEXN_TYPEERR, "{0} must be called with a global RegExp") // Number MSG_DEF(JSMSG_BAD_RADIX, 0, JSEXN_RANGEERR, "radix must be an integer at least 2 and no greater than 36") diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 1579e69703..8a34d108f1 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2703,9 +2703,22 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil bg->BottomLayer(), bgRect, useWillPaintBorderOptimization); } - bgItemList.AppendNewToTop( - new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bgRect, bg, - drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0))); + if (aSecondaryReferenceFrame) { + bgItemList.AppendNewToTop( + new (aBuilder) nsDisplayTableBackgroundColor(aBuilder, + aSecondaryReferenceFrame, + bgRect, + bg, + drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0), + aFrame)); + } else { + bgItemList.AppendNewToTop( + new (aBuilder) nsDisplayBackgroundColor(aBuilder, + aFrame, + bgRect, + bg, + drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0))); + } } if (isThemed) { diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index e9047b1135..9cee7b517d 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -3015,6 +3015,27 @@ protected: mozilla::gfx::Color mColor; }; +class nsDisplayTableBackgroundColor : public nsDisplayBackgroundColor +{ +public: + nsDisplayTableBackgroundColor(nsDisplayListBuilder* aBuilder, + nsIFrame* aFrame, + const nsRect& aBackgroundRect, + const nsStyleBackground* aBackgroundStyle, + nscolor aColor, + nsIFrame* aAncestorFrame) + : nsDisplayBackgroundColor(aBuilder, aFrame, aBackgroundRect, aBackgroundStyle, aColor) + , mTableType(GetTableTypeFromFrame(aAncestorFrame)) + { } + + virtual uint32_t GetPerFrameKey() override { + return (static_cast(mTableType) << nsDisplayItem::TYPE_BITS) | + nsDisplayItem::GetPerFrameKey(); + } +protected: + TableType mTableType; +}; + class nsDisplayClearBackground : public nsDisplayItem { public: diff --git a/layout/generic/BlockReflowInput.cpp b/layout/generic/BlockReflowInput.cpp index 10084fd8b3..86248ac141 100644 --- a/layout/generic/BlockReflowInput.cpp +++ b/layout/generic/BlockReflowInput.cpp @@ -716,6 +716,8 @@ FloatMarginISize(const ReflowInput& aCBReflowInput, bool BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat) { + MOZ_ASSERT(aFloat->GetParent() == mBlock); + WritingMode wm = mReflowInput.GetWritingMode(); // Save away the Y coordinate before placing the float. We will // restore mBCoord at the end after placing the float. This is diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index 5a04f0cd1e..7e188c247e 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -376,8 +376,6 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext, bool lazilySetParentPointer = false; - nsIFrame* lineContainer = aReflowInput.mLineLayout->LineContainerFrame(); - // Check for an overflow list with our prev-in-flow nsInlineFrame* prevInFlow = (nsInlineFrame*)GetPrevInFlow(); if (prevInFlow) { @@ -403,12 +401,6 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext, mFrames.SetFrames(*prevOverflowFrames); lazilySetParentPointer = true; } else { - // Assign all floats to our block if necessary - if (lineContainer && lineContainer->GetPrevContinuation()) { - ReparentFloatsForInlineChild(lineContainer, - prevOverflowFrames->FirstChild(), - true); - } // Insert the new frames at the beginning of the child list // and set their parent pointer const nsFrameList::Slice& newFrames = @@ -442,14 +434,13 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext, if (aReflowInput.mLineLayout->GetInFirstLine()) { flags = DrainFlags(flags | eInFirstLine); } - DrainSelfOverflowListInternal(flags, lineContainer); + DrainSelfOverflowListInternal(flags); } - // Set our own reflow state (additional state above and beyond - // aReflowInput) + // Set our own reflow state (additional state above and beyond aReflowInput) InlineReflowInput irs; irs.mPrevFrame = nullptr; - irs.mLineContainer = lineContainer; + irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame(); irs.mLineLayout = aReflowInput.mLineLayout; irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow(); irs.mSetParentPointer = lazilySetParentPointer; @@ -494,8 +485,7 @@ nsInlineFrame::AttributeChanged(int32_t aNameSpaceID, } bool -nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags, - nsIFrame* aLineContainer) +nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags) { AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); if (overflowFrames) { @@ -504,9 +494,6 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags, // correct parent pointer. This is sometimes skipped by Reflow. if (!(aFlags & eDontReparentFrames)) { nsIFrame* firstChild = overflowFrames->FirstChild(); - if (aLineContainer && aLineContainer->GetPrevContinuation()) { - ReparentFloatsForInlineChild(aLineContainer, firstChild, true); - } const bool doReparentSC = (aFlags & eInFirstLine); RestyleManagerHandle restyleManager = PresContext()->RestyleManager(); for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) { @@ -537,7 +524,7 @@ nsInlineFrame::DrainSelfOverflowList() break; } } - return DrainSelfOverflowListInternal(flags, lineContainer); + return DrainSelfOverflowListInternal(flags); } /* virtual */ bool @@ -606,23 +593,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, while (frame) { // Check if we should lazily set the child frame's parent pointer. if (irs.mSetParentPointer) { - bool havePrevBlock = - irs.mLineContainer && irs.mLineContainer->GetPrevContinuation(); nsIFrame* child = frame; do { - // If our block is the first in flow, then any floats under the pulled - // frame must already belong to our block. - if (havePrevBlock) { - // This has to happen before we update frame's parent; we need to - // know frame's ancestry under its old block. - // The blockChildren.ContainsFrame check performed by - // ReparentFloatsForInlineChild here may be slow, but we can't - // easily avoid it because we don't know where 'frame' originally - // came from. If we really really have to optimize this we could - // cache whether frame->GetParent() is under its containing blocks - // overflowList or not. - ReparentFloatsForInlineChild(irs.mLineContainer, child, false); - } child->SetParent(this); if (inFirstLine) { restyleManager->ReparentStyleContext(child); @@ -1098,20 +1070,13 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext, return; // XXX does this happen? why? } - nsIFrame* lineContainer = aReflowInput.mLineLayout->LineContainerFrame(); - // Check for an overflow list with our prev-in-flow nsFirstLineFrame* prevInFlow = (nsFirstLineFrame*)GetPrevInFlow(); if (prevInFlow) { AutoFrameListPtr prevOverflowFrames(aPresContext, prevInFlow->StealOverflowFrames()); if (prevOverflowFrames) { - // Assign all floats to our block if necessary - if (lineContainer && lineContainer->GetPrevContinuation()) { - ReparentFloatsForInlineChild(lineContainer, - prevOverflowFrames->FirstChild(), - true); - } + // Reparent the new frames and their style contexts. const nsFrameList::Slice& newFrames = mFrames.InsertFrames(this, nullptr, *prevOverflowFrames); ReparentChildListStyle(aPresContext, newFrames, this); @@ -1125,7 +1090,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext, // aReflowInput) InlineReflowInput irs; irs.mPrevFrame = nullptr; - irs.mLineContainer = lineContainer; + irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame(); irs.mLineLayout = aReflowInput.mLineLayout; irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow(); diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index a9679e93f0..36df6be93a 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -179,11 +179,9 @@ private: /** * Move any frames on our overflow list to the end of our principal list. * @param aFlags one or more of the above DrainFlags - * @param aLineContainer the nearest line container ancestor * @return true if there were any overflow frames */ - bool DrainSelfOverflowListInternal(DrainFlags aFlags, - nsIFrame* aLineContainer); + bool DrainSelfOverflowListInternal(DrainFlags aFlags); protected: nscoord mBaseline; }; diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 3e4f60f624..f613c8b798 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -164,7 +164,7 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, // Don't try to use the row cursor if we have to descend into placeholders; // we might have rows containing placeholders, where the row's overflow // area doesn't intersect the dirty rect but we need to descend into the row - // to see out of flows. + // to see out-of-flows. // Note that we really want to check ShouldDescendIntoFrame for all // the rows in |f|, but that's exactly what we're trying to avoid, so we // approximate it by checking it for |f|: if it's true for any row @@ -173,11 +173,11 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame, nullptr : f->GetFirstRowContaining(aDirtyRect.y, &overflowAbove); if (kid) { - // have a cursor, use it + // If we have a cursor, use it while (kid) { - if (kid->GetRect().y - overflowAbove >= aDirtyRect.YMost() && - kid->GetNormalRect().y - overflowAbove >= aDirtyRect.YMost()) + if (kid->GetRect().y - overflowAbove >= aDirtyRect.YMost()) { break; + } f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists); kid = kid->GetNextSibling(); } @@ -1911,12 +1911,12 @@ nsTableRowGroupFrame::GetFirstRowContaining(nscoord aY, nscoord* aOverflowAbove) // encountering a row whose overflowArea.YMost() is <= aY but which has // a row above it containing cell(s) that span to include aY. while (cursorIndex > 0 && - cursorFrame->GetNormalRect().YMost() + property->mOverflowBelow > aY) { + cursorFrame->GetRect().YMost() + property->mOverflowBelow > aY) { --cursorIndex; cursorFrame = property->mFrames[cursorIndex]; } while (cursorIndex + 1 < frameCount && - cursorFrame->GetNormalRect().YMost() + property->mOverflowBelow <= aY) { + cursorFrame->GetRect().YMost() + property->mOverflowBelow <= aY) { ++cursorIndex; cursorFrame = property->mFrames[cursorIndex]; } @@ -1929,13 +1929,11 @@ nsTableRowGroupFrame::GetFirstRowContaining(nscoord aY, nscoord* aOverflowAbove) bool nsTableRowGroupFrame::FrameCursorData::AppendFrame(nsIFrame* aFrame) { - // Relative positioning can cause table parts to move, but we will still paint - // the backgrounds for the parts under them at their 'normal' position. That - // means that we must consider the overflow rects at both positions. For - // example, if we use relative positioning to move a row-spanning cell, we - // will still paint the row background for that cell at its normal position, - // which will overflow the row. - // XXX(seth): This probably isn't correct in the presence of transforms. + // Relative positioning can cause table parts to move, which can cause issues + // with the cursor position to know which rows can be skipped. + // To make this work, use the max difference between the frame's rect and the + // union of the frame's "normal" position and the overflow rect to cover the + // area of relatively positioned elements even if they are out of order. nsRect positionedOverflowRect = aFrame->GetVisualOverflowRect(); nsPoint positionedToNormal = aFrame->GetNormalPosition() - aFrame->GetPosition(); nsRect normalOverflowRect = positionedOverflowRect + positionedToNormal; diff --git a/old-configure.in b/old-configure.in index 24c9c0e7fe..163be38de1 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3774,6 +3774,8 @@ if test -n "$MOZ_BUNDLED_FONTS"; then AC_DEFINE(MOZ_BUNDLED_FONTS) fi +AC_SUBST(MOZ_BUNDLED_FONTS) + dnl ======================================================== dnl Verify MAR signatures dnl ======================================================== diff --git a/python/mozbuild/mozbuild/controller/clobber.py b/python/mozbuild/mozbuild/controller/clobber.py index d3cdfd5968..ba83e24285 100644 --- a/python/mozbuild/mozbuild/controller/clobber.py +++ b/python/mozbuild/mozbuild/controller/clobber.py @@ -58,6 +58,9 @@ class Clobberer(object): if not os.path.isfile(self.src_clobber): self.src_clobber = os.path.join(topsrcdir, 'mozilla', 'CLOBBER') + if not os.path.isfile(self.src_clobber): + self.src_clobber = os.path.join(topsrcdir, 'platform', 'CLOBBER') + assert os.path.isfile(self.src_clobber) def clobber_needed(self): diff --git a/application/palemoon/fonts/README.txt b/toolkit/fonts/README.txt similarity index 100% rename from application/palemoon/fonts/README.txt rename to toolkit/fonts/README.txt diff --git a/application/basilisk/fonts/TwemojiMozilla.ttf b/toolkit/fonts/TwemojiMozilla.ttf similarity index 100% rename from application/basilisk/fonts/TwemojiMozilla.ttf rename to toolkit/fonts/TwemojiMozilla.ttf diff --git a/application/palemoon/fonts/moz.build b/toolkit/fonts/moz.build similarity index 95% rename from application/palemoon/fonts/moz.build rename to toolkit/fonts/moz.build index 8840a87f89..fb6a9b24c5 100644 --- a/application/palemoon/fonts/moz.build +++ b/toolkit/fonts/moz.build @@ -5,5 +5,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. if CONFIG['OS_ARCH'] in ('WINNT', 'Linux'): - DIST_SUBDIR = '' FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf'] diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 4d870c73c5..ebba07b4ad 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -24,12 +24,7 @@ def Libxul(name): DELAYLOAD_DLLS += [ 'comdlg32.dll', - 'dbghelp.dll', 'netapi32.dll', - 'PowrProf.dll', - 'psapi.dll', - 'rasapi32.dll', - 'rasdlg.dll', 'secur32.dll', 'wininet.dll', 'winspool.drv' @@ -63,11 +58,6 @@ def Libxul(name): if CONFIG['MOZ_NEEDS_LIBATOMIC']: OS_LIBS += ['atomic'] - # This option should go away in bug 1290972, but we need to wait until - # Rust 1.12 has been released. - if CONFIG['MOZ_RUST'] and CONFIG['OS_ARCH'] == 'Darwin': - LDFLAGS += ['-Wl,-no_compact_unwind'] - Libxul('xul') SDK_LIBRARY = True diff --git a/toolkit/moz.build b/toolkit/moz.build index 33b459d478..bd1be6eadf 100644 --- a/toolkit/moz.build +++ b/toolkit/moz.build @@ -19,6 +19,9 @@ DIRS += [ 'themes', ] +if CONFIG['MOZ_BUNDLED_FONTS']: + DIRS += ['fonts'] + if CONFIG['MOZ_JETPACK']: DIRS += ['jetpack']