[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

alex at webkit.org alex at webkit.org
Fri Feb 26 22:16:14 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit a614a67a383e339e59d9c1d1f966af9e6bbec641
Author: alex at webkit.org <alex at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 9 20:51:04 2010 +0000

    Problems navigating by caret in links whose text wraps onto
    subsequent lines.
    https://bugs.webkit.org/show_bug.cgi?id=25676
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    We should not search ahead if we are not in the last element.
    
    * dom/Position.cpp:
    
    LayoutTests:
    
    Added tests showing the problem.
    
    * fast/events/multiline-link-arrow-navigation.html
    * fast/events/multiline-link-arrow-navigation-expected.txt
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index af9d048..b0aa94f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-09  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        Problems navigating by caret in links whose text wraps onto
+        subsequent lines.
+        https://bugs.webkit.org/show_bug.cgi?id=25676
+
+        Added tests showing the problem.
+
+        * fast/events/multiline-link-arrow-navigation.html
+        * fast/events/multiline-link-arrow-navigation-expected.txt
+
 2010-02-09  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/fast/events/multiline-link-arrow-navigation-expected.txt b/LayoutTests/fast/events/multiline-link-arrow-navigation-expected.txt
new file mode 100644
index 0000000..6681480
--- /dev/null
+++ b/LayoutTests/fast/events/multiline-link-arrow-navigation-expected.txt
@@ -0,0 +1,3 @@
+This is a test of links which span multiple lines for various and sundry reasons.
+
+PASS
diff --git a/LayoutTests/fast/events/multiline-link-arrow-navigation.html b/LayoutTests/fast/events/multiline-link-arrow-navigation.html
new file mode 100644
index 0000000..83d8441
--- /dev/null
+++ b/LayoutTests/fast/events/multiline-link-arrow-navigation.html
@@ -0,0 +1,26 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+<script>
+if (window.layoutTestController) {
+    layoutTestController.overridePreference("WebKitEnableCaretBrowsing", true);
+    layoutTestController.dumpAsText();
+}
+
+function runTest()
+{
+    var para = document.getElementById("para");
+    window.getSelection().setPosition(para.childNodes.item(1).childNodes.item(0), 15);
+    eventSender.keyDown("rightArrow");
+    eventSender.keyDown("rightArrow");
+
+    document.getElementById("result").innerText = getSelection().baseOffset == 17 ? "PASS" : "FAIL";
+}
+</script>
+
+<title>Test</title>
+</head><body onLoad="runTest();">
+<p id="para" style="-webkit-user-modify: read-write; width: 250px; height: 100px; border: 1px solid blue;">This is a test of <a href="https://bug-25676-attachments.webkit.org/foo.html">links which span multiple lines</a> for various and sundry reasons.</p>
+
+<p id="result"></p>
+</body></html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3cfc586..49cf578 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-09  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Darin Adler.
+
+        Problems navigating by caret in links whose text wraps onto
+        subsequent lines.
+        https://bugs.webkit.org/show_bug.cgi?id=25676
+
+        We should not search ahead if we are not in the last element.
+
+        * dom/Position.cpp:
+
 2010-02-09  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/dom/Position.cpp b/WebCore/dom/Position.cpp
index 0126835..c0f6fa3 100644
--- a/WebCore/dom/Position.cpp
+++ b/WebCore/dom/Position.cpp
@@ -1046,7 +1046,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
 
             candidate = box;
         }
-        if (candidate && !box && affinity == DOWNSTREAM) {
+        if (candidate && candidate == textRenderer->lastTextBox() && affinity == DOWNSTREAM) {
             box = searchAheadForBetterMatch(textRenderer);
             if (box)
                 caretOffset = box->caretMinOffset();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list