[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

rniwa at webkit.org rniwa at webkit.org
Wed Dec 22 17:49:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fbe7f75e94b89bc8ddb088ce6dd27b30ce36d962
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 1 00:32:06 2010 +0000

    2010-11-30  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Ojan Vafai.
    
            REGRESSION(r72861): editing/selection/click-left-of-rtl-wrapping-text.html and
            modify-up-on-rtl-wrapping-text.html fail on all but Mac platform
            https://bugs.webkit.org/show_bug.cgi?id=50204
    
            Fixed the tests. Instead of using "ex" to specify the width of the container div,
            the tests now auto-detect the correct width by comparing the computed height to
            the expected height deduced from the height of one line and the expected number of lines.
    
            * editing/selection/click-left-of-rtl-wrapping-text-expected.txt:
            * editing/selection/click-left-of-rtl-wrapping-text.html:
            * editing/selection/modify-up-on-rtl-wrapping-text.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 86849c8..b02aa6a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-30  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Ojan Vafai.
+
+        REGRESSION(r72861): editing/selection/click-left-of-rtl-wrapping-text.html and
+        modify-up-on-rtl-wrapping-text.html fail on all but Mac platform
+        https://bugs.webkit.org/show_bug.cgi?id=50204
+
+        Fixed the tests. Instead of using "ex" to specify the width of the container div,
+        the tests now auto-detect the correct width by comparing the computed height to
+        the expected height deduced from the height of one line and the expected number of lines.
+
+        * editing/selection/click-left-of-rtl-wrapping-text-expected.txt:
+        * editing/selection/click-left-of-rtl-wrapping-text.html:
+        * editing/selection/modify-up-on-rtl-wrapping-text.html:
+
 2010-11-30  Yael Aharon  <yael.aharon at nokia.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text-expected.txt b/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text-expected.txt
index eec8470..4effea1 100644
--- a/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text-expected.txt
+++ b/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text-expected.txt
@@ -2,9 +2,9 @@ This tests clicking on the left of RTL text puts the caret at the end of the lin
 
 PASS: clicking on the left of the 1st line of ך לכ put the caret at 2
 PASS: clicking on the left of the 2nd line of ך לכ put the caret at 4
-PASS: clicking on the left of the 1st line of גכ יגכע ג put the caret at 3
-PASS: clicking on the left of the 2nd line of גכ יגכע ג put the caret at 8
-FAIL: clicking on the left of the 3rd line of גכ יגכע ג put the caret at 9 but expected at 10
+PASS: clicking on the left of the 1st line of ככ ככככ כככ put the caret at 3
+PASS: clicking on the left of the 2nd line of ככ ככככ כככ put the caret at 8
+PASS: clicking on the left of the 3rd line of ככ ככככ כככ put the caret at 11
 PASS: clicking on the left of the 1st line of גכ יגכ יגכ יגכ יגכ put the caret at 3
 PASS: clicking on the left of the 2nd line of גכ יגכ יגכ יגכ יגכ put the caret at 7
 PASS: clicking on the left of the 3rd line of גכ יגכ יגכ יגכ יגכ put the caret at 11
diff --git a/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text.html b/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text.html
index a01c584..a979468 100644
--- a/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text.html
+++ b/LayoutTests/editing/selection/click-left-of-rtl-wrapping-text.html
@@ -9,8 +9,8 @@ if (window.layoutTestController)
     layoutTestController.dumpAsText();
 
 var tests = [
-    {content: "&#1498; &#1500;&#1499;", width: "2.5ex", expected: [2, 4]},
-    {content: "&#1490;&#1499; &#1497;&#1490;&#1499;&#1506; &#1490;", width: "5ex", expected: [3, 8, 10]},
+    {content: "&#1498; &#1500;&#1499;", expected: [2, 4]},
+    {content: "&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;", expected: [3, 8, 11]},
     {content: "&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;", width: "5ex",
         expected: [3, 7, 11, 15, 18]},
 ];
@@ -24,19 +24,33 @@ function passed(message) {
 }
 
 function runTest(container, test) {
+    container.style.width = '100%';
     container.innerHTML = test.content;
-    container.style.width = test.width;
 
-    var x = 2;
-    var y = 2;
+    // Starting from 5px, slowly increase the width until each word fits in one line.
+    var heightOfLine = container.offsetHeight;
+    var width = 5;
+    do {
+        container.style.width = width + 'px';
+        width++;
+    } while (container.offsetHeight > heightOfLine * test.expected.length);        
+    container.style.width = (width + 1) + 'px';
+
+    var x = 0;
+    var y = heightOfLine / 2;
     var yIncrement = container.offsetHeight / test.expected.length;
     var lines = ['st', 'nd', 'rd', 'th'];
 
+    if (!window.eventSender)
+        return;
+
     for (var i = 0; i < test.expected.length; i++) {
         eventSender.mouseMoveTo(container.offsetLeft + x, container.offsetTop + y);
         eventSender.mouseDown();
-        eventSender.leapForward(500);
+        eventSender.leapForward(100);
         eventSender.mouseUp();
+        eventSender.leapForward(1000);
+
         var line = (i + 1) + lines[Math.min(i, lines.length - 1)];
         var action = 'clicking on the left of the ' + line + ' line of ' + test.content;
 
diff --git a/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text-expected.txt b/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text-expected.txt
index 781add8..87c5eb8 100644
--- a/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text-expected.txt
+++ b/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text-expected.txt
@@ -2,9 +2,9 @@ This tests clicking on the left of RTL text puts the caret at the end of the lin
 
 PASS: on ך לכ, caret is at 4 initially
 PASS: on ך לכ, caret is at 2 after moving upwards once
-PASS: on ג גכ כעי, caret is at 8 initially
-PASS: on ג גכ כעי, caret is at 5 after moving upwards once
-PASS: on ג גכ כעי, caret is at 2 after moving upwards twice
+PASS: on כ ככ כככ, caret is at 8 initially
+PASS: on כ ככ כככ, caret is at 5 after moving upwards once
+PASS: on כ ככ כככ, caret is at 2 after moving upwards twice
 PASS: on גכ יגכ יגכ יגכ יגכ, caret is at 18 initially
 PASS: on גכ יגכ יגכ יגכ יגכ, caret is at 14 after moving upwards once
 PASS: on גכ יגכ יגכ יגכ יגכ, caret is at 10 after moving upwards twice
diff --git a/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text.html b/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text.html
index ef26f67..f7cb486 100644
--- a/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text.html
+++ b/LayoutTests/editing/selection/modify-up-on-rtl-wrapping-text.html
@@ -9,9 +9,9 @@ if (window.layoutTestController)
     layoutTestController.dumpAsText();
 
 var tests = [
-    {content: "&#1498; &#1500;&#1499;", width: "2.5ex", expected: [2, 4]},
-    {content: "&#1490; &#1490;&#1499; &#1499;&#1506;&#1497;", width: "3.5ex", expected: [2, 5, 8]},
-    {content: "&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;", width: "5ex",
+    {content: "&#1498; &#1500;&#1499;", expected: [2, 4]},
+    {content: "&#1499; &#1499;&#1499; &#1499;&#1499;&#1499;", expected: [2, 5, 8]},
+    {content: "&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;",
         expected: [3, 6, 10, 14, 18]},
 ];
 
@@ -24,11 +24,20 @@ function passed(message) {
 }
 
 function runTest(container, test) {
+    container.style.width = '100%';
     container.innerHTML = test.content;
-    container.style.width = test.width;
+
+    // Starting from 5px, slowly increase the width until each word fits in one line.
+    var heightOfLine = container.offsetHeight;
+    var width = 5;
+    do {
+        container.style.width = width + 'px';
+        width++;
+    } while (container.offsetHeight > heightOfLine * test.expected.length);        
+    container.style.width = (width + 1) + 'px';
 
     var lines = ['st', 'nd', 'rd', 'th'];
-    window.getSelection().setPosition(container.firstChild, test.content.length);
+    window.getSelection().setPosition(container.lastChild, container.lastChild.length);
 
     for (var i = 0; i < test.expected.length; i++) {
         if (!window.getSelection().isCollapsed)
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 3ff2196..33594c5 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3191,9 +3191,6 @@ BUGCR64695 : fast/dom/StyleSheet/gc-parent-rule.html = TEXT
 BUGCR64695 : fast/dom/StyleSheet/gc-parent-stylesheet.html = TEXT
 BUGCR64695 : fast/dom/StyleSheet/gc-declaration-parent-rule.html = TEXT
 
-BUGWK50204 : editing/selection/click-left-of-rtl-wrapping-text.html = TEXT
-BUGWK50204 WIN LINUX : editing/selection/modify-up-on-rtl-wrapping-text.html = TEXT
-
 BUGWK50272 MAC : fast/filesystem/async-operations.html = CRASH PASS
 
 BUGCR64733 : editing/text-iterator/findString.html = TEXT
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index ce9edab..c8a9f66 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5572,8 +5572,3 @@ fast/canvas/canvas-strokePath-shadow.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=47727
 mathml/presentation
-
-# REGRESSION(r72861): editing/selection/click-left-of-rtl-wrapping-text.html and modify-up-on-rtl-wrapping-text.html fail on all but Mac platform
-# https://bugs.webkit.org/show_bug.cgi?id=50204
-editing/selection/click-left-of-rtl-wrapping-text.html
-editing/selection/modify-up-on-rtl-wrapping-text.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index f4f413a..94f1cb8 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1069,10 +1069,5 @@ plugins/iframe-shims.html
 # Requires WebP support.
 fast/images/webp-image-decoding.html
 
-# REGRESSION(r72861): editing/selection/click-left-of-rtl-wrapping-text.html and modify-up-on-rtl-wrapping-text.html fail on all but Mac platform
-# https://bugs.webkit.org/show_bug.cgi?id=50204
-editing/selection/click-left-of-rtl-wrapping-text.html
-editing/selection/modify-up-on-rtl-wrapping-text.html
-
 # Missing layoutTestController.findString() http://webkit.org/b/50234
 editing/text-iterator/findString.html

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list