Also remove most C++-side optimizations for avoiding calls to Rust
for short strings now that we have LTO between C++ and Rust. Since
LTO still leaves the overhead of one function call layer, inlined
function call avoidance optimization is left in place in the
IsUTF8 and in the 8-bit IsASCII cases for which perfherder flags
the difference as significant for the length 15.
Differential Revision: https://phabricator.services.mozilla.com/D40999
--HG--
extra : moz-landing-system : lando
Summary:
- Add markers to generated files to discourage manual edits.
- Add generated file to clang-format-ignore.
- Handle currently not supported Georgian characters in the Perl script.
Reviewers: jfkthame
Reviewed By: jfkthame
Bug #: 1533481
Differential Revision: https://phabricator.services.mozilla.com/D25269
--HG--
extra : rebase_source : cb485b400638790af9cbe24867d6a25505888459
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)
--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.
Differential Revision: https://phabricator.services.mozilla.com/D13193
--HG--
extra : moz-landing-system : lando
* Update encoding_rs to 0.8.8.
* Change U+FEFD and U+FEFE to RTL in IS_RTL_PRESENTATION_FORM to make the
Rust and C++ code agree on what's RTL.
MozReview-Commit-ID: CuK6fN4pojG
Differential Revision: https://phabricator.services.mozilla.com/D7285
--HG--
extra : moz-landing-system : lando
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.
MozReview-Commit-ID: 5UQVHElSpCr
--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
Behavior change: Certain unpaired high surrogates will result in
the text being considered RTL where that wasn't the case before.
MozReview-Commit-ID: JL7wiRjhslC
--HG--
extra : rebase_source : ecd521a97be8908bb839aca02d624d86d5b0337f
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.
--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
We don't check error of unum_open, so we should check it. Because
unum_setAttribute doesn't have UErrorCode parameter.
MozReview-Commit-ID: 3j7jeiKbdG
--HG--
extra : rebase_source : 61d0daf8f14f1a36623967d9d63648a8a88e25ae
HasRTLChars() appears in profile of attachment 8848015 after landing the patches
for bug 1391538 because the landing made text in <input> or <textarea> always
treated as non-single byte characters. Therefore, HasRTLChars() is now called
by nsTextFragment::SetTo() a lot in editors.
HasRTLChar() checks if it's in an RTL character for each character until it
becomes true. However, if character is less than the minimum RTL character,
U+0590, it works faster at least for Western languages.
MozReview-Commit-ID: 4YecxQWUcmK
--HG--
extra : rebase_source : 172be670795f0e2155d4bd5044ee37f652367734
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:
- a 16-bit C string literal, which is then converted to an 8-bit string in
order for the lookup to occur;
- an 8-bit C string literal converted to a 16-bit string, which is then
converted back to an 8-bit string in order for the lookup to occur.
This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.
The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.
Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.
The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)
--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e