[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdelibs/khtml/html
From:       Maks Orlovich <maksim () kde ! org>
Date:       2009-04-25 16:42:01
Message-ID: 1240677721.849964.20083.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 959136 by orlovich:

Go ahead and remove restrictions on what elements can be altered
with innerHTML, to match Mozilla's embrace-and-extend of this IE 
extension. We do not take advantage of the context yet, but I am not 
sure we have to do context-aware reconstruction here anyway;
and the weather is way too nice for me to try to make sense of HTML5's
spaghetti code. 

(And whitespace issue with this are a separate report)

Makes google suggest on google.com front page work --- thanks to 
Ariya for mentionning it exists.

Makes the 'other systems' download wizard for flash player on adobe.com 
work --- thanks to 'bokey' on IRC for bringing it up...

Makes stuff show up on mail-archives.apache.org

BUG:168479
BUG:137408


 M  +4 -21     html_elementimpl.cpp  


--- branches/KDE/4.2/kdelibs/khtml/html/html_elementimpl.cpp #959135:959136
@@ -486,27 +486,10 @@
 
 DocumentFragment HTMLElementImpl::createContextualFragment( const DOMString &html )
 {
-    // the following is in accordance with the definition as used by IE
-    if( endTagRequirement(id()) == FORBIDDEN )
-        return DocumentFragment();
-    // 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;
-    switch( id() ) {
-        case ID_COL:
-        case ID_COLGROUP:
-        case ID_FRAMESET:
-        case ID_HEAD:
-        case ID_TABLE:
-        case ID_TBODY:
-        case ID_TFOOT:
-        case ID_THEAD:
-        case ID_TITLE:
-            return DocumentFragment();
-        default:
-            break;
-    }
+    // IE originally restricted innerHTML to a small subset of elements; 
+    // and we largely matched that. Mozilla's embrace of innerHTML, however, extended 
+    // it to pretty much everything, and so the web (and HTML5) requires it now.
+    // For now, we accept everything, but do not do context-based recovery in the parser.
     if ( !document()->isHTMLDocument() )
         return DocumentFragment();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic