<rdar://problem/
4414575> AX: Dictionary popup cannot find some words on Dictionary.app
* editing/editing.js:
Add sentence navigation/selection.
* editing/selection/extend-by-sentence-001-expected.txt: Added.
* editing/selection/extend-by-sentence-001.html: Added.
Test for both <rdar://problem/
4386640> and <rdar://problem/
4414575>.
* fast/dom/inner-text-001-expected.txt: Added.
* fast/dom/inner-text-001.html: Added.
Tests innerText on a variety of elements.
* fast/dom/HTMLObjectElement/form/test1-expected.txt:
* fast/events/mouseclick-target-and-positioning-expected.txt:
* fast/forms/button-in-forms-collection-expected.txt:
* fast/forms/focus-control-to-page-expected.txt:
* fast/forms/focus-expected.txt:
* fast/forms/textarea-hard-linewrap-expected.txt:
* fast/forms/textarea-setvalue-submit-expected.txt:
* fast/loader/loadInProgress-expected.txt:
Updated for innerText changes that emit newlines for more kinds of blocks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13851
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-04-12 David Harrison <harrison@apple.com>
+
+ <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
+ <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
+
+ * editing/editing.js:
+ Add sentence navigation/selection.
+
+ * editing/selection/extend-by-sentence-001-expected.txt: Added.
+ * editing/selection/extend-by-sentence-001.html: Added.
+ Test for both <rdar://problem/4386640> and <rdar://problem/4414575>.
+
+ * fast/dom/inner-text-001-expected.txt: Added.
+ * fast/dom/inner-text-001.html: Added.
+ Tests innerText on a variety of elements.
+
+ * fast/dom/HTMLObjectElement/form/test1-expected.txt:
+ * fast/events/mouseclick-target-and-positioning-expected.txt:
+ * fast/forms/button-in-forms-collection-expected.txt:
+ * fast/forms/focus-control-to-page-expected.txt:
+ * fast/forms/focus-expected.txt:
+ * fast/forms/textarea-hard-linewrap-expected.txt:
+ * fast/forms/textarea-setvalue-submit-expected.txt:
+ * fast/loader/loadInProgress-expected.txt:
+ Updated for innerText changes that emit newlines for more kinds of blocks.
+
2006-04-12 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
//-------------------------------------------------------------------------------------------------------
+function execMoveSelectionForwardBySentenceCommand() {
+ selection.modify("move", "forward", "sentence");
+}
+function moveSelectionForwardBySentenceCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execMoveSelectionForwardBySentenceCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execMoveSelectionForwardBySentenceCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
+function execExtendSelectionForwardBySentenceCommand() {
+ selection.modify("extend", "forward", "sentence");
+}
+function extendSelectionForwardBySentenceCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execExtendSelectionForwardBySentenceCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execExtendSelectionForwardBySentenceCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
function execMoveSelectionForwardByLineCommand() {
selection.modify("move", "forward", "line");
}
//-------------------------------------------------------------------------------------------------------
+function execMoveSelectionBackwardBySentenceCommand() {
+ selection.modify("move", "backward", "sentence");
+}
+function moveSelectionBackwardBySentenceCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execMoveSelectionBackwardBySentenceCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execMoveSelectionBackwardBySentenceCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
+function execExtendSelectionBackwardBySentenceCommand() {
+ selection.modify("extend", "backward", "sentence");
+}
+function extendSelectionBackwardBySentenceCommand() {
+ if (commandDelay > 0) {
+ window.setTimeout(execExtendSelectionBackwardBySentenceCommand, commandCount * commandDelay);
+ commandCount++;
+ }
+ else {
+ execExtendSelectionBackwardBySentenceCommand();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------------
+
function execMoveSelectionBackwardByLineCommand() {
selection.modify("move", "backward", "line");
}
--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)]
+ RenderBlock {FRIJOLE} at (14,14) size 756x56
+ RenderBlock (anonymous) at (0,0) size 756x28
+ RenderText {TEXT} at (0,0) size 132x28
+ text run at (0,0) width 132: "one two three"
+ RenderInline {FRIJOLE} at (0,0) size 0x0
+ RenderText {TEXT} at (0,0) size 0x0
+ RenderBlock (anonymous) at (0,28) size 756x28
+ RenderBlock {DOODAD} at (0,0) size 756x28
+ RenderText {TEXT} at (0,0) size 118x28
+ text run at (0,0) width 118: "four five six"
+ RenderBlock (anonymous) at (0,56) size 756x0
+ RenderInline {FRIJOLE} at (0,0) size 0x0
+selection start: position 0 of child 0 {TEXT} of child 1 {DOODAD} of child 1 {FRIJOLE} of child 1 {FRIJOLE} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+selection end: position 13 of child 0 {TEXT} of child 1 {DOODAD} of child 1 {FRIJOLE} of child 1 {FRIJOLE} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+.cell {
+ padding: 12px;
+ font-size: 24px;
+ height: 48px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ moveSelectionForwardByLineCommand();
+ moveSelectionForwardByWordCommand();
+ moveSelectionBackwardBySentenceCommand();
+ extendSelectionForwardBySentenceCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<frijole style="display:block;" id="test">one two three<frijole>
+<doodad style="display:block;">four five six</doodad>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+Test innerText
+
+Check lists, tables, styled text, and images.
+
+Block flow elements get line breaks before and after. Table cells are tab separated.
+Item 1
+Item 2
+1 2 3
+4 5 6
+
+Right here is an inline block.
+And an inline table with one row is here, too.
+And an inline table with rows not far behind.
+Check collapsed margins
+
+Collapsed margins are supposed to result in an extra line break.
+First header
+
+Second header
+
+First list element
+Second list element
+This line contains an image.
+The innerText of the above:
+
+Test innerText
+
+Check lists, tables, styled text, and images.
+
+Block flow elements get line breaks before and after. Table cells are tab separated.
+Item 1
+Item 2
+1 2 3
+4 5 6
+
+Right here is an inline block.
+And an inline table with one row is here, too.
+And an inline table with rows not far behind.
+Check collapsed margins
+
+Collapsed margins are supposed to result in an extra line break.
+First header
+
+Second header
+
+First list element
+Second list element
+This line contains an image.
+
--- /dev/null
+<html>
+<head>
+ <style type="text/css">
+ ul.colored {
+ background: yellow;
+ margin: 12px 12px 12px 12px;
+ padding: 3px 3px 3px 3px;
+ }
+ li.colored {
+ color: white;
+ background: blue;
+ margin: 12px 12px 12px 12px;
+ padding: 12px 0px 12px 12px;
+ list-style: none;
+ }
+ h4.colored {
+ color: white;
+ background: blue;
+ margin: 12px 12px 12px 12px;
+ padding: 12px 0px 12px 12px;
+ }
+ </style>
+</head>
+
+<body style="font-size: 12px;">
+<div contenteditable id="test" style="border-style:solid; border-color:red">
+<h2>Test innerText</h1>
+<h3>Check lists, tables, styled text, and images.</h3>
+Block flow elements get line breaks before and after. Table cells are tab separated.
+<ul>
+<li>Item 1</li>
+<li>Item 2</li>
+</ul>
+<table border=1><tr><td>1</td><td>2</td><td><span">3</span></td></tr><tr><td>4</td><td>5</td><td><span">6</span></td></tr></table>
+<br>
+Right <h4 style="display:inline">here</h4> is an inline block.
+<br>
+And an <table border=1 style="display:inline"><td>inline</td><td>table</td><td>with</td><td>one</td><td>row</td></table> is here, too.
+<br>
+And an <table border=1 style="display:inline"><tr><td>inline</td><td>table</td></tr><tr><td>with</td><td>rows</td></tr></table> not far behind.
+<h3>Check collapsed margins</h3>
+Collapsed margins are supposed to result in an extra line break.
+<h4 class="colored">First header</h4>
+<h4 class="colored">Second header</h4>
+<ul class="colored">
+ <li class="colored">First list element</li>
+ <li class="colored">Second list element</li>
+</ul>
+This <b>line</b> contains <img src="../replaced/resources/compass.jpg"> an image.
+</div>
+<p><b><u>The innerText of the above:</u></b></p>
+<pre id="innertext"></pre>
+<script>
+ if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+
+ document.getElementById("innertext").innerText = document.getElementById("test").innerText;
+</script>
+</body>
+
+</html>
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
This page tests whether a click event propogates with the correct target and positioning. See rdar://problem/4477126.
-click inside the red box:[]
+click inside the red box:
+[]
PASS: event target should be [object SPAN] and is
PASS: event.pageX should be 175 and is
PASS: event.pageY should be 105 and is
The following tests for regression against 4405: <button> not listed in form collections. You should see a series of lines starting with PASS.
Button2
+
PASS document.test.elements.length is 2
PASS document.test.elements[0].name is "foo"
PASS document.test.elements[1].name is "bla"
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 19 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 19 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
This test checks whether you can tab between AppKit controls and engine-rendered controls or other focusable object in the page like contentEditable areas. As you tab through, select one, text, select two and contentEditable div should focus, in that order.
-
-contentEditable div
- FOCUS: select one
+ contentEditable div
+FOCUS: select one
FOCUS: text
FOCUS: select two
FOCUS: contentEditable div
If the test passes, you should see a line saying "focused 1", then 2, then 3.
-LegendLabel2 Label3
+Legend
+Label2 Label3
focused 1
focused 2
Due to a bug, the textarea is actually a bit wider than we specify via the cols attribute, so, the number and position of the carriage returns in the submitted data is not what you'd expect. The expected results for this testcase should be updated when http://bugzilla.opendarwin.org/show_bug.cgi?id=7505 is fixed.
- Success
+
+Success
ALERT: Test passed: [object FORM]
+