Clean up `HTMLEditor::TryToJoinBlocksWithTransaction()`
Categories
(Core :: DOM: Editor, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(7 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 |
It's made from 4 block, one is preparation, the others join 2 blocks, one of them is for the case when left block is a descendant of right block, next one is for the case when right block is a descendant of left block, the last one is for the case when they are siblings or similar. The last 3 blocks extend deletion range to delete invisible white-spaces. For understanding them deeper, I wrote patches to split these blocks.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
And the name is wrong. It depends on aPoint
whether the <br>
element is
visible or invisible because it just scans preceding <br>
element but
stop doing it when it meets a visible content. Therefore, this patch renames
it to explain what it does.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D85528
Assignee | ||
Comment 3•5 years ago
|
||
Now, the new method,
WhiteSpaceVisibilityKeeper::MergeFirstLineOfRightBlockElementIntoLeftBlockElement()
is the only user of the method so that we can get rid of it since it does enough
simple thing.
Depends on D85529
Assignee | ||
Comment 4•5 years ago
|
||
rightListElement
is not used, so, we can put it into smaller scope.
leftListElement
is used for storing original leftBlockElement
when
newListElementTagNameOfRightListElement
is some. Therefore, we can
stop using it with caching the original leftBlockElement
before
maybe modified its value.
Depends on D85530
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D85531
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D85532
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D85533
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e6609ce56edc
https://hg.mozilla.org/mozilla-central/rev/578e7eee6309
https://hg.mozilla.org/mozilla-central/rev/aca4cf510bef
https://hg.mozilla.org/mozilla-central/rev/d7da635ceb47
https://hg.mozilla.org/mozilla-central/rev/c46442c200e9
https://hg.mozilla.org/mozilla-central/rev/7118f540a471
https://hg.mozilla.org/mozilla-central/rev/7dd2d86abbe3
Description
•