Closed Bug 697048 Opened 13 years ago Closed 13 years ago

Copy surface data URL's to clipboard

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Details

(Whiteboard: [inbound])

Attachments

(1 file, 3 obsolete files)

Having these only dump to stdout can be hard to use, we should copy them to the clipboard as well.

It might be nice to have a way to specify where you want the output to go, not sure how to make this easy to use from a debugger though.

Maybe just multiple functions?
Attachment #569321 - Flags: review?(roc)
Comment on attachment 569321 [details] [diff] [review]
Copy data URL's to clipboard as well

Better patch coming.
Attachment #569321 - Attachment is obsolete: true
Attachment #569321 - Flags: review?(roc)
Attachment #569514 - Flags: review?(roc)
Fixed a strlen bug, add gfxContext wrappers and made it fail less often by using GetAsImageSurface.
Attachment #569514 - Attachment is obsolete: true
Attachment #569578 - Flags: review?(roc)
Comment on attachment 569578 [details] [diff] [review]
Add multiple output formats for DumpAsDataURL v2

Review of attachment 569578 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxASurface.cpp
@@ +853,5 @@
> +
> +  const char* prefix = "data:image/png;base64,";
> +  PRUint32 len = strlen(encodedImg) + strlen(prefix) + 1;
> +  char *fullString = new char[len];
> +  snprintf(fullString, len, "%s%s", prefix, encodedImg);

Why not use nsCString instead?
Good point, C char arrays are horrible.
Attachment #569578 - Attachment is obsolete: true
Attachment #569578 - Flags: review?(roc)
Attachment #569595 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/8d21cf5b59d0
Assignee: nobody → matt.woodrow
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: