[Webkit-unassigned] [Bug 28355] New: Replace MAX()/MIN() macros with type-safe std::max()/min() templates

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 16 05:25:26 PDT 2009


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

           Summary: Replace MAX()/MIN() macros with type-safe
                    std::max()/min() templates
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org
                CC: mitz at webkit.org



David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34925|                            |review?
               Flag|                            |


Created an attachment (id=34925)
 --> (https://bugs.webkit.org/attachment.cgi?id=34925)
Patch v1

Reviewed by NOBODY (OOPS!).

WebCore:

* accessibility/mac/AccessibilityObjectWrapper.mm:
(AXAttributeStringSetSpelling): Changed MIN() to min().
* platform/graphics/mac/FontMacATSUI.mm:
(WebCore::Font::selectionRectForComplexText): Changed MAX() to
max() and MIN() to min().
(WebCore::Font::floatWidthForComplexText): Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm: Added using
std::max statment.
(WebCore::SimpleFontData::platformInit): Changed MAX() to max().
* platform/text/mac/TextCodecMac.cpp:
(WebCore::TextCodecMac::decode): Changed MIN() to min().

WebKit/mac:

* Plugins/WebBaseNetscapePluginStream.mm: Added using std::min
statement.
(WebNetscapePluginStream::deliverData): Changed MIN() to min().
Changed C-style cast to a static_cast.
* Plugins/WebNetscapePluginView.mm: Added using std::min
statement.
(-[WebNetscapePluginView
_postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
Changed MIN() to min().  Changed C-style cast to a static_cast.
* WebView/WebHTMLView.mm: Added using std::max statement.
(-[WebHTMLView _dragImageForURL:withLabel:]): Changed MAX() to
max().
(-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto.
* WebView/WebTextCompletionController.mm: Added using std::max
and using std::min statements.
(-[WebTextCompletionController _placePopupWindow:]): Changed
type of maxWidth variable from float to CGFloat to prevent a
type mismatch on x86_64.  Changed MAX() to max() and MIN() to
min().  Added static_cast for a constant value since CGFloat is
defined as a float on i386 and as a double on x86_64.
---
 10 files changed, 70 insertions(+), 16 deletions(-)

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