diff options
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r-- | Source/WebCore/platform/FileSystem.h | 4 | ||||
-rw-r--r-- | Source/WebCore/platform/HashTools.h | 6 | ||||
-rw-r--r-- | Source/WebCore/platform/Length.h | 8 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp | 7 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/FileSystemQt.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/PasteboardQt.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQStyle.cpp | 8 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQStyle.h | 2 |
8 files changed, 21 insertions, 18 deletions
diff --git a/Source/WebCore/platform/FileSystem.h b/Source/WebCore/platform/FileSystem.h index 2c46e4da0..4ee276da4 100644 --- a/Source/WebCore/platform/FileSystem.h +++ b/Source/WebCore/platform/FileSystem.h @@ -49,7 +49,7 @@ #endif #endif -#if USE(CF) || (PLATFORM(QT) && defined(Q_OS_MAC)) +#if USE(CF) || (PLATFORM(QT) && defined(Q_OS_MACOS)) typedef struct __CFBundle* CFBundleRef; typedef const struct __CFData* CFDataRef; #endif @@ -75,7 +75,7 @@ typedef HMODULE PlatformModule; #elif PLATFORM(EFL) typedef Eina_Module* PlatformModule; #elif PLATFORM(QT) -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) typedef CFBundleRef PlatformModule; #elif !defined(QT_NO_LIBRARY) typedef QLibrary* PlatformModule; diff --git a/Source/WebCore/platform/HashTools.h b/Source/WebCore/platform/HashTools.h index 3badbdee1..a943eb49a 100644 --- a/Source/WebCore/platform/HashTools.h +++ b/Source/WebCore/platform/HashTools.h @@ -37,9 +37,9 @@ struct Value { int id; }; -const NamedColor* findColor(register const char* str, register unsigned int len); -const Property* findProperty(register const char* str, register unsigned int len); -const Value* findValue(register const char* str, register unsigned int len); +const NamedColor* findColor(const char* str, unsigned len); +const Property* findProperty(const char* str, unsigned len); +const Value* findValue(const char* str, unsigned len); } // namespace WebCore diff --git a/Source/WebCore/platform/Length.h b/Source/WebCore/platform/Length.h index 75ccf775e..b5697ce13 100644 --- a/Source/WebCore/platform/Length.h +++ b/Source/WebCore/platform/Length.h @@ -170,12 +170,12 @@ inline Length::Length(const Length& other) if (other.isCalculated()) other.ref(); - memcpy(this, &other, sizeof(Length)); + memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length)); } inline Length::Length(Length&& other) { - memcpy(this, &other, sizeof(Length)); + memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length)); other.m_type = Auto; } @@ -189,7 +189,7 @@ inline Length& Length::operator=(const Length& other) if (isCalculated()) deref(); - memcpy(this, &other, sizeof(Length)); + memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length)); return *this; } @@ -201,7 +201,7 @@ inline Length& Length::operator=(Length&& other) if (isCalculated()) deref(); - memcpy(this, &other, sizeof(Length)); + memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length)); other.m_type = Auto; return *this; } diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp index 1b60c5131..631adf37d 100644 --- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp +++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp @@ -488,12 +488,15 @@ QNetworkReply* QNetworkReplyHandler::release() static bool shouldIgnoreHttpError(QNetworkReply* reply, bool receivedData) { + int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + // Don't ignore error if we haven't received HTTP status code + if (httpStatusCode == 0) + return false; + // An HEAD XmlHTTPRequest shouldn't be marked as failure for HTTP errors. if (reply->operation() == QNetworkAccessManager::HeadOperation) return true; - int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); - if (httpStatusCode == 401 || httpStatusCode == 407) return true; diff --git a/Source/WebCore/platform/qt/FileSystemQt.cpp b/Source/WebCore/platform/qt/FileSystemQt.cpp index 167ff8354..7f62d0e1f 100644 --- a/Source/WebCore/platform/qt/FileSystemQt.cpp +++ b/Source/WebCore/platform/qt/FileSystemQt.cpp @@ -257,7 +257,7 @@ int writeToFile(PlatformFileHandle handle, const char* data, int length) bool unloadModule(PlatformModule module) { -#if defined(Q_OS_MAC) +#if defined(Q_OS_MACOS) CFRelease(module); return true; diff --git a/Source/WebCore/platform/qt/PasteboardQt.cpp b/Source/WebCore/platform/qt/PasteboardQt.cpp index 2bc766782..2b4a2220c 100644 --- a/Source/WebCore/platform/qt/PasteboardQt.cpp +++ b/Source/WebCore/platform/qt/PasteboardQt.cpp @@ -131,7 +131,7 @@ void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete, m_writableData->setText(text); QString markup = createMarkup(selectedRange, 0, AnnotateForInterchange, false, ResolveNonLocalURLs); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS markup.prepend(QLatin1String("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>")); markup.append(QLatin1String("</body></html>")); m_writableData->setData(QLatin1String("text/html"), markup.toUtf8()); diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp index 706570399..8c6bbba03 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp @@ -130,7 +130,7 @@ RenderThemeQStyle::RenderThemeQStyle(Page* page) { int buttonPixelSize = 0; m_qStyle->getButtonMetrics(&m_buttonFontFamily, &buttonPixelSize); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS m_buttonFontPixelSize = buttonPixelSize; #endif } @@ -288,7 +288,7 @@ void RenderThemeQStyle::adjustButtonStyle(StyleResolver& styleResolver, RenderSt // Ditch the border. style.resetBorder(); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS if (style.appearance() == PushButtonPart) { // The Mac ports ignore the specified height for <input type="button"> elements // unless a border and/or background CSS property is also specified. @@ -299,7 +299,7 @@ void RenderThemeQStyle::adjustButtonStyle(StyleResolver& styleResolver, RenderSt FontCascadeDescription fontDescription = style.fontDescription(); fontDescription.setIsAbsoluteSize(true); -#ifdef Q_OS_MAC // Use fixed font size and family on Mac (like Safari does) +#ifdef Q_OS_MACOS // Use fixed font size and family on Mac (like Safari does) fontDescription.setSpecifiedSize(m_buttonFontPixelSize); fontDescription.setComputedSize(m_buttonFontPixelSize); #else @@ -601,7 +601,7 @@ ControlPart RenderThemeQStyle::initializeCommonQStyleOptions(QStyleFacadeOption option.state &= ~(QStyleFacade::State_HasFocus | QStyleFacade::State_MouseOver); option.state |= QStyleFacade::State_Enabled; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS // to render controls in correct positions we also should set the State_Active flag option.state |= QStyleFacade::State_Active; #endif diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h index 665eee005..463404b7d 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.h +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h @@ -110,7 +110,7 @@ private: QRect indicatorRect(QStyleFacade::ButtonType part, const QRect& originalRect) const; -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS int m_buttonFontPixelSize; #endif |