Closed Bug 340908 Opened 19 years ago Closed 19 years ago

Hook up SVG foreignobject to new invalidation architecture

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(2 files, 4 obsolete files)

Now that the necessary invalidation hooks have landed, we just need to connect the dots to get foreignobject content to invalidate itself safely.
Attached patch fix (obsolete) — Splinter Review
Here it is. We accumulate the damage region locally during reflow so we don't have to do any fancy stuff on every invalidate in the reflowing content.
Attachment #224946 - Flags: superreview?(bzbarsky)
Attachment #224946 - Flags: review?(tor)
This seems to work nicely; you can really browse inside foreignobject content now, edit text, etc. There are of course some remaining issues: -- scrolling doesn't really work -- it's sloooooow when you're rotated (combination of things, I think: cairo clip masks making every operation roughly twice as slow, natural difficulties of rotating images etc, child native widgets being in random places unrelated to the actual content and all having to be repainted all the time) -- it's not really clear how combobox dropdowns should work in rotated content. Probably we should go all-out and use our transparent widget code to draw a true rotated dropdown, that'd wow the crowd. -- Seams are really obvious in rotated content. The Google home page is a case in point.
Attached file testcase (obsolete) —
Testcase ... browser widgety thing which you can transform
Attached file better testcase (obsolete) —
This one makes better use of screen real estate.
Attachment #224949 - Attachment is obsolete: true
(In reply to comment #4) > Created an attachment (id=224951) [edit] > better testcase > > This one makes better use of screen real estate. > It doesn't look like the testcase :-). When it implemented completly, it will become the strongest feature of Gecko !
Attached file testcase
oops
Attachment #224951 - Attachment is obsolete: true
Comment on attachment 224946 [details] [diff] [review] fix Unfortunally you'll need to update this patch now that the nsISVGRendererRegion removal has happened. Why do you call PostReflowCommand() in DidModifySVGObservable?
(In reply to comment #7) > (From update of attachment 224946 [details] [diff] [review] [edit]) > Unfortunally you'll need to update this patch now that the nsISVGRendererRegion > removal has happened. Yeah, I know. I considered delaying my review for that and decided that would be unconscionable :-). > Why do you call PostReflowCommand() in DidModifySVGObservable? To ensure that the inner block (eventually) gets reflowed after our size has changed.
(In reply to comment #8) > > Why do you call PostReflowCommand() in DidModifySVGObservable? > > To ensure that the inner block (eventually) gets reflowed after our size has > changed. Size updates go through AttributeChanged, which you have calling PostReflowCommand() as I'd expect. The only thing a foreignObject frame should be getting modify messages for is a filter change, which doesn't seem like it should need to reflow the fO content, as the size isn't changing.
Comment on attachment 224946 [details] [diff] [review] fix Looks nice!
Attachment #224946 - Flags: superreview?(bzbarsky) → superreview+
Attached patch updated patch (obsolete) — Splinter Review
Updated to trunk + comment.
Attachment #224946 - Attachment is obsolete: true
Attachment #225251 - Flags: review?(tor)
Attachment #224946 - Flags: review?(tor)
Comment on attachment 225251 [details] [diff] [review] updated patch I think you'll need a call to UpdateGraphic in NotifyCanvasTMChanged. You removed the call to UpdateCoveredRegion in DoReflow, which is the method that sets mRect. UpdateCoveredRegion probably needs to be called in InitialUpdate and AttributeChanged.
Attached patch updatedSplinter Review
Attachment #225251 - Attachment is obsolete: true
Attachment #225335 - Flags: review?(tor)
Attachment #225251 - Flags: review?(tor)
Comment on attachment 225335 [details] [diff] [review] updated With an UpdateCoveredRegion in NotifyCanvasTMChanged (hopefully soon to be gone), r=tor.
Attachment #225335 - Flags: review?(tor) → review+
checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: