Bug 43859 - Node::renderer() should ASSERT(!view() || !view()->needsLayout())
Summary: Node::renderer() should ASSERT(!view() || !view()->needsLayout())
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 09:51 PDT by Eric Seidel (no email)
Modified: 2010-08-16 07:22 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.