Граф коммитов

10920 Коммитов

Автор SHA1 Сообщение Дата
Andi-Bogdan Postelnicu 2508edc4c5 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Mirko Brodesser ab4f8bcdcd Bug 1700051: part 44) Reduce `mozInlineSpellStatus::PositionToCollapsedRange` to `static` method. r=smaug
Potentially, this changes behavior, but it shouldn't. Historically,
creating a `nsRange` needed the Document, but it doesn't anymore.

Differential Revision: https://phabricator.services.mozilla.com/D113300
2021-04-26 12:14:49 +00:00
Mirko Brodesser ecf6017483 Bug 1700051: part 43) Const-qualify `mozInlineSpellStatus::PositionToCollapsedRange`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113103
2021-04-26 07:40:43 +00:00
Mirko Brodesser cfb0e08cb4 Bug 1700051: part 42) Const-qualify `mozInlineSpellStatus::mOp`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113100
2021-04-26 07:40:08 +00:00
Mirko Brodesser 23d745343c Bug 1700051: part 41) Const-qualify `mozInlineSpellStatus::mNewNavigationPositionOffset`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113099
2021-04-26 07:40:08 +00:00
Mirko Brodesser 44c7f6cb03 Bug 1700051: part 40) Const-qualify `mozInlineSpellStatus::mForceNavigationWordCheck`. r=smaug
Makes `mozInlineSpellStatus` slightly less confusing and always
initializes `mForceNavigationWordCheck`.

Differential Revision: https://phabricator.services.mozilla.com/D113098
2021-04-26 07:40:07 +00:00
Joel Maher 8a9f37b534 Bug 1706716 green up mda, xpcshell, browser-chrome, reftest for apple silicon. r=necko-reviewers,extension-reviewers,preferences-reviewers,application-update-reviewers,zombie,ahal,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D113001
2021-04-22 18:39:40 +00:00
Mirko Brodesser df29e1a8f4 Bug 1706894: part 3) Change `MapDOMPositionToSoftTextOffset`'s argument to `const` reference. r=smaug
More efficient.

Depends on D113080

Differential Revision: https://phabricator.services.mozilla.com/D113081
2021-04-22 13:35:39 +00:00
Mirko Brodesser 25f87040f2 Bug 1706894: part 2) In `NodeOffsetRange` use `std::move` and return `const` references instead of copies. r=smaug
More efficient.

Depends on D113079

Differential Revision: https://phabricator.services.mozilla.com/D113080
2021-04-22 13:35:38 +00:00
Mirko Brodesser 1eccfda320 Bug 1706894: part 1) Use `std::move` in `DOMTextMapping`'s constructor. r=smaug
More efficient.

Differential Revision: https://phabricator.services.mozilla.com/D113079
2021-04-22 13:35:38 +00:00
Mirko Brodesser 11f3568a7e Bug 1700051: part 39) Add logging when `SoftText::AdjustBeginAndBuildText` adjusts `mBegin.mOffset`. r=smaug
Depends on D112972

Differential Revision: https://phabricator.services.mozilla.com/D112973
2021-04-22 07:15:55 +00:00
Mirko Brodesser 3c01a158ee Bug 1700051: part 38) Add more verbose logging to `mozInlineSpellStatus`. r=smaug
Helps to comprehend the program flow.

Differential Revision: https://phabricator.services.mozilla.com/D112972
2021-04-22 07:15:55 +00:00
Mirko Brodesser ff55282cb1 Bug 1706613: part 2) Change `NS_ASSERTION`s to `MOZ_ASSERT`s in `mozInlineSpellWordUtil`. r=smaug
Depends on D112958

Differential Revision: https://phabricator.services.mozilla.com/D112959
2021-04-21 13:06:57 +00:00
Mirko Brodesser d45f47b9a0 Bug 1706613: part 1) Change `NS_ASSERTION`s to `MOZ_ASSERT`s in `mozInlineSpellChecker`. r=smaug
Helps to detect violations during Try runs.

Differential Revision: https://phabricator.services.mozilla.com/D112958
2021-04-21 13:06:56 +00:00
Mirko Brodesser 1856c367b5 Bug 1700051: part 37) Reduce accessibility of `SoftText::mEnd` to `private`. r=smaug
Depends on D112732

Differential Revision: https://phabricator.services.mozilla.com/D112733
2021-04-21 07:40:35 +00:00
Mirko Brodesser d514c2e238 Bug 1700051: part 36) Reduce accessibility of `SoftText::mBegin` to `private`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D112732
2021-04-21 07:40:34 +00:00
Mirko Brodesser d44f4cc342 Bug 1700051: part 35) Reduce accessibility of `mSoftText.mDOMMapping` to `private`. r=smaug
Depends on D112551

Differential Revision: https://phabricator.services.mozilla.com/D112552
2021-04-20 07:49:13 +00:00
Mirko Brodesser 7198e709e8 Bug 1700051: part 34) Reduce accessibility of `mSoftText.mValue` to `private`. r=smaug
Depends on D112550

