Fix some warnings encountered during the GTK+ build
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 18:51:53 +0000 (18:51 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 18:51:53 +0000 (18:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78911

Reviewed by Xan Lopez.

Source/WebCore:

No new tests. These are just fixes for warnings.

* page/GestureTapHighlighter.cpp: Avoid using potentially signed operations on
a size_t type. Use size_t for iterating over members of a vector.
* platform/graphics/texmap/TextureMapperBackingStore.cpp: Use size_t where necessary.
(WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded): Ditto.
* platform/graphics/texmap/TextureMapperLayer.cpp: Ditto.
(WebCore::TextureMapperLayer::computeTransformsRecursive): Ditto.
(WebCore::TextureMapperLayer::paintSelfAndChildren): Ditto.
(WebCore::TextureMapperLayer::intermediateSurfaceRect): Ditto.

Source/WebKit2:

* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView): Initialize a new member of the loader client struct.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/GestureTapHighlighter.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp

index d9f2a20..91c1164 100644 (file)
@@ -1,3 +1,21 @@
+2012-02-17  Martin Robinson  <mrobinson@igalia.com>
+
+        Fix some warnings encountered during the GTK+ build
+        https://bugs.webkit.org/show_bug.cgi?id=78911
+
+        Reviewed by Xan Lopez.
+
+        No new tests. These are just fixes for warnings.
+
+        * page/GestureTapHighlighter.cpp: Avoid using potentially signed operations on
+        a size_t type. Use size_t for iterating over members of a vector.
+        * platform/graphics/texmap/TextureMapperBackingStore.cpp: Use size_t where necessary.
+        (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded): Ditto.
+        * platform/graphics/texmap/TextureMapperLayer.cpp: Ditto.
+        (WebCore::TextureMapperLayer::computeTransformsRecursive): Ditto.
+        (WebCore::TextureMapperLayer::paintSelfAndChildren): Ditto.
+        (WebCore::TextureMapperLayer::intermediateSurfaceRect): Ditto.
+
 2012-02-17  Tim Dresser  <tdresser@chromium.org>
 
         [chromium] Refactor video drawing to be more data driven
index c3f7239..4ed7c55 100644 (file)
@@ -146,7 +146,7 @@ Path pathForRenderer(RenderObject* o)
 
     // Merge all center boxes (all but the first and the last).
     LayoutRect mid;
-    for (int i = 1; i < rects.size() - 1; ++i)
+    for (size_t i = 1; i < rects.size() - 1; ++i)
         mid.uniteIfNonZero(rects.at(i));
 
     Vector<LayoutRect> drawableRects;
@@ -177,9 +177,9 @@ Path pathForRenderer(RenderObject* o)
         shiftXEdgesToContainIfStrikes(middle, drawableRects.at(2));
     }
 
-    for (int i = 0; i < drawableRects.size(); ++i) {
-        LayoutRect prev = (i - 1) >= 0 ? drawableRects.at(i - 1) : LayoutRect();
-        LayoutRect next = (i + 1) < drawableRects.size() ? drawableRects.at(i + 1) : LayoutRect();
+    for (size_t i = 0; i < drawableRects.size(); ++i) {
+        LayoutRect prev = i ? drawableRects.at(i - 1) : LayoutRect();
+        LayoutRect next = i < (drawableRects.size() - 1) ? drawableRects.at(i + 1) : LayoutRect();
         addHighlightRect(path, drawableRects.at(i), prev, next);
     }
 
index fcb9f53..59d96df 100644 (file)
@@ -79,7 +79,7 @@ void TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded(const FloatSiz
 
     Vector<FloatRect> tileRectsToAdd;
     Vector<int> tileIndicesToRemove;
-    static const int TileEraseThreshold = 6;
+    static const size_t TileEraseThreshold = 6;
 
     // This method recycles tiles. We check which tiles we need to add, which to remove, and use as many
     // removable tiles as replacement for new tiles when possible.
index cbeff70..b21cbc1 100644 (file)
@@ -81,7 +81,7 @@ void TextureMapperLayer::computeTransformsRecursive()
         m_state.maskLayer->computeTransformsRecursive();
     if (m_state.replicaLayer)
         m_state.replicaLayer->computeTransformsRecursive();
-    for (int i = 0; i < m_children.size(); ++i)
+    for (size_t i = 0; i < m_children.size(); ++i)
         m_children[i]->computeTransformsRecursive();
 
     // Reorder children if needed on the way back up.
@@ -179,7 +179,7 @@ void TextureMapperLayer::paintSelfAndChildren(const TextureMapperPaintOptions& o
 
     paintSelf(options);
 
-    for (int i = 0; i < m_children.size(); ++i)
+    for (size_t i = 0; i < m_children.size(); ++i)
         m_children[i]->paintRecursive(options);
 
     if (hasClip)
@@ -198,7 +198,7 @@ IntRect TextureMapperLayer::intermediateSurfaceRect(const TransformationMatrix&
     TransformationMatrix localTransform = TransformationMatrix(matrix).multiply(m_transform.combined());
     rect = enclosingIntRect(localTransform.mapRect(layerRect()));
     if (!m_state.masksToBounds && !m_state.maskLayer) {
-        for (int i = 0; i < m_children.size(); ++i)
+        for (size_t i = 0; i < m_children.size(); ++i)
             rect.unite(m_children[i]->intermediateSurfaceRect(matrix));
     }
 
index 2b03a3b..ea77c60 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-17  Martin Robinson  <mrobinson@igalia.com>
+
+        Fix some warnings encountered during the GTK+ build
+        https://bugs.webkit.org/show_bug.cgi?id=78911
+
+        Reviewed by Xan Lopez.
+
+        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+        (attachLoaderClientToView): Initialize a new member of the loader client struct.
+
 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it
index 6d11339..c26d8eb 100644 (file)
@@ -144,7 +144,8 @@ void attachLoaderClientToView(WebKitWebView* webView)
         didChangeBackForwardList,
         0, // shouldGoToBackForwardListItem
         0, // didFailToInitializePlugin
-        0 // didDetectXSSForFrame
+        0, // didDetectXSSForFrame
+        0 // didFirstVisuallyNonEmptyLayoutForFrame 
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
     WKPageSetPageLoaderClient(wkPage, &wkLoaderClient);