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

jamesr at google.com jamesr at google.com
Wed Dec 22 13:53:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 10915e3d43f7d124b09c64abd8c35539a799f1fa
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 28 21:48:54 2010 +0000

    2010-09-27  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Tony Chang.
    
            [chromium] Increase warning level for chromium linux build
            https://bugs.webkit.org/show_bug.cgi?id=46687
    
            This sets the chromium_code gyp variable to 1 for the chromium
            linux WebCore build and fixes the warnings that exposes.  This
            matches the chromium mac build's compiler settings more closely
            and should cut down on the number of patches that break mac but
            compile cleaning on linux.
    
            * WebCore.gyp/WebCore.gyp:
            * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
            (WebCore::ScrollbarThemeChromiumLinux::paintButton):
            * platform/graphics/chromium/FontLinux.cpp:
            (WebCore::TextRunWalker::nextScriptRun):
            (WebCore::TextRunWalker::getTextRun):
            (WebCore::TextRunWalker::getNormalizedTextRun):
            (WebCore::TextRunWalker::setGlyphXPositions):
            (WebCore::glyphIndexForXPositionInScriptRun):
            (WebCore::Font::offsetForPositionForComplexText):
            (WebCore::Font::selectionRectForComplexText):
            * platform/graphics/chromium/HarfbuzzSkia.cpp:
            (WebCore::getOutlinePoint):
            * platform/graphics/chromium/LayerRendererChromium.cpp:
            (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
            * platform/graphics/gpu/Texture.cpp:
            (WebCore::copySubRect):
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
            * platform/image-decoders/gif/GIFImageDecoder.cpp:
            (WebCore::GIFImageDecoder::setSize):
            * platform/image-decoders/gif/GIFImageDecoder.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 90b8a2f..7d3703a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-09-27  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [chromium] Increase warning level for chromium linux build
+        https://bugs.webkit.org/show_bug.cgi?id=46687
+
+        This sets the chromium_code gyp variable to 1 for the chromium
+        linux WebCore build and fixes the warnings that exposes.  This
+        matches the chromium mac build's compiler settings more closely
+        and should cut down on the number of patches that break mac but
+        compile cleaning on linux.
+
+        * WebCore.gyp/WebCore.gyp:
+        * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+        (WebCore::ScrollbarThemeChromiumLinux::paintButton):
+        * platform/graphics/chromium/FontLinux.cpp:
+        (WebCore::TextRunWalker::nextScriptRun):
+        (WebCore::TextRunWalker::getTextRun):
+        (WebCore::TextRunWalker::getNormalizedTextRun):
+        (WebCore::TextRunWalker::setGlyphXPositions):
+        (WebCore::glyphIndexForXPositionInScriptRun):
+        (WebCore::Font::offsetForPositionForComplexText):
+        (WebCore::Font::selectionRectForComplexText):
+        * platform/graphics/chromium/HarfbuzzSkia.cpp:
+        (WebCore::getOutlinePoint):
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
+        * platform/graphics/gpu/Texture.cpp:
+        (WebCore::copySubRect):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
+        * platform/image-decoders/gif/GIFImageDecoder.cpp:
+        (WebCore::GIFImageDecoder::setSize):
+        * platform/image-decoders/gif/GIFImageDecoder.h:
+
 2010-09-28  Stephen White  <senorblanco at chromium.org>
 
         Reviewed by Csaba Osztrogonác.
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index 8fda04a..4ba1a35 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -244,8 +244,11 @@
           '../platform/mac',
           '../platform/text/mac',
         ],
