This restriction comes from khtml where it says: http://trac.webkit.org/browser/trunk/WebCore/khtml/html/html_elementimpl.cpp?annotate=blame&rev=9169#L325 // IE disallows innerHTML on inline elements. I don't see why we should have this restriction, as our // dhtml engine can cope with it. Lars //if ( isInline() ) return false; Given that this function is no longer used for innerHTML, I see why we'd want restrict createContextualFragment like this.
Also, http://trac.webkit.org/changeset/3112 has been regressed. We're no longer popping html/body elements for innerHTML. However, we ARE popping them for createContextualElement. I'm inclined to just get rid of both chunks of code given that it's used in the wrong feature (createContextualFragment instead of innerHTML).
Also, HTMLElement::ieForbidsInsertHTML is never called in setInnerHTML but only in createContextualFragment. There are just so many things wrong with this function.
Seems like the right place to start is adding a lot more test cases. I’m guessing you’re already thinking of doing that.
I am unable to find this comment in WebKit source anymore, can we close this now? "// IE disallows innerHTML on inline elements. I don't see why we should have this restriction, as our"
I don't think this bug is relevant anymore. We can always file a new one if needed.