If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

selection not visible in iframe in foreignObject (invalidation issue?)




7 years ago
7 years ago


(Reporter: karlt, Assigned: tnikkel)




Firefox Tracking Flags

(blocking2.0 betaN+)



(2 attachments)



7 years ago
1. Install http://mxr.mozilla.org/mozilla/source/testing/performance/talos/page_load_test/scroll/iframe.svg locally together with drac.htm and possibly scroll-frame.js.

2. Load iframe.svg.

3. Use the mouse to select text in the iframe.

Expected results:
Selected text is highlighted.

Actual results:
Text is not highlighted until after scrolling or focus change.

Regression sometime after 633756e2a580 2010-06-01.

Comment 1

7 years ago
Guessing bug 564991.
Blocks: 564991
blocking2.0: --- → ?

Comment 2

7 years ago
nsSVGForeignObjectFrame::InvalidateInternal doesn't do any invalidating of thebes layers like all other implementations of InvalidateInternal. I don't know SVG very well so that might not be the problem.
That does sound like the problem. Any volunteers to fix it? :-)
Well hmm, the nsSVGForeignObjectFrame should be in the same layer as the nsSVGOuterSVGFrame, so the current code actually should work.

Comment 5

7 years ago
Yeah, I realized that later. But if foreign object frames get layers we would need to fix that.
blocking2.0: ? → betaN+
Assignee: nobody → tnikkel

Comment 6

7 years ago
A regression window and simplified testcase would be nice here.
Keywords: regressionwindow-wanted, testcase-wanted


7 years ago
Keywords: regressionwindow-wanted, testcase-wanted

Comment 7

7 years ago
So the mScrollPosAtLastPaint of the scroll frame inside the svg foreign object never gets updated because PaintFrame call used to draw the contents of the svg foreign object doesn't pass the widget layers flag and hence doesn't set the painting to window flag on the display list builder.
Hmm, I see! We could add a new flag for nsLayoutUtils::PaintFrame that sets SetPaintingToWindow even if PAINT_WIDGET_LAYERS is false.

This will only be temporary; once we convert SVG to use display lists, this won't be an issue.

Comment 9

7 years ago
Created attachment 482166 [details] [diff] [review]
Part 1. Pass invalidation flags through SVG foreign objects.

Just noticed this while reading code. I don't know of anything that it fixes, we don't need to take it for that reason.
Attachment #482166 - Flags: review?(roc)

Comment 10

7 years ago
Created attachment 482167 [details] [diff] [review]
Part 2. Set painting to window flag when painting SVG foreign objects.

The real fix for this bug.
Attachment #482167 - Flags: review?(roc)
Attachment #482166 - Flags: review?(roc) → review+
Attachment #482167 - Flags: review?(roc) → review+

Comment 11

7 years ago
A couple of nits in passing...

In nsSVGUtils.h mPaintingToWindow should be a PRPackedBool

Also IsPaintingToWindow (and the other existing accessors) should be const which would allow the additional argument to nsSVGOuterSVGFrame::Paint to be const too.

Comment 12

7 years ago
Thanks Robert. I made those changes in my queue.

Comment 13

7 years ago
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.