IE的execCommand
先看IE大老爷的execCommand。跟踪可以发现,IE支持下列execCommand指令:
.text:63C0DB06 ; ---------------------------------------------------------------------------
.text:63C0DB08 ; public: static struct CBase::CMDINFOSTRUCT const * const CBase::cmdTable
.text:63C0DB08 ?cmdTable@CBase@@2QBUCMDINFOSTRUCT@1@B dd offset loc_63848E05+3
.text:63C0DB08 ; DATA XREF: CBase::CmdIDFromCmdName(ushort const *,ulong *)+21r
.text:63C0DB08 ; CBase::CmdIDFromCmdName(ushort const *,ulong *)+29o ...
.text:63C0DB0C ; int dword_63C0DB0C[]
.text:63C0DB0C dword_63C0DB0C dd 919h ; DATA XREF: CBase::CmdIDFromCmdName(ushort const *,ulong *)+52r
.text:63C0DB10 dd offset aAutourldetect ; "AutoUrlDetect"
.text:63C0DB14 dd 960h
.text:63C0DB18 dd offset aCreatebookmark ; "CreateBookmark"
.text:63C0DB1C dd 84Bh
.text:63C0DB20 dd offset aCreatelink ; "CreateLink"
.text:63C0DB24 dd 84Ch
.text:63C0DB28 dd offset aInsertimage ; "InsertImage"
.text:63C0DB2C dd 878h
.text:63C0DB30 dd offset aBold_0 ; "Bold"
.text:63C0DB34 dd 34h
.text:63C0DB38 dd offset aTristatebold ; "TristateBold"
.text:63C0DB3C dd 5Fh
.text:63C0DB40 dd offset aBrowsemode ; "BrowseMode"
.text:63C0DB44 dd 84Eh
.text:63C0DB48 dd offset aEditmode ; "EditMode"
.text:63C0DB4C dd 84Fh
.text:63C0DB50 dd offset aInsertbutton ; "InsertButton"
.text:63C0DB54 dd 877h
.text:63C0DB58 dd offset aInsertiframe ; "InsertIFrame"
.text:63C0DB5C dd 86Eh
.text:63C0DB60 dd offset aInsertinputbut ; "InsertInputButton"
.text:63C0DB64 dd 843h
.text:63C0DB68 dd offset aInsertinputche ; "InsertInputCheckbox"
.text:63C0DB6C dd 873h
.text:63C0DB70 dd offset aInsertinputima ; "InsertInputImage"
.text:63C0DB74 dd 842h
.text:63C0DB78 dd offset aInsertinputrad ; "InsertInputRadio"
.text:63C0DB7C dd 874h
.text:63C0DB80 dd offset aInsertinputtex ; "InsertInputText"
.text:63C0DB84 dd 871h
.text:63C0DB88 dd offset aInsertselectdr ; "InsertSelectDropdown"
.text:63C0DB8C dd 875h
.text:63C0DB90 dd offset aInsertselectli ; "InsertSelectListbox"
.text:63C0DB94 dd 876h
.text:63C0DB98 dd offset aInserttextarea ; "InsertTextArea"
.text:63C0DB9C dd 872h
.text:63C0DBA0 dd offset aItalic ; "Italic"
.text:63C0DBA4 dd 38h
.text:63C0DBA8 dd offset aTristateitalic ; "TristateItalic"
.text:63C0DBAC dd 60h
.text:63C0DBB0 dd offset aSizetocontrol ; "SizeToControl"
.text:63C0DBB4 dd 23h
.text:63C0DBB8 dd offset aSizetocontrolh ; "SizeToControlHeight"
.text:63C0DBBC dd 24h
.text:63C0DBC0 dd offset aSizetocontrolw ; "SizeToControlWidth"
.text:63C0DBC4 dd 25h
.text:63C0DBC8 dd offset aUnderline_1 ; "Underline"
.text:63C0DBCC dd 3Fh
.text:63C0DBD0 dd offset aTristateunderl ; "TristateUnderline"
.text:63C0DBD4 dd 61h
.text:63C0DBD8 dd offset aCopy ; "Copy"
.text:63C0DBDC dd 0Fh
.text:63C0DBE0 dd offset aCut ; "Cut"
.text:63C0DBE4 dd 10h
.text:63C0DBE8 dd offset psz2 ; "Delete"
.text:63C0DBEC dd 11h
.text:63C0DBF0 dd offset aPrint ; "Print"
.text:63C0DBF4 dd 5Dh
.text:63C0DBF8 dd offset aJustifycenter ; "JustifyCenter"
.text:63C0DBFC dd 39h
.text:63C0DC00 dd offset aJustifyfull ; "JustifyFull"
.text:63C0DC04 dd 32h
.text:63C0DC08 dd offset aJustifyleft ; "JustifyLeft"
.text:63C0DC0C dd 3Bh
.text:63C0DC10 dd offset aJustifyright ; "JustifyRight"
.text:63C0DC14 dd 3Ch
.text:63C0DC18 dd offset aJustifynone ; "JustifyNone"
.text:63C0DC1C dd 5Eh
.text:63C0DC20 dd offset aPaste_0 ; "Paste"
.text:63C0DC24 dd 1Ah
.text:63C0DC28 dd offset aMsPastecontent ; "ms-pasteContentOnly"
.text:63C0DC2C dd 9C4h
.text:63C0DC30 dd offset aMsPastetextonl ; "ms-pasteTextOnly"
.text:63C0DC34 dd 9C5h
.text:63C0DC38 dd offset aPlayimage ; "PlayImage"
.text:63C0DC3C dd 8DFh
.text:63C0DC40 dd offset aStopimage ; "StopImage"
.text:63C0DC44 dd 8E0h
.text:63C0DC48 dd offset aInsertinputres ; "InsertInputReset"
.text:63C0DC4C dd 844h
.text:63C0DC50 dd offset aInsertinputsub ; "InsertInputSubmit"
.text:63C0DC54 dd 845h
.text:63C0DC58 dd offset aInsertinputfil ; "InsertInputFileUpload"
.text:63C0DC5C ; ---------------------------------------------------------------------------
.text:63C0DC5C inc esi
.text:63C0DC5D or [eax], al
.text:63C0DC5F add [eax], bh
.text:63C0DC61 retf
.text:63C0DC61 ; ---------------------------------------------------------------------------
.text:63C0DC62 dw 63C0h
.text:63C0DC64 dd 847h
.text:63C0DC68 dd offset aUnselect ; "Unselect"
.text:63C0DC6C dd 7D7h
.text:63C0DC70 dd offset aBackcolor ; "BackColor"
.text:63C0DC74 dd 33h
.text:63C0DC78 dd offset aForecolor ; "ForeColor"
.text:63C0DC7C dd 37h
.text:63C0DC80 dd offset aFontname ; "FontName"
.text:63C0DC84 dd 12h
.text:63C0DC88 dd offset aFontsize_0 ; "FontSize"
.text:63C0DC8C dd 13h
.text:63C0DC90 dd offset aGetblockformat ; "GetBlockFormats"
.text:63C0DC94 ; ---------------------------------------------------------------------------
.text:63C0DC94 mov ecx, 6C000008h
.text:63C0DC99 retf
.text:63C0DC99 ; ---------------------------------------------------------------------------
.text:63C0DC9A dw 63C0h
.text:63C0DC9C ; ---------------------------------------------------------------------------
.text:63C0DC9C mov edx, 84000008h
.text:63C0DCA1 retf
.text:63C0DCA1 ; ---------------------------------------------------------------------------
.text:63C0DCA2 dw 63C0h
.text:63C0DCA4 dd 88Ah
.text:63C0DCA8 dd offset aInsertmarquee ; "InsertMarquee"
.text:63C0DCAC dd 886h
.text:63C0DCB0 dd offset aInsertorderedl ; "InsertOrderedList"
.text:63C0DCB4 dd 888h
.text:63C0DCB8 dd offset aInsertparagrap ; "InsertParagraph"
.text:63C0DCBC dd 884h
.text:63C0DCC0 dd offset aInsertunordere ; "InsertUnorderedList"
.text:63C0DCC4 dd 889h
.text:63C0DCC8 dd offset aOutdent ; "Outdent"
.text:63C0DCCC dd 88Bh
.text:63C0DCD0 dd offset aUioutdent ; "UIOutdent"
.text:63C0DCD4 dd 967h
.text:63C0DCD8 dd offset aRedo ; "Redo"
.text:63C0DCDC dd 1Dh
.text:63C0DCE0 dd offset aRefresh ; "Refresh"
.text:63C0DCE4 dd 8FCh
.text:63C0DCE8 dd offset aRemoveparaform ; "RemoveParaFormat"
.text:63C0DCEC dd 8CDh
.text:63C0DCF0 dd offset aRemoveformat ; "RemoveFormat"
.text:63C0DCF4 dd 8B6h
.text:63C0DCF8 dd offset aSelectall ; "SelectAll"
.text:63C0DCFC dd 1Fh
.text:63C0DD00 dd offset aStrikethrough ; "StrikeThrough"
.text:63C0DD04 dd 5Bh
.text:63C0DD08 dd offset aSubscript ; "Subscript"
.text:63C0DD0C dd 8C7h
.text:63C0DD10 dd offset aSuperscript ; "Superscript"
.text:63C0DD14 dd 8C8h
.text:63C0DD18 dd offset aUndo ; "Undo"
.text:63C0DD1C dd 2Bh
.text:63C0DD20 dd offset aUnlink ; "Unlink"
.text:63C0DD24 dd 84Dh
.text:63C0DD28 dd offset aInserthorizont ; "InsertHorizontalRule"
.text:63C0DD2C dd 866h
.text:63C0DD30 dd offset aUnbookmark ; "UnBookmark"
.text:63C0DD34 dd 850h
.text:63C0DD38 dd offset aOverwrite ; "OverWrite"
.text:63C0DD3C dd 90Ah
.text:63C0DD40 dd offset aInsertinputpas ; "InsertInputPassword"
.text:63C0DD44 dd 909h
.text:63C0DD48 dd offset aInsertinputhid ; "InsertInputHidden"
.text:63C0DD4C dd 908h
.text:63C0DD50 dd offset aDirltr ; "DirLTR"
.text:63C0DD54 dd 92Eh
.text:63C0DD58 dd offset aDirrtl ; "DirRTL"
.text:63C0DD5C dd 92Fh
.text:63C0DD60 dd offset aBlockdirltr ; "BlockDirLTR"
.text:63C0DD64 dd 930h
.text:63C0DD68 dd offset aBlockdirrtl ; "BlockDirRTL"
.text:63C0DD6C dd 931h
.text:63C0DD70 dd offset aInlinedirltr ; "InlineDirLTR"
.text:63C0DD74 dd 932h
.text:63C0DD78 dd offset aInlinedirrtl ; "InlineDirRTL"
.text:63C0DD7C dd 933h
.text:63C0DD80 dd offset aSaveas ; "SaveAs"
.text:63C0DD84 dd 47h
.text:63C0DD88 dd offset aOpen ; "Open"
.text:63C0DD8C dd 7D0h
.text:63C0DD90 dd offset aStop ; "Stop"
.text:63C0DD94 dd 85Ah
.text:63C0DD98 dd offset aMultipleselect ; "MultipleSelection"
.text:63C0DD9C dd 959h
.text:63C0DDA0 dd offset a2dPosition ; "2D-Position"
.text:63C0DDA4 dd 95Ah
.text:63C0DDA8 dd offset aAbsolutepositi ; "AbsolutePosition"
.text:63C0DDAC dd 95Dh
.text:63C0DDB0 dd offset aLiveresize ; "LiveResize"
.text:63C0DDB4 dd 95Eh
.text:63C0DDB8 dd offset aKeepselection ; "KeepSelection"
.text:63C0DDBC dd 96Ah
.text:63C0DDC0 dd offset aRespectvisibil ; "RespectVisibilityInDesign"
.text:63C0DDC4 dd 965h
.text:63C0DDC8 dd offset aUnloaddocument ; "UnloadDocument"
.text:63C0DDCC dd 96Bh
.text:63C0DDD0 dd offset aClearauthentic ; "ClearAuthenticationCache"
.text:63C0DDD4 dd 3A9Bh
.text:63C0DDD8 dd offset aBackgroundim_2 ; "BackgroundImageCache"
.text:63C0DDDC dd 97Eh
.text:63C0DDE0 dd offset aDefaultparagra ; "DefaultParagraphSeparator"
.text:63C0DDE4 dd 0F3Ch
.text:63C0DDE8 dd offset aMsBeginundouni ; "ms-beginUndoUnit"
.text:63C0DDEC dd 0F3Dh
.text:63C0DDF0 dd offset aMsEndundounit ; "ms-endUndoUnit"
.text:63C0DDF4 dd 0F3Eh
.text:63C0DDF8 dd offset aMsClearundosta ; "ms-clearUndoStack"
.text:63C0DDFC dd 0F3Fh
.text:63C0DE00 dd offset aHilitecolor ; "HiliteColor"
.text:63C0DE04 dd 33h, 2 dup(0)
.text:63C0DE10 db 5 dup(90h)
在网页中调用execCommand之后,在IE中分别经过了:
CFastDOM::CDocument::Trampoline_execCommand(void *,CallInfo,...)
CDocument::execCommand(ushort *,short,tagVARIANT,short *)
CBase::execCommand(ushort * const,short,tagVARIANT)
三步,CBase继承于CDocument嘛,其他细节不用在意。
想起来再写