mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 12:57:31 +09:00
Issue #1656 - Part 2: Unmangle some unfortunate UTF-8 victims.
The poor fellows got lost in an ASCII-interpretation of the world.
This commit is contained in:
parent
8c395520d9
commit
ed7e49eda6
9 changed files with 24 additions and 24 deletions
|
|
@ -3828,7 +3828,7 @@ VariablesView.stringifiers.byObjectKind = {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the "N more???" formatted string, given an N. This is used for displaying
|
* Get the "N more…" formatted string, given an N. This is used for displaying
|
||||||
* how many elements are not displayed in an object preview (eg. an array).
|
* how many elements are not displayed in an object preview (eg. an array).
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
|
|
|
||||||
|
|
@ -1069,7 +1069,7 @@ ShadowRoot*
|
||||||
Element::GetShadowRootByMode() const
|
Element::GetShadowRootByMode() const
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 1. Let shadow be context object???s shadow root.
|
* 1. Let shadow be context object’s shadow root.
|
||||||
* 2. If shadow is null or its mode is "closed", then return null.
|
* 2. If shadow is null or its mode is "closed", then return null.
|
||||||
*/
|
*/
|
||||||
ShadowRoot* shadowRoot = GetShadowRoot();
|
ShadowRoot* shadowRoot = GetShadowRoot();
|
||||||
|
|
@ -1088,7 +1088,7 @@ already_AddRefed<ShadowRoot>
|
||||||
Element::AttachShadow(const ShadowRootInit& aInit, ErrorResult& aError)
|
Element::AttachShadow(const ShadowRootInit& aInit, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 1. If context object???s namespace is not the HTML namespace,
|
* 1. If context object’s namespace is not the HTML namespace,
|
||||||
* then throw a "NotSupportedError" DOMException.
|
* then throw a "NotSupportedError" DOMException.
|
||||||
*/
|
*/
|
||||||
if (!IsHTMLElement()) {
|
if (!IsHTMLElement()) {
|
||||||
|
|
@ -1097,7 +1097,7 @@ Element::AttachShadow(const ShadowRootInit& aInit, ErrorResult& aError)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2. If context object???s local name is not
|
* 2. If context object’s local name is not
|
||||||
* a valid custom element name, "article", "aside", "blockquote",
|
* a valid custom element name, "article", "aside", "blockquote",
|
||||||
* "body", "div", "footer", "h1", "h2", "h3", "h4", "h5", "h6",
|
* "body", "div", "footer", "h1", "h2", "h3", "h4", "h5", "h6",
|
||||||
* "header", "main" "nav", "p", "section", or "span",
|
* "header", "main" "nav", "p", "section", or "span",
|
||||||
|
|
@ -1181,8 +1181,8 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4. Let shadow be a new shadow root whose node document is
|
* 4. Let shadow be a new shadow root whose node document is
|
||||||
* context object???s node document, host is context object,
|
* context object’s node document, host is context object,
|
||||||
* and mode is init???s mode.
|
* and mode is init’s mode.
|
||||||
*/
|
*/
|
||||||
RefPtr<ShadowRoot> shadowRoot =
|
RefPtr<ShadowRoot> shadowRoot =
|
||||||
new ShadowRoot(this, aClosed, nodeInfo.forget(), protoBinding);
|
new ShadowRoot(this, aClosed, nodeInfo.forget(), protoBinding);
|
||||||
|
|
@ -1190,7 +1190,7 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
||||||
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 5. Set context object???s shadow root to shadow.
|
* 5. Set context object’s shadow root to shadow.
|
||||||
*/
|
*/
|
||||||
SetShadowRoot(shadowRoot);
|
SetShadowRoot(shadowRoot);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -540,7 +540,7 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
|
||||||
nsIDocument* newDoc = aNode->OwnerDoc();
|
nsIDocument* newDoc = aNode->OwnerDoc();
|
||||||
if (newDoc) {
|
if (newDoc) {
|
||||||
if (CustomElementRegistry::IsCustomElementEnabled()) {
|
if (CustomElementRegistry::IsCustomElementEnabled()) {
|
||||||
// Adopted callback must be enqueued whenever a node???s
|
// Adopted callback must be enqueued whenever a node’s
|
||||||
// shadow-including inclusive descendants that is custom.
|
// shadow-including inclusive descendants that is custom.
|
||||||
Element* element = aNode->IsElement() ? aNode->AsElement() : nullptr;
|
Element* element = aNode->IsElement() ? aNode->AsElement() : nullptr;
|
||||||
if (element) {
|
if (element) {
|
||||||
|
|
|
||||||
|
|
@ -878,7 +878,7 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
||||||
|
|
||||||
mRequest->AddURL(spec, fragment);
|
mRequest->AddURL(spec, fragment);
|
||||||
NS_ConvertUTF8toUTF16 tRPHeaderValue(tRPHeaderCValue);
|
NS_ConvertUTF8toUTF16 tRPHeaderValue(tRPHeaderCValue);
|
||||||
// updates request???s associated referrer policy according to the
|
// updates request’s associated referrer policy according to the
|
||||||
// Referrer-Policy header (if any).
|
// Referrer-Policy header (if any).
|
||||||
if (!tRPHeaderValue.IsEmpty()) {
|
if (!tRPHeaderValue.IsEmpty()) {
|
||||||
net::ReferrerPolicy net_referrerPolicy =
|
net::ReferrerPolicy net_referrerPolicy =
|
||||||
|
|
|
||||||
|
|
@ -1565,7 +1565,7 @@ protected:
|
||||||
// Default step base value when a type do not have specific one.
|
// Default step base value when a type do not have specific one.
|
||||||
static const Decimal kDefaultStepBase;
|
static const Decimal kDefaultStepBase;
|
||||||
// Default step base value when type=week does not not have a specific one,
|
// Default step base value when type=week does not not have a specific one,
|
||||||
// which is ???259200000, the start of week 1970-W01.
|
// which is −259200000, the start of week 1970-W01.
|
||||||
static const Decimal kDefaultStepBaseWeek;
|
static const Decimal kDefaultStepBaseWeek;
|
||||||
|
|
||||||
// Default step used when there is no specified step.
|
// Default step used when there is no specified step.
|
||||||
|
|
|
||||||
|
|
@ -772,7 +772,7 @@ StripURIForReporting(nsIURI* aURI,
|
||||||
{
|
{
|
||||||
// 1) If the origin of uri is a globally unique identifier (for example,
|
// 1) If the origin of uri is a globally unique identifier (for example,
|
||||||
// aURI has a scheme of data, blob, or filesystem), then return the
|
// aURI has a scheme of data, blob, or filesystem), then return the
|
||||||
// ASCII serialization of uri???s scheme.
|
// ASCII serialization of uri’s scheme.
|
||||||
bool isHttpOrFtp =
|
bool isHttpOrFtp =
|
||||||
(NS_SUCCEEDED(aURI->SchemeIs("http", &isHttpOrFtp)) && isHttpOrFtp) ||
|
(NS_SUCCEEDED(aURI->SchemeIs("http", &isHttpOrFtp)) && isHttpOrFtp) ||
|
||||||
(NS_SUCCEEDED(aURI->SchemeIs("https", &isHttpOrFtp)) && isHttpOrFtp) ||
|
(NS_SUCCEEDED(aURI->SchemeIs("https", &isHttpOrFtp)) && isHttpOrFtp) ||
|
||||||
|
|
@ -787,7 +787,7 @@ StripURIForReporting(nsIURI* aURI,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) If the origin of uri is not the same as the origin of the protected
|
// 2) If the origin of uri is not the same as the origin of the protected
|
||||||
// resource, then return the ASCII serialization of uri???s origin.
|
// resource, then return the ASCII serialization of uri’s origin.
|
||||||
if (!NS_SecurityCompareURIs(aSelfURI, aURI, false)) {
|
if (!NS_SecurityCompareURIs(aSelfURI, aURI, false)) {
|
||||||
// cross origin redirects also fall into this category, see:
|
// cross origin redirects also fall into this category, see:
|
||||||
// http://www.w3.org/TR/CSP/#violation-reports
|
// http://www.w3.org/TR/CSP/#violation-reports
|
||||||
|
|
|
||||||
|
|
@ -1403,7 +1403,7 @@ struct nsGridContainerFrame::Tracks
|
||||||
const LineRange& aRange,
|
const LineRange& aRange,
|
||||||
const GridItemInfo& aGridItem);
|
const GridItemInfo& aGridItem);
|
||||||
|
|
||||||
// Helper method that returns the track size to use in ??11.5.1.2
|
// Helper method that returns the track size to use in §11.5.1.2
|
||||||
// https://drafts.csswg.org/css-grid/#extra-space
|
// https://drafts.csswg.org/css-grid/#extra-space
|
||||||
template<TrackSizingPhase phase> static
|
template<TrackSizingPhase phase> static
|
||||||
nscoord StartSizeInDistribution(const TrackSize& aSize)
|
nscoord StartSizeInDistribution(const TrackSize& aSize)
|
||||||
|
|
@ -1426,7 +1426,7 @@ struct nsGridContainerFrame::Tracks
|
||||||
/**
|
/**
|
||||||
* Collect the tracks which are growable (matching aSelector) into
|
* Collect the tracks which are growable (matching aSelector) into
|
||||||
* aGrowableTracks, and return the amount of space that can be used
|
* aGrowableTracks, and return the amount of space that can be used
|
||||||
* to grow those tracks. This method implements CSS Grid ??11.5.1.2.
|
* to grow those tracks. This method implements CSS Grid §11.5.1.2.
|
||||||
* https://drafts.csswg.org/css-grid/#extra-space
|
* https://drafts.csswg.org/css-grid/#extra-space
|
||||||
*/
|
*/
|
||||||
template<TrackSizingPhase phase>
|
template<TrackSizingPhase phase>
|
||||||
|
|
@ -1537,7 +1537,7 @@ struct nsGridContainerFrame::Tracks
|
||||||
nscoord limit = sz.mLimit;
|
nscoord limit = sz.mLimit;
|
||||||
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
||||||
aFitContentClamper)) {
|
aFitContentClamper)) {
|
||||||
// Clamp the limit to the fit-content() size, for ??12.5.2 step 5/6.
|
// Clamp the limit to the fit-content() size, for §12.5.2 step 5/6.
|
||||||
aFitContentClamper(track, sz.mBase, &limit);
|
aFitContentClamper(track, sz.mBase, &limit);
|
||||||
}
|
}
|
||||||
if (newBase > limit) {
|
if (newBase > limit) {
|
||||||
|
|
@ -1609,7 +1609,7 @@ struct nsGridContainerFrame::Tracks
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark all tracks in aGrowableTracks with an eSkipGrowUnlimited bit if
|
* Mark all tracks in aGrowableTracks with an eSkipGrowUnlimited bit if
|
||||||
* they *shouldn't* grow unlimited in ??11.5.1.2.3 "Distribute space beyond
|
* they *shouldn't* grow unlimited in §11.5.1.2.3 "Distribute space beyond
|
||||||
* growth limits" https://drafts.csswg.org/css-grid/#extra-space
|
* growth limits" https://drafts.csswg.org/css-grid/#extra-space
|
||||||
* Return the number of tracks that are still growable.
|
* Return the number of tracks that are still growable.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1671,7 +1671,7 @@ struct nsGridContainerFrame::Tracks
|
||||||
nscoord newBase = sz.mBase + delta;
|
nscoord newBase = sz.mBase + delta;
|
||||||
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
||||||
aFitContentClamper)) {
|
aFitContentClamper)) {
|
||||||
// Clamp newBase to the fit-content() size, for ??12.5.2 step 5/6.
|
// Clamp newBase to the fit-content() size, for §12.5.2 step 5/6.
|
||||||
if (aFitContentClamper(track, sz.mBase, &newBase)) {
|
if (aFitContentClamper(track, sz.mBase, &newBase)) {
|
||||||
didClamp = true;
|
didClamp = true;
|
||||||
delta = newBase - sz.mBase;
|
delta = newBase - sz.mBase;
|
||||||
|
|
@ -4104,7 +4104,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSizeStep1(
|
||||||
sz.mLimit = std::max(sz.mLimit, s);
|
sz.mLimit = std::max(sz.mLimit, s);
|
||||||
}
|
}
|
||||||
if (MOZ_UNLIKELY(sz.mState & TrackSize::eFitContent)) {
|
if (MOZ_UNLIKELY(sz.mState & TrackSize::eFitContent)) {
|
||||||
// Clamp mLimit to the fit-content() size, for ??12.5.1.
|
// Clamp mLimit to the fit-content() size, for §12.5.1.
|
||||||
auto maxCoord = aFunctions.MaxSizingFor(aRange.mStart);
|
auto maxCoord = aFunctions.MaxSizingFor(aRange.mStart);
|
||||||
nscoord fitContentClamp =
|
nscoord fitContentClamp =
|
||||||
nsRuleNode::ComputeCoordPercentCalc(maxCoord, aPercentageBasis);
|
nsRuleNode::ComputeCoordPercentCalc(maxCoord, aPercentageBasis);
|
||||||
|
|
@ -4845,8 +4845,8 @@ nsGridContainerFrame::Tracks::StretchFlexibleTracks(
|
||||||
applyMinMax = false;
|
applyMinMax = false;
|
||||||
// https://drafts.csswg.org/css-grid/#algo-flex-tracks
|
// https://drafts.csswg.org/css-grid/#algo-flex-tracks
|
||||||
// "If using this flex fraction would cause the grid to be smaller than
|
// "If using this flex fraction would cause the grid to be smaller than
|
||||||
// the grid container???s min-width/height (or larger than the grid
|
// the grid container’s min-width/height (or larger than the grid
|
||||||
// container???s max-width/height), then redo this step, treating the free
|
// container’s max-width/height), then redo this step, treating the free
|
||||||
// space as definite [...]"
|
// space as definite [...]"
|
||||||
nscoord newSize = 0;
|
nscoord newSize = 0;
|
||||||
for (auto& sz : mSizes) {
|
for (auto& sz : mSizes) {
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ class FastBernoulliTrial {
|
||||||
* - The gaps below 1 are 2**-53, so that interval is (0, 1-2**-53].
|
* - The gaps below 1 are 2**-53, so that interval is (0, 1-2**-53].
|
||||||
*
|
*
|
||||||
* - Because the floating-point gaps near 1 are wider than those near
|
* - Because the floating-point gaps near 1 are wider than those near
|
||||||
* zero, there are many small positive doubles ?? such that 1-?? rounds to
|
* zero, there are many small positive doubles ε such that 1-ε rounds to
|
||||||
* exactly 1. However, 2**-53 can be represented exactly. So
|
* exactly 1. However, 2**-53 can be represented exactly. So
|
||||||
* 1-mProbability is in [2**-53, 1].
|
* 1-mProbability is in [2**-53, 1].
|
||||||
*
|
*
|
||||||
|
|
@ -263,9 +263,9 @@ class FastBernoulliTrial {
|
||||||
*
|
*
|
||||||
* - How much of the range of mProbability does this cause us to ignore?
|
* - How much of the range of mProbability does this cause us to ignore?
|
||||||
* The only value for which log returns 0 is exactly 1; the slope of log
|
* The only value for which log returns 0 is exactly 1; the slope of log
|
||||||
* at 1 is 1, so for small ?? such that 1 - ?? != 1, log(1 - ??) is -??,
|
* at 1 is 1, so for small ε such that 1 - ε != 1, log(1 - ε) is -ε,
|
||||||
* never 0. The gaps near one are larger than the gaps near zero, so if
|
* never 0. The gaps near one are larger than the gaps near zero, so if
|
||||||
* 1 - ?? wasn't 1, then -?? is representable. So if log(1 - mProbability)
|
* 1 - ε wasn't 1, then -ε is representable. So if log(1 - mProbability)
|
||||||
* isn't 0, then 1 - mProbability isn't 1, which means that mProbability
|
* isn't 0, then 1 - mProbability isn't 1, which means that mProbability
|
||||||
* is at least 2**-53, as discussed earlier. This is a sampling
|
* is at least 2**-53, as discussed earlier. This is a sampling
|
||||||
* likelihood of roughly one in ten trillion, which is unlikely to be
|
* likelihood of roughly one in ten trillion, which is unlikely to be
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ static_assert(IsDestructible<TrivialDestructible>::value,
|
||||||
|
|
||||||
namespace CPlusPlus11IsBaseOf {
|
namespace CPlusPlus11IsBaseOf {
|
||||||
|
|
||||||
// Adapted from C++11 ?? 20.9.6.
|
// Adapted from C++11 § 20.9.6.
|
||||||
struct B {};
|
struct B {};
|
||||||
struct B1 : B {};
|
struct B1 : B {};
|
||||||
struct B2 : B {};
|
struct B2 : B {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue