<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 19, 2010, at 2:07 PM, Alex Milowski wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tue, Oct 19, 2010 at 11:29 AM, David Hyatt <<a href="mailto:hyatt@apple.com">hyatt@apple.com</a>> wrote:<br><blockquote type="cite">(1) Make sure any layout methods you call do setNeedsLayout(false) at the end of them.<br></blockquote><blockquote type="cite">(2) Look for any early returns in any of your layout methods, since maybe you did an early return causing the setNeedsLayout(false) to be missed.<br></blockquote><blockquote type="cite">(3) Make sure you aren't dirtying a child for a re-layout without immediately doing that re-layout, e.g., don't call setChildNeedsLayout(true, false) on some child and then bail without doing a layout.<br></blockquote><br>While this is helpful, the current code (in the patch) follows these<br>principles (except when RenderBlock::layout() is called last and so<br>setNeedsLayout(false) is already done). The problem I have is an<br>*ancestor* is marked as having a child needing layout during the<br>layout process. When then MathML layout finishes, the MathML<br>rendering objects do not need layout but the parent is marked with<br>m_normalChildNeedsLayout set to true.<br><br></div></blockquote><div><br></div><div>Ok, just speculating from eyeballing the code.... I think layoutInlineChildren should do setNeedsLayout(false) on inlines when the end of the inline is encountered rather than the start of it.</div><div><br></div><div>The iteration order is start of inline -> contents of inline -> end of inline, and we do setNeedsLayout(false) at the start of the inline. If the contents of the inline end up causing a dirtying up the chain, then this will not be caught and cleared.</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #b731a1"><span class="Apple-tab-span" style="white-space:pre">        </span> else</span> <span style="color: #b731a1">if</span> (<span style="color: #518187">o</span>-><span style="color: #33595d">isText</span>() || (<span style="color: #518187">o</span>-><span style="color: #33595d">isRenderInline</span>() && !endOfInline)) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #b731a1">if</span> (fullLayout || <span style="color: #518187">o</span>-><span style="color: #33595d">selfNeedsLayout</span>())</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #33595d">dirtyLineBoxesForRenderer</span>(<span style="color: #518187">o</span>, fullLayout);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #518187">o</span>-><span style="color: #3c2280">setNeedsLayout</span>(<span style="color: #b731a1">false</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> <span style="color: #b731a1">if</span> (!<span style="color: #518187">o</span>-><span style="color: #33595d">isText</span>())</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(10, 131, 15); "><span style="color: #000000"> </span><span style="color: #33595d">toRenderInline</span><span style="color: #000000">(</span><span style="color: #518187">o</span><span style="color: #000000">)-></span><span style="color: #33595d">invalidateVerticalPosition</span><span style="color: #000000">(); </span>// FIXME: Should do better here and not always invalidate everything.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "> }</div></div></div><br><div>In that code above I think !endOfInline should maybe just become endOfInline instead.</div><div><br></div><div>dave</div><div>(<a href="mailto:hyatt@apple.com">hyatt@apple.com</a>)</div><div><br></div></body></html>