Reviewed by Maciej.
Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
Fix Win32 build
* kjs/config.h: define NOMINMAX instead of min/max
as themselves.
* wtf/Vector.h: put back hack to ensure that min/max
are not defined as macros.
2006-11-20 Samuel Weinig <sam@webkit.org>
Reviewed by Maciej.
Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
Fix Win32 build
* config.h: add #define NOMINMAX for windows build
* platform/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/win/TemporaryLinkStubs.cpp: add definitions for
new cursors.
(WebCore::aliasCursor):
(WebCore::noDropCursor):
(WebCore::progressCursor):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17856
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-11-20 Samuel Weinig <sam@webkit.org>
+
+ Reviewed by Maciej.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
+ Fix Win32 build
+
+ * kjs/config.h: define NOMINMAX instead of min/max
+ as themselves.
+ * wtf/Vector.h: put back hack to ensure that min/max
+ are not defined as macros.
+
2006-11-19 Simon Hausmann <hausmann@kde.org>
Reviewed by Zack.
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
#include <wtf/Platform.h>
#if PLATFORM(DARWIN)
#elif PLATFORM(WIN_OS)
-// If we don't define these, they get defined in windef.h.
-// We want to use std::min and std::max
-#define max max
-#define min min
+// We need to define this in order to use the numeric limit
+// values provided by the C++ standard library.
+#define NOMINMAX
#define HAVE_FLOAT_H 1
#define HAVE_FUNC__FINITE 1
#define HAVE_SYS_TIMEB_H 1
-
#define USE_SYSTEM_MALLOC 1
#else
#include <stdlib.h>
#include <utility>
+// FIXME: For unknown reasons defining NOMINMAX is not preventing the
+// min and max macros from being defined on Win32.
+#ifdef max
+#undef max
+#endif
+
+#ifdef min
+#undef min
+#endif
+
namespace WTF {
using std::min;
+2006-11-20 Samuel Weinig <sam@webkit.org>
+
+ Reviewed by Maciej.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
+ Fix Win32 build
+
+ * config.h: add #define NOMINMAX for windows build
+ * platform/win/FontCacheWin.cpp:
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/win/TemporaryLinkStubs.cpp: add definitions for
+ new cursors.
+ (WebCore::aliasCursor):
+ (WebCore::noDropCursor):
+ (WebCore::progressCursor):
+
2006-11-19 Beth Dakin <bdakin@apple.com>
Reviewed by Adam.
/*
* Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#define WINVER 0x0500
#endif
+// We need to define this in order to use the numeric limit
+// values provided by the C++ standard library.
+#define NOMINMAX
+
// Hack to match configuration of JavaScriptCore.
// Maybe there's a better way to do this.
#define USE_SYSTEM_MALLOC 1
#include "config.h"
#include "FontCache.h"
+
#include "FontData.h"
#include "Font.h"
-#include <windows.h>
+#include <algorithm>
#include <mlang.h>
+#include <windows.h>
-namespace WebCore
-{
+using std::min;
+
+namespace WebCore {
void FontCache::platformInit()
{
winfont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
winfont.lfItalic = fontDescription.italic();
winfont.lfWeight = fontDescription.bold() ? 700 : 400; // FIXME: Support weights for real.
- int len = min(family.length(), LF_FACESIZE - 1);
+ int len = min(static_cast<int>(family.length()), LF_FACESIZE - 1);
memcpy(winfont.lfFaceName, family.characters(), len * sizeof(WORD));
winfont.lfFaceName[len] = '\0';
bool historyContains(DeprecatedString const&) { notImplemented(); return false; }
String inputElementAltText() { notImplemented(); return DeprecatedString(); }
bool IsResponseURLEqualToURL(PlatformResponse , const String&) { notImplemented(); return false; }
+const Cursor& aliasCursor() { notImplemented(); return localCursor; }
const Cursor& cellCursor() { notImplemented(); return localCursor; }
const Cursor& contextMenuCursor() { notImplemented(); return localCursor; }
const Cursor& moveCursor() { notImplemented(); return localCursor; }
+const Cursor& noDropCursor() { notImplemented(); return localCursor; }
+const Cursor& progressCursor() { notImplemented(); return localCursor; }
const Cursor& verticalTextCursor() { notImplemented(); return localCursor; }
void refreshPlugins(bool) { notImplemented(); }
String resetButtonDefaultLabel() { notImplemented(); return "Reset"; }