Copy surface data URL's to clipboard

RESOLVED FIXED in mozilla10

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

unspecified
mozilla10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

6 years ago
Created attachment 569321 [details] [diff] [review]
Copy data URL's to clipboard as well

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)
(Assignee)

Comment 1

6 years ago
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)
(Assignee)

Comment 2

6 years ago
Created attachment 569514 [details] [diff] [review]
Add multiple output formats for DumpAsDataURL
Attachment #569514 - Flags: review?(roc)
Attachment #569514 - Flags: review?(roc) → review+
(Assignee)

Comment 3

6 years ago
Created attachment 569578 [details] [diff] [review]
Add multiple output formats for DumpAsDataURL v2

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?
(Assignee)

Comment 5

6 years ago
Created attachment 569595 [details] [diff] [review]
Add multiple output formats for DumpAsDataURL v3

Good point, C char arrays are horrible.
Attachment #569578 - Attachment is obsolete: true
Attachment #569578 - Flags: review?(roc)
Attachment #569595 - Flags: review?(roc)
Attachment #569595 - Flags: review?(roc) → review+
(Assignee)

Comment 6

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d21cf5b59d0
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/8d21cf5b59d0
Assignee: nobody → matt.woodrow
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.