2010-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Fisher.
Reorganize, document and rename OS() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33198
* wtf/Platform.h: Rename, reorganize and document OS() macros.
Adapt to name changes. Also fixed a few incorrect OS checks.
* API/JSContextRef.cpp:
* assembler/MacroAssemblerARM.cpp:
(JSC::isVFPPresent):
* assembler/MacroAssemblerX86Common.h:
* bytecode/SamplingTool.cpp:
* config.h:
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::~RegisterFile):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
* jit/ExecutableAllocator.h:
* jit/ExecutableAllocatorFixedVMPool.cpp:
* jit/ExecutableAllocatorPosix.cpp:
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
* jsc.cpp:
(main):
* parser/Grammar.y:
* profiler/ProfileNode.cpp:
(JSC::getCount):
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlockPtr):
(JSC::currentThreadStackBase):
(JSC::getCurrentPlatformThread):
(JSC::suspendThread):
(JSC::resumeThread):
(JSC::getPlatformThreadRegisters):
(JSC::otherThreadStackPointer):
* runtime/Collector.h:
* runtime/DateConstructor.cpp:
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStackArray::shrinkAllocation):
* runtime/MarkStackPosix.cpp:
* runtime/MarkStackSymbian.cpp:
* runtime/MarkStackWin.cpp:
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncLastIndexOf):
* runtime/TimeoutChecker.cpp:
(JSC::getCPUTime):
* runtime/UString.cpp:
(JSC::UString::from):
* wtf/Assertions.cpp:
* wtf/Assertions.h:
* wtf/CurrentTime.cpp:
(WTF::lowResUTCTime):
* wtf/CurrentTime.h:
(WTF::getLocalTime):
* wtf/DateMath.cpp:
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::InitModule):
(WTF::TCMallocStats::):
* wtf/FastMalloc.h:
* wtf/MathExtras.h:
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
* wtf/StringExtras.h:
* wtf/TCSpinLock.h:
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SlowLock):
* wtf/TCSystemAlloc.cpp:
* wtf/ThreadSpecific.h:
(WTF::::destroy):
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
(WTF::isMainThread):
* wtf/ThreadingWin.cpp:
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
* wtf/VMTags.h:
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):
2010-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Fisher.
Reorganize, document and rename OS() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33198
Adapt to name changes.
* src/ChromiumBridge.cpp:
* src/EditorClientImpl.cpp:
(WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled):
(WebKit::):
(WebKit::EditorClientImpl::handleEditingKeyboardEvent):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::createPlugin):
* src/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
(WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
(WebCore::GraphicsContext3DInternal::makeContextCurrent):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::selectionAsText):
(WebKit::WebFrameImpl::printPage):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::handleMouseEvent):
(WebKit::WebPluginContainerImpl::handleKeyboardEvent):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::mouseDown):
(WebKit::WebViewImpl::mouseContextMenu):
(WebKit::WebViewImpl::mouseUp):
(WebKit::WebViewImpl::keyEvent):
(WebKit::WebViewImpl::sendContextMenuEvent):
(WebKit::WebViewImpl::setScrollbarColors):
(WebKit::WebViewImpl::navigationPolicyFromMouseEvent):
2010-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Fisher.
Reorganize, document and rename OS() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33198
Adapt to name changes.
* webkit/webkitwebsettings.cpp:
(webkit_get_user_agent):
2010-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Fisher.
Reorganize, document and rename OS() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33198
Adapt to name changes. Also fixed a few incorrect OS checks.
* accessibility/AccessibilityObject.h:
* config.h:
* dom/SelectElement.cpp:
(WebCore::SelectElement::listBoxDefaultEventHandler):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::platform):
* loader/CachedFont.cpp:
* loader/FTPDirectoryDocument.cpp:
* loader/FTPDirectoryParser.cpp:
* page/EventHandler.cpp:
* page/Frame.cpp:
(WebCore::Frame::setUseSecureKeyboardEntry):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform):
* page/Page.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* page/chromium/DragControllerChromium.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* platform/FileSystem.h:
* platform/KeyboardCodes.h:
* platform/PurgeableBuffer.h:
* platform/chromium/ChromiumBridge.h:
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::writeRange):
* platform/chromium/ClipboardUtilitiesChromium.cpp:
* platform/chromium/ClipboardUtilitiesChromium.h:
* platform/chromium/PasteboardChromium.cpp:
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::documentFragment):
* platform/chromium/PlatformKeyboardEventChromium.cpp:
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
(WebCore::PlatformKeyboardEvent::currentCapsLockState):
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupListBox::layout):
(WebCore::PopupMenu::show):
* platform/graphics/BitmapImage.h:
(WebCore::BitmapImage::mayFillWithSolidColor):
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.h:
* platform/graphics/FontCache.cpp:
(WebCore::alternateFamilyName):
* platform/graphics/FontCache.h:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataForCharacter):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/graphics/Gradient.h:
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/ImageSource.h:
* platform/graphics/IntRect.h:
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* platform/graphics/SimpleFontData.h:
* platform/graphics/cg/ColorCG.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/chromium/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/chromium/FontCustomPlatformData.h:
* platform/graphics/chromium/FontPlatformData.h:
* platform/graphics/opentype/OpenTypeUtilities.cpp:
* platform/graphics/opentype/OpenTypeUtilities.h:
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::getWindowsContext):
* platform/graphics/qt/ImageQt.cpp:
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/skia/PlatformContextSkia.cpp:
(PlatformContextSkia::State::State):
(PlatformContextSkia::PlatformContextSkia):
(PlatformContextSkia::save):
(PlatformContextSkia::restore):
* platform/graphics/skia/PlatformContextSkia.h:
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::paint):
* platform/graphics/wx/GraphicsContextWx.cpp:
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString):
(WebCore::filenameFromString):
(WebCore::filenameForDisplay):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
* platform/network/curl/ResourceHandleManager.cpp:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::):
* platform/text/String.cpp:
(WebCore::String::format):
(WebCore::String::number):
* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::encode):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps):
(WebCore::extendTextCodecMaps):
* platform/text/TextStream.cpp:
* platform/text/TextStream.h:
* platform/text/qt/TextCodecQt.cpp:
(WebCore::TextCodecQt::decode):
* platform/win/PlatformMouseEventWin.cpp:
(WebCore::messageToEventType):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/win/PlatformScreenWin.cpp:
(WebCore::deviceInfoForWidget):
(WebCore::screenIsMonochrome):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenu::show):
(WebCore::PopupMenu::paint):
(WebCore::PopupMenu::registerClass):
(WebCore::PopupMenu::PopupMenuWndProc):
(WebCore::PopupMenu::wndProc):
* platform/win/SystemTimeWin.cpp:
(WebCore::userIdleTime):
* platform/wx/FileSystemWx.cpp:
(WebCore::unloadModule):
* plugins/PluginDatabase.cpp:
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::compareFileVersion):
* plugins/PluginPackage.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::setFrameRect):
(WebCore::PluginView::stop):
(WebCore::PluginView::PluginView):
* plugins/PluginView.h:
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::addWindowsMediaPlayerPluginDirectory):
(WebCore::addMacromediaPluginDirectories):
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::registerPluginView):
(WebCore::PluginView::wndProc):
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setParent):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::platformStart):
2010-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Fisher.
Reorganize, document and rename OS() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33198
Adapt to name changes.
* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/config.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h
index 3220d51..c5395a9 100644
--- a/WebCore/platform/FileSystem.h
+++ b/WebCore/platform/FileSystem.h
@@ -54,7 +54,7 @@
typedef const struct __CFData* CFDataRef;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// These are to avoid including <winbase.h> in a header for Chromium
typedef void *HANDLE;
// Assuming STRICT
@@ -67,7 +67,7 @@
class CString;
// PlatformModule
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
typedef HMODULE PlatformModule;
#elif PLATFORM(QT)
#if defined(Q_WS_MAC)
@@ -84,7 +84,7 @@
#endif
// PlatformModuleVersion
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
@@ -110,7 +110,7 @@
#if PLATFORM(QT)
typedef QFile* PlatformFileHandle;
const PlatformFileHandle invalidPlatformFileHandle = 0;
-#elif PLATFORM(WIN_OS)
+#elif OS(WINDOWS)
typedef HANDLE PlatformFileHandle;
// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
// avoid using Windows headers in headers. We'd rather move this into the .cpp.
diff --git a/WebCore/platform/KeyboardCodes.h b/WebCore/platform/KeyboardCodes.h
index 48582a8..04ee071 100644
--- a/WebCore/platform/KeyboardCodes.h
+++ b/WebCore/platform/KeyboardCodes.h
@@ -33,7 +33,7 @@
// FIXME: We should get rid of these Chromium-related ifdefs.
#if PLATFORM(CHROMIUM)
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "KeyboardCodesWin.h"
#else
#include "KeyboardCodesPosix.h"
@@ -43,7 +43,7 @@
namespace WebCore {
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_LBUTTON (01) Left mouse button
// VK_RBUTTON (02) Right mouse button
// VK_CANCEL (03) Control-break processing
@@ -160,7 +160,7 @@
// VK_HELP (2F) HELP key
const int VK_HELP = 0x2F;
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
// (30) 0 key
const int VK_0 = 0x30;
@@ -271,7 +271,7 @@
// (5A) Z key
const int VK_Z = 0x5A;
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
const int VK_LWIN = 0x5B;
@@ -483,9 +483,9 @@
// VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
const int VK_MEDIA_LAUNCH_APP2 = 0xB7;
-#endif // !PLATFORM(WIN_OS)
+#endif // !OS(WINDOWS)
-#if !PLATFORM(WIN_OS) || PLATFORM(WINCE)
+#if !OS(WINDOWS) || OS(WINCE)
// VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
const int VK_OEM_1 = 0xBA;
@@ -523,9 +523,9 @@
// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
const int VK_OEM_8 = 0xDF;
-#endif // !PLATFORM(WIN_OS) || PLATFORM(WINCE)
+#endif // !OS(WINDOWS) || OS(WINCE)
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
const int VK_OEM_102 = 0xE2;
@@ -565,7 +565,7 @@
const int VK_UNKNOWN = 0;
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
}
diff --git a/WebCore/platform/PurgeableBuffer.h b/WebCore/platform/PurgeableBuffer.h
index c487eb9..94e58da 100644
--- a/WebCore/platform/PurgeableBuffer.h
+++ b/WebCore/platform/PurgeableBuffer.h
@@ -62,7 +62,7 @@
mutable State m_state;
};
-#if !PLATFORM(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) || PLATFORM(GTK)
+#if !OS(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) || PLATFORM(GTK)
inline PurgeableBuffer* PurgeableBuffer::create(const char*, size_t) { return 0; }
inline PurgeableBuffer::~PurgeableBuffer() { }
inline const char* PurgeableBuffer::data() const { return 0; }
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index d30b9a8..92b4c13 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -43,7 +43,7 @@
typedef struct _NPP NPP_t;
typedef NPP_t* NPP;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
typedef struct HFONT__* HFONT;
#endif
@@ -106,10 +106,10 @@
static KURL filePathToURL(const String&);
// Font ---------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static bool ensureFontLoaded(HFONT font);
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
static String getFontFamilyForCharacters(const UChar*, size_t numCharacters);
#endif
@@ -188,7 +188,7 @@
static double currentTime();
// Theming ------------------------------------------------------------
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
static void paintButton(
GraphicsContext*, int part, int state, int classicState, const IntRect&);
static void paintMenuList(
diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp
index 6c1e050..32f7d50 100644
--- a/WebCore/platform/chromium/ClipboardChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardChromium.cpp
@@ -363,13 +363,13 @@
m_dataObject->textHtml = createMarkup(selectedRange, 0,
AnnotateForInterchange);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
m_dataObject->textHtml = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + m_dataObject->textHtml;
#endif
m_dataObject->htmlBaseUrl = frame->document()->url();
String str = frame->selectedText();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(str);
#endif
replaceNBSPWithSpace(str);
diff --git a/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp b/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
index 7efcb3c..5d9ed05 100644
--- a/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardUtilitiesChromium.cpp
@@ -36,7 +36,7 @@
namespace WebCore {
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void replaceNewlinesWithWindowsStyleNewlines(String& str)
{
static const UChar Newline = '\n';
diff --git a/WebCore/platform/chromium/ClipboardUtilitiesChromium.h b/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
index c597089..23fd29c 100644
--- a/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
+++ b/WebCore/platform/chromium/ClipboardUtilitiesChromium.h
@@ -33,7 +33,7 @@
class KURL;
class String;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void replaceNewlinesWithWindowsStyleNewlines(String&);
#endif
void replaceNBSPWithSpace(String&);
diff --git a/WebCore/platform/chromium/PasteboardChromium.cpp b/WebCore/platform/chromium/PasteboardChromium.cpp
index ce06e55..9213718 100644
--- a/WebCore/platform/chromium/PasteboardChromium.cpp
+++ b/WebCore/platform/chromium/PasteboardChromium.cpp
@@ -82,13 +82,13 @@
void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
{
String html = createMarkup(selectedRange, 0, AnnotateForInterchange);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
html = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + html;
#endif
ExceptionCode ec = 0;
KURL url = selectedRange->startContainer(ec)->document()->url();
String plainText = frame->selectedText();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
replaceNewlinesWithWindowsStyleNewlines(plainText);
#endif
replaceNBSPWithSpace(plainText);
@@ -98,7 +98,7 @@
void Pasteboard::writePlainText(const String& text)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
String plainText(text);
replaceNewlinesWithWindowsStyleNewlines(plainText);
ChromiumBridge::clipboardWritePlainText(plainText);
@@ -170,7 +170,7 @@
String markup;
KURL srcURL;
ChromiumBridge::clipboardReadHTML(buffer, &markup, &srcURL);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
DEFINE_STATIC_LOCAL(const String, forceUtf8String, ("<meta charset='utf-8' id='webkit-interchange-charset'>"));
if (markup.startsWith(forceUtf8String))
markup = markup.substring(forceUtf8String.length());
diff --git a/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp b/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
index ae55afe..74643f7 100644
--- a/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
+++ b/WebCore/platform/chromium/PlatformKeyboardEventChromium.cpp
@@ -27,9 +27,9 @@
#include "config.h"
#include "PlatformKeyboardEvent.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <windows.h>
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
#import <Carbon/Carbon.h>
#else
#include "NotImplemented.h"
@@ -39,7 +39,7 @@
void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// No KeyDown events on Windows to disambiguate.
ASSERT_NOT_REACHED();
#else
@@ -56,7 +56,7 @@
} else {
m_keyIdentifier = String();
m_windowsVirtualKeyCode = 0;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
if (m_text.length() == 1 && (m_text[0U] >= 0xF700 && m_text[0U] <= 0xF7FF)) {
// According to NSEvents.h, OpenStep reserves the range 0xF700-0xF8FF for function keys. However, some actual private use characters
// happen to be in this range, e.g. the Apple logo (Option+Shift+K).
@@ -71,10 +71,10 @@
bool PlatformKeyboardEvent::currentCapsLockState()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// FIXME: Does this even work inside the sandbox?
return GetKeyState(VK_CAPITAL) & 1;
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
return GetCurrentKeyModifiers() & alphaLock;
#else
notImplemented();
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 7298b27..b1f8f3b 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -1135,7 +1135,7 @@
// Calculate scroll bar width.
int windowHeight = 0;
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
// Set the popup's window to contain all available items on Mac only, which
// uses native controls that manage their own scrolling. This allows hit
// testing to work when selecting items in popups that have more menu entries
@@ -1147,7 +1147,7 @@
for (int i = 0; i < m_visibleRows; ++i) {
int rowHeight = getRowHeight(i);
-#if !PLATFORM(DARWIN)
+#if !OS(DARWIN)
// Only clip the window height for non-Mac platforms.
if (windowHeight + rowHeight > kMaxHeight) {
m_visibleRows = i;
@@ -1225,7 +1225,7 @@
{
if (!p.popup)
p.popup = PopupContainer::create(client(), dropDownSettings);
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
p.popup->showExternal(r, v, index);
#else
p.popup->show(r, v, index);
diff --git a/WebCore/platform/graphics/BitmapImage.h b/WebCore/platform/graphics/BitmapImage.h
index 614ebaf..a743672 100644
--- a/WebCore/platform/graphics/BitmapImage.h
+++ b/WebCore/platform/graphics/BitmapImage.h
@@ -140,7 +140,7 @@
virtual CGImageRef getCGImageRef();
#endif
-#if PLATFORM(WIN) || (PLATFORM(QT) && PLATFORM(WIN_OS))
+#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS))
static PassRefPtr<BitmapImage> create(HBITMAP);
#endif
#if PLATFORM(WIN)
@@ -169,7 +169,7 @@
#endif
virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
-#if PLATFORM(WX) || (PLATFORM(WINCE) && !PLATFORM(QT))
+#if PLATFORM(WX) || (OS(WINCE) && !PLATFORM(QT))
virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
#endif
@@ -236,7 +236,7 @@
checkForSolidColor();
// WINCE PORT: checkForSolidColor() doesn't set m_checkedForSolidColor until
// it gets enough information to make final decision.
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
ASSERT(m_checkedForSolidColor);
#endif
}
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 45a1e83..6b037ff 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -36,7 +36,7 @@
typedef struct CGPoint CGPoint;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGPoint NSPoint;
#else
@@ -85,7 +85,7 @@
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
FloatPoint(const NSPoint&);
operator NSPoint() const;
#endif
diff --git a/WebCore/platform/graphics/FloatRect.h b/WebCore/platform/graphics/FloatRect.h
index 2dc854d..b4772c7 100644
--- a/WebCore/platform/graphics/FloatRect.h
+++ b/WebCore/platform/graphics/FloatRect.h
@@ -33,7 +33,7 @@
typedef struct CGRect CGRect;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
#else
@@ -129,7 +129,7 @@
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
FloatRect(const NSRect&);
operator NSRect() const;
#endif
diff --git a/WebCore/platform/graphics/FloatSize.h b/WebCore/platform/graphics/FloatSize.h
index 5a84fd1..1bc3423 100644
--- a/WebCore/platform/graphics/FloatSize.h
+++ b/WebCore/platform/graphics/FloatSize.h
@@ -34,7 +34,7 @@
typedef struct CGSize CGSize;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGSize NSSize;
#else
@@ -80,7 +80,7 @@
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
explicit FloatSize(const NSSize &); // don't do this implicitly since it's lossy
operator NSSize() const;
#endif
diff --git a/WebCore/platform/graphics/FontCache.cpp b/WebCore/platform/graphics/FontCache.cpp
index bb83319..2aa68f1 100644
--- a/WebCore/platform/graphics/FontCache.cpp
+++ b/WebCore/platform/graphics/FontCache.cpp
@@ -139,7 +139,7 @@
DEFINE_STATIC_LOCAL(AtomicString, courierNew, ("Courier New"));
if (equalIgnoringCase(familyName, courier))
return courierNew;
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// On Windows, Courier New (truetype font) is always present and
// Courier is a bitmap font. So, we don't want to map Courier New to
// Courier.
@@ -163,7 +163,7 @@
if (equalIgnoringCase(familyName, helvetica))
return arial;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// On Windows, bitmap fonts are blocked altogether so that we have to
// alias MS Sans Serif (bitmap font) -> Microsoft Sans Serif (truetype font)
DEFINE_STATIC_LOCAL(AtomicString, msSans, ("MS Sans Serif"));
diff --git a/WebCore/platform/graphics/FontCache.h b/WebCore/platform/graphics/FontCache.h
index 4a6222b..9b41e38 100644
--- a/WebCore/platform/graphics/FontCache.h
+++ b/WebCore/platform/graphics/FontCache.h
@@ -64,7 +64,7 @@
// Also implemented by the platform.
void platformInit();
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
#if defined(IMLANG_FONT_LINK) && (IMLANG_FONT_LINK == 2)
IMLangFontLink2* getFontLinkInterface();
#else
diff --git a/WebCore/platform/graphics/FontFastPath.cpp b/WebCore/platform/graphics/FontFastPath.cpp
index dd945e5..0c9046c 100644
--- a/WebCore/platform/graphics/FontFastPath.cpp
+++ b/WebCore/platform/graphics/FontFastPath.cpp
@@ -151,7 +151,7 @@
GlyphData data = fallbackPage && fallbackPage->fontDataForCharacter(c) ? fallbackPage->glyphDataForCharacter(c) : characterFontData->missingGlyphData();
// Cache it so we don't have to do system fallback again next time.
if (!useSmallCapsFont) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// missingGlyphData returns a null character, which is not suitable for GDI to display.
// Also, sometimes we cannot map a font for the character on WINCE, but GDI can still
// display the character, probably because the font package is not installed correctly.
@@ -169,7 +169,7 @@
// FIXME: It would be nicer to use the missing glyph from the last resort font instead.
GlyphData data = primaryFont()->missingGlyphData();
if (!useSmallCapsFont) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// See comment about WINCE GDI handling near setGlyphDataForCharacter above.
page->setGlyphDataForCharacter(c, c, data.fontData);
return page->glyphDataForCharacter(c);
diff --git a/WebCore/platform/graphics/GlyphBuffer.h b/WebCore/platform/graphics/GlyphBuffer.h
index 04491a7..edb804c 100644
--- a/WebCore/platform/graphics/GlyphBuffer.h
+++ b/WebCore/platform/graphics/GlyphBuffer.h
@@ -50,7 +50,7 @@
#if PLATFORM(CAIRO)
// FIXME: Why does Cairo use such a huge struct instead of just an offset into an array?
typedef cairo_glyph_t GlyphBufferGlyph;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef wchar_t GlyphBufferGlyph;
#else
typedef Glyph GlyphBufferGlyph;
@@ -60,7 +60,7 @@
// can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm
#if PLATFORM(CG)
typedef CGSize GlyphBufferAdvance;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
// There is no cross-platform code that uses the height of GlyphBufferAdvance,
// so we can save memory space on embedded devices by storing only the width
typedef float GlyphBufferAdvance;
@@ -124,7 +124,7 @@
{
#if PLATFORM(CG)
return m_advances[index].width;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
return m_advances[index];
#else
return m_advances[index].width();
@@ -156,7 +156,7 @@
#if PLATFORM(CG)
CGSize advance = { width, 0 };
m_advances.append(advance);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
m_advances.append(width);
#else
m_advances.append(FloatSize(width, 0));
@@ -172,7 +172,7 @@
#endif
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance)
{
m_fontData.append(font);
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 0e39e73..821b412 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -74,7 +74,7 @@
void getColor(float value, float* r, float* g, float* b, float* a) const;
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
const FloatPoint& p0() const { return m_p0; }
const FloatPoint& p1() const { return m_p1; }
float r0() const { return m_r0; }
diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp
index d89bd28..652c1cb 100644
--- a/WebCore/platform/graphics/GraphicsContext.cpp
+++ b/WebCore/platform/graphics/GraphicsContext.cpp
@@ -328,7 +328,7 @@
drawImage(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
}
-#if !PLATFORM(WINCE) || PLATFORM(QT)
+#if !OS(WINCE) || PLATFORM(QT)
void GraphicsContext::drawText(const Font& font, const TextRun& run, const IntPoint& point, int from, int to)
{
if (paintingDisabled())
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 8fdcaf7..88e41e6 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -71,7 +71,7 @@
class BView;
typedef BView PlatformGraphicsContext;
struct pattern;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef struct HDC__ PlatformGraphicsContext;
#else
typedef void PlatformGraphicsContext;
@@ -96,7 +96,7 @@
namespace WebCore {
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
class SharedBitmap;
class SimpleFontData;
class GlyphBuffer;
@@ -144,7 +144,7 @@
GraphicsContext(PlatformGraphicsContext*);
~GraphicsContext();
-#if !PLATFORM(WINCE) || PLATFORM(QT)
+#if !OS(WINCE) || PLATFORM(QT)
PlatformGraphicsContext* platformContext() const;
#endif
@@ -299,7 +299,7 @@
void concatCTM(const TransformationMatrix&);
TransformationMatrix getCTM() const;
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
void setBitmap(PassRefPtr<SharedBitmap>);
const TransformationMatrix& affineTransform() const;
TransformationMatrix& affineTransform();
@@ -357,7 +357,7 @@
void drawWindowsBitmap(WindowsBitmap*, const IntPoint&);
#endif
-#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && PLATFORM(WIN_OS))
+#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && OS(WINDOWS))
HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
bool shouldIncludeChildWindows() const { return false; }
diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h
index aad8dd4..94629b2 100644
--- a/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/WebCore/platform/graphics/GraphicsContext3D.h
@@ -33,7 +33,7 @@
#include <wtf/PassOwnPtr.h>
// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
-#if PLATFORM(CHROMIUM) && PLATFORM(WIN_OS)
+#if PLATFORM(CHROMIUM) && OS(WINDOWS)
#undef NO_ERROR
#endif
diff --git a/WebCore/platform/graphics/ImageSource.h b/WebCore/platform/graphics/ImageSource.h
index 3559abe..258fd0f 100644
--- a/WebCore/platform/graphics/ImageSource.h
+++ b/WebCore/platform/graphics/ImageSource.h
@@ -49,7 +49,7 @@
class NativeImageSkia;
#elif PLATFORM(HAIKU)
class BBitmap;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
#include "SharedBitmap.h"
#endif
@@ -81,7 +81,7 @@
typedef NativeImageSkia* NativeImagePtr;
#elif PLATFORM(HAIKU)
typedef BBitmap* NativeImagePtr;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef RefPtr<SharedBitmap> NativeImagePtr;
#endif
#endif
diff --git a/WebCore/platform/graphics/IntRect.h b/WebCore/platform/graphics/IntRect.h
index 34f7fd8..e3633df 100644
--- a/WebCore/platform/graphics/IntRect.h
+++ b/WebCore/platform/graphics/IntRect.h
@@ -34,7 +34,7 @@
typedef struct CGRect CGRect;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
#else
@@ -163,7 +163,7 @@
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
operator NSRect() const;
#endif
@@ -203,7 +203,7 @@
#endif
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+ || (PLATFORM(CHROMIUM) && OS(DARWIN))
IntRect enclosingIntRect(const NSRect&);
#endif
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 78d7663..b37351d 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -39,7 +39,7 @@
#if PLATFORM(MAC)
#include "MediaPlayerPrivateQTKit.h"
-#elif PLATFORM(WINCE) && !PLATFORM(QT)
+#elif OS(WINCE) && !PLATFORM(QT)
#include "MediaPlayerPrivateWince.h"
#elif PLATFORM(WIN)
#include "MediaPlayerPrivateQuickTimeWin.h"
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index 6618fb7..bf4cd9d 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -53,7 +53,7 @@
#elif PLATFORM(HAIKU)
class BRegion;
typedef BRegion PlatformPath;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
namespace WebCore {
class PlatformPath;
}
diff --git a/WebCore/platform/graphics/Pattern.h b/WebCore/platform/graphics/Pattern.h
index aa0a357..f7f612a 100644
--- a/WebCore/platform/graphics/Pattern.h
+++ b/WebCore/platform/graphics/Pattern.h
@@ -56,7 +56,7 @@
#elif PLATFORM(HAIKU)
#include <interface/GraphicsDefs.h>
typedef pattern* PlatformPatternPtr;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
typedef void* PlatformPatternPtr;
#endif
diff --git a/WebCore/platform/graphics/SimpleFontData.h b/WebCore/platform/graphics/SimpleFontData.h
index 7d78756..1a388be 100644
--- a/WebCore/platform/graphics/SimpleFontData.h
+++ b/WebCore/platform/graphics/SimpleFontData.h
@@ -35,7 +35,7 @@
typedef struct OpaqueATSUStyle* ATSUStyle;
#endif
-#if PLATFORM(WIN) && !PLATFORM(WINCE)
+#if PLATFORM(WIN) && !OS(WINCE)
#include <usp10.h>
#endif
@@ -115,7 +115,7 @@
virtual String description() const;
#endif
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
NSFont* getNSFont() const { return m_platformData.font(); }
#endif
@@ -140,7 +140,7 @@
#if PLATFORM(WIN)
bool isSystemFont() const { return m_isSystemFont; }
-#if !PLATFORM(WINCE) // disable unused members to save space
+#if !OS(WINCE) // disable unused members to save space
SCRIPT_FONTPROPERTIES* scriptFontProperties() const;
SCRIPT_CACHE* scriptCache() const { return &m_scriptCache; }
#endif
@@ -162,7 +162,7 @@
void commonInit();
-#if PLATFORM(WIN) && !PLATFORM(WINCE)
+#if PLATFORM(WIN) && !OS(WINCE)
void initGDIFont();
void platformCommonDestroy();
float widthForGDIGlyph(Glyph glyph) const;
@@ -227,7 +227,7 @@
#if PLATFORM(WIN)
bool m_isSystemFont;
-#if !PLATFORM(WINCE) // disable unused members to save space
+#if !OS(WINCE) // disable unused members to save space
mutable SCRIPT_CACHE m_scriptCache;
mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties;
#endif
diff --git a/WebCore/platform/graphics/cg/ColorCG.cpp b/WebCore/platform/graphics/cg/ColorCG.cpp
index 40aacc5..e514fa3 100644
--- a/WebCore/platform/graphics/cg/ColorCG.cpp
+++ b/WebCore/platform/graphics/cg/ColorCG.cpp
@@ -68,7 +68,7 @@
m_color = makeRGBA(r * 255, g * 255, b * 255, a * 255);
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
CGColorRef createCGColor(const Color& c)
{
@@ -89,7 +89,7 @@
return color;
}
-#endif // PLATFORM(WIN_OS)
+#endif // OS(WINDOWS)
}
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 39f06a6..19bc2c2 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -43,7 +43,7 @@
#include <wtf/OwnArrayPtr.h>
#include <wtf/RetainPtr.h>
-#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
+#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
// Building on 10.6 or later: kCGInterpolationMedium is defined in the CGInterpolationQuality enum.
diff --git a/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp b/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
index a902057..6432e17 100644
--- a/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
@@ -32,11 +32,11 @@
#include "config.h"
#include "FontCustomPlatformData.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "Base64.h"
#include "ChromiumBridge.h"
#include "OpenTypeUtilities.h"
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include "SkStream.h"
#endif
@@ -45,9 +45,9 @@
#include "OpenTypeSanitizer.h"
#include "SharedBuffer.h"
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include <objbase.h>
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include <cstring>
#endif
@@ -55,10 +55,10 @@
FontCustomPlatformData::~FontCustomPlatformData()
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
if (m_fontReference)
RemoveFontMemResourceEx(m_fontReference);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
if (m_fontReference)
m_fontReference->unref();
#endif
@@ -66,7 +66,7 @@
FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode mode)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
ASSERT(m_fontReference);
LOGFONT logFont;
@@ -99,7 +99,7 @@
HFONT hfont = CreateFontIndirect(&logFont);
return FontPlatformData(hfont, size);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
ASSERT(m_fontReference);
return FontPlatformData(m_fontReference, size, bold && !m_fontReference->isBold(), italic && !m_fontReference->isItalic());
#else
@@ -108,7 +108,7 @@
#endif
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Creates a unique and unpredictable font name, in order to avoid collisions and to
// not allow access from CSS.
static String createUniqueFontName()
@@ -123,7 +123,7 @@
}
#endif
-#if PLATFORM(LINUX)
+#if OS(LINUX)
class RemoteFontStream : public SkStream {
public:
explicit RemoteFontStream(PassRefPtr<SharedBuffer> buffer)
@@ -180,7 +180,7 @@
buffer = transcodeBuffer.get();
#endif
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// Introduce the font to GDI. AddFontMemResourceEx should be used with care, because it will pollute the process's
// font namespace (Windows has no API for creating an HFONT from data without exposing the font to the
// entire process first).
@@ -189,7 +189,7 @@
if (!fontReference)
return 0;
return new FontCustomPlatformData(fontReference, fontName);
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
RemoteFontStream* stream = new RemoteFontStream(buffer);
SkTypeface* typeface = SkTypeface::CreateFromStream(stream);
if (!typeface)
diff --git a/WebCore/platform/graphics/chromium/FontCustomPlatformData.h b/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
index a42f1ec..e1fbd48 100644
--- a/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/chromium/FontCustomPlatformData.h
@@ -35,10 +35,10 @@
#include "FontRenderingMode.h"
#include <wtf/Noncopyable.h>
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "PlatformString.h"
#include <windows.h>
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
#include "SkTypeface.h"
#endif
@@ -48,12 +48,12 @@
class SharedBuffer;
struct FontCustomPlatformData : Noncopyable {
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
FontCustomPlatformData(HANDLE fontReference, const String& name)
: m_fontReference(fontReference)
, m_name(name)
{}
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
explicit FontCustomPlatformData(SkTypeface* typeface)
: m_fontReference(typeface)
{}
@@ -64,10 +64,10 @@
FontPlatformData fontPlatformData(int size, bool bold, bool italic,
FontRenderingMode = NormalRenderingMode);
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
HANDLE m_fontReference;
String m_name;
-#elif PLATFORM(LINUX)
+#elif OS(LINUX)
SkTypeface* m_fontReference;
#endif
};
diff --git a/WebCore/platform/graphics/chromium/FontPlatformData.h b/WebCore/platform/graphics/chromium/FontPlatformData.h
index c6f1912..871fec8 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformData.h
+++ b/WebCore/platform/graphics/chromium/FontPlatformData.h
@@ -31,9 +31,9 @@
#ifndef FontPlatformData_h
#define FontPlatformData_h
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
#include "FontPlatformDataChromiumWin.h"
-#elif defined(__linux__)
+#elif OS(LINUX)
#include "FontPlatformDataLinux.h"
#endif
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
index 3a60160..12ae09d 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
@@ -401,7 +401,7 @@
return nameTableSize;
}
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// AddFontMemResourceEx does not exist on WinCE, so we must handle the font data manually
// This function just renames the font and overwrites the old font data with the new
bool renameFont(SharedBuffer* fontData, const String& fontName)
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.h b/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
index 4c75314..0ef1b2b 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.h
@@ -36,7 +36,7 @@
struct EOTPrefix;
class SharedBuffer;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
typedef unsigned __int8 UInt8;
#endif
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 49d7a27..ae31d4c 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -1292,7 +1292,7 @@
memset(bmpInfo.bmBits, 0, bufferSize);
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
// Make sure we can do world transforms.
SetGraphicsMode(bitmapDC, GM_ADVANCED);
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index 9a82911..fea1448 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -213,7 +213,7 @@
m_solidColor = QColor::fromRgba(framePixmap->toImage().pixel(0, 0));
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
PassRefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
{
return BitmapImage::create(new QPixmap(QPixmap::fromWinHBITMAP(hBitmap)));
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index 877da89..81fad7b 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -431,7 +431,7 @@
if (paintingDisabled())
return;
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
platformContext()->beginLayerClippedToImage(rect, imageBuffer);
#endif
}
diff --git a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index c36f1ce..4ea3d7a 100644
--- a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -66,7 +66,7 @@
m_data.m_platformContext.setCanvas(&m_data.m_canvas);
m_context.set(new GraphicsContext(&m_data.m_platformContext));
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
m_context->platformContext()->setDrawingToImageBuffer(true);
#endif
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 4900dfb..92a1870 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -89,7 +89,7 @@
// color to produce a new output color.
SkColor applyAlpha(SkColor) const;
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// If non-empty, the current State is clipped to this image.
SkBitmap m_imageBufferClip;
// If m_imageBufferClip is non-empty, this is the region the image is clipped to.
@@ -143,7 +143,7 @@
, m_lineJoin(other.m_lineJoin)
, m_dash(other.m_dash)
, m_textDrawingMode(other.m_textDrawingMode)
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
, m_imageBufferClip(other.m_imageBufferClip)
, m_clip(other.m_clip)
#endif
@@ -180,7 +180,7 @@
// Danger: canvas can be NULL.
PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
: m_canvas(canvas)
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
, m_drawingToImageBuffer(false)
#endif
{
@@ -197,7 +197,7 @@
m_canvas = canvas;
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
void PlatformContextSkia::setDrawingToImageBuffer(bool value)
{
m_drawingToImageBuffer = value;
@@ -214,7 +214,7 @@
m_stateStack.append(*m_state);
m_state = &m_stateStack.last();
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// The clip image only needs to be applied once. Reset the image so that we
// don't attempt to clip multiple times.
m_state->m_imageBufferClip.reset();
@@ -224,7 +224,7 @@
canvas()->save();
}
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void PlatformContextSkia::beginLayerClippedToImage(const WebCore::FloatRect& rect,
const WebCore::ImageBuffer* imageBuffer)
{
@@ -272,7 +272,7 @@
void PlatformContextSkia::restore()
{
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
if (!m_state->m_imageBufferClip.empty()) {
applyClipFromImage(m_state->m_clip, m_state->m_imageBufferClip);
canvas()->restore();
@@ -575,7 +575,7 @@
return m_canvas->getTopPlatformDevice().IsVectorial();
}
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void PlatformContextSkia::applyClipFromImage(const WebCore::FloatRect& rect, const SkBitmap& imageBuffer)
{
// NOTE: this assumes the image mask contains opaque black for the portions that are to be shown, as such we
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index 53590bf..e445262 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -71,7 +71,7 @@
// to the constructor.
void setCanvas(skia::PlatformCanvas*);
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
// If false we're rendering to a GraphicsContext for a web page, if false
// we're not (as is the case when rendering to a canvas object).
// If this is true the contents have not been marked up with the magic
@@ -88,7 +88,7 @@
// |rect|. This layer is implicitly restored when the next restore is
// invoked.
// NOTE: |imageBuffer| may be deleted before the |restore| is invoked.
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
void beginLayerClippedToImage(const WebCore::FloatRect&,
const WebCore::ImageBuffer*);
#endif
@@ -168,7 +168,7 @@
bool isPrinting();
private:
-#if defined(__linux__) || PLATFORM(WIN_OS)
+#if OS(LINUX) || OS(WINDOWS)
// Used when restoring and the state has an image clip. Only shows the pixels in
// m_canvas that are also in imageBuffer.
void applyClipFromImage(const WebCore::FloatRect&, const SkBitmap&);
@@ -191,7 +191,7 @@
// Current path in global coordinates.
SkPath m_path;
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
bool m_drawingToImageBuffer;
#endif
};
diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp
index d71ca00..56b46de 100644
--- a/WebCore/platform/graphics/win/IconWin.cpp
+++ b/WebCore/platform/graphics/win/IconWin.cpp
@@ -27,7 +27,7 @@
#include <tchar.h>
#include <windows.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// SHGFI_SHELLICONSIZE is not available on WINCE
#define SHGFI_SHELLICONSIZE 0
#endif
@@ -63,7 +63,7 @@
return adoptRef(new Icon(sfi.hIcon));
}
-#if PLATFORM(WINCE)
+#if OS(WINCE)
return 0;
#else
TCHAR buffer[MAX_PATH];
@@ -86,7 +86,7 @@
if (context->paintingDisabled())
return;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
context->drawIcon(m_hIcon, r, DI_NORMAL);
#else
HDC hdc = context->getWindowsContext(r);
diff --git a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index 6e67e68..f5dfe00 100644
--- a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -566,7 +566,7 @@
notImplemented();
}
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
{
if (dstRect.isEmpty())
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index fcdc863..b8bbd60 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -42,7 +42,7 @@
if (!filename)
return String();
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return String::fromUTF8(filename);
#else
gchar* escapedString = g_uri_escape_string(filename, "/:", false);
@@ -54,7 +54,7 @@
char* filenameFromString(const String& string)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return g_strdup(string.utf8().data());
#else
return g_uri_unescape_string(string.utf8().data(), 0);
@@ -64,7 +64,7 @@
// Converts a string to something suitable to be displayed to the user.
String filenameForDisplay(const String& string)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return string;
#else
gchar* filename = filenameFromString(string);
diff --git a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index 9ae03fc..9691c38 100644
--- a/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -41,7 +41,7 @@
#include "JPEGImageDecoder.h"
#include <stdio.h> // Needed by jpeglib.h for FILE.
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// Remove warning: 'FAR' macro redefinition
#undef FAR
diff --git a/WebCore/platform/network/curl/ResourceHandleManager.cpp b/WebCore/platform/network/curl/ResourceHandleManager.cpp
index 74edfef..bcae67f 100644
--- a/WebCore/platform/network/curl/ResourceHandleManager.cpp
+++ b/WebCore/platform/network/curl/ResourceHandleManager.cpp
@@ -49,7 +49,7 @@
#include <wtf/Threading.h>
#include <wtf/Vector.h>
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
#include <sys/param.h>
#define MAX_PATH MAXPATHLEN
#endif
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index 5a229b8..da16f4a 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -876,7 +876,7 @@
url.setQuery(String());
url.removePort();
-#if !PLATFORM(WIN_OS)
+#if !OS(WINDOWS)
// we avoid the escaping for local files, because
// g_filename_from_uri (used internally by GFile) has problems
// decoding strings with arbitrary percent signs
diff --git a/WebCore/platform/text/String.cpp b/WebCore/platform/text/String.cpp
index 8342b0b..04b04ab 100644
--- a/WebCore/platform/text/String.cpp
+++ b/WebCore/platform/text/String.cpp
@@ -354,7 +354,7 @@
return buffer;
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
va_list args;
va_start(args, format);
@@ -446,7 +446,7 @@
String String::number(long long n)
{
-#if PLATFORM(WIN_OS) && !PLATFORM(QT)
+#if OS(WINDOWS) && !PLATFORM(QT)
return String::format("%I64i", n);
#else
return String::format("%lli", n);
@@ -455,7 +455,7 @@
String String::number(unsigned long long n)
{
-#if PLATFORM(WIN_OS) && !PLATFORM(QT)
+#if OS(WINDOWS) && !PLATFORM(QT)
return String::format("%I64u", n);
#else
return String::format("%llu", n);
diff --git a/WebCore/platform/text/TextEncoding.cpp b/WebCore/platform/text/TextEncoding.cpp
index ec9a8b0..4a30d62 100644
--- a/WebCore/platform/text/TextEncoding.cpp
+++ b/WebCore/platform/text/TextEncoding.cpp
@@ -129,7 +129,7 @@
UTF16Normalized.set(g_utf8_to_utf16(UTF8Normalized.get(), -1, 0, &UTF16Length, 0));
return newTextCodec(*this)->encode(UTF16Normalized.get(), UTF16Length, handling);
-#elif PLATFORM(WINCE)
+#elif OS(WINCE)
// normalization will be done by Windows CE API
OwnPtr<TextCodec> textCodec = newTextCodec(*this);
return textCodec.get() ? textCodec->encode(characters, length, handling) : CString();
diff --git a/WebCore/platform/text/TextEncodingRegistry.cpp b/WebCore/platform/text/TextEncodingRegistry.cpp
index a4be520..00ad2c9 100644
--- a/WebCore/platform/text/TextEncodingRegistry.cpp
+++ b/WebCore/platform/text/TextEncodingRegistry.cpp
@@ -51,7 +51,7 @@
#if USE(GLIB_UNICODE)
#include "gtk/TextCodecGtk.h"
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
#include "TextCodecWince.h"
#endif
@@ -230,7 +230,7 @@
TextCodecGtk::registerBaseCodecs(addToTextCodecMap);
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
TextCodecWince::registerBaseEncodingNames(addToTextEncodingNameMap);
TextCodecWince::registerBaseCodecs(addToTextCodecMap);
#endif
@@ -258,7 +258,7 @@
TextCodecGtk::registerExtendedCodecs(addToTextCodecMap);
#endif
-#if PLATFORM(WINCE) && !PLATFORM(QT)
+#if OS(WINCE) && !PLATFORM(QT)
TextCodecWince::registerExtendedEncodingNames(addToTextEncodingNameMap);
TextCodecWince::registerExtendedCodecs(addToTextCodecMap);
#endif
diff --git a/WebCore/platform/text/TextStream.cpp b/WebCore/platform/text/TextStream.cpp
index eb4bae7..57c1328 100644
--- a/WebCore/platform/text/TextStream.cpp
+++ b/WebCore/platform/text/TextStream.cpp
@@ -101,7 +101,7 @@
return String::adopt(m_text);
}
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
TextStream& TextStream::operator<<(__int64 i)
{
char buffer[printBufferSize];
diff --git a/WebCore/platform/text/TextStream.h b/WebCore/platform/text/TextStream.h
index 71034f3..b6bcea8 100644
--- a/WebCore/platform/text/TextStream.h
+++ b/WebCore/platform/text/TextStream.h
@@ -44,7 +44,7 @@
TextStream& operator<<(double);
TextStream& operator<<(const char*);
TextStream& operator<<(const String&);
-#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
TextStream& operator<<(unsigned __int64);
TextStream& operator<<(__int64);
#endif
diff --git a/WebCore/platform/text/qt/TextCodecQt.cpp b/WebCore/platform/text/qt/TextCodecQt.cpp
index b3f75cc..21e6e12 100644
--- a/WebCore/platform/text/qt/TextCodecQt.cpp
+++ b/WebCore/platform/text/qt/TextCodecQt.cpp
@@ -97,7 +97,7 @@
// We chop input buffer to smaller buffers to avoid excessive memory consumption
// when the input buffer is big. This helps reduce peak memory consumption in
// mobile devices where system RAM is limited.
-#if PLATFORM(SYMBIAN)
+#if OS(SYMBIAN)
static const int MaxInputChunkSize = 32 * 1024;
#else
static const int MaxInputChunkSize = 1024 * 1024;
diff --git a/WebCore/platform/win/PlatformMouseEventWin.cpp b/WebCore/platform/win/PlatformMouseEventWin.cpp
index dc4dd2f..8b542f9 100644
--- a/WebCore/platform/win/PlatformMouseEventWin.cpp
+++ b/WebCore/platform/win/PlatformMouseEventWin.cpp
@@ -65,7 +65,7 @@
case WM_MBUTTONUP:
return MouseEventReleased;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_MOUSELEAVE:
#endif
case WM_MOUSEMOVE:
@@ -108,7 +108,7 @@
m_button = MiddleButton;
break;
case WM_MOUSEMOVE:
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_MOUSELEAVE:
#endif
if (wParam & MK_LBUTTON)
diff --git a/WebCore/platform/win/PlatformScreenWin.cpp b/WebCore/platform/win/PlatformScreenWin.cpp
index 8a0d779..4af9e17 100644
--- a/WebCore/platform/win/PlatformScreenWin.cpp
+++ b/WebCore/platform/win/PlatformScreenWin.cpp
@@ -54,7 +54,7 @@
DEVMODE deviceInfo;
deviceInfo.dmSize = sizeof(DEVMODE);
deviceInfo.dmDriverExtra = 0;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &deviceInfo))
deviceInfo.dmBitsPerPel = 16;
#else
@@ -80,7 +80,7 @@
bool screenIsMonochrome(Widget* widget)
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
// EnumDisplaySettings doesn't set dmColor in DEVMODE.
return false;
#else
diff --git a/WebCore/platform/win/PopupMenuWin.cpp b/WebCore/platform/win/PopupMenuWin.cpp
index f3b0ba8..0a8e8e82c 100644
--- a/WebCore/platform/win/PopupMenuWin.cpp
+++ b/WebCore/platform/win/PopupMenuWin.cpp
@@ -42,7 +42,7 @@
#include <tchar.h>
#include <windows.h>
#include <windowsx.h>
-#if PLATFORM(WINCE)
+#if OS(WINCE)
#include <ResDefCE.h>
#define MAKEPOINTS(l) (*((POINTS FAR *)&(l)))
#endif
@@ -152,7 +152,7 @@
// Determine whether we should animate our popups
// Note: Must use 'BOOL' and 'FALSE' instead of 'bool' and 'false' to avoid stack corruption with SystemParametersInfo
BOOL shouldAnimate = FALSE;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
::SystemParametersInfo(SPI_GETCOMBOBOXANIMATION, 0, &shouldAnimate, 0);
if (shouldAnimate) {
@@ -579,7 +579,7 @@
}
}
if (!m_bmp) {
-#if PLATFORM(WINCE)
+#if OS(WINCE)
BitmapInfo bitmapInfo(true, clientRect().width(), clientRect().height());
#else
BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(clientRect().size());
@@ -714,7 +714,7 @@
if (haveRegisteredWindowClass)
return;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
WNDCLASS wcex;
#else
WNDCLASSEX wcex;
@@ -735,7 +735,7 @@
haveRegisteredWindowClass = true;
-#if PLATFORM(WINCE)
+#if OS(WINCE)
RegisterClass(&wcex);
#else
RegisterClassEx(&wcex);
@@ -745,7 +745,7 @@
LRESULT CALLBACK PopupMenu::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
-#if PLATFORM(WINCE)
+#if OS(WINCE)
LONG longPtr = GetWindowLong(hWnd, 0);
#else
LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0);
@@ -758,7 +758,7 @@
LPCREATESTRUCT createStruct = reinterpret_cast<LPCREATESTRUCT>(lParam);
// Associate the PopupMenu with the window.
-#if PLATFORM(WINCE)
+#if OS(WINCE)
::SetWindowLong(hWnd, 0, (LONG)createStruct->lpCreateParams);
#else
::SetWindowLongPtr(hWnd, 0, (LONG_PTR)createStruct->lpCreateParams);
@@ -892,7 +892,7 @@
}
BOOL shouldHotTrack = FALSE;
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
::SystemParametersInfo(SPI_GETHOTTRACKING, 0, &shouldHotTrack, 0);
#endif
@@ -989,7 +989,7 @@
lResult = 0;
break;
}
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
case WM_PRINTCLIENT:
paint(clientRect(), (HDC)wParam);
break;
diff --git a/WebCore/platform/win/SystemTimeWin.cpp b/WebCore/platform/win/SystemTimeWin.cpp
index 6ab4c27..8c25c32 100644
--- a/WebCore/platform/win/SystemTimeWin.cpp
+++ b/WebCore/platform/win/SystemTimeWin.cpp
@@ -37,7 +37,7 @@
float userIdleTime()
{
-#if !PLATFORM(WINCE)
+#if !OS(WINCE)
LASTINPUTINFO lastInputInfo = {0};
lastInputInfo.cbSize = sizeof(LASTINPUTINFO);
if (::GetLastInputInfo(&lastInputInfo))
diff --git a/WebCore/platform/wx/FileSystemWx.cpp b/WebCore/platform/wx/FileSystemWx.cpp
index 1ee87ae..50ac2ec 100644
--- a/WebCore/platform/wx/FileSystemWx.cpp
+++ b/WebCore/platform/wx/FileSystemWx.cpp
@@ -42,7 +42,7 @@
#include <wx/filefn.h>
#include <wx/filename.h>
-#if PLATFORM(DARWIN)
+#if OS(DARWIN)
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -127,9 +127,9 @@
bool unloadModule(PlatformModule mod)
{
-#if PLATFORM(WIN_OS)
+#if OS(WINDOWS)
return ::FreeLibrary(mod);
-#elif PLATFORM(DARWIN)
+#elif OS(DARWIN)
CFRelease(mod);
return true;
#else