Bug 68416

Summary: RenderLayer::root() should not traverse the layer tree for rooted layers
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Julien Chaffraix
Reported 2011-09-19 17:48:31 PDT
Currently we always traverse the RenderLayer up to the root to know which layer is our root. However using the RenderTree we have a way of getting the root RenderLayer's in a constant time. As there is no guarantee that a layer is rooted, we cannot remove the old code but it is fairly common to call root() in a rooted layer (updateLayerPositions for example is called from the FrameView).
Attachments
Julien Chaffraix
Comment 1 2011-09-19 18:20:53 PDT
> As there is no guarantee that a layer is rooted, we cannot remove the old code but it is fairly common to call root() in a rooted layer (updateLayerPositions for example is called from the FrameView). Unfortunately I missed something on this bug: we have no way of knowing if we are rooted unless we walk to the root (calling RenderObject::view() can return something even if we are *not* rooted).
Note You need to log in before you can comment on or make changes to this bug.