mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +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).
|
||||
*
|
||||
* @private
|
||||
|
|
|
|||
|
|
@ -1069,7 +1069,7 @@ ShadowRoot*
|
|||
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.
|
||||
*/
|
||||
ShadowRoot* shadowRoot = GetShadowRoot();
|
||||
|
|
@ -1088,7 +1088,7 @@ already_AddRefed<ShadowRoot>
|
|||
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.
|
||||
*/
|
||||
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",
|
||||
* "body", "div", "footer", "h1", "h2", "h3", "h4", "h5", "h6",
|
||||
* "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
|
||||
* context object???s node document, host is context object,
|
||||
* and mode is init???s mode.
|
||||
* context object’s node document, host is context object,
|
||||
* and mode is init’s mode.
|
||||
*/
|
||||
RefPtr<ShadowRoot> shadowRoot =
|
||||
new ShadowRoot(this, aClosed, nodeInfo.forget(), protoBinding);
|
||||
|
|
@ -1190,7 +1190,7 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
|||
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
||||
|
||||
/**
|
||||
* 5. Set context object???s shadow root to shadow.
|
||||
* 5. Set context object’s shadow root to shadow.
|
||||
*/
|
||||
SetShadowRoot(shadowRoot);
|
||||
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
|
|||
nsIDocument* newDoc = aNode->OwnerDoc();
|
||||
if (newDoc) {
|
||||
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.
|
||||
Element* element = aNode->IsElement() ? aNode->AsElement() : nullptr;
|
||||
if (element) {
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
|||
|
||||
mRequest->AddURL(spec, fragment);
|
||||
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).
|
||||
if (!tRPHeaderValue.IsEmpty()) {
|
||||
net::ReferrerPolicy net_referrerPolicy =
|
||||
|
|
|
|||
|
|
@ -1565,7 +1565,7 @@ protected:
|
|||
// Default step base value when a type do not have specific one.
|
||||
static const Decimal kDefaultStepBase;
|
||||
// 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;
|
||||
|
||||
// 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,
|
||||
// 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 =
|
||||
(NS_SUCCEEDED(aURI->SchemeIs("http", &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
|
||||
// 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)) {
|
||||
// cross origin redirects also fall into this category, see:
|
||||
// http://www.w3.org/TR/CSP/#violation-reports
|
||||
|
|
|
|||
|
|
@ -1403,7 +1403,7 @@ struct nsGridContainerFrame::Tracks
|
|||
const LineRange& aRange,
|
||||
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
|
||||
template<TrackSizingPhase phase> static
|
||||
nscoord StartSizeInDistribution(const TrackSize& aSize)
|
||||
|
|
@ -1426,7 +1426,7 @@ struct nsGridContainerFrame::Tracks
|
|||
/**
|
||||
* Collect the tracks which are growable (matching aSelector) into
|
||||
* 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
|
||||
*/
|
||||
template<TrackSizingPhase phase>
|
||||
|
|
@ -1537,7 +1537,7 @@ struct nsGridContainerFrame::Tracks
|
|||
nscoord limit = sz.mLimit;
|
||||
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
||||
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);
|
||||
}
|
||||
if (newBase > limit) {
|
||||
|
|
@ -1609,7 +1609,7 @@ struct nsGridContainerFrame::Tracks
|
|||
|
||||
/**
|
||||
* 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
|
||||
* Return the number of tracks that are still growable.
|
||||
*/
|
||||
|
|
@ -1671,7 +1671,7 @@ struct nsGridContainerFrame::Tracks
|
|||
nscoord newBase = sz.mBase + delta;
|
||||
if (MOZ_UNLIKELY((sz.mState & TrackSize::eFitContent) &&
|
||||
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)) {
|
||||
didClamp = true;
|
||||
delta = newBase - sz.mBase;
|
||||
|
|
@ -4104,7 +4104,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSizeStep1(
|
|||
sz.mLimit = std::max(sz.mLimit, s);
|
||||
}
|
||||
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);
|
||||
nscoord fitContentClamp =
|
||||
nsRuleNode::ComputeCoordPercentCalc(maxCoord, aPercentageBasis);
|
||||
|
|
@ -4845,8 +4845,8 @@ nsGridContainerFrame::Tracks::StretchFlexibleTracks(
|
|||
applyMinMax = false;
|
||||
// https://drafts.csswg.org/css-grid/#algo-flex-tracks
|
||||
// "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
|
||||
// container???s max-width/height), then redo this step, treating the free
|
||||
// the grid container’s min-width/height (or larger than the grid
|
||||
// container’s max-width/height), then redo this step, treating the free
|
||||
// space as definite [...]"
|
||||
nscoord newSize = 0;
|
||||
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].
|
||||
*
|
||||
* - 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
|
||||
* 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?
|
||||
* 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
|
||||
* 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
|
||||
* is at least 2**-53, as discussed earlier. This is a sampling
|
||||
* likelihood of roughly one in ten trillion, which is unlikely to be
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ static_assert(IsDestructible<TrivialDestructible>::value,
|
|||
|
||||
namespace CPlusPlus11IsBaseOf {
|
||||
|
||||
// Adapted from C++11 ?? 20.9.6.
|
||||
// Adapted from C++11 § 20.9.6.
|
||||
struct B {};
|
||||
struct B1 : B {};
|
||||
struct B2 : B {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue