[Webkit-unassigned] [Bug 7347] New: fixup and rename functions in Length class to make sense in other contexts

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sat Feb 18 16:53:21 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7347

           Summary: fixup and rename functions in Length class to make sense
                    in other contexts
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: sam.weinig at gmail.com


As it stands right now, the class Length (found in
WebCore/khtml/misc/khtmllayout.h) is very confusing to use, especially if one
is not using it to model a width.  Even if you are using it for a width the
functions 'int width(int maxWidth)' and 'int minWidth(int maxWidth)' are not at
all clear about what they are supposed to do.

In addition to renaming, the data structure itself could use a reworking (there
is a comment right above it in the code attesting to this) and perhaps moving
it from the khtml/misc directory to somewhere more appropriate like the
rendering directory would make sense.  

Some ideas for the rename of the two functions are:

int width(int maxWidth) const --> int calcLength(int availableLength) const
int minWidth(int maxWidth) const --> int calcMinLength(int availableLength)
const

or maybe the longer,

int width(int maxWidth) const --> int lengthInAbsolutePixels(int
availableLength) const
int minWidth(int maxWidth) const --> int minLengthInAbsolutePixels(int
availableLength) const

Any ideas?


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list