Bug 7146
Summary: | New WebKit API needed for communicating PostScript conversion progress via delegate method | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | jordan.breeding, sullivan |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
Bug Depends on: | 3527 | ||
Bug Blocks: |
David Kilzer (:ddkilzer)
Bug 3527 added the ability to view PostScript files within WebKit, but there is no way to communicate to the user that the conversion is taking place. A new API is needed in WebKit to provide that information via delegate method calls.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
[10:09pm] darin: ddkilzer: When I tested it I saw a spinning cursor for a while -- I wonder why.
[10:09pm] darin: Preview didn't seem to take as long to convert to PDF.
[10:09pm] ddkilzer: darin: Did you have any thoughts on how to handle errors? ap suggested that I use the status bar, but I don't think that's turned on by default.
[10:10pm] darin: I think we should report the errors to Safari and let it handle them some nice way.
[10:10pm] ddkilzer: darin: Preview has a dialog while the conversion happens, too.
[10:10pm] darin: We need to make sure WebKit API has a good way to tell about the errors
[10:10pm] darin: I was about to mention that.
[10:10pm] darin: In general we want to let the browser control such things.
[10:10pm] ddkilzer: darin: Is there an example of code in WebKit where an error is reported?
[10:11pm] darin: ddkilzer: You should probably talk to John Sullivan about this -- it's probably OK to send him emal.
[10:11pm] darin: Errors are reported through the page load delegate.
[10:11pm] darin: frame load delegate I guess
[10:11pm] ddkilzer: darin: Should I file a follow-up bug to track the issue, too?
[10:11pm] darin: sure, we could even use 2
[10:11pm] ddkilzer: darin: Add sullivan(at)apple.com to the CC list. Two?
[10:11pm] darin: 1 for the "converting PostScript" and another for the error case
[10:12pm] darin: and the bugs aren't about what Safari does
[10:12pm] darin: because those don't belong in WebKit
[10:12pm] darin: but rather bugs about adding WebKit API for this
[10:12pm] darin: xenon is another guy to talk to about this
[10:12pm] darin: - (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
[10:12pm] darin: that's how errors get reported
[10:12pm] darin: it's not clear how to communicate that loading is taking place
[10:13pm] ddkilzer: Adding WebKit API to report PS conversion status and to report an error
[10:13pm] darin: that might require some new delegate call
[10:13pm] darin: sure
[10:13pm] darin: I guess PS conversion progress would be ideal, but the framework doesn't tell us that
[10:13pm] darin: instead it's just "start and stop" I guess
[10:13pm] darin: ddkilzer: I think the "report an error" case really just means using the existing delegate and a new NSError code
[10:13pm] ddkilzer: darin: No, actually that's what that zeroed-out callback is for.
[10:13pm] darin: neat
[10:14pm] darin: so we'd want to report the progress too then
[10:14pm] darin: so those are the two bugs
[10:14pm] ddkilzer: darin: The callback struct calls methods at various points in the conversion process.
[10:14pm] darin: neat
[10:14pm] darin: maybe we can turn that into something abstract enough to be in the general WebKit API
[10:14pm] darin: sullivan and xenon are 2 great people to talk to about this
David Kilzer (:ddkilzer)
If a new delegate method is added to WebKit to report the conversion status progress, will corresponding changes need to be made in Safari?
John Sullivan
Yes, if there's a new delegate callback then only updated clients can take advantage of it. We'd have to make a change such that old clients wouldn't do anything bad, they just wouldn't take advantage of the new improved mechanism.