[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loki at webkit.org loki at webkit.org
Wed Dec 22 12:33:19 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ed0d41dbf73e5feedba3ca01b6c8f18c364c2277
Author: loki at webkit.org <loki at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 25 09:36:51 2010 +0000

    Avoid increasing required alignment of target type warning
    https://bugs.webkit.org/show_bug.cgi?id=43963
    
    Reviewed by Gavin Barraclough.
    
    Fix alignment warnings on Qt.
    
    WebCore:
    
    * bridge/qt/qt_runtime.cpp:
    (JSC::Bindings::convertQVariantToValue):
    * platform/graphics/qt/ImageBufferQt.cpp:
    (WebCore::getImageData):
    (WebCore::putImageData):
    * platform/image-decoders/ImageDecoder.h:
    (WebCore::RGBA32Buffer::getAddr):
    * platform/text/qt/TextCodecQt.cpp:
    (WebCore::TextCodecQt::decode):
    
    WebKit/qt:
    
    * Api/qwebelement.cpp:
    (QWebElement::evaluateJavaScript):
    * Api/qwebframe.cpp:
    (QWebFrame::addToJavaScriptWindowObject):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65999 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4689ec9..0f156f4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-25  Gabor Loki  <loki at webkit.org>
+
+        Reviewed by Gavin Barraclough.
+
+        Avoid increasing required alignment of target type warning
+        https://bugs.webkit.org/show_bug.cgi?id=43963
+
+        Fix alignment warnings on Qt.
+
+        * bridge/qt/qt_runtime.cpp:
+        (JSC::Bindings::convertQVariantToValue):
+        * platform/graphics/qt/ImageBufferQt.cpp:
+        (WebCore::getImageData):
+        (WebCore::putImageData):
+        * platform/image-decoders/ImageDecoder.h:
+        (WebCore::RGBA32Buffer::getAddr):
+        * platform/text/qt/TextCodecQt.cpp:
+        (WebCore::TextCodecQt::decode):
+
 2010-08-25  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Shinichiro Hamaji
@@ -16,7 +35,7 @@
         * rendering/TextControlInnerElements.cpp:
         (WebCore::SpinButtonElement::defaultEventHandler):
 
-2010-08-16  Gabor Loki  <loki at webkit.org>
+2010-08-25  Gabor Loki  <loki at webkit.org>
 
         Reviewed by Gavin Barraclough.
 
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 6881c2e..630fd2f 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -905,7 +905,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
             JSValue val = convertQVariantToValue(exec, root.get(), i.value());
             if (val) {
                 PutPropertySlot slot;
-                ret->put(exec, Identifier(exec, (const UChar *)s.constData(), s.length()), val, slot);
+                ret->put(exec, Identifier(exec, reinterpret_cast_ptr<const UChar *>(s.constData()), s.length()), val, slot);
                 // ### error case?
             }
             ++i;
diff --git a/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index 11ca377..ee01222 100644
--- a/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -216,11 +216,11 @@ PassRefPtr<ImageData> getImageData(const IntRect& rect, const ImageBufferData& i
     const uchar* bits = image.bits();
 #endif
 
-    quint32* destRows = reinterpret_cast<quint32*>(&data[desty * rect.width() + destx]);
+    quint32* destRows = reinterpret_cast_ptr<quint32*>(&data[desty * rect.width() + destx]);
 
     if (multiplied == Unmultiplied) {
         for (int y = 0; y < numRows; ++y) {
-            const quint32* scanLine = reinterpret_cast<const quint32*>(bits + (y + originy) * bytesPerLine);
+            const quint32* scanLine = reinterpret_cast_ptr<const quint32*>(bits + (y + originy) * bytesPerLine);
             for (int x = 0; x < numColumns; x++) {
                 QRgb pixel = scanLine[x + originx];
                 int alpha = qAlpha(pixel);
@@ -242,7 +242,7 @@ PassRefPtr<ImageData> getImageData(const IntRect& rect, const ImageBufferData& i
         }
     } else {
         for (int y = 0; y < numRows; ++y) {
-            const quint32* scanLine = reinterpret_cast<const quint32*>(bits + (y + originy) * bytesPerLine);
+            const quint32* scanLine = reinterpret_cast_ptr<const quint32*>(bits + (y + originy) * bytesPerLine);
             for (int x = 0; x < numColumns; x++) {
                 QRgb pixel = scanLine[x + originx];
                 // Convert RGB to BGR.
@@ -318,11 +318,11 @@ void putImageData(ImageData*& source, const IntRect& sourceRect, const IntPoint&
     uchar* bits = image.bits();
     const int bytesPerLine = image.bytesPerLine();
 
-    const quint32* srcScanLine = reinterpret_cast<const quint32*>(source->data()->data()->data() + originy * srcBytesPerRow + originx * 4);
+    const quint32* srcScanLine = reinterpret_cast_ptr<const quint32*>(source->data()->data()->data() + originy * srcBytesPerRow + originx * 4);
 
     if (multiplied == Unmultiplied) {
         for (int y = 0; y < numRows; ++y) {
-            quint32* destScanLine = reinterpret_cast<quint32*>(bits + y * bytesPerLine);
+            quint32* destScanLine = reinterpret_cast_ptr<quint32*>(bits + y * bytesPerLine);
             for (int x = 0; x < numColumns; x++) {
                 // Premultiply and convert BGR to RGB.
                 quint32 pixel = srcScanLine[x];
@@ -332,7 +332,7 @@ void putImageData(ImageData*& source, const IntRect& sourceRect, const IntPoint&
         }
     } else {
         for (int y = 0; y < numRows; ++y) {
-            quint32* destScanLine = reinterpret_cast<quint32*>(bits + y * bytesPerLine);
+            quint32* destScanLine = reinterpret_cast_ptr<quint32*>(bits + y * bytesPerLine);
             for (int x = 0; x < numColumns; x++) {
                 // Convert BGR to RGB.
                 quint32 pixel = srcScanLine[x];
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h
index b6748f3..4b71ce7 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/WebCore/platform/image-decoders/ImageDecoder.h
@@ -145,7 +145,7 @@ namespace WebCore {
 #elif PLATFORM(QT)
             m_image = m_pixmap.toImage();
             m_pixmap = QPixmap();
-            return reinterpret_cast<QRgb*>(m_image.scanLine(y)) + x;
+            return reinterpret_cast_ptr<QRgb*>(m_image.scanLine(y)) + x;
 #else
             return m_bytes.data() + (y * width()) + x;
 #endif
diff --git a/WebCore/platform/text/qt/TextCodecQt.cpp b/WebCore/platform/text/qt/TextCodecQt.cpp
index 88c9500..94a2b7b 100644
--- a/WebCore/platform/text/qt/TextCodecQt.cpp
+++ b/WebCore/platform/text/qt/TextCodecQt.cpp
@@ -110,7 +110,7 @@ String TextCodecQt::decode(const char* bytes, size_t length, bool flush, bool /*
         int size = end - buf;
         size = qMin(size, MaxInputChunkSize);
         QString decoded = m_codec->toUnicode(buf, size, &m_state);
-        unicode.append(reinterpret_cast<const UChar*>(decoded.unicode()), decoded.length());
+        unicode.append(reinterpret_cast_ptr<const UChar*>(decoded.unicode()), decoded.length());
         buf += size;
     }
 
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index ce2f283..1dd4150 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -739,7 +739,7 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
         return QVariant();
 
     JSC::ScopeChain& scopeChain = state->dynamicGlobalObject()->globalScopeChain();
-    JSC::UString script((const UChar*)scriptSource.data(), scriptSource.length());
+    JSC::UString script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
     JSC::Completion completion = JSC::evaluate(state, scopeChain, JSC::makeSource(script), thisValue);
     if ((completion.complType() != JSC::ReturnValue) && (completion.complType() != JSC::Normal))
         return QVariant();
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 921281a..1b0c2df 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -496,7 +496,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
             JSC::Bindings::QtInstance::getQtInstance(object, root, ownership)->createRuntimeObject(exec);
 
     JSC::PutPropertySlot slot;
-    window->put(exec, JSC::Identifier(exec, (const UChar *) name.constData(), name.length()), runtimeObject, slot);
+    window->put(exec, JSC::Identifier(exec, reinterpret_cast_ptr<const UChar*>(name.constData()), name.length()), runtimeObject, slot);
 }
 
 /*!
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 4c586b8..3d57a39 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-25  Gabor Loki  <loki at webkit.org>
+
+        Reviewed by Gavin Barraclough.
+
+        Avoid increasing required alignment of target type warning
+        https://bugs.webkit.org/show_bug.cgi?id=43963
+
+        Fix alignment warnings on Qt.
+
+        * Api/qwebelement.cpp:
+        (QWebElement::evaluateJavaScript):
+        * Api/qwebframe.cpp:
+        (QWebFrame::addToJavaScriptWindowObject):
+
 2010-08-24  Andras Becsi  <abecsi at inf.u-szeged.hu>
 
         Reviewed by Simon Hausmann.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list