Title: [104357] branches/subpixellayout

Diff

Modified: branches/subpixellayout/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html (104356 => 104357)


--- branches/subpixellayout/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html	2012-01-07 00:29:37 UTC (rev 104356)
+++ branches/subpixellayout/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html	2012-01-07 00:49:32 UTC (rev 104357)
@@ -5,7 +5,7 @@
 
     1) There is no unit overflow in the Spatial Navigation algorithm while
        calculating the best node candidate to move focus to. To test that this
-       page positions some elements 10000000 pixels far from each other (distance
+       page positions some elements 1000000 pixels far from each other (distance
        that can considered large enough for most of the Web Pages on the
        Internet).
 
@@ -92,7 +92,7 @@
   </head>
   <body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
     <a id="start" href=""
-    <div style='margin-top:100000000px'>
+    <div style='margin-top:10000000px'>
         <a id="end" href=""
     </div>
     <div id="console"></div>

Modified: branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-expected.txt (104356 => 104357)


--- branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-expected.txt	2012-01-07 00:29:37 UTC (rev 104356)
+++ branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-expected.txt	2012-01-07 00:49:32 UTC (rev 104357)
@@ -1,8 +1,8 @@
 layer at (0,0) size 785x626
   RenderView at (0,0) size 785x600
 layer at (0,0) size 785x626
-  RenderBlock {HTML} at (0,0) size 785x626
-    RenderBody {BODY} at (8,8) size 769x610
+  RenderBlock {HTML} at (0,0) size 785x627
+    RenderBody {BODY} at (8,8) size 769x611
       RenderBlock {H1} at (0,0) size 769x37
         RenderText {#text} at (0,0) size 608x37
           text run at (0,0) width 608: "Fixed Columns, Auto Span, Minwidth Table"
@@ -14,7 +14,7 @@
           RenderTableRow {TR} at (0,20) size 100x20
             RenderTableCell {TD} at (0,30) size 100x0 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (0,0) size 100x0
-      RenderBlock {P} at (0,114) size 769x54
+      RenderBlock {P} at (0,114) size 769x55
         RenderText {#text} at (0,0) size 145x18
           text run at (0,0) width 145: "The table width is: 100"
         RenderBR {BR} at (145,14) size 0x0
@@ -23,7 +23,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,184) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,184) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,194) size 600x40
         RenderTableSection {TBODY} at (0,0) size 600x40
           RenderTableRow {TR} at (0,0) size 600x20
@@ -32,7 +32,7 @@
           RenderTableRow {TR} at (0,20) size 600x20
             RenderTableCell {TD} at (0,30) size 600x0 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (0,0) size 600x0
-      RenderBlock {P} at (0,250) size 769x54
+      RenderBlock {P} at (0,250) size 769x55
         RenderText {#text} at (0,0) size 145x18
           text run at (0,0) width 145: "The table width is: 600"
         RenderBR {BR} at (145,14) size 0x0
@@ -41,7 +41,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,320) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,320) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,330) size 600x56
         RenderTableSection {TBODY} at (0,0) size 600x56
           RenderTableRow {TR} at (0,0) size 600x36
@@ -56,7 +56,7 @@
           RenderTableRow {TR} at (0,36) size 600x20
             RenderTableCell {TD} at (0,46) size 600x0 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (0,0) size 600x0
-      RenderBlock {P} at (0,402) size 769x54
+      RenderBlock {P} at (0,402) size 769x55
         RenderText {#text} at (0,0) size 145x18
           text run at (0,0) width 145: "The table width is: 600"
         RenderBR {BR} at (145,14) size 0x0
@@ -65,7 +65,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,472) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,472) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,482) size 600x40
         RenderTableSection {TBODY} at (0,0) size 600x40
           RenderTableRow {TR} at (0,0) size 600x20
@@ -76,7 +76,7 @@
           RenderTableRow {TR} at (0,20) size 600x20
             RenderTableCell {TD} at (0,30) size 600x0 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (0,0) size 600x0
