Skip to content

Commit

Permalink
Backed out 11 changesets (bug 1824671) for causing spidermonkey busta…
Browse files Browse the repository at this point in the history
…ges in Bidi.h CLOSED TREE

Backed out changeset f41ef5e3f7b9 (bug 1824671)
Backed out changeset f029db1566d8 (bug 1824671)
Backed out changeset 7fe14219e95e (bug 1824671)
Backed out changeset 71dbcba23335 (bug 1824671)
Backed out changeset 5c20e50fc26b (bug 1824671)
Backed out changeset e16c7ccc64e5 (bug 1824671)
Backed out changeset d8414db5bc0c (bug 1824671)
Backed out changeset 89622f53da27 (bug 1824671)
Backed out changeset 9a2fbd21feb5 (bug 1824671)
Backed out changeset b273d641a26a (bug 1824671)
Backed out changeset 17e79f579645 (bug 1824671)
  • Loading branch information
Cristian Tuns committed Jan 23, 2024
1 parent f323591 commit a0f83ca
Show file tree
Hide file tree
Showing 182 changed files with 687 additions and 20,079 deletions.
44 changes: 2 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dom/media/webvtt/TextTrackCue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ PositionAlignSetting TextTrackCue::ComputedPositionAlign() {
}

bool TextTrackCue::IsTextBaseDirectionLTR() const {
// The result returned by `GetBaseDirection` might be `neutral` if the text
// only contains neutral charaters. In this case, we would treat its base
// direction as LTR.
// The returned result by `ubidi_getBaseDirection` might be `neutral` if the
// text only contains netural charaters. In this case, we would treat its
// base direction as LTR.
return intl::Bidi::GetBaseDirection(mText) != intl::Bidi::BaseDirection::RTL;
}

Expand Down
7 changes: 0 additions & 7 deletions intl/bidi/moz.build

This file was deleted.

10 changes: 0 additions & 10 deletions intl/bidi/rust/unicode-bidi-ffi/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions intl/bidi/rust/unicode-bidi-ffi/cbindgen.toml

This file was deleted.

176 changes: 0 additions & 176 deletions intl/bidi/rust/unicode-bidi-ffi/src/lib.rs

This file was deleted.

30 changes: 6 additions & 24 deletions intl/components/gtest/TestBidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,39 +184,24 @@ TEST(IntlBidi, RtlOverride)
ASSERT_EQ(bidi.GetParagraphEmbeddingLevel(), 0);
ASSERT_EQ(bidi.GetParagraphDirection(), Bidi::ParagraphDirection::Mixed);

// Note that the Unicode Bidi Algorithm explicitly does NOT require any
// specific placement or levels for the embedding controls (see
// rule https://www.unicode.org/reports/tr9/#X9).
// Further, the implementation notes at
// https://www.unicode.org/reports/tr9/#Retaining_Explicit_Formatting_Characters
// advise to "Resolve any LRE, RLE, LRO, RLO, PDF, or BN to the level of the
// preceding character if there is one...", which means the embedding marks
// here will each become part of the *preceding* run. This is how the Rust
// unicode-bidi implementation behaves.
// However, ICU4C behavior is such that they take on the level of the *next*
// character, and become part of the following run.
// For now, we accept either result here.
{
auto logicalRun = logicalRunIter.Next();
ASSERT_TRUE(logicalRun.isSome());
ASSERT_TRUE(logicalRun->string == MakeStringSpan(u"ltr") ||
logicalRun->string == MakeStringSpan(u"ltr\u202b"));
ASSERT_EQ(logicalRun->string, MakeStringSpan(u"ltr"));
ASSERT_EQ(logicalRun->embeddingLevel, 0);
ASSERT_EQ(logicalRun->embeddingLevel.Direction(), BidiDirection::LTR);
}
{
auto logicalRun = logicalRunIter.Next();
ASSERT_TRUE(logicalRun.isSome());
ASSERT_TRUE(logicalRun->string == MakeStringSpan(u"\u202b___رائع___") ||
logicalRun->string == MakeStringSpan(u"___رائع___\u202a"));
ASSERT_EQ(logicalRun->string, MakeStringSpan(u"\u202b___رائع___"));
ASSERT_EQ(logicalRun->embeddingLevel, 1);
ASSERT_EQ(logicalRun->embeddingLevel.Direction(), BidiDirection::RTL);
}
{
auto logicalRun = logicalRunIter.Next();
ASSERT_TRUE(logicalRun.isSome());
ASSERT_TRUE(logicalRun->string == MakeStringSpan(u"\u202a___ltr__") ||
logicalRun->string == MakeStringSpan(u"___ltr__"));
ASSERT_EQ(logicalRun->string, MakeStringSpan(u"\u202a___ltr__"));
ASSERT_EQ(logicalRun->embeddingLevel, 2);
ASSERT_EQ(logicalRun->embeddingLevel.Direction(), BidiDirection::LTR);
}
Expand Down Expand Up @@ -269,22 +254,19 @@ TEST(IntlBidi, VisualRunsWithEmbeds)
{
Maybe<VisualRun> run = visualRunIter.Next();
ASSERT_TRUE(run.isSome());
ASSERT_TRUE(run->string == MakeStringSpan(u"ltr") ||
run->string == MakeStringSpan(u"ltr\u202b"));
ASSERT_EQ(run->string, MakeStringSpan(u"ltr"));
ASSERT_EQ(run->direction, BidiDirection::LTR);
}
{
Maybe<VisualRun> run = visualRunIter.Next();
ASSERT_TRUE(run.isSome());
ASSERT_TRUE(run->string == MakeStringSpan(u"\u202a___ltr___") ||
run->string == MakeStringSpan(u"___ltr___"));
ASSERT_EQ(run->string, MakeStringSpan(u"\u202a___ltr___"));
ASSERT_EQ(run->direction, BidiDirection::LTR);
}
{
Maybe<VisualRun> run = visualRunIter.Next();
ASSERT_TRUE(run.isSome());
ASSERT_TRUE(run->string == MakeStringSpan(u"\u202b___رائع___") ||
run->string == MakeStringSpan(u"___رائع___\u202a"));
ASSERT_EQ(run->string, MakeStringSpan(u"\u202b___رائع___"));
ASSERT_EQ(run->direction, BidiDirection::RTL);
}
{
Expand Down
Loading

0 comments on commit a0f83ca

Please sign in to comment.