[Webkit-unassigned] [Bug 32813] New: Type=number UI part 2: Mac implementation of spin-button

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 20 22:47:08 PST 2009


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

           Summary: Type=number UI part 2: Mac implementation of
                    spin-button
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: tkent at chromium.org
                CC: eric at webkit.org
        Depends on: 31821
            Blocks: 27968


This bug was split from Bug#27968.

A review comment from Eric Seidel:
(From update of attachment 39538 [details])
This change is mostly useless w/o pixel results.  If we can't see what UI
you're adding, we can't really review it.  Also your ChangeLogs are still kinda
empty. :(

Why have this big function if you're only going to return 0?
+const int* stepperMargins(NSControlSize controlSize)
+{
+    static const int margins[3][4] = {
+        {0, 0, 0, 0},
+        {0, 0, 0, 0},
+        {0, 0, 0, 0}
+    };
+    return margins[controlSize];
+}

No need:
+    static NSStepperCell* cell;
+    if (!cell) {
+        cell = [[NSStepperCell alloc] init];
+    }
Just do:
static NSStepperCell* cell = [[NSStepperCell alloc] init];
and that will only run once, the first time the function is called.

Needs { } due to the comment:
+    if (states & PressedState && states & SpinUpState)
+        // FIXME: There is no way to draw a NSSteperCell with the up button
hilighted.
+        // Disables the hilight of the down button if the up button is
pressed.
+        [cell setHighlighted:NO];

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