Mirko Brodesser
5b09a02d3f
Bug 1584170: part 2) Replace array with `AutoTArray`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D48321
--HG--
extra : moz-landing-system : lando
2019-10-21 09:06:48 +00:00
Mirko Brodesser
1f69cf48a9
Bug 1584170: part 1) Factor out duplicated code to `IsInOlOrUl`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D48320
--HG--
extra : moz-landing-system : lando
2019-10-21 09:06:12 +00:00
Mirko Brodesser
8a338e58ac
Bug 1581523: part 6) Move wrap-related methods to `nsPlainTextSerializer::Settings`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D46136
--HG--
extra : moz-landing-system : lando
2019-09-23 11:44:13 +00:00
Mirko Brodesser
05a54f0575
Bug 1581523: part 5) Move `nsPlainTextSerializer::mWrapColumn` to `nsPlainTextSerializer::Settings`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D46135
--HG--
extra : moz-landing-system : lando
2019-09-23 12:59:27 +00:00
Mirko Brodesser
99420c7112
Bug 1581471: part 8) Add `CloseContainerForOutputFormatted`. r=hsivonen
...
Depends on D45982
Differential Revision: https://phabricator.services.mozilla.com/D45983
--HG--
extra : moz-landing-system : lando
2019-09-16 08:51:43 +00:00
Mirko Brodesser
3e241f3543
Bug 1581471: part 7) Add `OpenContainerForOutputFormatted`. r=hsivonen
...
Depends on D45981
Differential Revision: https://phabricator.services.mozilla.com/D45982
--HG--
extra : moz-landing-system : lando
2019-09-16 08:49:49 +00:00
Mirko Brodesser
b9886e97f5
Bug 1581471: part 2) Factor out finding wrap index for line content to `CurrentLine`. r=hsivonen
...
Depends on D45976
Differential Revision: https://phabricator.services.mozilla.com/D45977
--HG--
extra : moz-landing-system : lando
2019-09-16 08:40:38 +00:00
Mirko Brodesser
0b0b604b71
Bug 1580440: part 4) Rename `Indentation::mWidth` to `Indentation::mLength`. r=hsivonen
...
Previously, this could be mistaken for the width of the character
sequence.
Differential Revision: https://phabricator.services.mozilla.com/D45522
--HG--
extra : moz-landing-system : lando
2019-09-13 11:23:59 +00:00
Mirko Brodesser
335a7fb252
Bug 1580440: part 2) Add enum class for header strategy. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D45520
--HG--
extra : moz-landing-system : lando
2019-09-13 10:35:51 +00:00
Mirko Brodesser
35b2a709cf
Bug 1580440: part 1) Replace `CurrentLineContent` with its only member. r=hsivonen
...
It became superfluous after `CurrentLineContent::mWidth` could be
removed.
Differential Revision: https://phabricator.services.mozilla.com/D45519
--HG--
extra : moz-landing-system : lando
2019-09-13 10:35:42 +00:00
Mirko Brodesser
55fe4c9738
Bug 1579355: part 11) Factor out `ConvertToLinesAndOutput` from `Write`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44968
--HG--
extra : moz-landing-system : lando
2019-09-09 09:05:07 +00:00
Mirko Brodesser
8b4b215760
Bug 1579355: part 9) Factor out `MaybeWrapAndOutputCompleteLines`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44966
--HG--
extra : moz-landing-system : lando
2019-09-09 09:04:48 +00:00
Mirko Brodesser
c78e08d669
Bug 1579355: part 8) Replace `CurrentLineContent::mWidth` with local variable. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44965
--HG--
extra : moz-landing-system : lando
2019-09-09 09:04:34 +00:00
Mirko Brodesser
6ee8676f31
Bug 1579355: part 7) Add explanatory comment to `aSoftLineBreak`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44964
--HG--
extra : moz-landing-system : lando
2019-09-09 09:04:25 +00:00
Mirko Brodesser
d3394eda76
Bug 1579355: part 5) Move determining prefix-width to `CurrentLine`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44962
--HG--
extra : moz-landing-system : lando
2019-09-09 09:04:07 +00:00
Mirko Brodesser
f0cfac6cd3
Bug 1579355: part 4) Remove unused `nsPlainTextSerializer::mOutput`. r=hsivonen
...
`nsPlainTextSerialzier::OutputManager` made it superfluous.
Differential Revision: https://phabricator.services.mozilla.com/D44961
--HG--
extra : moz-landing-system : lando
2019-09-09 09:03:58 +00:00
Mirko Brodesser
b01a7275d1
Bug 1579355: part 3) Remove `nsPlainTextSerializer::mURL`. r=hsivonen
...
Less state allows simpler reasoning about `nsPlainTextSerializer`.
Differential Revision: https://phabricator.services.mozilla.com/D44960
--HG--
extra : moz-landing-system : lando
2019-09-09 09:03:49 +00:00
Mirko Brodesser
4c489da90e
Bug 1579355: part 2) Declare more methods const. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44959
--HG--
extra : moz-landing-system : lando
2019-09-09 09:03:39 +00:00
Mirko Brodesser
890f0eefbc
Bug 1578668: part 5) Add `CurrentLine::HasContentOrIndentationHeader`. r=hsivonen
...
Depends on D44653
Differential Revision: https://phabricator.services.mozilla.com/D44654
--HG--
extra : moz-landing-system : lando
2019-09-05 07:57:39 +00:00
Mirko Brodesser
d81a92135a
Bug 1578668: part 2) Move `nsPlainTextSerializer::FlushLine` to `nsPlainTextSerializer::OutputManager::Flush`. r=hsivonen
...
Depends on D44650
Differential Revision: https://phabricator.services.mozilla.com/D44651
--HG--
extra : moz-landing-system : lando
2019-09-05 07:55:48 +00:00
Mirko Brodesser
b0573c2b86
Bug 1578188: part 6) Overload `OutputManager::Append`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44387
--HG--
extra : moz-landing-system : lando
2019-09-04 13:30:25 +00:00
Mirko Brodesser
b10fb35c3c
Bug 1578188: part 5) Move `CreateQuotesAndIndent` to `CurrentLine`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44386
--HG--
extra : moz-landing-system : lando
2019-09-04 13:30:09 +00:00
Mirko Brodesser
b242474d51
Bug 1578188: part 4) Move `ResetCurrentLineContentAndIndentationHeader` to `CurrentLine::ResetContentAndIndentationHeader`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44385
--HG--
extra : moz-landing-system : lando
2019-09-04 13:29:59 +00:00
Mirko Brodesser
8141bbdc56
Bug 1578188: part 3) Add `nsPlainTextSerializer::CurrentLine`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D44384
--HG--
extra : moz-landing-system : lando
2019-09-04 13:29:48 +00:00
Mirko Brodesser
546f74b5dc
Bug 1578188: part 2) Use default constructor for `CurrentLineContent`. r=hsivonen
...
Simplifies a following refactoring.
Differential Revision: https://phabricator.services.mozilla.com/D44383
--HG--
extra : moz-landing-system : lando
2019-09-04 13:29:39 +00:00
Mirko Brodesser
3cae23189b
Bug 1578149: part 5) Bundle resetting `mIndentation.mHeader` and `mCurrentLineContent`. r=hsivonen
...
Depends on D44349
Differential Revision: https://phabricator.services.mozilla.com/D44350
--HG--
extra : moz-landing-system : lando
2019-09-02 15:25:15 +00:00
Mirko Brodesser
00a969bc92
Bug 1578149: part 4) Move truncating `mIndentation.mHeader` out of `CreateQuotesAndIndent`. r=hsivonen
...
Makes the method name more accurate.
Depends on D44348
Differential Revision: https://phabricator.services.mozilla.com/D44349
--HG--
extra : moz-landing-system : lando
2019-09-02 15:24:37 +00:00
Mirko Brodesser
a6377b2ed5
Bug 1578149: part 3) Move whitespace triming out of `OutputQuotesAndIndent`. r=hsivonen
...
Whitespace triming was used by only one caller, so it deserves to live
outside. Additionally, this defines the method name more precisely.
Depends on D44347
Differential Revision: https://phabricator.services.mozilla.com/D44348
--HG--
extra : moz-landing-system : lando
2019-09-02 15:23:18 +00:00
Mirko Brodesser
17ad1235da
Bug 1578149: part 1) Add `nsPlainTextSerializer::Indentation`. r=hsivonen
...
In order to encapsulate the indentation related members.
Differential Revision: https://phabricator.services.mozilla.com/D44346
--HG--
extra : moz-landing-system : lando
2019-09-02 15:13:20 +00:00
Mirko Brodesser
92df4c2ad8
Bug 1577425: add `nsPlainTextSerializer::OutputManager`. r=hsivonen
...
In order to encapsulate the output together with `mAtFirstColumn`.
Differential Revision: https://phabricator.services.mozilla.com/D43926
--HG--
extra : moz-landing-system : lando
2019-09-03 09:03:17 +00:00
Bogdan Tara
19972acbe5
Backed out changeset 55f62128b50b (bug 1577425) for bustages complaining about nsPlainTextSerializer.h CLOSED TREE
2019-09-02 18:23:39 +03:00
Mirko Brodesser
270c9537a7
Bug 1577425: add `nsPlainTextSerializer::OutputManager`. r=hsivonen
...
In order to encapsulate the output together with `mAtFirstColumn`.
Differential Revision: https://phabricator.services.mozilla.com/D43926
--HG--
extra : moz-landing-system : lando
2019-08-29 09:43:34 +00:00
Mirko Brodesser
45015bce27
Bug 1576899: change `nsIContentSerializer` to take output string as argument in `nsIContentSerializer::Init`. r=hsivonen
...
Before, all `nsIContentSerializer::Append`* methods took an output
string. The state of `nsPlainTextSerializer` depended on the string
pointing to the same object.
Now, it's ensured that the same output string is used between
`nsIContentSerializer::Init` and `nsIContentSerializer::Finish`.
Moreover, `nsHTMLCopyEncoder::EncodeToStringWithContext` re-used
`mSerializer` without initializing it again. This was error-prone,
because after serializing with `mSerializer`, it's internal state might
have changed to an undesirable one (e.g.
`nsPlainTextSerializer::mWrapColumn` could've been modified).
Hence, it is now initialized again before serializing the common
ancestors.
Differential Revision: https://phabricator.services.mozilla.com/D43613
--HG--
extra : moz-landing-system : lando
2019-08-28 11:54:49 +00:00
longsonr
40d4617494
Bug 1570799 - pass the original element into nsXMLContentSerializer::CheckElementEnd so that we can determine whether it has children properly r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D43450
--HG--
extra : moz-landing-system : lando
2019-08-27 20:33:46 +00:00
Mirko Brodesser
e2bc2108a5
Bug 1575839: part 2) Declare some methods `const` or `static`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D43416
--HG--
extra : moz-landing-system : lando
2019-08-27 10:40:30 +00:00
Mirko Brodesser
86fa840e79
Bug 1575839: part 1) Add `nsPlainTextSerializer::Settings::HasFlag`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D43415
--HG--
extra : moz-landing-system : lando
2019-08-27 10:40:16 +00:00
Mirko Brodesser
1a703a2360
Bug 1575585: prevent mutating individual members of `nsPlainTextSerializer::Settings`. r=hsivonen
...
Reasoning about this class and its callers becomes easier.
Differential Revision: https://phabricator.services.mozilla.com/D42896
--HG--
extra : moz-landing-system : lando
2019-08-26 12:00:58 +00:00
Mirko Brodesser
887a1c3c6d
Bug 1575495: part 4) Add `AddLineBreak` to `CurrentLineContent`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42840
--HG--
extra : moz-landing-system : lando
2019-08-23 14:00:50 +00:00
Mirko Brodesser
eea034bd57
Bug 1575495: part 3) Sync argument names of declaration and definition of `DoAddText`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42839
--HG--
extra : moz-landing-system : lando
2019-08-23 13:16:46 +00:00
Mirko Brodesser
6515718068
Bug 1575495: part 2) Move `MaybeReplaceNbspsForOutput` to `CurrentLineContent`. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42838
--HG--
extra : moz-landing-system : lando
2019-08-23 13:16:37 +00:00
Mirko Brodesser
6eb342b1ac
Bug 1575218: part 2) Factor out `nsPlainTextSerializer`'s members related to current line content. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42650
--HG--
extra : moz-landing-system : lando
2019-08-21 10:32:29 +00:00
Mirko Brodesser
cdf0b8f202
Bug 1575218: part 1) Factor out `nsPlainTextSerializer`'s members to `Settings` struct. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42649
--HG--
extra : moz-landing-system : lando
2019-08-21 10:31:31 +00:00
Mirko Brodesser
d465357990
Bug 1574912: part 4) Split `nsPlainTextSerializer::MaybeReplaceNbspsForOutput` out of `nsPlainTextSerializer::Output` method. r=hsivonen
...
In order to clarify what `Output` does.
Differential Revision: https://phabricator.services.mozilla.com/D42522
--HG--
extra : moz-landing-system : lando
2019-08-20 08:03:52 +00:00
Mirko Brodesser
0c4fd744e7
Bug 1574912: part 3) Remove unread `mStartedOutput` member. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D42521
--HG--
extra : moz-landing-system : lando
2019-08-20 08:03:43 +00:00
Mirko Brodesser
231ce6e93d
Bug 1574912: part 2) Rename `nsPlainTextSerializer::IsInPre`, `IsHTMLBlock` and `IsElementBlock`. r=hsivonen
...
In order to clarify their purpose.
Differential Revision: https://phabricator.services.mozilla.com/D42520
--HG--
extra : moz-landing-system : lando
2019-08-20 08:05:21 +00:00
Mirko Brodesser
5e6d66382d
Bug 1574463: remove unused `nsIDocumentEncoder::OutputNonTextContentAsPlaceholder`. r=hsivonen
...
Doesn't seem to be used by comm-central/Thunderbird.
Differential Revision: https://phabricator.services.mozilla.com/D42302
--HG--
extra : moz-landing-system : lando
2019-08-19 07:56:05 +00:00
Emilio Cobos Álvarez
d2ed260822
Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
...
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.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky
12ef963787
Bug 1446599
part 1. Stop using nsIDOMProcessingInstruction in serializers. r=mystor
...
MozReview-Commit-ID: loUmk0rNYV
2018-03-19 15:15:39 -04:00
Boris Zbarsky
51c87c6d96
Bug 1446598 part 1. Stop using nsIDOMComment in serializers. r=mystor
...
MozReview-Commit-ID: IBVkQJOi6O7
2018-03-19 15:15:39 -04:00