-        # enable -Wall and -Werror, just in Mac build for now
-        # FIXME: Also enable this for Linux/Windows after verifying no warnings
+        # enable -Wall and -Werror, just for Mac and Linux builds for now
+        # FIXME: Also enable this for Windows after verifying no warnings
+        'chromium_code': 1,
+      }],
+      ['OS=="linux"', {
         'chromium_code': 1,
       }],
       ['OS=="win"', {
diff --git a/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp b/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
index 19b4a54..d8f2c79 100644
--- a/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
+++ b/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
@@ -115,7 +115,7 @@ void ScrollbarThemeChromiumLinux::paintButton(GraphicsContext* gc, Scrollbar* sc
     ControlStates states = 0;
     // Determine if the button can be pressed.
     if (((direction == PlatformThemeChromiumGtk::West || direction == PlatformThemeChromiumGtk::North) && scrollbar->currentPos())
-        || (direction == PlatformThemeChromiumGtk::East || direction == PlatformThemeChromiumGtk::South) && scrollbar->currentPos() != scrollbar->maximum())
+        || ((direction == PlatformThemeChromiumGtk::East || direction == PlatformThemeChromiumGtk::South) && scrollbar->currentPos() != scrollbar->maximum()))
         states |= EnabledState;
 
     if (states & EnabledState) {
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index 3d2fed3..a242523 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -313,7 +313,7 @@ public:
             // So we allow that to run first, then do a second pass over the range it
             // found and take the largest subregion that stays within a single font.
             const FontData* glyphData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, false).fontData;
-            int endOfRun;
+            unsigned endOfRun;
             for (endOfRun = 1; endOfRun < m_item.item.length; ++endOfRun) {
                 const FontData* nextGlyphData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false, false).fontData;
                 if (nextGlyphData != glyphData)
@@ -406,7 +406,7 @@ private:
         // Harfbuzz will do the same thing for us using the GSUB table.
         // 2) Convert spacing characters into plain spaces, as some fonts will provide glyphs
         // for characters like '\n' otherwise.
-        for (unsigned i = 0; i < originalRun.length(); ++i) {
+        for (int i = 0; i < originalRun.length(); ++i) {
             UChar ch = originalRun[i];
             UBlockCode block = ::ublock_getCode(ch);
             if (block == UBLOCK_COMBINING_DIACRITICAL_MARKS || (Font::treatAsSpace(ch) && ch != ' ')) {
@@ -428,7 +428,7 @@ private:
         normalizedString.extract(m_normalizedBuffer.get(), normalizedString.length() + 1, error);
         ASSERT(U_SUCCESS(error));
 
-        for (unsigned i = 0; i < normalizedString.length(); ++i) {
+        for (int i = 0; i < normalizedString.length(); ++i) {
             if (Font::treatAsSpace(m_normalizedBuffer[i]))
                 m_normalizedBuffer[i] = ' ';
         }
@@ -517,7 +517,7 @@ private:
         // glyph.
         unsigned logClustersIndex = isRTL ? m_item.num_glyphs - 1 : 0;
 
-        for (int iter = 0; iter < m_item.num_glyphs; ++iter) {
+        for (unsigned iter = 0; iter < m_item.num_glyphs; ++iter) {
             // Glyphs are stored in logical order, but for layout purposes we
             // always go left to right.
             int i = isRTL ? m_item.num_glyphs - iter - 1 : iter;
@@ -683,7 +683,7 @@ static int glyphIndexForXPositionInScriptRun(const TextRunWalker& walker, int x)
             x -= truncateFixedPointToInteger(advances[glyphIndex]);
         }
     } else {
-        for (glyphIndex = 0; glyphIndex < walker.length(); ++glyphIndex) {
+        for (glyphIndex = 0; static_cast<unsigned>(glyphIndex) < walker.length(); ++glyphIndex) {
             if (x < truncateFixedPointToInteger(advances[glyphIndex]))
                 break;
             x -= truncateFixedPointToInteger(advances[glyphIndex]);
@@ -741,7 +741,7 @@ int Font::offsetForPositionForComplexText(const TextRun& run, float xFloat,
         if (walker.rtl())
             basePosition -= walker.numCodePoints();
 
-        if (x >= 0 && x < walker.width()) {
+        if (x >= 0 && static_cast<unsigned>(x) < walker.width()) {
             // The x value in question is within this script run. We consider
             // each glyph in presentation order and stop when we find the one
             // covering this position.
@@ -803,7 +803,7 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run,
         if (walker.rtl())
             base -= walker.width();
 
-        if (fromX == -1 && from < walker.numCodePoints()) {
+        if (fromX == -1 && from >= 0 && static_cast<unsigned>(from) < walker.numCodePoints()) {
             // |from| is within this script run. So we index the clusters log to
             // find which glyph this code-point contributed to and find its x
             // position.
@@ -813,7 +813,7 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run,
         } else
             from -= walker.numCodePoints();
 
-        if (toX == -1 && to < walker.numCodePoints()) {
+        if (toX == -1 && to >= 0 && static_cast<unsigned>(to) < walker.numCodePoints()) {
             int glyph = walker.logClusters()[to];
             toX = base + walker.xPositions()[glyph];
             toAdvance = walker.advances()[glyph];
diff --git a/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp b/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
index 59e8122..056d8eb 100644
--- a/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
+++ b/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
@@ -150,7 +150,7 @@ static HB_Error getOutlinePoint(HB_Font hbFont, HB_Glyph glyph, int flags, hb_ui
     SkPath path;
     paint.getTextPath(&glyph16, sizeof(glyph16), 0, 0, &path);
     int numPoints = path.getPoints(0, 0);
-    if (point >= numPoints)
+    if (point >= static_cast<unsigned>(numPoints))
         return HB_Err_Invalid_SubTable;
     SkPoint* points = reinterpret_cast<SkPoint*>(fastMalloc(sizeof(SkPoint) * (point + 1)));
     if (!points)
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index 03c8d7b..66cb0f7 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -258,9 +258,7 @@ void LayerRendererChromium::updateRootLayerTextureRect(const IntRect& updateRect
 #if PLATFORM(SKIA)
     // Get the contents of the updated rect.
     const SkBitmap bitmap = m_rootLayerCanvas->getDevice()->accessBitmap(false);
-    int bitmapWidth = bitmap.width();
-    int bitmapHeight = bitmap.height();
-    ASSERT(bitmapWidth == updateRect.width() && bitmapHeight == updateRect.height());
+    ASSERT(bitmap.width() == updateRect.width() && bitmap.height() == updateRect.height());
     void* pixels = bitmap.getPixels();
 #elif PLATFORM(CG)
     // Get the contents of the updated rect.
diff --git a/WebCore/platform/graphics/gpu/Texture.cpp b/WebCore/platform/graphics/gpu/Texture.cpp
index 95436ba..6023fe9 100644
--- a/WebCore/platform/graphics/gpu/Texture.cpp
+++ b/WebCore/platform/graphics/gpu/Texture.cpp
@@ -129,7 +129,7 @@ static uint32_t* copySubRect(uint32_t* src, int srcX, int srcY, uint32_t* dst, i
         for (int y = 0; y < height; ++y) {
             for (int x = 0; x < width ; ++x) {
                 uint32_t pixel = srcOffset[x + y * srcStride];
-                *dstPixel = pixel & 0xFF00FF00 | ((pixel & 0x00FF0000) >> 16) | ((pixel & 0x000000FF) << 16);
+                *dstPixel = (pixel & 0xFF00FF00) | ((pixel & 0x00FF0000) >> 16) | ((pixel & 0x000000FF) << 16);
                 dstPixel++;
             }
         }
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index ccaefba..b469312 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -845,7 +845,7 @@ void PlatformContextSkia::readbackHardwareToSoftware() const
             for (int i = 0; i < width; ++i) {
                 uint32_t pixel = pixels[i];
                 // Swizzles from RGBA -> BGRA.
-                pixels[i] = pixel & 0xFF00FF00 | ((pixel & 0x00FF0000) >> 16) | ((pixel & 0x000000FF) << 16);
+                pixels[i] = (pixel & 0xFF00FF00) | ((pixel & 0x00FF0000) >> 16) | ((pixel & 0x000000FF) << 16);
             }
         }
     }
diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
index 36a7bd7..4797495 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
@@ -60,7 +60,7 @@ bool GIFImageDecoder::isSizeAvailable()
     return ImageDecoder::isSizeAvailable();
 }
 
-bool GIFImageDecoder::setSize(unsigned width, unsigned height)
+bool GIFImageDecoder::setSize(int width, int height)
 {
     if (ImageDecoder::isSizeAvailable() && size().width() == width && size().height() == height)
         return true;
diff --git a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
index 21c1c57..0a88ffd 100644
--- a/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
+++ b/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
@@ -45,7 +45,7 @@ namespace WebCore {
         virtual String filenameExtension() const { return "gif"; }
         virtual void setData(SharedBuffer* data, bool allDataReceived);
         virtual bool isSizeAvailable();
-        virtual bool setSize(unsigned width, unsigned height);
+        virtual bool setSize(int width, int height);
         virtual size_t frameCount();
         virtual int repetitionCount() const;
         virtual RGBA32Buffer* frameBufferAtIndex(size_t index);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list