Closed Bug 1725930 Opened 3 years ago Closed 3 years ago

`TextServicesDocument::HasSameBlockNodeParent` refers same text node to check 2 text nodes are in same block element

Categories

(Core :: DOM: Editor, defect, P2)

Firefox 92
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- fixed
firefox93 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/editor/spellchecker/TextServicesDocument.cpp#1592-1593

bool TextServicesDocument::HasSameBlockNodeParent(Text& aTextNode1,
                                                  Text& aTextNode2) {
  nsIContent* container1 = aTextNode1.GetParent();
  nsIContent* container2 = aTextNode1.GetParent();

Could be a cause of bug 1721801, but not sure.

This is just a simple mistake, but I'm not sure how this break the callers.
Therefore, I don't have a testcase for this.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/708126343f0e Make `TextServicesDocument::HasSameBlockNodeParent` refer 2nd text node as expected r=m_kato

Comment on attachment 9236415 [details]
Bug 1725930 - Make TextServicesDocument::HasSameBlockNodeParent refer 2nd text node as expected r=m_kato!

Beta/Release Uplift Approval Request

  • User impact if declined: TextSevicesDocument which collects text in a block containing caret unexpectedly keeps collecting text in different blocks too. Even if this does not show any regression visually, this could cause bad performance or hunging up.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): I'm not sure how this method work, however, the fix is simplest and obviously correct.
  • String changes made/needed:
Attachment #9236415 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Comment on attachment 9236415 [details]
Bug 1725930 - Make TextServicesDocument::HasSameBlockNodeParent refer 2nd text node as expected r=m_kato!

Approved for 92.0b5.

Attachment #9236415 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: