A Quick Bug Description


I actually found a bug in WebCore ;P. The way the style strings work in WinterBoard is they are passed directly through to the rendering system on the iPhone's UIKit. This, in turn, passes these strings on as styles to WebKit/WebCore.

If you then ask for the width of something that simply doesn't render (display:none) that code crashes. Unfortunately, there is no way to know ahead of time whether it will render or not when the CSS selectors are coming from the end users. When I changed the order that WinterBoard was hooking things this ended up causing a problem.

The fix I added was rather general: I actually hook into WebCore and fix the bug (it now returns 0,0 for the size of something that doesn't exist), so if you have experienced crashes with random selectors in the past (on things other than the icon rendering, where this is now a bigger issue) this may have fixed it.