OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 | |
4 <style> | |
5 .editing { | |
6 border: 2px solid red; | |
7 padding: 12px; | |
8 font-size: 24px; | |
9 } | |
10 .explanation { | |
11 border: 2px solid blue; | |
12 padding: 12px; | |
13 font-size: 24px; | |
14 margin-bottom: 24px; | |
15 } | |
16 </style> | |
17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
18 | |
19 <script> | |
20 if (window.internals) | |
21 internals.settings.setEditingBehavior('mac'); | |
22 | |
23 function editingTest() { | |
24 moveSelectionForwardByLineCommand(); | |
25 for (i = 0; i < 5; i++) | |
26 extendSelectionForwardByWordCommand(); | |
27 for (i = 0; i < 6; i++) | |
28 fontSizeDeltaCommand("+1px"); | |
29 moveSelectionBackwardByCharacterCommand(); | |
30 for (i = 0; i < 2; i++) | |
31 extendSelectionForwardByWordCommand(); | |
32 for (i = 0; i < 6; i++) | |
33 fontSizeDeltaCommand("-1px"); | |
34 } | |
35 | |
36 </script> | |
37 | |
38 <title>Editing Test</title> | |
39 </head> | |
40 <body contenteditable="true"> | |
41 <div class="explanation"> | |
42 Size check should say: 24px. The first two words of the second line should appea
r to be 24px. The rest of the | |
43 words on the second line should appear to be 30px. | |
44 </div> | |
45 | |
46 <div style="font-size: 24px; margin-bottom: 16px;">Size check: <span id="check">
</span></div> | |
47 | |
48 <div id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-lin
e-break: after-white-space;"> | |
49 <div id="test" class="editing">There is a tide | |
50 <div id="sizeTest" class="editing">In the affairs of men | |
51 </div> | |
52 Which taken at the flood | |
53 </div> | |
54 </div> | |
55 | |
56 <script> | |
57 runEditingTest(); | |
58 test = document.getElementById("sizeTest").firstChild; | |
59 check = document.getElementById("check"); | |
60 size = document.defaultView.getComputedStyle(test, "").getPropertyValue("font-si
ze"); | |
61 check.innerHTML = size; | |
62 </script> | |
63 | |
64 </body> | |
65 </html> | |
OLD | NEW |