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

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: karlt, Assigned: tnikkel)

Tracking

({regression})

Trunk
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(2 attachments)

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.
Guessing bug 564991.
Blocks: 564991
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.
blocking2.0: ? → betaN+
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)
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.
http://hg.mozilla.org/mozilla-central/rev/c5c038c9b334
http://hg.mozilla.org/mozilla-central/rev/acc4673a58ac
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.