Closed Bug 880925 Opened 7 years ago Closed 7 years ago

OOB in mozilla::TextRenderedRunIterator::Next with svg.text.css-frames.enabled

Categories

(Core :: SVG, defect, critical)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jruderman, Assigned: heycam)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached image testcase
With:
  user_pref("svg.text.css-frames.enabled", true);

###!!! ASSERTION: expected a TextNodeCorrespondenceProperty on nsTextFrame used for SVG text: 'Not Reached', file ../../../layout/svg/nsSVGTextFrame2.cpp, line 1228

Assertion failure: i < Length() (invalid array index), at ../../dist/include/nsTArray.h:725

(mozilla::TextRenderedRunIterator::Next)
The fix for this needs that we no longer use a script runner to postpone reflow when NotifyGlyphMetricsUpdated is called under a DOM method.
Depends on: 877429
Attached patch patchSplinter Review
Seems like caretPositionFromPoint should be flushing layout.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #760263 - Flags: review?(bzbarsky)
Duplicate of this bug: 881031
Comment on attachment 760263 [details] [diff] [review]
patch

Yes, this most definitely needed a flush.  Nice catch!  It should even be possible to write a correctness test not using SVG, if we care enough...

r=me
Attachment #760263 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/e856b38719c1
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
> It should even be possible to write a correctness test not using SVG, if we care 
> enough...

I hope this doesn't mean the bug is exploitable without the SVG textframe pref!
I wasn't able to cause anything other than incorrect results just using caretPositionFromPoint on a <div>.
You need to log in before you can comment on or make changes to this bug.