[Webkit-unassigned] [Bug 35347] New: Convert the zoom mode into a proper enum

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 24 08:50:25 PST 2010


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

           Summary: Convert the zoom mode into a proper enum
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Frames
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jpetsovits at rim.com


"setZoomFactor(0.8, false)" has annoyed me since I first saw it. Unless you're
really familiar with the code or able to deduct it from the bug title, you have
little chance of knowing what the "false" argument means. The Qt "how to design
good APIs" guide specifically mentions vague boolean arguments like this one as
example of not to design APIs. Unfortunately, most ports have already adopted
this argument style. That doesn't mean, though, that we shouldn't fix it in the
internal WebCore API, as it still makes for vastly better readability.

So, the patch below replaces the boolean argument by an enum called ZoomMode,
and adapts all ports without changing their public APIs (I'll leave that
decision to the respective port maintainers and their ABI policies). Hopefully
I didn't miss any occurrence, let's see what the bots say. Please review,
thanks!

-- 
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