-      RenderBlock {P} at (0,538) size 769x54
+      RenderBlock {P} at (0,538) size 769x55
         RenderText {#text} at (0,0) size 145x18
           text run at (0,0) width 145: "The table width is: 600"
         RenderBR {BR} at (145,14) size 0x0
@@ -85,4 +85,4 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,608) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,608) size 769x3 [border: (1px inset #000000)]

Modified: branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-vertical-expected.txt (104356 => 104357)


--- branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-vertical-expected.txt	2012-01-07 00:29:37 UTC (rev 104356)
+++ branches/subpixellayout/LayoutTests/platform/mac/fast/table/040-vertical-expected.txt	2012-01-07 00:49:32 UTC (rev 104357)
@@ -1,8 +1,8 @@
 layer at (0,0) size 785x2350
   RenderView at (0,0) size 785x600
 layer at (0,0) size 785x2350
-  RenderBlock {HTML} at (0,0) size 785x2350
-    RenderBody {BODY} at (8,8) size 769x2334
+  RenderBlock {HTML} at (0,0) size 785x2351
+    RenderBody {BODY} at (8,8) size 769x2335
       RenderBlock {H1} at (0,0) size 769x37
         RenderText {#text} at (0,0) size 615x37
           text run at (0,0) width 615: "Fixed Columns, Auto Span, Minheight Table"
@@ -14,7 +14,7 @@
           RenderTableRow {TR} at (0,20) size 20x100
             RenderTableCell {TD} at (20,10) size 20x80 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (10,-10) size 0x100
-      RenderBlock {P} at (0,174) size 769x54
+      RenderBlock {P} at (0,174) size 769x55
         RenderText {#text} at (0,0) size 148x18
           text run at (0,0) width 148: "The table height is: 100"
         RenderBR {BR} at (148,14) size 0x0
@@ -23,7 +23,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,244) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,244) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,254) size 40x600
         RenderTableSection {TBODY} at (0,0) size 40x600
           RenderTableRow {TR} at (0,0) size 20x600
@@ -32,7 +32,7 @@
           RenderTableRow {TR} at (0,20) size 20x600
             RenderTableCell {TD} at (20,10) size 20x580 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (10,-10) size 0x600
-      RenderBlock {P} at (0,870) size 769x54
+      RenderBlock {P} at (0,870) size 769x55
         RenderText {#text} at (0,0) size 148x18
           text run at (0,0) width 148: "The table height is: 600"
         RenderBR {BR} at (148,14) size 0x0
@@ -41,7 +41,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,940) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,940) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,950) size 56x600
         RenderTableSection {TBODY} at (0,0) size 56x600
           RenderTableRow {TR} at (0,0) size 36x600
@@ -56,7 +56,7 @@
           RenderTableRow {TR} at (0,36) size 20x600
             RenderTableCell {TD} at (36,10) size 20x580 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (10,-10) size 0x600
-      RenderBlock {P} at (0,1566) size 769x54
+      RenderBlock {P} at (0,1566) size 769x55
         RenderText {#text} at (0,0) size 148x18
           text run at (0,0) width 148: "The table height is: 600"
         RenderBR {BR} at (148,14) size 0x0
@@ -65,7 +65,7 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,1636) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,1636) size 769x3 [border: (1px inset #000000)]
       RenderTable {TABLE} at (0,1646) size 40x600
         RenderTableSection {TBODY} at (0,0) size 40x600
           RenderTableRow {TR} at (0,0) size 20x600
@@ -76,7 +76,7 @@
           RenderTableRow {TR} at (0,20) size 20x600
             RenderTableCell {TD} at (20,10) size 20x580 [bgcolor=#FFC0CB] [r=1 c=0 rs=1 cs=2]
               RenderBlock {DIV} at (10,-10) size 0x600
-      RenderBlock {P} at (0,2262) size 769x54
+      RenderBlock {P} at (0,2262) size 769x55
         RenderText {#text} at (0,0) size 148x18
           text run at (0,0) width 148: "The table height is: 600"
         RenderBR {BR} at (148,14) size 0x0
@@ -85,4 +85,4 @@
         RenderBR {BR} at (133,32) size 0x0
         RenderText {#text} at (0,36) size 136x18
           text run at (0,36) width 136: "Column Two is: 67%"
-      RenderBlock {HR} at (0,2332) size 769x2 [border: (1px inset #000000)]
+      RenderBlock {HR} at (0,2332) size 769x3 [border: (1px inset #000000)]

Modified: branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp (104356 => 104357)


--- branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-01-07 00:29:37 UTC (rev 104356)
+++ branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-01-07 00:49:32 UTC (rev 104357)
@@ -664,10 +664,10 @@
         return;
     }
 
-    LayoutUnit x = (entryPoint.x() - exitPoint.x()) * (entryPoint.x() - exitPoint.x());
-    LayoutUnit y = (entryPoint.y() - exitPoint.y()) * (entryPoint.y() - exitPoint.y());
+    float x = (entryPoint.x() - exitPoint.x()).toFloat() * (entryPoint.x() - exitPoint.x()).toFloat();
+    float y = (entryPoint.y() - exitPoint.y()).toFloat() * (entryPoint.y() - exitPoint.y()).toFloat();
 
-    float euclidianDistance = sqrt((x + y).toFloat());
+    float euclidianDistance = sqrt(x + y);
 
     // Loosely based on http://www.w3.org/TR/WICD/#focus-handling
     // df = dotDist + dx + dy + 2 * (xdisplacement + ydisplacement) - sqrt(Overlap)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to