[Webkit-unassigned] [Bug 33520] Mapping from local to container coord space is O(N^2)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 13 17:40:54 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=33520
--- Comment #10 from James Robinson <jamesr at chromium.org> 2010-01-13 17:40:53 PST ---
LayoutState is used in the position:relative case, but it doesn't help much.
On that page the slow mapping calls are made through a few code paths:
- RenderLayer::updateLayerPositions() calls RenderLayer::convertToLayerCoords()
at each layer without passing any accumulated state in. This means at each
layer it still has to do a walk up every ancestor layer and recalculate the
offsets.
- RenderLayer::updateLayerPositions() calls
RenderBox::outlineBoundsForRepaint() which calls
RenderObject::localToContainerQuad() which calls
RenderBox::mapLocalToContainer(), which walks up each ancestor containing
renderer.
- RenderLayer::hitTestLayer() which descends through each layer and calls
RenderLayer::calculateRects() which calls RenderLayer::convertToLayerCoords()
on each layer. No accumulated state is stored here, so at each layer a walk is
made back up to the root converting to the parent's coordinate system.
During layout 'proper' (RenderView::layout() and children), the layout state is
used to optimize RenderBox::computeRectForRepaint(). In the post-layout
updateLayerPositions() call
(http://trac.webkit.org/browser/trunk/WebCore/page//FrameView.cpp#L700), the
layout state is never set. However RenderBox::computeRectForRepaint() is still
called via RenderLayer::updateLayerPositions() which calls
RenderBox::clippedOverflowRectForRepaint() which calls
RenderBox::computeRectForRepaint(). This means it goes slowpath, and since
it's called unconditionally on every layer it goes slowpath for every layer in
the document.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list