11 border:
2px solid blue;
17 <script src=../editing.js
language=
"JavaScript" type=
"text/JavaScript" ></script>
21 internals
.settings
.setEditingBehavior('mac');
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");
38 <title>Editing Test
</title>
40 <body contenteditable=
"true">
41 <div class=
"explanation">
42 Size check should say:
24px. The first two words of the second line should appear to be
24px. The rest of the
43 words on the second line should appear to be
30px.
46 <div style=
"font-size: 24px; margin-bottom: 16px;">Size check:
<span id=
"check"></span></div>
48 <div id=
"root" style=
"word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-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
52 Which taken at the flood
58 test
= document
.getElementById("sizeTest").firstChild
;
59 check
= document
.getElementById("check");
60 size
= document
.defaultView
.getComputedStyle(test
, "").getPropertyValue("font-size");
61 check
.innerHTML
= size
;