Bug 68416
Summary: | RenderLayer::root() should not traverse the layer tree for rooted layers | ||
---|---|---|---|
Product: | WebKit | Reporter: | Julien Chaffraix <jchaffraix> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Julien Chaffraix
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Julien Chaffraix
> 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).