Open Bug 1649121 Opened 3 months ago Updated 4 hours ago

Fortify code for copy&paste

Categories

(Core :: DOM: Selection, enhancement, P1)

enhancement

Tracking

()

People

(Reporter: mbrodesser, Assigned: mbrodesser)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(94 files, 4 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
No description provided.
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fc2182995479
part 1) Add some documentation to `HTMLEditor::CreateDOMFragmentFromPaste`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/53a4b49e11f5
part 2) Factor moving start and end of out `CreateDOMFragmentForPaste`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/23136e9b0d91
part 3) Declare some methods in `HTMLEditor` `static`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/7cb690c8d208
part 4) Rename `HTMLEditUtils::IsTableElement` to `HTMLEditUtils::IsAnyTableElement`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a87047c03047
part 5) Declare `HTMLEditor::GetBetterInsertionPointFor` `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/14fe3fb99221
part 6) Rename `HTMLEditUtils::IsTableElementButNotTable` to `HTMLEditUtils::IsAnyTableElementButNotTable`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a50105f79fb0
part 7) Rename `HTMLEditUtils::IsList` to `HTMLEditUtils::IsAnyListElement`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/af63fd2828b5
part 8) Rename `CollectListAndTableRelatedElementsAt` to `CollectTableAndAnyListElementsOfInclusiveAncestorsAt`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/43481dc46b38
part 9) Simplify `GetMostAncestorListOrTableElement`. r=masayuki
Keywords: leave-open
Attachment #9160639 - Attachment is obsolete: true
Attachment #9160640 - Attachment description: Bug 1649121: part 11) Rename `CollectTopMostChildNodesCompletelyInRange` to `CollectTopMostChildContentsCompletelyInRange`. r=masayuki → Bug 1649121: part 10) Rename `CollectTopMostChildNodesCompletelyInRange` to `CollectTopMostChildContentsCompletelyInRange`. r=masayuki
Attachment #9160641 - Attachment description: Bug 1649121: part 12) Factor some functionality of `GetMostAncestorListOrTableElement` out. r=masayuki → Bug 1649121: part 11) Factor some functionality of `GetMostAncestorListOrTableElement` out. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe84d83f7754
part 10) Rename `CollectTopMostChildNodesCompletelyInRange` to `CollectTopMostChildContentsCompletelyInRange`. r=masayuki

Separate commit to reduce possibility for typos.

Depends on D82147

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/660c40fe1d39
part 11) Factor some functionality of `GetMostAncestorListOrTableElement` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/bda80a47ba46
part 12) Remove duplicated code in `IsReplaceableListElement`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/3b45751665b9
part 13) Rename `GetMostAncestorListOrTableElement`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a85194c541d6
part 14) Rename local variables `mostAncestorTableRelatedElement`, `maybeTableRelatedElement`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/65a677ea36d0
part 15) Declare `IsVisibleBRElement` `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/23d22d222e48
part 16) Factor getting new caret point out of `DoInsertHTMLWithContext`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/74f2d9c4261a
part 17) Correct style for previous commit. r=masayuki

This is minimally invasive. In the following parts, methods will be
moved to it and potentially other methods will be extracted.

