2008/9/11 Marshall Greenblatt <[EMAIL PROTECTED]>: > Hi Marc-Antoine, > > Thank you for your fast response! > > I've made my work-in-progress patches available here: > > http://www.magpcss.net/patches/chromium_test_shell_printing_rev2056.diff
Sorry to hear about gcl fighting. > Most of the changes are in the webkit/tools/test_shell/ folder, but one > small change was required to the PrintingContext class as well. I've added > an additional argument to the PrintingContext::NewDocument() method that can > be set to "false" to disable the default functionality of forcing > print-to-file if no g_browser_process instance exists. Using default > arguments violates Google's style requirements, of course, so we'll probably > want to come up with a better solution. I disagree with the debug flag. The main issue right now is that you include chrome/* from webkit/*. That violates the current hierarchy. The PrintingContext class will need to be moved. Also, you'll have to turn off tab generation and use spaces instead. I know, it hurts at first but you get used to it. :) > The TestShell::PrintPage() method implements the suggested approach of > writing directly to the printer device context. All of the elements of the > page are printed, but appear very small. > > If the DPI settings are likely to be the problem, how would I go about > notifying the WebFrame instance that the DPI settings are different? When calling TestShell::PrintPages(), use settings.dpi() / settings.desired_dpi as the scaling factor. Change the matrix loaded in print_context_.context() with this additional factor, in addition to the "shrink" factor which is independent. > One other thing I've noticed is that Google Chrome doesn't remember the > print settings last selected by the user during the same session. We may > want to add support for that as well while we're at it. I'd rather keep separate changes separate. The first thing to do would be to move PrintingContext into base/ or webkit/. Since PrintingContext depends on PrintSettings, PageOverlays, PageRange and PageSetup, it's non-trivial. Furthermore, PageOverlays requires the url elider. I think the url elider and the emf dumping facilities (which cause the browser dependency) could be factored away and be "hot pluggable". That would be nice in fact. One question though, what about 'chrome.exe --single-process' ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/chromium-dev?hl=en -~----------~----~----~----~------~----~------~--~---
