[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tony at chromium.org tony at chromium.org
Thu Apr 8 02:10:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1851e3ecbfd1a1c7c645140460ef2f9c55d51b8d
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 5 04:34:00 2010 +0000

    2010-03-04  Tony Chang  <tony at chromium.org>
    
            Reviewed by Eric Seidel.
    
            https://bugs.webkit.org/show_bug.cgi?id=18819
            Pressing option+page{down,up} should move the cursor and scroll in
            content editable areas.  On other platforms, pressing page{down,up}
            should move the cursor and scroll in content editable areas.
    
            * editing/input/option-page-up-down-expected.txt: Added.
            * editing/input/option-page-up-down.html: Added.
    2010-03-04  Tony Chang  <tony at chromium.org>
    
            Reviewed by Eric Seidel.
    
            https://bugs.webkit.org/show_bug.cgi?id=18819
            Pressing option+page{down,up} should move the cursor and scroll in
            content editable areas.  On other platforms, pressing page{down,up}
            should move the cursor and scroll in content editable areas.
    
            Test: editing/input/option-page-up-down.html
    
            * editing/EditorCommand.cpp:
            (WebCore::verticalScrollDistance):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cb33490..86f7c85 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-04  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        https://bugs.webkit.org/show_bug.cgi?id=18819
+        Pressing option+page{down,up} should move the cursor and scroll in
+        content editable areas.  On other platforms, pressing page{down,up}
+        should move the cursor and scroll in content editable areas.
+
+        * editing/input/option-page-up-down-expected.txt: Added.
+        * editing/input/option-page-up-down.html: Added.
+
 2010-03-03  Oliver Hunt  <oliver at apple.com>
 
         Reviewed by Gavin Barraclough.
diff --git a/LayoutTests/editing/input/option-page-up-down-expected.txt b/LayoutTests/editing/input/option-page-up-down-expected.txt
new file mode 100644
index 0000000..98a5be0
--- /dev/null
+++ b/LayoutTests/editing/input/option-page-up-down-expected.txt
@@ -0,0 +1,3 @@
+On Mac, option+pagedown should move the mouse cursor and scroll in text areas. On other platforms, pagedown should move the mouse cursor and scroll in text areas. This test requires DRT to pass.
+
+PASS
diff --git a/LayoutTests/editing/input/option-page-up-down.html b/LayoutTests/editing/input/option-page-up-down.html
new file mode 100644
index 0000000..6556a3a
--- /dev/null
+++ b/LayoutTests/editing/input/option-page-up-down.html
@@ -0,0 +1,49 @@
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function runTest()
+{
+    var frame = frames[0];
+    var doc = frame.document;
+    var body = doc.body;
+    for (var i = 0; i < 10; ++i)
+        body.innerHTML += "<p>line " + i + "</p>\n";
+    frame.focus();
+    frame.getSelection().setPosition(body.firstChild, 0);
+
+    var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
+    var modifiers = onMacPlatform ? ["altKey"] : [];
+
+    if (!window.eventSender)
+        return;
+
+    eventSender.keyDown("pageDown", modifiers);
+    var line = frame.getSelection().baseNode.nodeValue;
+    if (line != "line 8")
+        throw "cursor should be at line 8, not " + line;
+
+    eventSender.keyDown("pageDown", modifiers);
+    var line = frame.getSelection().baseNode.nodeValue;
+    if (line != "line 9")
+        throw "cursor should be at line 9, not " + line;
+
+    eventSender.keyDown("pageUp", modifiers);
+    var line = frame.getSelection().baseNode.nodeValue;
+    if (line != "line 1")
+        throw "cursor should be at line 1, not " + line;
+
+    document.getElementById("results").innerText = "PASS";
+
+    if (window.layoutTestController)
+        window.layoutTestController.notifyDone();
+}
+</script>
+
+<div>On Mac, option+pagedown should move the mouse cursor and scroll in text areas.  On
+other platforms, pagedown should move the mouse cursor and scroll in text areas.  This
+test requires DRT to pass.</div>
+<iframe src="../resources/contenteditable-iframe-src.html" onload="runTest()"></iframe>
+<div id="results">FAIL</div>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index be02ba5..92d90ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-04  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        https://bugs.webkit.org/show_bug.cgi?id=18819
+        Pressing option+page{down,up} should move the cursor and scroll in
+        content editable areas.  On other platforms, pressing page{down,up}
+        should move the cursor and scroll in content editable areas.
+
+        Test: editing/input/option-page-up-down.html
+
+        * editing/EditorCommand.cpp:
+        (WebCore::verticalScrollDistance):
+
 2010-03-03  Oliver Hunt  <oliver at apple.com>
 
         Reviewed by Gavin Barraclough.
diff --git a/WebCore/editing/EditorCommand.cpp b/WebCore/editing/EditorCommand.cpp
index 437d584..34fa46d 100644
--- a/WebCore/editing/EditorCommand.cpp
+++ b/WebCore/editing/EditorCommand.cpp
@@ -257,7 +257,7 @@ static int verticalScrollDistance(Frame* frame)
     RenderStyle* style = renderer->style();
     if (!style)
         return 0;
-    if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || renderer->isTextArea()))
+    if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focusedNode->isContentEditable()))
         return 0;
     int height = toRenderBox(renderer)->clientHeight();
     return max(max<int>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list