Closed Bug 499595 Opened 15 years ago Closed 15 years ago

Windows NPTest plugin just stops rendering after rendering a small number of times

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(2 files, 1 obsolete file)

Attached file testcase
Open the attached testcase and start resizing the window. Pretty quickly you'll see that the plugin text and border stop being drawn.

I'm not really sure what's going on. The DrawRectangle and DrawString calls just stop working after we've drawn the plugin 5-10 times. From code inspection we seem to be setting up and tearing down GDI+ correctly. I fear something weird going on with GDI+.

Jim, if it's OK with you I think I'll just rewrite this code to use GDI instead of GDI+. I think with GDI it should be easier to see what's going on, and it will definitely be easier for most people to understand. I also want to make it double-buffered; right now plugin drawing flickers a bit, and that makes it hard to tell whether flicker is because of the plugin or Gecko.
Attached patch fix (obsolete) — Splinter Review
Attachment #384328 - Flags: review?
Attachment #384328 - Flags: review? → review?(jmathies)
Attached patch fix v2Splinter Review
Clean out a bit more GDI+ stuff
Attachment #384328 - Attachment is obsolete: true
Attachment #384329 - Flags: review?(jmathies)
Attachment #384328 - Flags: review?(jmathies)
Man that's too bad, I love the simplicity of the GDI+ stuff. I'm off this week as I've got a bunch of home improvement projects lined up, but I'll find some time to poke through this for the review towards the end of the week.
Hey guys, GDI+ is being misused currently, see bug 500451. May fix the issue here so that you can continue to use GDI+ if you like it better.
Of course, silly me.

I actually still want my patch though, since it does double-buffering and fixes the rendering to look just like the other platforms, and I don't really want to write it again.
Comment on attachment 384329 [details] [diff] [review]
fix v2

looks good to me.
Attachment #384329 - Flags: review?(jmathies) → review+
http://hg.mozilla.org/mozilla-central/rev/847488ceae1f
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: