author Masayuki Nakano <>
Thu, 02 Feb 2023 05:09:15 +0000
changeset 651452 20512741e7b60f3f6791002d8311d681f9242e68
parent 261125 37eb43b1d82ea3460d562a4ac4d0d9a2af20ae6c
permissions -rw-r--r--
Bug 1812170 - Make `HTMLEditor::ClearStyleAt` should return `pointToPutCaret` if next node of first split is not split r=m_kato The new path added in bug 1807829 hits the odd result case of `ClearStyleAt`. `pointToPutCaret` may be updated if the preceding split occurs. Therefore, it should be returned if it does not split next nodes after the first split instead of returning unset point (because of not splitting the point, `unwrappedSplitNodeResult.AtSplitPoint` may return unset point, therefore, it may return unset point in the case). Additionally, I forgot to split delete `SplitNodeResult::mCaretPoint` in bug 1792654, and it causes `SplitNodeDeepWithTransaction` returns unset caret point. This patch fixes this bug too. Differential Revision:

    <meta charset="utf-8">
    <style type="text/css">
.grid {
  height: 60px;
  border: 10px solid green;
  position: relative;

span {
  position: absolute;
  background: lime;
  border: 1px solid black;
  box-sizing: border-box;

.a {
  left: 40px;
  width: 60px;
  height: 40px;
.b {
  left: 20px;
  top: 40px;
  width: 60px;
  height: 20px;
.c {
  left: 80px;
  top: 40px;
  width: 60px;
  height: 20px;
.d {
  left: 0px;
  width: 20px;
  height: 60px;

<div class=grid>
<span class="a">a</span>
<span class="b">b</span>
<span class="c">c</span>
<span class="d">d</span>