[webkit-dev] dectecting changes from event handling

David Hyatt hyatt at apple.com
Wed Mar 26 10:09:43 PDT 2008

On Mar 26, 2008, at 10:35 AM, jligman at mindspring.com wrote:

> Hi,
> I am trying to understand event handling in the webkit. I have a few  
> questions/confusions. Could anyone tell me how to detect layout  
> changes in the view that are triggered from the event model? For  
> example, when a click occurs on a element with an onclick  
> eventlistener registered that modifies the layout how does this  
> work? I wanted to see when the layout changes, so I poked around and  
> noticed that I could detect if a layout is pending after I sending  
> the event to the eventhandler, but this is general and I don't know  
> how to determine what triggered the layout from here. So, I am  
> wondering if there is something more specific (such as setting a  
> callback with the event handler) that would help me see when the  
> event handler is changing the layout. Basically, I am trying to  
> understand how dhtml event processing works in the engine, so any  
> non-specific (i.e. look at this code/file for a better  
> understanding) type information would be greatly appreciated.

setNeedsLayout (over in RenderObject) is how an object gets marked as  
dirty and needing layout.  You can put a breakpoint there to find out  
when an object gets marked to know why it got marked.


More information about the webkit-dev mailing list