Logic error in nsHTMLEditor::SetInlinePropertyOnNodeImpl

RESOLVED FIXED in mozilla15

Status

()

Core
Editor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ayg, Assigned: ayg)

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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!
Created attachment 621401 [details] [diff] [review]
Patch v1

This will be tested by bug 751842, so I didn't add a separate test.
Attachment #621401 - Flags: review?(ehsan)
Blocks: 751843
Flags: in-testsuite+

Updated

5 years ago
Duplicate of this bug: 752419
Attachment #621401 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/622145252703
Target Milestone: --- → mozilla15

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/622145252703
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.