Commit a9d36ce2 authored by mario@webkit.org's avatar mario@webkit.org

2010-12-13 Mario Sanchez Prada <msanchez@igalia.com>

        Reviewed by Xan Lopez.

        [Gtk] Additional support is needed for caret browsing
        https://bugs.webkit.org/show_bug.cgi?id=25526

        New layout test to check the "MoveTo{Beginninng|End}OfDocument"
        commands when caret browsing is enabled.

        * platform/gtk/editing/selection/caret-mode-document-begin-end-expected.txt: Added.
        * platform/gtk/editing/selection/caret-mode-document-begin-end.html: Added.
2010-12-13  Mario Sanchez Prada  <msanchez@igalia.com>

        Reviewed by Xan Lopez.

        [Gtk] Additional support is needed for caret browsing
        https://bugs.webkit.org/show_bug.cgi?id=25526

        Enable "MoveTo{Beginninng|End}OfDocument" commands when caret
        browsing is enabled.

        This change impacts the GTK-port only as caret browsing is a
        feature only used in that platform so far.

        Test: platform/gtk/editing/selection/caret-mode-document-begin-end.html

        * editing/EditorCommand.cpp:
        (WebCore::createCommandMap): Enable the commads when in caret browsing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 89848885
2010-12-13 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Xan Lopez.
[Gtk] Additional support is needed for caret browsing
https://bugs.webkit.org/show_bug.cgi?id=25526
New layout test to check the "MoveTo{Beginninng|End}OfDocument"
commands when caret browsing is enabled.
* platform/gtk/editing/selection/caret-mode-document-begin-end-expected.txt: Added.
* platform/gtk/editing/selection/caret-mode-document-begin-end.html: Added.
2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
......
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > P > SPAN > P > BODY > HTML > #document to 2 of #text > P > SPAN > P > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > P > SPAN > P > BODY > HTML > #document to 2 of #text > P > SPAN > P > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 2 of #text > P > SPAN > P > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 2 of #text > P > SPAN > P > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
First text line.
Second text line.
Third text line.
A paragraph to finish.
This tests direct navigation to the begin and end of the document in caret mode.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
<script>
var successfullyParsed = false;
</script>
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<div id="startHere">
First text line.<br />
Second text line.<br />
Third text line.
</div>
<p>A paragraph to finish.</p>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests direct navigation to the begin and end of the document in caret mode.");
if (window.layoutTestController) {
layoutTestController.overridePreference("WebKitEnableCaretBrowsing", true);
layoutTestController.dumpAsText();
layoutTestController.dumpEditingCallbacks();
startPoint = document.getElementById("startHere");
window.getSelection().setPosition(startPoint.childNodes.item(0), 5);
// Move to the beginning and the end of the document.
layoutTestController.execCommand("MoveToBeginningOfDocument");
layoutTestController.execCommand("MoveToEndOfDocument");
// Try the same commands modifying the selection.
layoutTestController.execCommand("MoveToBeginningOfDocumentAndModifySelection");
window.getSelection().setPosition(startPoint.childNodes.item(0), 5);
layoutTestController.execCommand("MoveToEndOfDocumentAndModifySelection");
}
successfullyParsed = true;
</script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
2010-12-13 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Xan Lopez.
[Gtk] Additional support is needed for caret browsing
https://bugs.webkit.org/show_bug.cgi?id=25526
Enable "MoveTo{Beginninng|End}OfDocument" commands when caret
browsing is enabled.
This change impacts the GTK-port only as caret browsing is a
feature only used in that platform so far.
Test: platform/gtk/editing/selection/caret-mode-document-begin-end.html
* editing/EditorCommand.cpp:
(WebCore::createCommandMap): Enable the commads when in caret browsing.
2010-12-13 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Qt build fix.
......
......@@ -1457,16 +1457,16 @@ static const CommandMap& createCommandMap()
{ "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveRight", { executeMoveRight, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginningOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToBeginningOfSentenceAndModifySelection", { executeMoveToBeginningOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfDocument", { executeMoveToEndOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfDocumentAndModifySelection", { executeMoveToEndOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfDocument", { executeMoveToEndOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfDocumentAndModifySelection", { executeMoveToEndOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfLine", { executeMoveToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfLineAndModifySelection", { executeMoveToEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "MoveToEndOfParagraph", { executeMoveToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment