Bug 43859

Summary: Node::renderer() should ASSERT(!view() || !view()->needsLayout())
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bdakin, hyatt, jamesr, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   

Description Eric Seidel (no email) 2010-08-11 09:51:48 PDT
Node::renderer() should ASSERT(!view() || !view()->needsLayout())

We should add a new method Node::staleRenderer() which does not ASSERT.  That will make it very clear in the callsites if we can expect the renderer to be up to date or not.  Obviously parts of the code which update renderers (or don't care if they might be stale) will change to use staleRenderer().
Comment 1 Simon Fraser (smfr) 2010-08-11 11:25:59 PDT
What is the impetus for this?
Comment 2 Eric Seidel (no email) 2010-08-16 07:22:29 PDT
To make it clear in the source, whether we expect the renderer to be stale or not.  My understanding is that noob rendering tree programmers get this wrong all the time (assuming that renderer() is up to date).  I suspect we have a number of bugs related to bad assumptions.