Bug 87539
| Summary: | createContextualFragment doesn't work with colTag, colgroupTag, framesetTag, headTag, styleTag, and titleTag | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | DOM | Assignee: | 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 | ||
Ryosuke Niwa
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
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).
Ryosuke Niwa
Also, HTMLElement::ieForbidsInsertHTML is never called in setInnerHTML but only in createContextualFragment. There are just so many things wrong with this function.
Darin Adler
Seems like the right place to start is adding a lot more test cases. I’m guessing you’re already thinking of doing that.
Ahmad Saleem
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"
Ryosuke Niwa
I don't think this bug is relevant anymore. We can always file a new one if needed.