Bug 87539

Summary: createContextualFragment doesn't work with colTag, colgroupTag, framesetTag, headTag, styleTag, and titleTag
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, annevk, ap, cdumez, darin, eric, mjs, Ms2ger, rafaelw, sullivan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Ryosuke Niwa 2012-05-25 15:27:32 PDT
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.
Comment 1 Ryosuke Niwa 2012-05-25 15:34:45 PDT
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).
Comment 2 Ryosuke Niwa 2012-05-25 15:44:24 PDT
Also, HTMLElement::ieForbidsInsertHTML is never called in setInnerHTML but only in createContextualFragment. There are just so many things wrong with this function.
Comment 3 Darin Adler 2012-05-26 17:11:07 PDT
Seems like the right place to start is adding a lot more test cases. I’m guessing you’re already thinking of doing that.
Comment 4 Ahmad Saleem 2023-02-12 07:25:46 PST
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"
Comment 5 Ryosuke Niwa 2023-09-25 08:40:47 PDT
I don't think this bug is relevant anymore. We can always file a new one if needed.