7 <script src=../editing.js
language=
"JavaScript" type=
"text/JavaScript"></script>
9 function editingTest() {
11 moveSelectionForwardByCharacterCommand();
12 moveSelectionBackwardByLineCommand();
16 <body onload=
"runEditingTest();">
18 <div id=
"test" contentEditable
style=
"word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
20 <DIV class=
3D
"AppleOriginalContents"><DIV>On Feb
1,
2006, at
7:
37 PM, David Hyatt wrote:
</DIV><BR class=
3D
"Apple-interchange-newline"><BLOCKQUOTE type=
3D
"cite"><DIV
21 style=
3D
"margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
22 margin-left: 0px; ">While reworking images I ran into something that
23 really concerns me.
<SPAN class=
3D
"Apple-converted-space">
24 </SPAN>WebElementImageKey is a key added to the elementAtPoint
25 dictionary and the key's value is an NSImage.
<SPAN
26 class=
3D
"Apple-converted-space"> </SPAN>Unfortunately we use
27 CGImageRef now.
<SPAN class=
3D
"Apple-converted-space"> </SPAN>What
28 this means is that as you move the mouse around a web page we are
29 aggressively mallocing NSImages that then move into our image cache and
30 stay around until the CGImageRef goes away (which could be a long
31 time).
</DIV><DIV style=
3D
"margin-top: 0px; margin-right: 0px;
32 margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV
33 style=
3D
"margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
34 margin-left: 0px; ">I think this is terrible but am not sure how to fix
35 it.
<SPAN class=
3D
"Apple-converted-space"> </SPAN>I assume this key is
36 public API.
<SPAN class=
3D
"Apple-converted-space"> </SPAN>Could we
37 change the key's value to be a CGImageRef instead?
<SPAN
38 class=
3D
"Apple-converted-space"> </SPAN>Could we just eliminate the
39 key in favor of a DOM extension method for accessing an
40 NSImage?
</DIV><DIV style=
3D
"margin-top: 0px; margin-right: 0px;
41 margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV
42 style=
3D
"margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
43 margin-left: 0px; ">dave
</DIV><DIV style=
3D
"margin-top: 0px;
44 margin-right: 0px; margin-bottom: 0px; margin-left: 0px;
45 ">(hyatt@apple.com)
</DIV><DIV style=
3D
"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px;"><BR></DIV> </BLOCKQUOTE></DIV><BR>