| <!DOCTYPE html> |
| <html> |
| <body style="background-color: #fee; font-family: 'courier new', monospace; font-size: 13px; word-wrap: break-word;" contenteditable> |
| <p id="description">This test ensures WebKit does not skip paragraphs when determining the insertion position for paste.<br> |
| You should see "hello world<caret> WebKit" below.</p> |
| <div id="test" contenteditable> |
| <font class="Apple-style-span" face="'courier new', monospace"><div style="font-family: arial;"> |
| <span class="Apple-style-span" style="font-family: 'courier new', monospace;">hello</span></div> |
| <div style="font-family: arial; "><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> WebKit</span></div></font> |
| </div> |
| <script src="../editing.js"></script> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <script> |
| |
| Markup.description(document.getElementById('description').textContent); |
| |
| moveSelectionForwardByLineBoundaryCommand(); |
| Markup.dump('test', 'Initial markup'); |
| |
| insertHTMLCommand('<span class="Apple-style-span" style="background-color: #fee;"> world</span>'); |
| Markup.dump('test', 'After inserting " world"'); |
| |
| for (var i = 0; i < 5; i++) // Make sure we're at the very end. |
| moveSelectionForwardByLineCommand(); |
| moveSelectionBackwardByLineBoundaryCommand(); |
| |
| deleteCommand(); |
| Markup.dump('test', 'After deleting line break before " WebKit"'); |
| |
| </script> |
| </body> |
| </html> |