Add `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()`
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(11 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
MaybeSplitAncestorsForInsertWithTransaction()
and CreateNodeWithTransaction()
are used with similar code. So for saving the maintenance cost, there should be a wrapper method for the users.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
I realized that it's now used only by HTMLEditor
so that we can move it
into HTMLEditor
and we can make CreateElementTransaction
treat HTMLEditor
directly rather than via EditorBase
.
Assignee | ||
Comment 2•3 years ago
|
||
There are a lot of places which calls
HTMLEditor::MaybeSplitAncestorsForInsertWithTransaction()
and then calls
HTMLEditor::CreateAndInsertElementWithTransaction()
with split point of the
preceding result. It's better to wrap them in a method for reducing the
maintenance cost.
HTMLEditor::CreateOrChangeBlockContainerElement()
handles to calling them
safer than the others so that let's use this code for the new method. The
additional change won't change the most web apps which don't touch the DOM
tree from legacy mutation event listeners.
Depends on D131198
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D131199
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D131200
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D131201
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D131202
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D131203
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D131204
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D131205
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D131206
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D131207
Comment 12•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/88d1b7401340 part 1: Move `EditorBase::CreateElementWithTransaction()` into `HTMLEditor` r=m_kato https://hg.mozilla.org/integration/autoland/rev/b97163a65d2b part 2: Create `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` to wrap to call a pair of `MaybeSplitAncestorsForInsertWithTransaction()` and `CreateAndInsertElementWithTransaction()` r=m_kato https://hg.mozilla.org/integration/autoland/rev/d6cb4390e6f9 part 3: Make `HTMLEditor::ChangeSelectedHardLinesToList()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 13•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/c8a55bef68ac part 4: Make `HTMLEditor::FormatBlockContainerWithTransaction()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/086ba791bea0 part 5: Make `HTMLEditor::IndentListChild()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 15•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/3088b7d11351 part 6: Make `HTMLEditor::HandleCSSIndentAtSelectionInternal()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 16•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/56092011cff6 part 7: Make `HTMLEditor::HandleHTMLIndentAtSelectionInternal()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 17•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/11958ca23821 part 8: Make `HTMLEditor::AlignNodesAndDescendants()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 18•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/253d2d0969c9 part 9: Make `HTMLEditor::MoveNodesIntoNewBlockquoteElement()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 19•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/3dc781627f47 part 10: Make `HTMLEditor::MoveSelectedContentsToDivElementToMakeItAbsolutePosition()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Comment 20•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/88d1b7401340
https://hg.mozilla.org/mozilla-central/rev/b97163a65d2b
https://hg.mozilla.org/mozilla-central/rev/d6cb4390e6f9
https://hg.mozilla.org/mozilla-central/rev/c8a55bef68ac
https://hg.mozilla.org/mozilla-central/rev/086ba791bea0
https://hg.mozilla.org/mozilla-central/rev/3088b7d11351
Comment 21•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/f8dde932c1d6 part 11: Make `HTMLEditor::AlignContentsAtSelectionWithEmptyDivElement()` use `HTMLEditor::InsertElementWithSplittingAncestorsWithTransaction()` r=m_kato
Assignee | ||
Updated•3 years ago
|
Comment 22•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/56092011cff6
https://hg.mozilla.org/mozilla-central/rev/11958ca23821
https://hg.mozilla.org/mozilla-central/rev/253d2d0969c9
https://hg.mozilla.org/mozilla-central/rev/3dc781627f47
https://hg.mozilla.org/mozilla-central/rev/f8dde932c1d6
Description
•