Closed Bug 582476 Opened 10 years ago Closed 10 years ago
selection not visible in iframe in foreign
Object (invalidation issue?)
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.
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.
Yeah, I realized that later. But if foreign object frames get layers we would need to fix that.
Assignee: nobody → tnikkel
A regression window and simplified testcase would be nice here.
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.
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)
The real fix for this bug.
Attachment #482167 - Flags: review?(roc)
Attachment #482166 - Flags: review?(roc) → review+
Attachment #482167 - Flags: review?(roc) → review+
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.
Thanks Robert. I made those changes in my queue.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.