Last Comment Bug 752304 - Logic error in nsHTMLEditor::SetInlinePropertyOnNodeImpl
: Logic error in nsHTMLEditor::SetInlinePropertyOnNodeImpl
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: :Aryeh Gregor (working until September 2)
:
Mentors:
: 752419 (view as bug list)
Depends on:
Blocks: editingspectests
  Show dependency treegraph
 
Reported: 2012-05-06 03:58 PDT by :Aryeh Gregor (working until September 2)
Modified: 2012-05-08 11:19 PDT (History)
4 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.29 KB, patch)
2012-05-06 03:59 PDT, :Aryeh Gregor (working until September 2)
ehsan: review+
Details | Diff | Splinter Review

Description :Aryeh Gregor (working until September 2) 2012-05-06 03:58:16 PDT
if (nextNode && nextNode->Tag() == aProperty &&
        HasAttrVal(nextNode, aAttribute, *aValue) &&
        IsOnlyAttribute(priorNode, *aAttribute)) {
      // following sib is already right kind of inline node; slide this over into it
      return MoveNode(aNode->AsDOMNode(), nextNode->AsDOMNode(), 0);
    }

Do you spot the bug?  It says "priorNode" instead of "nextNode" on the IsOnlyAttribute line.  Ms2ger's use of MOZ_ASSERT in bug 750079 part a is hit by my editing tests because of this.  Yay for catching bugs via fast failure in comprehensive test suites!
Comment 1 :Aryeh Gregor (working until September 2) 2012-05-06 03:59:26 PDT
Created attachment 621401 [details] [diff] [review]
Patch v1

This will be tested by bug 751842, so I didn't add a separate test.
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-05-07 02:30:08 PDT
*** Bug 752419 has been marked as a duplicate of this bug. ***
Comment 3 :Aryeh Gregor (working until September 2) 2012-05-07 23:19:54 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/622145252703
Comment 4 Ed Morley [:emorley] 2012-05-08 11:19:10 PDT
https://hg.mozilla.org/mozilla-central/rev/622145252703

Note You need to log in before you can comment on or make changes to this bug.