Bug 109628 - RenderQuote and RenderCounter should use tasks called before checking needsLayout()
Summary: RenderQuote and RenderCounter should use tasks called before checking needsLa...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 16:27 PST by Elliott Sprehn
Modified: 2017-07-18 08:30 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 Elliott Sprehn 2013-02-12 16:27:35 PST
Instead of dirtying the needsLayout bits during layout like in RenderQuote::updateDepth() we should instead use some kind of pre-layout like task. Unfortunately running before a layout is not quite enough, we instead need to run anytime someone would check needsLayout() to guard a call to layout()

ex. Document::updateLayout() needs this.
Comment 1 Elliott Sprehn 2013-02-12 16:29:52 PST
Note that the reason for this more complicated approach than the current proposal for pre-layout tasks is that RenderView may not need a layout, but there may be some pre-layout tasks that need to run that would then mark it as needing layout so:

if (needsLayout())
  layout();

void layout() {
   // not enough! Since we'll never even get here if needsLayout was false.
  preLayoutTasks();
  realLayout();
}
Comment 2 Elliott Sprehn 2013-02-12 16:30:49 PST
Related bug: https://bugs.webkit.org/show_bug.cgi?id=109616