Differential Revision: https://phabricator.services.mozilla.com/D112551
2021-04-20 07:49:13 +00:00
Mirko Brodesser 8e5146d57b Bug 1700051: part 33) Move `AdjustSoftBeginAndBuildSoftText` to `SoftText`. r=smaug
Depends on D112549

Differential Revision: https://phabricator.services.mozilla.com/D112550
2021-04-20 07:49:13 +00:00
Mirko Brodesser 5af84ee6ee Bug 1700051: part 32) Move `InvalidateWords` to `SoftText`. r=smaug
It's clearer.

Differential Revision: https://phabricator.services.mozilla.com/D112549
2021-04-20 07:49:12 +00:00
Mirko Brodesser c7077c610e Bug 1700051: part 31.5) Move `mSoftTextDOMMapping` to `SoftText`. r=smaug
Depends on D112544

Differential Revision: https://phabricator.services.mozilla.com/D112545
2021-04-20 07:49:12 +00:00
Mirko Brodesser 12f19abd5f Bug 1700051: part 31.4) Move `mSoftTextValid` to `SoftText`. r=smaug
Depends on D112543

Differential Revision: https://phabricator.services.mozilla.com/D112544
2021-04-20 07:49:11 +00:00
Mirko Brodesser 64c83abf72 Bug 1700051: part 31.3) Move `mSoftEnd` to `SoftText`. r=smaug
Depends on D112542

Differential Revision: https://phabricator.services.mozilla.com/D112543
2021-04-20 07:49:11 +00:00
Mirko Brodesser f9be3581cf Bug 1700051: part 31.2) Move `mSoftBegin` to `SoftText`. r=smaug
Depends on D112541

Differential Revision: https://phabricator.services.mozilla.com/D112542
2021-04-20 07:49:11 +00:00
Mirko Brodesser 1b13e1f445 Bug 1700051: part 31.1) Factor `SoftText` out. r=smaug
The `mSoft*` members belong together and will be moved to `SoftText` in
the following reviews.

Depends on D112540

Differential Revision: https://phabricator.services.mozilla.com/D112541
2021-04-20 07:49:10 +00:00
Mirko Brodesser acff2bb77d Bug 1700051: part 30) Narrow scope of `newOffset`. r=smaug
Presumably allows simplifying the code around it. See the following
review.

Differential Revision: https://phabricator.services.mozilla.com/D112540
2021-04-20 07:49:10 +00:00
Mirko Brodesser 70371eb59b Bug 1700051: part 29) Refactor `TextNodeContainsDOMWordSeparator` to `FindOffsetOfLastDOMWordSeparatorSequence`. r=smaug
More descriptive and separates input- from output-arguments.

Differential Revision: https://phabricator.services.mozilla.com/D112180
2021-04-16 08:10:11 +00:00
Mirko Brodesser 2ac0000c8a Bug 1700051: part 28) Refactor `WordSplitState<T>::GetDOMWordSeparatorOffset` to `WordSplitState<T>::FindOffsetOfLastDOMWordSeparatorSequence`. r=smaug
The method name is clearer and input and ouput are separated more
clearly.

Differential Revision: https://phabricator.services.mozilla.com/D112026
2021-04-15 08:38:42 +00:00
Mirko Brodesser 2357740bfb Bug 1700051: part 27) Rename `mozInlineSpellWordUtil::BuildSoftText` to `mozInlineSpellWordUtil::AdjustSoftBeginAndBuildSoftText`. r=smaug
Ideally, the method itself should be refactored. I'll need to think
about how to properly do that. For now, the new name reflects more
clearly what the method does.

Depends on D110242

Differential Revision: https://phabricator.services.mozilla.com/D110243
2021-03-31 09:04:46 +00:00
Mirko Brodesser 74905cb822 Bug 1700051: part 26) Correct typo in comment of `mozInlineSpellWordUtil::BuildSoftText`. r=smaug
Depends on D110241

Differential Revision: https://phabricator.services.mozilla.com/D110242
2021-03-31 09:04:46 +00:00
Mirko Brodesser c4cd5efacd Bug 1700051: part 25) Change `mozInlineSpellWordUtil::BuildRealWords` to return the built words. r=smaug
Depends on D110240

Differential Revision: https://phabricator.services.mozilla.com/D110241
2021-03-31 09:04:45 +00:00
Mirko Brodesser 7814efb66a Bug 1700051: part 24) Refactor `mozInlineSpellWordUtil::SplitDOMWord` to `mozInlineSpellWordUtil::SplitDOMWordAndAppendTo`. r=smaug
More explicit and preparation for further `const`-correctness.

Depends on D110090

Differential Revision: https://phabricator.services.mozilla.com/D110240
2021-03-31 08:33:09 +00:00
Mirko Brodesser 5cf3a4fde1 Bug 1700051: part 23) `const`-qualify more methods of `mozInlineSpellWordUtil`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110090
2021-03-30 14:43:16 +00:00
Mirko Brodesser 8f90ed40d6 Bug 1700051: part 22) `const`-qualify some members of `mozInlineSpellStatus`. r=smaug
Depends on D110084

