Title: [133590] trunk
Revision
133590
Author
[email protected]
Date
2012-11-06 05:24:32 -0800 (Tue, 06 Nov 2012)

Log Message

The "Rect" class in WebCore/Resources/pagepopups/pickerCommon.js should be renamed
https://bugs.webkit.org/show_bug.cgi?id=101304

Reviewed by Kent Tamura.

Source/WebCore:

The name Rect conflicts with CSS Rect.

No new tests. Just renaming.

* Resources/pagepopups/pickerCommon.js:
(Rectangle): Renamed from Rect.
(Rectangle.prototype.toString):
(Rectangle.intersection):
(adjustWindowRect):
(hideWindow):

LayoutTests:

* platform/chromium/fast/forms/page-popup/page-popup-adjust-rect-expected.txt: Replace Rect with Rectangle.
* platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html: Ditto.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (133589 => 133590)


--- trunk/LayoutTests/ChangeLog	2012-11-06 13:20:42 UTC (rev 133589)
+++ trunk/LayoutTests/ChangeLog	2012-11-06 13:24:32 UTC (rev 133590)
@@ -1,3 +1,13 @@
+2012-11-06  Keishi Hattori  <[email protected]>
+
+        The "Rect" class in WebCore/Resources/pagepopups/pickerCommon.js should be renamed
+        https://bugs.webkit.org/show_bug.cgi?id=101304
+
+        Reviewed by Kent Tamura.
+
+        * platform/chromium/fast/forms/page-popup/page-popup-adjust-rect-expected.txt: Replace Rect with Rectangle.
+        * platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html: Ditto.
+
 2012-11-06  Kangil Han  <[email protected]>
 
         [EFL] Exclude fast/css/style-scoped cases from layout test running

Modified: trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect-expected.txt (133589 => 133590)


--- trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect-expected.txt	2012-11-06 13:20:42 UTC (rev 133589)
+++ trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect-expected.txt	2012-11-06 13:24:32 UTC (rev 133590)
@@ -4,65 +4,65 @@
 
 
 Move anchor element along the vertical axis.
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,0,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,0,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,20,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,30,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,40,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,50,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,40,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,50,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,50,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,50,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,0,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,0,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,20,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,30,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,40,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,50,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,40,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,50,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,50,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,50,30,10)"
 Move anchor element along the horizontal axis.
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(0,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(10,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(20,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(30,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(40,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(0,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(10,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(20,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(30,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(40,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(50,10,30,10)"
 Move anchor element along the vertical axis. Open popup that is too tall.
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,60)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,60)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,10,30,50)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,20,30,40)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,30,30,30)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,30)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,40)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,50)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,60)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,60)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rect(0,0,30,60)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,60)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,60)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,10,30,50)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,20,30,40)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,30,30,30)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,30)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,40)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,50)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,60)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,60)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 10).toString() is "Rectangle(0,0,30,60)"
 Move anchor element along the vertical axis. Open popup that is too tall and won't shrink.
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
-PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rect(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
+PASS popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString() is "Rectangle(0,0,30,1000)"
 Grow popup width.
-PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rect(30,10,30,10)"
-PASS popupWindow.adjustWindowRect(40, 10, 40, 10).toString() is "Rect(30,10,40,10)"
-PASS popupWindow.adjustWindowRect(50, 10, 50, 10).toString() is "Rect(30,10,50,10)"
-PASS popupWindow.adjustWindowRect(60, 10, 60, 10).toString() is "Rect(20,10,60,10)"
-PASS popupWindow.adjustWindowRect(70, 10, 70, 10).toString() is "Rect(10,10,70,10)"
-PASS popupWindow.adjustWindowRect(80, 10, 80, 10).toString() is "Rect(0,10,80,10)"
-PASS popupWindow.adjustWindowRect(90, 10, 90, 10).toString() is "Rect(0,10,90,10)"
+PASS popupWindow.adjustWindowRect(30, 10, 30, 10).toString() is "Rectangle(30,10,30,10)"
+PASS popupWindow.adjustWindowRect(40, 10, 40, 10).toString() is "Rectangle(30,10,40,10)"
+PASS popupWindow.adjustWindowRect(50, 10, 50, 10).toString() is "Rectangle(30,10,50,10)"
+PASS popupWindow.adjustWindowRect(60, 10, 60, 10).toString() is "Rectangle(20,10,60,10)"
+PASS popupWindow.adjustWindowRect(70, 10, 70, 10).toString() is "Rectangle(10,10,70,10)"
+PASS popupWindow.adjustWindowRect(80, 10, 80, 10).toString() is "Rectangle(0,10,80,10)"
+PASS popupWindow.adjustWindowRect(90, 10, 90, 10).toString() is "Rectangle(0,10,90,10)"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html (133589 => 133590)


--- trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html	2012-11-06 13:20:42 UTC (rev 133589)
+++ trunk/LayoutTests/platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html	2012-11-06 13:24:32 UTC (rev 133590)
@@ -41,177 +41,177 @@
     debug("Move anchor element along the vertical axis.");
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,0,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,0,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,0,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,0,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,20,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,20,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,30,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,30,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 30, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,40,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,40,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 40, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,50,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,50,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 50, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,40,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,40,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 60, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,50,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,50,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 70, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,50,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,50,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 80, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,50,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,50,30,10)');
 
     debug("Move anchor element along the horizontal axis.");
 
     popupWindow.global.params.anchorRectInScreen = makeRect(-40, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(-30, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(-20, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(-10, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(0,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(0,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(10, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(10,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(10,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(20, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(20,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(20,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(30,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(30,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(40, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(40,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(40,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(50, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(60, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(70, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(80, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(90, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(100, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(50,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(50,10,30,10)');
 
     debug("Move anchor element along the vertical axis. Open popup that is too tall.");
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,60)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,60)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,60)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,60)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,10,30,50)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,10,30,50)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,20,30,40)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,20,30,40)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,30,30,30)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,30,30,30)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 30, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,30)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,30)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 40, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,40)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,40)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 50, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,50)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,50)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 60, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,60)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,60)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 70, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,60)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,60)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 80, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rect(0,0,30,60)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 10).toString()', 'Rectangle(0,0,30,60)');
 
     debug("Move anchor element along the vertical axis. Open popup that is too tall and won't shrink.");
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, -10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 0, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 10, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 20, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 30, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 40, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 50, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 60, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 70, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(0, 80, 20, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rect(0,0,30,1000)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 1000, 30, 1000).toString()', 'Rectangle(0,0,30,1000)');
 
     debug("Grow popup width.");
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rect(30,10,30,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(30, 10, 30, 10).toString()', 'Rectangle(30,10,30,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(40, 10, 40, 10).toString()', 'Rect(30,10,40,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(40, 10, 40, 10).toString()', 'Rectangle(30,10,40,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(50, 10, 50, 10).toString()', 'Rect(30,10,50,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(50, 10, 50, 10).toString()', 'Rectangle(30,10,50,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(60, 10, 60, 10).toString()', 'Rect(20,10,60,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(60, 10, 60, 10).toString()', 'Rectangle(20,10,60,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(70, 10, 70, 10).toString()', 'Rect(10,10,70,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(70, 10, 70, 10).toString()', 'Rectangle(10,10,70,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(80, 10, 80, 10).toString()', 'Rect(0,10,80,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(80, 10, 80, 10).toString()', 'Rectangle(0,10,80,10)');
 
     popupWindow.global.params.anchorRectInScreen = makeRect(30, 0, 30, 10);
-    shouldBeEqualToString('popupWindow.adjustWindowRect(90, 10, 90, 10).toString()', 'Rect(0,10,90,10)');
+    shouldBeEqualToString('popupWindow.adjustWindowRect(90, 10, 90, 10).toString()', 'Rectangle(0,10,90,10)');
 
     finishJSTest();
 }

Modified: trunk/Source/WebCore/ChangeLog (133589 => 133590)


--- trunk/Source/WebCore/ChangeLog	2012-11-06 13:20:42 UTC (rev 133589)
+++ trunk/Source/WebCore/ChangeLog	2012-11-06 13:24:32 UTC (rev 133590)
@@ -1,3 +1,21 @@
+2012-11-06  Keishi Hattori  <[email protected]>
+
+        The "Rect" class in WebCore/Resources/pagepopups/pickerCommon.js should be renamed
+        https://bugs.webkit.org/show_bug.cgi?id=101304
+
+        Reviewed by Kent Tamura.
+
+        The name Rect conflicts with CSS Rect.
+
+        No new tests. Just renaming.
+
+        * Resources/pagepopups/pickerCommon.js:
+        (Rectangle): Renamed from Rect.
+        (Rectangle.prototype.toString):
+        (Rectangle.intersection):
+        (adjustWindowRect):
+        (hideWindow):
+
 2012-11-06  Kentaro Hara  <[email protected]>
 
         Replace setDOMWrapper(wrapper, 0) with resetDOMWrapper(wrapper)

Modified: trunk/Source/WebCore/Resources/pagepopups/pickerCommon.js (133589 => 133590)


--- trunk/Source/WebCore/Resources/pagepopups/pickerCommon.js	2012-11-06 13:20:42 UTC (rev 133589)
+++ trunk/Source/WebCore/Resources/pagepopups/pickerCommon.js	2012-11-06 13:24:32 UTC (rev 133590)
@@ -45,7 +45,7 @@
     return element;
 }
 
-function Rect(xOrRect, y, width, height) {
+function Rectangle(xOrRect, y, width, height) {
     if (typeof xOrRect === "object") {
         y = xOrRect.y;
         width = xOrRect.width;
@@ -58,18 +58,18 @@
     this.height = height;
 }
 
-Rect.prototype = {
+Rectangle.prototype = {
     get maxX() { return this.x + this.width; },
     get maxY() { return this.y + this.height; },
-    toString: function() { return "Rect(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")"; }
+    toString: function() { return "Rectangle(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")"; }
 };
 
 /**
- * @param {!number} Rect
- * @param {!number} Rect
- * @return {?Rect}
+ * @param {!Rectangle} rect1
+ * @param {!Rectangle} rect2
+ * @return {?Rectangle}
  */
-Rect.intersection = function(rect1, rect2) {
+Rectangle.intersection = function(rect1, rect2) {
     var x = Math.max(rect1.x, rect2.x);
     var maxX = Math.min(rect1.maxX, rect2.maxX);
     var y = Math.max(rect1.y, rect2.y);
@@ -78,7 +78,7 @@
     var height = maxY - y;
     if (width < 0 || height < 0)
         return null;
-    return new Rect(x, y, width, height);
+    return new Rectangle(x, y, width, height);
 };
 
 /**
@@ -94,7 +94,7 @@
  * @param {!number} height
  * @param {?number} minWidth
  * @param {?number} minHeight
- * @return {!Rect}
+ * @return {!Rectangle}
  */
 function adjustWindowRect(width, height, minWidth, minHeight) {
     if (typeof minWidth !== "number")
@@ -102,16 +102,16 @@
     if (typeof minHeight !== "number")
         minHeight = 0;
 
-    var windowRect = new Rect(0, 0, width, height);
+    var windowRect = new Rectangle(0, 0, width, height);
 
     if (!global.params.anchorRectInScreen)
         return windowRect;
 
-    var anchorRect = new Rect(global.params.anchorRectInScreen);
-    var rootViewRect = new Rect(global.params.rootViewRectInScreen);
-    var availRect = new Rect(window.screen.availLeft, window.screen.availTop, window.screen.availWidth, window.screen.availHeight);
+    var anchorRect = new Rectangle(global.params.anchorRectInScreen);
+    var rootViewRect = new Rectangle(global.params.rootViewRectInScreen);
+    var availRect = new Rectangle(window.screen.availLeft, window.screen.availTop, window.screen.availWidth, window.screen.availHeight);
     if (global.params.confineToRootView)
-        availRect = Rect.intersection(availRect, rootViewRect) || new Rect(0, 0, 0, 0);
+        availRect = Rectangle.intersection(availRect, rootViewRect) || new Rectangle(0, 0, 0, 0);
 
     _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight);
     _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth);
@@ -151,7 +151,7 @@
 }
 
 /**
- * @param {!Rect} rect
+ * @param {!Rectangle} rect
  */
 function setWindowRect(rect) {
     if (window.frameElement) {
@@ -164,7 +164,7 @@
 }
 
 function hideWindow() {
-    setWindowRect(new Rect(0, 0, 1, 1));
+    setWindowRect(new Rectangle(0, 0, 1, 1));
 }
 
 window.addEventListener("resize", function() {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to