Build fix for release build.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 19:12:11 +0000 (19:12 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 19:12:11 +0000 (19:12 +0000)
        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcEffectiveWidth):
        (WebCore::AutoTableLayout::layout):

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

WebCore/ChangeLog
WebCore/rendering/AutoTableLayout.cpp

index f71ae7dbc907cec400b452bc9589b759a06f6047..a77b27ec7e2aa47114094520b775bf2873e04333 100644 (file)
@@ -1,3 +1,11 @@
+2007-08-21  Adele Peterson  <adele@apple.com>
+
+        Build fix for release build.
+
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::calcEffectiveWidth):
+        (WebCore::AutoTableLayout::layout):
+
 2007-08-21  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Darin.
index 4e2e317816131721ef3a1dcc853cfb57ddf67833..deb3ba23cc916e4c777b0eb9dc123551c37e09ef 100644 (file)
@@ -400,7 +400,7 @@ int AutoTableLayout::calcEffectiveWidth()
 
                 for (unsigned int pos = col; pos < lastCol && totalWidth > 0; pos++) {
                     if (!(m_layoutStruct[pos].effWidth.isPercent())) {
-                        int percent = percentMissing * static_cast<float>(m_layoutStruct[pos].effMaxWidth) / totalWidth;
+                        int percent = static_cast<int>(percentMissing * static_cast<float>(m_layoutStruct[pos].effMaxWidth) / totalWidth);
                         totalWidth -= m_layoutStruct[pos].effMaxWidth;
                         percentMissing -= percent;
                         if (percent > 0)
@@ -657,7 +657,7 @@ void AutoTableLayout::layout()
         for (int i = 0; i < nEffCols; i++) {
             Length &width = m_layoutStruct[i].effWidth;
             if (width.isFixed()) {
-                int w = available * static_cast<float>(m_layoutStruct[i].effMaxWidth) / totalFixed;
+                int w = static_cast<int>(available * static_cast<float>(m_layoutStruct[i].effMaxWidth) / totalFixed);
                 available -= w;
                 totalFixed -= m_layoutStruct[i].effMaxWidth;
                 m_layoutStruct[i].calcWidth += w;