Closed
Bug 1788840
Opened 3 years ago
Closed 3 years ago
HTMLEditor::HandleCSSIndentAroundRanges should not use moved variable
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
106 Branch
| Tracking | Status | |
|---|---|---|
| firefox106 | --- | fixed |
People
(Reporter: m_kato, Assigned: masayuki)
Details
Attachments
(1 file)
I guess I overlook Bug 1774704's review.
const EditorDOMPoint pointToInsertDivElement =
pointToPutCaret.IsSet()
? std::move(pointToPutCaret)
: aRanges.GetFirstRangeStartPoint<EditorDOMPoint>();
So pointToPutCaret is moved, so it may become nothing value. But we re-use pointToPutCaret at next.
if (NS_WARN_IF(!pointToPutCaret.IsSet())) {
return NS_ERROR_FAILURE;
}
Updated•3 years ago
|
Severity: -- → S3
| Assignee | ||
Comment 1•3 years ago
|
||
Oh, indeed, it should check pointToInsertDivElement.IsSet() instead.
| Assignee | ||
Comment 2•3 years ago
|
||
Unfortunately, the result is really different from the other browsers.
E.g., when execCommand("indent") at <div>abc<br>{}<br></div>, Gecko inserts
a <div> and set its margin-left. However, Chrome splits parent <div>
element and wrap the <div> which contains the caret in new <blockquote>.
Therefore, this does not contain new WPT.
Depends on D157404
Updated•3 years ago
|
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/343bf04a54ba
Make `HTMLEditor::HandleCSSIndentAroundRanges` stop referring moved `EditorDOMPoint` r=m_kato
Comment 4•3 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox106:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•