中级农民
- 积分
- 109
- 大米
- 颗
- 鳄梨
- 个
- 水井
- 尺
- 蓝莓
- 颗
- 萝卜
- 根
- 小米
- 粒
- 学分
- 个
- 注册时间
- 2010-1-2
- 最后登录
- 1970-1-1
|
本帖最后由 leonsu777 于 2012-10-12 00:55 编辑
1. keyboard controller received a scan code.
2. the keyboard controller interprets the code and stores it in buffer.
3. the keyboard controller send a hw interrupt to cpu. (via putting signal on "interrupt request line: IRQ1")
4. the interrupt controller unmask signal to maps IRQ1 into INT 9.
5. the process stop current task and invoke interrupt handler, fetch address of ISR from interrupt vector table.
6. ISR read scan code from port 60h, and decide whether to process it or pass the control to program for taking action. ----
hw and os part done
----
7. GUI toolkit(Qt/GTK/MFC)capature this event.
8. Event passed to Webkit(Webcore)
9. Webcore delegate this event to javascript engine's DOM document.
-----
Javascript Engine(part of Webkit) finally receive this Event.
-----
(when Webkit build DOM tree and Render tree. if it meets onClick() attribute, it will register a unique eventlistener on document
document handle all eventlisteners(jsLazyEventListener).)
10. windows.document is singleton that handle all eventlisteners.
11. pasing the Render Tree to find the eventTargetNode(in DOM) which contains all the event tree nodes.
12. get attributes of onClick() on those html nodes.
13. parse this String into a AST tree to intepret it. function definiton, parameters, var....
14. exec() it.
|
|