[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf

eric at webkit.org eric at webkit.org
Tue Jan 5 23:53:29 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit a29d4c2986d7bf585a353686e335c363d31a8a06
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 18 09:50:26 2009 +0000

    2009-12-18  Alejandro G. Castro  <alex at igalia.com>
    
            Reviewed by Darin Adler.
    
            REGRESSION (r38898): Using the up arrow in a textarea gets "stuck"
            at the beginning.
            https://bugs.webkit.org/show_bug.cgi?id=31920
    
            Added test showing the problem described in the bug.
    
            * editing/selection/wrapped-line-caret-3.html:
            * editing/selection/wrapped-line-caret-3-expected.txt:
    2009-12-18  Alejandro G. Castro  <alex at igalia.com>
    
            Reviewed by Darin Adler.
    
            REGRESSION (r38898): Using the up arrow in a textarea gets "stuck"
            at the beginning.
            https://bugs.webkit.org/show_bug.cgi?id=31920
    
            Moving up from a position after the end of the previous lines
            should use UPSTREAM affinity to render the caret in the previous
            line.
    
            Test: editing/selection/wrapped-line-caret-3.html
    
            * rendering/RenderText.cpp:
            (WebCore::RenderText::positionForPoint):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52303 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8f3693f..2e2ca1f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-18  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r38898): Using the up arrow in a textarea gets "stuck"
+        at the beginning.
+        https://bugs.webkit.org/show_bug.cgi?id=31920
+
+        Added test showing the problem described in the bug.
+
+        * editing/selection/wrapped-line-caret-3.html:
+        * editing/selection/wrapped-line-caret-3-expected.txt:
+
 2009-12-17  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/editing/selection/wrapped-line-caret-3-expected.txt b/LayoutTests/editing/selection/wrapped-line-caret-3-expected.txt
new file mode 100644
index 0000000..a4f19ec
--- /dev/null
+++ b/LayoutTests/editing/selection/wrapped-line-caret-3-expected.txt
@@ -0,0 +1,4 @@
+This test passes if the caret is at the start of the first line.
+PASS
+
+a xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
diff --git a/LayoutTests/editing/selection/wrapped-line-caret-3.html b/LayoutTests/editing/selection/wrapped-line-caret-3.html
new file mode 100644
index 0000000..d6a775b
--- /dev/null
+++ b/LayoutTests/editing/selection/wrapped-line-caret-3.html
@@ -0,0 +1,17 @@
+<span>This test passes if the caret is at the start of the first line.</span>
+
+<p id="result"></p>
+
+<div id="edit" contentEditable="true" style="width: 350px; height: 100px; border: 1px solid blue;">a <span style=color:blue;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span></div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var edit = document.getElementById("edit");
+window.getSelection().setPosition(edit.childNodes.item(1).childNodes.item(0), 2);
+window.getSelection().modify("move", "backward", "line");
+window.getSelection().modify("move", "backward", "line");
+
+document.getElementById("result").innerText = getSelection().baseOffset == 0 ? "PASS" : "FAIL";
+
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 78f59aa..7df8a9f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-12-18  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r38898): Using the up arrow in a textarea gets "stuck"
+        at the beginning.
+        https://bugs.webkit.org/show_bug.cgi?id=31920
+
+        Moving up from a position after the end of the previous lines
+        should use UPSTREAM affinity to render the caret in the previous
+        line.
+
+        Test: editing/selection/wrapped-line-caret-3.html
+
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::positionForPoint):
+
 2009-12-17  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index 95aa277..5fe4d64 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -338,7 +338,7 @@ VisiblePosition RenderText::positionForPoint(const IntPoint& point)
         // at the y coordinate of the last line or below
         // and the x coordinate is to the right of the last text box right edge
         offset = lastTextBox()->offsetForPosition(point.x());
-        return createVisiblePosition(offset + lastTextBox()->start(), DOWNSTREAM);
+        return createVisiblePosition(offset + lastTextBox()->start(), VP_UPSTREAM_IF_POSSIBLE);
     }
 
     InlineTextBox* lastBoxAbove = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list