The pain is almost all in the area of browser compatibility.
I kind of agree with your point, in that I think there is a layer missing [ eg. to make resizable UI work well ]. But I think that layer is best implemented in Javascript upon SVG/DOM.
As a comparison : I've used XCode's Interface Builder, and then thrown it away and written iOS UI Layouts by hand, and apparently Im not alone in this. Then I compare that to how much less code I'd need to write in Javascript for the same UI. [ I have implemented HTML5+js UI for iPad that looks like native Cocoa]
Dont get me wrong, I think Cocoa is a good traditional API. But compared to SVG+js APIs such as Cocoa/QT/GTK feel incredibly verbose, slow to iterate and brittle, IMO.