Depends on D82198

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/233d95fb9fe4
part 18) Declare `CreateDOMFragmentFromPaste` `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/185be8f23283
part 19) Add `HTMLWithContextInserter` and move content of `DoInsertHTMLWithContext` to it. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/11acdf44634d
part 20) Move `GetNewCaretPointAfterInsertingHTML` to `HTMLWithContextInserter`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/872032f12fe3
part 21) Move `CreateDOMFragmentFromPaste`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/13056466e78f
part 22) Move `ParseFragment`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/610bc19ed14d
part 23) Move `MoveStartAndEndAccordingToHTMLInfo`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/9aeb390dd46f
part 24) Move `StripFormattingNodes`. r=masayuki

Its arguments are renamed in the following review.

Depends on D82520

Attachment #9161851 - Attachment description: Bug 1649121: part 28) Add `MoveCaretOutsideOfLink`. r=masayuki → Bug 1649121: part 27) Add `MoveCaretOutsideOfLink`. r=masayuki
Attachment #9162079 - Attachment description: Bug 1649121: part 29) Add `InsertContents`. r=masayuki → Bug 1649121: part 28) Add `InsertContents`. r=masayuki
Attachment #9162080 - Attachment description: Bug 1649121: part 30) Rename and simplify arguments of `InsertContents`. r=masayuki → Bug 1649121: part 29) Rename and simplify arguments of `InsertContents`. r=masayuki
Attachment #9161850 - Attachment is obsolete: true
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/974d99b9cf36
part 25) Factor detecting invisible `<br>` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/71a1c9fdc933
part 26) Move `CollectTopMostChildContentsCompletelyInRange`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/964a4279b645
part 27) Add `MoveCaretOutsideOfLink`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/69092de8e958
part 28) Add `InsertContents`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/83eb0d717a70
part 29) Rename and simplify arguments of `InsertContents`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a820a72c43db
part 30) Move `RemoveBodyAndHead`, `FindTargetNode`. r=masayuki

First step of separating parsing more clearly from other fragment
mutations.

Depends on D82895

Attachment #9162468 - Attachment description: Bug 1649121: part 32) Rename `RemoveBodyAndHead` to `RemoveHEADChildAndStealBODYChildsChildren`. r=masayuki → Bug 1649121: part 32) Rename `RemoveBodyAndHead` to `RemoveHeadChildAndStealBodyChildsChildren`. r=masayuki
Attachment #9162451 - Attachment description: Bug 1649121: part 31) Change `StripFormattingNodes` to `RemoveNonPREWhitespaceOnlyTextNodes`. r=masayuki → Bug 1649121: part 31) Change `StripFormattingNodes` to `RemoveNonPreWhiteSpaceOnlyTextNodesForIgnoringInvisibleWhiteSpaces`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b070fcc148f6
part 31) Change `StripFormattingNodes` to `RemoveNonPreWhiteSpaceOnlyTextNodesForIgnoringInvisibleWhiteSpaces`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/c805c09c2b28
part 32) Rename `RemoveBodyAndHead` to `RemoveHeadChildAndStealBodyChildsChildren`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/fdee379992c0
part 33) Rename `FindTargetNode` to `FindTargetNodeOfContextForPastedHTML`. r=masayuki

First step of breaking up the complex corresponding method.

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aad7c6b3d5ef
part 34) Factor `FragmentParser` out. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4d835cc17a7f
part 35) Add `FragmentFromPasteCreator`. r=masayuki

Thanks for the notification. Will fix the build and land it again.

Flags: needinfo?(mbrodesser)
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d15ab3a0f771
part 35) Add `FragmentFromPasteCreator`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/1e127a5c1292
part 36) Move setting start- and end-offsets out of `FragmentFromPasteCreator`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/c4cd0750bfc4
part 37) Move some methods to `FragmentFromPasteCreator`. r=masayuki

The parameters will be renamed in the following review.

Attachment #9163509 - Attachment description: Bug 1649121: part 39) Rename parameters and variables around `CreateDocumentFragmentAndTargetNodeForPaste`. r=masayuki → Bug 1649121: part 39) Rename parameters and variables around `CreateDocumentFragmentAndGetParentOfPastedHTMLInContext`. r=masayuki

It's clearer and allow setting the output fragment at the end of the
method.

Depends on D83657

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/17002265d035
part 38) Add `CreateDocumentFragmentAndGetParentOfPastedHTMLInContext`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/5cc856884937
part 39) Rename parameters and variables around `CreateDocumentFragmentAndGetParentOfPastedHTMLInContext`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/15f69af9b5b9
part 40) Factor `DetermineContextLocalNameForParsingPastedHTML` out. r=masayuki
Attachment #9163797 - Attachment is obsolete: true
Attachment #9163798 - Attachment description: Bug 1649121: part 42) Add local variable for pasted HTML document fragment. r=masayuki → Bug 1649121: part 41) Add local variable for pasted HTML document fragment. r=masayuki
Attachment #9163799 - Attachment description: Bug 1649121: part 43) Factor `MergeAndPostProcessFragmentsForPastedHTMLAndContext` out. r=masayuki → Bug 1649121: part 42) Factor `MergeAndPostProcessFragmentsForPastedHTMLAndContext` out. r=masayuki
Attachment #9163800 - Attachment description: Bug 1649121: part 44) Factor `PostProcessFragmentForPastedHTMLWithoutContext` out. r=masayuki → Bug 1649121: part 43) Factor `PostProcessFragmentForPastedHTMLWithoutContext` out. r=masayuki
Attachment #9163801 - Attachment description: Bug 1649121: part 45) Factor `PreProcessContextDocumentFragmentForMerging` out. r=masayuki → Bug 1649121: part 44) Factor `PreProcessContextDocumentFragmentForMerging` out. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ecae975d92fe
part 41) Add local variable for pasted HTML document fragment. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/1b49d3b9e274
part 42) Factor `MergeAndPostProcessFragmentsForPastedHTMLAndContext` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/1b67973327ea
part 43) Factor `PostProcessFragmentForPastedHTMLWithoutContext` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/499d2683b580
part 44) Factor `PreProcessContextDocumentFragmentForMerging` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/6b0161030c73
part 45) Rename `FindTargetNodeOfContextForPastedHTML`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a8b504a946fa
part 46) Reference spec in `nsINode::AppendChild`'s documentation. r=masayuki

Preparatory step to make that code readable.

Depends on D83951

Allows adding methods operating on them.

Depends on D83962

Remove redundant code.

Depends on D83966

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ebea8897d47
part 47) Rename local variable `startIsData` in `ContentIteratorBase::InitInternal`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/8c5ca73547d0
part 48) Rename `MakeEmpty` in `ContentIteratorBase::InitInternal`. r=masayuki
Attachment #9164364 - Attachment description: Bug 1649121: part 54) Add `ContentIteratorBase::Initializer::IsContainer`. r=masayuki → Bug 1649121: part 54) Add `RangeBoundaryBase::IsContainerAContainerHTMLElement`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b38a02358eab
part 49) Break a method object out for `ContentIteratorBase::InitInternal`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/6054a8df2932
part 50) Add members for start and end. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/ee2ef9d4d746
part 51) Factor `IsSingleNodeCharacterRange` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/f6b80f74f9ad
part 52) Factor `IsCollapsedNonCharacterRange` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a984435dc43a
part 53) Rename local variable `endIsData` in `ContentIteratorBase::InitInternal`. r=masayuki
Attachment #9164364 - Attachment is obsolete: true
Attachment #9164365 - Attachment description: Bug 1649121: part 55) Assert range boundaries in `ContentIteratorBase::Initializer` are set. r=masayuki → Bug 1649121: part 54) Assert range boundaries in `ContentIteratorBase::Initializer` are set and valid. r=masayuki
Attachment #9164712 - Attachment description: Bug 1649121: part 57) Factor `DetermineLastNode` out of `ContentIteratorBase::Initializer`. r=masayuki → Bug 1649121: part 55) Factor `DetermineLastNode` out of `ContentIteratorBase::Initializer`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/68100e19a94d
part 54) Assert range boundaries in `ContentIteratorBase::Initializer` are set and valid. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a2bdc23f3e53
part 55) Factor `DetermineLastNode` out of `ContentIteratorBase::Initializer`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/2b525375be8d
part 56) Factor `DetermineFirstNode` out of `ContentIteratorBase::Initializer`. r=masayuki

Hides details and "inclusive" ancestors is more precise.

Depends on D84522

Simplifies factoring determining firstCandidate and lastCandidate
out.

Depends on D84790

Please see the next review too, because it moves more code to that
method.

Depends on D84792

Please see the following review too, because there more code is moved to
that method.

Depends on D84795

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/885508b7a15c
part 57) Change `DetermineFirstNode` to return the found node. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/24cc8c0b96bc
part 58) Change `DetermineLastNode` to return the found node. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/ff333a51931f
part 59) Declare `mPre` `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/3894d20e0f0b
part 60) Declare some methods in `ContentIteratorBase` `static`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/d374d8692104
part 61) Rename `mCommonParent` to `mClosestCommonInclusiveAncestor`. r=masayuki
Attachment #9165847 - Attachment description: Bug 1649121: part 63) Factor `CacheEndContainersInclusiveAncestors` out. r=masayuki → Bug 1649121: part 63) Factor `CacheInclusiveAncestorsOfEndContainer` out. r=masayuki
Attachment #9165928 - Attachment description: Bug 1649121: part 72) Rename `mEndNodes` to `mEndContainersInclusiveAncestors`. r=masayuki → Bug 1649121: part 72) Rename `mEndNodes` to `mInclusiveAncestorsOfEndContainer`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e4b86d02431
part 62) Replace `bool ContentIterator::mPre` with `enum class`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/36f2d1a081f5
part 63) Factor `CacheInclusiveAncestorsOfEndContainer` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/204dcb26837f
part 64) Don't reuse local `offset` variable in `InitWithRange`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/3509bd105db8
part 65) Declare more methods in `ContentIteratorBase` `static`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/5002d651b711
part 66) Factor `DetermineCandidateForFirstContent` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/39033ca494c1
part 67) Move more code to `DetermineCandidateForFirstContent`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/2dfb66728bdf
part 68) Factor `DetermineFirstContent` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/e9a3849e624c
part 69) Factor `DetermineCandidateForLastContent` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/88a2963f2cf4
part 70) Move more code to `DetermineCandidateForLastContent`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/6fee5dd104d1
part 71) Factor `DetermineLastContent` out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/03646d5e16ac
part 72) Rename `mEndNodes` to `mInclusiveAncestorsOfEndContainer`. r=masayuki

