Bug 109628
Summary: | RenderQuote and RenderCounter should use tasks called before checking needsLayout() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Elliott Sprehn <esprehn> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | eric, igor.oliveira, inferno, jchaffraix |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Elliott Sprehn
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Elliott Sprehn
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();
}
Elliott Sprehn
Related bug: https://bugs.webkit.org/show_bug.cgi?id=109616