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 extendSelectionForwardByWordCommand(); | |
25 extendSelectionForwardByLineCommand(); | |
26 extendSelectionForwardByWordCommand(); | |
27 for (i = 0; i < 6; i++) | |
28 fontSizeDeltaCommand("+1px"); | |
29 } | |
30 | |
31 </script> | |
32 | |
33 <title>Editing Test</title> | |
34 </head> | |
35 <body contenteditable="true"> | |
36 <div class="explanation"> | |
37 Size check should say: 30px. All text on the first line, and the first two words
of the second line, should appear to be 30px. | |
38 </div> | |
39 | |
40 <div style="font-size: 24px; margin-bottom: 16px;">Size check: <span id="check">
</span></div> | |
41 | |
42 <div id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-lin
e-break: after-white-space;"> | |
43 <div id="test" class="editing">There is a tide | |
44 <div id="foo" class="editing"> | |
45 In the affairs of men | |
46 </div> | |
47 Which taken at the flood | |
48 </div> | |
49 </div> | |
50 | |
51 <script> | |
52 runEditingTest(); | |
53 test = document.getElementById("test").firstChild; | |
54 check = document.getElementById("check"); | |
55 size = document.defaultView.getComputedStyle(test, "").getPropertyValue("font-si
ze"); | |
56 check.innerHTML = size; | |
57 </script> | |
58 | |
59 </body> | |
60 </html> | |
OLD | NEW |