RESOLVED WONTFIX 107990
Add asserts about when you can call computePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=107990
Summary Add asserts about when you can call computePreferredLogicalWidths
Ojan Vafai
Reported 2013-01-25 15:49:53 PST
Add asserts about when you can call computePreferredLogicalWidths
Attachments
Patch (10.18 KB, patch)
2013-01-25 15:50 PST, Ojan Vafai
no flags
Patch (9.69 KB, patch)
2013-02-06 16:29 PST, Ojan Vafai
no flags
Ojan Vafai
Comment 1 2013-01-25 15:50:51 PST
Ojan Vafai
Comment 2 2013-01-25 15:52:31 PST
I started out with an assert that we only call computePreferredLogicalWidths from within layout. It turns out there are a bunch of cases where we legitimately call computePreferredLogicalWidths outside of layout. So, I ended up with this. This should maybe just be merged into the patch on bug 104829. It's a little weird to commit by itself.
Ojan Vafai
Comment 3 2013-02-06 16:29:12 PST
Elliott Sprehn
Comment 4 2013-02-06 16:35:55 PST
Comment on attachment 186941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186941&action=review Seems strange to do this and not ifdef everything out for release builds. > Source/WebCore/rendering/RenderBox.cpp:889 > + assertIsReadyForWidthComputation(); Should be inside the ifdef above it. > Source/WebCore/rendering/RenderView.cpp:181 > + TemporaryChange<bool> changeInAutoSize(const_cast<bool&>(m_canComputeIntrinsicWidths), true); Is this just overhead on the method calls in release builds? It feels like we should ifdef all the code related to m_canComputeIntrinsicWidths out unless there's some reason for it to exist in release builds. > Source/WebCore/rendering/RenderView.h:237 > + virtual LayoutUnit maxPreferredLogicalWidth() const; Missing OVERRIDE on both of these.
Ojan Vafai
Comment 5 2013-02-19 15:29:58 PST
I'm not convinced this assert adds much value. I'm on the fence, so if Hyatt or someone likes this, I can still add it.
Note You need to log in before you can comment on or make changes to this bug.