Add callback to `HTMLEditor::CreateAndInsertElementWithTransaction` to initialize new element before inserting the new element into the tree
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(12 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 | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Callers of HTMLEditor::CreateAndInsertElementWithTransaction
appends attributes and/or its children after each call. It causes redundant mutation events/notifications and wastes memory space with redundant transaction instances.
Before doing this, we need to drop CreateElementTransaction
.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
For making initializing new element safer and faster, it's better to initialize
new element's attributes and appending children before inserting the new element
into the DOM tree.
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D140465
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D140466
Assignee | ||
Comment 4•2 years ago
|
||
At initializing new element which has not been connected, undo transactions
are not necessary because just removing the new element gets same result for
users. Therefore, they should be able to work without transactions.
Depends on D140467
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D140468
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D140469
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D140470
Assignee | ||
Comment 8•2 years ago
|
||
Depends on D140471
Assignee | ||
Comment 9•2 years ago
|
||
Depends on D140472
Assignee | ||
Comment 10•2 years ago
|
||
Depends on D140473
Assignee | ||
Comment 11•2 years ago
|
||
For avoiding simple back-out of the patches when we get serious regression
reports, we should have a pref to disable the new pref.
Depends on D140474
Assignee | ||
Comment 12•2 years ago
|
||
For making the callers simpler, they should be able to be omitted if they
want to do nothing.
Depends on D140475
Comment 13•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/28759b90db6e part 1: Make `HTMLEditor::CreateAndInsertElementWithTransaction()` take a callback function r=m_kato
Comment 14•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/6525cb40a8e0 part 2: Make `HTMLEditor::CopyLastEditableChildStylesWithTransaction` clone attributes to new elements before inserting them into the DOM tree r=m_kato
Comment 15•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/7b37517e2b86 part 3: Make `HTMLEditor::AlignBlockContentsWithDivElement` set `align` attribute or equivalent before inserting a new `<div>` into the DOM tree r=m_kato
Comment 16•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/b92fd32ccea3 part 4: Make `HTMLEditor::CreateAndInsertElementWithTransaction()` and `HTMLEditor::InsertBRElementWithTransaction()` work without transactions r=m_kato
Comment 17•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/5915bbe06732 part 5: Make `HTMLEditor::HandleInsertParagraphInHeadingElement()` insert `<br>` element into the new paragraph before connecting to the DOM tree r=m_kato https://hg.mozilla.org/integration/autoland/rev/d7c979cbcbcc part 6: Make `HTMLEditor::HandleInsertParagraphInListItemElement()` insert `<br>` element into the new paragraph before connecting to the DOM tree r=m_kato
Comment 18•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/ffb5b57840a1 part 7: Make `HTMLEditor::ChangeSelectedHardLinesToList()` insert list item into the new list element before connected to the DOM tree r=m_kato
Comment 19•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/330f4429ae10 part 8: Make `HTMLEditor::PasteAsQuotationAsAction()` set "type" attribute of new blockquote element before connecting it to the DOM tree r=m_kato https://hg.mozilla.org/integration/autoland/rev/fd4655669d31 part 9: Make `HTMLEditor::InsertAsPlaintextQuotation()` set attributes of `<span>` before connecting to the DOM tree r=m_kato
Comment 20•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/389698b4a258 part 10: Make `HTMLEditor::InsertAsCitedQuotationInternal()` set attributes of `<blockquote>` before connecting it to the DOM tree r=m_kato https://hg.mozilla.org/integration/autoland/rev/279f83f54bf9 part 11: Create a pref to get back the traditional behavior r=m_kato https://hg.mozilla.org/integration/autoland/rev/6e0716832ef0 part 12: Make all `aInitializer` arguments optional r=m_kato
Comment 21•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/28759b90db6e
https://hg.mozilla.org/mozilla-central/rev/6525cb40a8e0
https://hg.mozilla.org/mozilla-central/rev/7b37517e2b86
https://hg.mozilla.org/mozilla-central/rev/b92fd32ccea3
https://hg.mozilla.org/mozilla-central/rev/5915bbe06732
https://hg.mozilla.org/mozilla-central/rev/d7c979cbcbcc
https://hg.mozilla.org/mozilla-central/rev/ffb5b57840a1
Comment 22•2 years ago
|
||
bugherder |
Description
•