Title: [108095] trunk/Source
Revision
108095
Author
[email protected]
Date
2012-02-17 10:51:53 -0800 (Fri, 17 Feb 2012)

Log Message

Fix some warnings encountered during the GTK+ build
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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108094 => 108095)


--- trunk/Source/WebCore/ChangeLog	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebCore/ChangeLog	2012-02-17 18:51:53 UTC (rev 108095)
@@ -1,3 +1,21 @@
+2012-02-17  Martin Robinson  <[email protected]>
+
+        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  <[email protected]>
 
         [chromium] Refactor video drawing to be more data driven

Modified: trunk/Source/WebCore/page/GestureTapHighlighter.cpp (108094 => 108095)


--- trunk/Source/WebCore/page/GestureTapHighlighter.cpp	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebCore/page/GestureTapHighlighter.cpp	2012-02-17 18:51:53 UTC (rev 108095)
@@ -146,7 +146,7 @@
 
     // 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 @@
         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);
     }
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp (108094 => 108095)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp	2012-02-17 18:51:53 UTC (rev 108095)
@@ -79,7 +79,7 @@
 
     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.

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (108094 => 108095)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-02-17 18:51:53 UTC (rev 108095)
@@ -81,7 +81,7 @@
         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 @@
 
     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 @@
     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));
     }
 

Modified: trunk/Source/WebKit2/ChangeLog (108094 => 108095)


--- trunk/Source/WebKit2/ChangeLog	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebKit2/ChangeLog	2012-02-17 18:51:53 UTC (rev 108095)
@@ -1,3 +1,13 @@
+2012-02-17  Martin Robinson  <[email protected]>
+
+        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  <[email protected]>
 
         [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp (108094 => 108095)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp	2012-02-17 18:47:05 UTC (rev 108094)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp	2012-02-17 18:51:53 UTC (rev 108095)
@@ -144,7 +144,8 @@
         didChangeBackForwardList,
         0, // shouldGoToBackForwardListItem
         0, // didFailToInitializePlugin
-        0 // didDetectXSSForFrame
+        0, // didDetectXSSForFrame
+        0 // didFirstVisuallyNonEmptyLayoutForFrame 
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
     WKPageSetPageLoaderClient(wkPage, &wkLoaderClient);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to