diff --git a/devtools/client/shared/curl.js b/devtools/client/shared/curl.js index 478d3f1ecd..276e1f9fb6 100644 --- a/devtools/client/shared/curl.js +++ b/devtools/client/shared/curl.js @@ -436,14 +436,10 @@ const CurlUtils = { // This ensures we do not try and double escape another ^ if it was placed // by the previous replace. .replace(/%(?=[a-zA-Z0-9_])/g, "%^") - // We replace \r and \r\n with \n, this allows to consistently escape all new - // lines in the next replace - .replace(/\r\n?/g, "\n") // Lastly we replace new lines with ^ and TWO new lines because the first // new line is there to enact the escape command the second is the character // to escape (in this case new line). - // The extra " enables escaping new lines with ^ within quotes in cmd.exe. - .replace(/\n/g, '"^\r\n\r\n"') + .replace(/\r?\n|\r/g, "^\n\n") + encapsChars ); } diff --git a/gfx/2d/BaseRect.h b/gfx/2d/BaseRect.h index c0bb60fa39..eeaa12347f 100644 --- a/gfx/2d/BaseRect.h +++ b/gfx/2d/BaseRect.h @@ -16,6 +16,8 @@ #include "mozilla/TypeTraits.h" #include "Types.h" +#include + namespace mozilla { namespace gfx { diff --git a/gfx/2d/Matrix.h b/gfx/2d/Matrix.h index d6835c8e62..b38a1d2275 100644 --- a/gfx/2d/Matrix.h +++ b/gfx/2d/Matrix.h @@ -17,6 +17,8 @@ #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" +#include + namespace mozilla { namespace gfx { diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 11e7f18e22..cf0d1dd755 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -1086,6 +1086,23 @@ nsStyleSet::AssertNoCSSRules(nsRuleNode* aCurrLevelNode, } #endif +static MOZ_ALWAYS_INLINE void +TrackRuleNodeForCurrentOrigin( + nsRuleWalker* aRuleWalker, + nsRuleNode*& aLastRN, + nsTArray& aLastRNs, + nsTArray& aHaveImportantOriginRules, + bool& aHaveAnyImportantOriginRules) +{ + aLastRN = aRuleWalker->CurrentNode(); + aLastRNs.AppendElement(aLastRN); + + bool haveImportantRules = !aRuleWalker->GetCheckForImportantRules(); + aHaveImportantOriginRules.AppendElement(haveImportantRules); + aHaveAnyImportantOriginRules = + aHaveAnyImportantOriginRules || haveImportantRules; +} + static MOZ_ALWAYS_INLINE void FileRulesFromAllChildProcessors( nsCOMPtr aParentProcessor, @@ -1113,13 +1130,11 @@ FileRulesFromAllChildProcessors( aRuleWalker->SetLevel(aLevel, false, true); (*aCollectorFunc)(processor, aData); - aLastRN = aRuleWalker->CurrentNode(); - aLastRNs.AppendElement(aLastRN); - - bool haveImportantRules = !aRuleWalker->GetCheckForImportantRules(); - aHaveImportantOriginRules.AppendElement(haveImportantRules); - aHaveAnyImportantOriginRules = - aHaveAnyImportantOriginRules || haveImportantRules; + TrackRuleNodeForCurrentOrigin(aRuleWalker, + aLastRN, + aLastRNs, + aHaveImportantOriginRules, + aHaveAnyImportantOriginRules); } } @@ -1204,18 +1219,22 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc, aRuleWalker->SetLevel(SheetType::Doc, false, true); bool cutOffInheritance = false; + nsRuleNode* lastDocRN = nullptr; + nsTArray lastDocRNs; + nsTArray haveImportantDocRules; + bool haveAnyImportantDocRules = false; if (mBindingManager && aElement) { // We can supply additional document-level sheets that should be walked. mBindingManager->WalkRules(aCollectorFunc, static_cast(aData), &cutOffInheritance); + TrackRuleNodeForCurrentOrigin(aRuleWalker, + lastDocRN, + lastDocRNs, + haveImportantDocRules, + haveAnyImportantDocRules); } - bool haveImportantNACRules = !aRuleWalker->GetCheckForImportantRules(); - nsRuleNode* lastDocRN = nullptr; - nsTArray lastDocRNs; - nsTArray haveImportantDocRules; - bool haveAnyImportantDocRules = haveImportantNACRules; if (!skipUserStyles && !cutOffInheritance) { // NOTE: different FileRulesFromAllChildProcessors(mRuleProcessors[SheetType::Doc], aCollectorFunc, @@ -1297,8 +1316,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc, aRuleWalker->SetLevel(SheetType::Doc, true, false); nsRuleNode* startRN = lastDocRNs[i]; nsRuleNode* endRN = i == 0 ? lastSVGAttrAnimationRN : lastDocRNs[i - 1]; - bool isNearestToNACWithImportantRules = i == 0 && haveImportantNACRules; - if (haveImportantDocRules[i] || isNearestToNACWithImportantRules) { + if (haveImportantDocRules[i]) { AddImportantRules(startRN, endRN, aRuleWalker); // doc } #ifdef DEBUG diff --git a/netwerk/base/nsURLParsers.h b/netwerk/base/nsURLParsers.h index 34de99a377..5f41f01598 100644 --- a/netwerk/base/nsURLParsers.h +++ b/netwerk/base/nsURLParsers.h @@ -9,6 +9,8 @@ #include "nsIURLParser.h" #include "mozilla/Attributes.h" +#include + //---------------------------------------------------------------------------- // base class for url parsers //---------------------------------------------------------------------------- diff --git a/toolkit/content/logopage.xhtml b/toolkit/content/logopage.xhtml index 04c6a82f33..aa458ae0cf 100644 --- a/toolkit/content/logopage.xhtml +++ b/toolkit/content/logopage.xhtml @@ -10,7 +10,7 @@ - + Blank page