[Webkit-unassigned] [Bug 76172] [GTK] Add basic printing support to WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 27 13:14:20 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76172





--- Comment #12 from Gustavo Noronha (kov) <gns at gnome.org>  2012-01-27 13:14:19 PST ---
(In reply to comment #7)
> > > +        if (printerName) {
> > > +            if (!strcmp(printerName, gtk_printer_get_name(printer)))
> > > +                selectedPrinter = printer;
> > 
> > Nit: I think this would be more readable as if (printerName && !strcmp(...)), then you can drop the braces.
> 
> The thing is that we don't want to use the default printer if a printer name has been chosen by the user, so I would need to check again in the else, that printerName is NULL. So the printerName check is not just to avoid a crash in strcmp, but to check whether a printer has been specified, to use the default one otherwise.

I understand that, but the if (printername && !strcmp()) I suggested would work the same the current code does, or am I missing something? =)

> > > Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:262
> > > +    bool isDone : 1;
> > 
> > How about turning this into a method that does return m_totalPrinted == pages.size()?
> 
> That would work now, but not when some manual capabilities are implemented like multiple pages per sheet.

Ack.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list