diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
commit | 815f1ed417bd26fbe2abbdf20ac5d3423b30796c (patch) | |
tree | 923c9a9e2834ccab60f5caecfb8f0ac410c1dd9e /Source/WebKit2/Shared | |
parent | b4ad5d9d2b96baacd0180ead50de5195ca78af2d (diff) | |
download | qtwebkit-815f1ed417bd26fbe2abbdf20ac5d3423b30796c.tar.gz |
Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308)
New snapshot with better configure tests
Diffstat (limited to 'Source/WebKit2/Shared')
-rw-r--r-- | Source/WebKit2/Shared/PlatformPopupMenuData.cpp | 7 | ||||
-rw-r--r-- | Source/WebKit2/Shared/PlatformPopupMenuData.h | 2 | ||||
-rw-r--r-- | Source/WebKit2/Shared/WebPopupItem.cpp | 13 | ||||
-rw-r--r-- | Source/WebKit2/Shared/WebPopupItem.h | 3 | ||||
-rw-r--r-- | Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp | 3 |
5 files changed, 24 insertions, 4 deletions
diff --git a/Source/WebKit2/Shared/PlatformPopupMenuData.cpp b/Source/WebKit2/Shared/PlatformPopupMenuData.cpp index 6c4d20e64..b627afe24 100644 --- a/Source/WebKit2/Shared/PlatformPopupMenuData.cpp +++ b/Source/WebKit2/Shared/PlatformPopupMenuData.cpp @@ -38,6 +38,8 @@ PlatformPopupMenuData::PlatformPopupMenuData() , m_clientInsetRight(0) , m_popupWidth(0) , m_itemHeight(0) +#elif PLATFORM(QT) + : multipleSelections(false) #endif { } @@ -62,6 +64,8 @@ void PlatformPopupMenuData::encode(CoreIPC::ArgumentEncoder* encoder) const #elif PLATFORM(MAC) encoder->encode(fontInfo); encoder->encode(shouldPopOver); +#elif PLATFORM(QT) + encoder->encode(multipleSelections); #endif } @@ -95,6 +99,9 @@ bool PlatformPopupMenuData::decode(CoreIPC::ArgumentDecoder* decoder, PlatformPo return false; if (!decoder->decode(data.shouldPopOver)) return false; +#elif PLATFORM(QT) + if (!decoder->decode(data.multipleSelections)) + return false; #endif return true; diff --git a/Source/WebKit2/Shared/PlatformPopupMenuData.h b/Source/WebKit2/Shared/PlatformPopupMenuData.h index f85008a8d..21abde4ff 100644 --- a/Source/WebKit2/Shared/PlatformPopupMenuData.h +++ b/Source/WebKit2/Shared/PlatformPopupMenuData.h @@ -55,6 +55,8 @@ struct PlatformPopupMenuData { #elif PLATFORM(MAC) FontInfo fontInfo; bool shouldPopOver; +#elif PLATFORM(QT) + bool multipleSelections; #endif }; diff --git a/Source/WebKit2/Shared/WebPopupItem.cpp b/Source/WebKit2/Shared/WebPopupItem.cpp index a9ac03225..c215f3568 100644 --- a/Source/WebKit2/Shared/WebPopupItem.cpp +++ b/Source/WebKit2/Shared/WebPopupItem.cpp @@ -39,6 +39,7 @@ WebPopupItem::WebPopupItem() , m_textDirection(LTR) , m_hasTextDirectionOverride(false) , m_isEnabled(true) + , m_isSelected(false) { } @@ -48,10 +49,11 @@ WebPopupItem::WebPopupItem(Type type) , m_hasTextDirectionOverride(false) , m_isEnabled(true) , m_isLabel(false) + , m_isSelected(false) { } -WebPopupItem::WebPopupItem(Type type, const String& text, TextDirection textDirection, bool hasTextDirectionOverride, const String& toolTip, const String& accessibilityText, bool isEnabled, bool isLabel) +WebPopupItem::WebPopupItem(Type type, const String& text, TextDirection textDirection, bool hasTextDirectionOverride, const String& toolTip, const String& accessibilityText, bool isEnabled, bool isLabel, bool isSelected) : m_type(type) , m_text(text) , m_textDirection(textDirection) @@ -60,12 +62,14 @@ WebPopupItem::WebPopupItem(Type type, const String& text, TextDirection textDire , m_accessibilityText(accessibilityText) , m_isEnabled(isEnabled) , m_isLabel(isLabel) + , m_isSelected(isSelected) { } void WebPopupItem::encode(CoreIPC::ArgumentEncoder* encoder) const { encoder->encode(CoreIPC::In(static_cast<uint32_t>(m_type), m_text, static_cast<uint64_t>(m_textDirection), m_hasTextDirectionOverride, m_toolTip, m_accessibilityText, m_isEnabled, m_isLabel)); + encoder->encode(CoreIPC::In(m_isSelected)); } bool WebPopupItem::decode(CoreIPC::ArgumentDecoder* decoder, WebPopupItem& item) @@ -78,10 +82,15 @@ bool WebPopupItem::decode(CoreIPC::ArgumentDecoder* decoder, WebPopupItem& item) String accessibilityText; bool isEnabled; bool isLabel; + bool isSelected; + if (!decoder->decode(CoreIPC::Out(type, text, textDirection, hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel))) return false; - item = WebPopupItem(static_cast<Type>(type), text, static_cast<TextDirection>(textDirection), hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel); + if (!decoder->decode(CoreIPC::Out(isSelected))) + return false; + + item = WebPopupItem(static_cast<Type>(type), text, static_cast<TextDirection>(textDirection), hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel, isSelected); return true; } diff --git a/Source/WebKit2/Shared/WebPopupItem.h b/Source/WebKit2/Shared/WebPopupItem.h index 3dc61d77e..d8584bea5 100644 --- a/Source/WebKit2/Shared/WebPopupItem.h +++ b/Source/WebKit2/Shared/WebPopupItem.h @@ -44,7 +44,7 @@ struct WebPopupItem { WebPopupItem(); WebPopupItem(Type); - WebPopupItem(Type, const String& text, WebCore::TextDirection, bool hasTextDirectionOverride, const String& toolTip, const String& accessibilityText, bool isEnabled, bool isLabel); + WebPopupItem(Type, const String& text, WebCore::TextDirection, bool hasTextDirectionOverride, const String& toolTip, const String& accessibilityText, bool isEnabled, bool isLabel, bool isSelected); void encode(CoreIPC::ArgumentEncoder*) const; static bool decode(CoreIPC::ArgumentDecoder*, WebPopupItem&); @@ -57,6 +57,7 @@ struct WebPopupItem { String m_accessibilityText; bool m_isEnabled; bool m_isLabel; + bool m_isSelected; }; } // namespace WebKit diff --git a/Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp b/Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp index b6ceb3e15..88e4d3aec 100644 --- a/Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp +++ b/Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "ShareableBitmap.h" +#include "NativeImageQt.h" #include <QImage> #include <QPainter> #include <QtGlobal> @@ -41,7 +42,7 @@ QImage ShareableBitmap::createQImage() { ref(); // Balanced by deref in releaseSharedMemoryData return QImage(reinterpret_cast<uchar*>(data()), m_size.width(), m_size.height(), m_size.width() * 4, - m_flags & SupportsAlpha ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32, + m_flags & SupportsAlpha ? NativeImageQt::defaultFormatForAlphaEnabledImages() : NativeImageQt::defaultFormatForOpaqueImages(), releaseSharedMemoryData, this); } |