[webkit-reviews] review requested: [Bug 28355] Replace MAX()/MIN() macros with type-safe std::max()/min() templates : [Attachment 34925] Patch v1

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


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 28355: Replace MAX()/MIN() macros with type-safe std::max()/min() templates
https://bugs.webkit.org/show_bug.cgi?id=28355

Attachment 34925: Patch v1
https://bugs.webkit.org/attachment.cgi?id=34925&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
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(-)


More information about the webkit-reviews mailing list