Removes code duplication, abstracts details away.

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e0b9bfa8ca7c
part 73) Factor `IsNodeContainedInRange` out. r=masayuki

CreateDocumentFragmentFromPaste doesn't need to know about
HTMLEditor, Document suffices.

It's more concise.

Depends on D88257

Hides details. The new methods' arguments are renamed in the next
review.

Depends on D88261

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b9bcdf8a7967
part 74) Pass `Document` instead of `HTMLEditor` to `CreateDocumentFragmentFromPaste`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/d139830f70b9
part 75) Declare `FragmentFromPasteCreator`'s `Document` argument `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/a7344f8a1e30
part 76) Factor `IsInsertionCookie` out. r=masayuki
Attachment #9172122 - Attachment description: Bug 1649121: part 82) Factor serializing node partially contained in range out. → Bug 1649121: part 82) Factor serializing node partially contained in range out. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25f72d16044a
part 77) `MOZ_ASSERT` html info is only provided when there's html context. r=masayuki
Attachment #9172118 - Attachment description: Bug 1649121: part 78) Move start- and end-node only if html context was provided. r=masayuki → Bug 1649121: part 78) Revert part 77. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afa9f0262aa6
part 78) Revert part 77. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/6876eb48d2ed
part 79) Pass reference to `IncludeInContext` instead of pointer. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/c555095f6604
part 80) Factor determing start- and end-content out of `SerializeRangeNodes`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/7cd7d4aaa4e9
part 81) Factor serializing text node out of `RangeSerializer`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/23320dfa3110
part 82) Factor serializing node partially contained in range out. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/0ab368e868cd
part 83) Rename arguments of `SerializeNodePartiallyContainedInRange` to conform to style-guide. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/e342a0f97d2c
part 84) Change some arguments of `SerializeNodePartiallyContainedInRange` from pointers to references. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/6ff7f090eeb6
part 85) Follow-up for part 74. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/ec0dd01a8333
part 86) Follow-up for part 79. r=masayuki

Clarifies the connection.

Depends on D90528

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e4756124ec03
part 87) Add minimal documentation to `HTMLEditor::ParseCFHTML`. r=masayuki
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1036d28621b9
part 88) Declare some methods around `DataTransfer` `const`. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/60ce423cd417
part 89) Reference spec from `DataTransfer` class. r=masayuki

A step towards making HTMLEditor::InsertFromDataTransfer
understandable.

Depends on D90688

Preparing the transferable has the hidden requirement that the order of
the added flavors matters.

This is the preparation for expressing this in code.

aTransferable is renamed in the following commit.

Depends on D90689

To adhere the style-guide.

Depends on D90881

This clarifies why the flavors are added in a certain order and why
retrieving the first available one is the best one.

Moreover, this enables previously, accidentally disabled
NS_WARNING_ASSERTIONS.

Depends on D90882

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/96a3d02b5ba9
part 90) Declare some editor methods `const` or `static`. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/96b7ecdffe87
part 91) Document some arguments of some `DataTransfer`-related methods. r=m_kato
You need to log in before you can comment on or make changes to this bug.