Differential Revision: https://phabricator.services.mozilla.com/D110085
2021-03-30 08:45:04 +00:00
Mirko Brodesser 76015c271a Bug 1700051: part 21) Simplify `mozInlineSpellStatus`'s initialization. r=smaug
Depends on D110083

Differential Revision: https://phabricator.services.mozilla.com/D110084
2021-03-30 08:45:03 +00:00
Mirko Brodesser a4864650c7 Bug 1700051: part 20) Merge `mozInlineSpellStatus`'s constructor and its `Init` method. r=smaug
Allows to `const`-qualify some members.

Differential Revision: https://phabricator.services.mozilla.com/D110083
2021-03-30 08:45:03 +00:00
Mirko Brodesser b8bb3ce56e Bug 1700051: part 19) `const`-qualify and rename `mozInlineSpellChecker::SpellCheckSelectionIsFull`. r=smaug
Depends on D109895

Differential Revision: https://phabricator.services.mozilla.com/D109896
2021-03-29 08:03:11 +00:00
Mirko Brodesser 217df64f78 Bug 1700051: part 18) Throw more `const` on `mozInlineSpellChecker`. r=smaug
Depends on D109882

Differential Revision: https://phabricator.services.mozilla.com/D109895
2021-03-29 08:03:11 +00:00
Mirko Brodesser 9fbe592b0f Bug 1700051: part 17) Add `mozInlineSpellChecker::GetDisabledAsyncToken()`. r=smaug
Allows unfriending some class from `mozInlineSpellChecker`.

Depends on D109881

Differential Revision: https://phabricator.services.mozilla.com/D109882
2021-03-29 08:03:10 +00:00
Mirko Brodesser 2eaf6f3625 Bug 1700051: part 16) Qualify `mozInlineSpellWordUtil::GetRootNode` `const`. r=smaug
Depends on D109880

Differential Revision: https://phabricator.services.mozilla.com/D109881
2021-03-29 08:03:10 +00:00
Mirko Brodesser 4aabcc8b6a Bug 1700051: part 15) Qualify `mozInlineSpellWordUtil::MakeRange` `const`. r=smaug
Depends on D109879

Differential Revision: https://phabricator.services.mozilla.com/D109880
2021-03-29 08:03:10 +00:00
Mirko Brodesser c3a6b19580 Bug 1700051: part 14) Qualify `mozInlineSpellWordUtil::Init`'s argument `const`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109879
2021-03-29 08:03:09 +00:00
Mirko Brodesser 17b3805751 Bug 1700051: part 13) Reduce accessibility of `mozInlineSpellStatus`'s constructor to `private`. r=smaug
Prevents users of `mozInlineSpellStatus` forgetting to initialize it.

Differential Revision: https://phabricator.services.mozilla.com/D109748
2021-03-26 09:21:13 +00:00
Mirko Brodesser 14313e8270 Bug 1700051: part 12) Declare `mozInlineSpellStatus::mSpellChecker` `const`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109747
2021-03-26 09:21:12 +00:00
Mirko Brodesser c15083e2e7 Bug 1700051: part 11) Change `mozInlineSpellStatus::InitForRange` to static factory method. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109746
2021-03-26 09:21:12 +00:00
Mirko Brodesser 7d02c05467 Bug 1700051: part 10) Change `mozInlineSpellStatus::InitForSelection` to static factory method. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109745
2021-03-26 09:21:11 +00:00
Mirko Brodesser ad87ef090b Bug 1700051: part 9) Change `mozInlineSpellStatus::CreateForNavigation` to return `Result<...,...>`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109744
2021-03-26 09:21:11 +00:00
Mirko Brodesser 5dde374aaf Bug 1700051: part 8) Change `mozInlineSpellStatus::InitForNavigation` to static factory method. r=smaug
The next part changes its return type to `Result<..., nsresult>`.

Differential Revision: https://phabricator.services.mozilla.com/D109743
2021-03-26 09:21:11 +00:00
Mirko Brodesser d38cbe5571 Bug 1700051: part 7) Change `mozInlineSpellStatus::CreateForEditorChange` to return `Result<..., ...>`. r=smaug
Separates input from output more clearly.

Differential Revision: https://phabricator.services.mozilla.com/D109742
2021-03-26 09:21:10 +00:00
Mirko Brodesser daed84a8f4 Bug 1700051: part 6) Change `mozInlineSpellStatus::InitForEditorChange` to static factory method. r=smaug
Preparation so that some members of `mozInlineSpellStatus` can become
`const`-qualified.

The method's return value will be changed to
`Result<UniquePtr<mozInlineSpellStatus>, nsresult>>` in a separate
review.

Differential Revision: https://phabricator.services.mozilla.com/D109741
2021-03-26 09:21:10 +00:00