Skip to content
  • msaboff@apple.com's avatar
    HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings · 16b0eaf9
    msaboff@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=97740
    
    Reviewed by Darin Adler.
    
    Source/WebCore: 
    
    Changed parserAppendData to take a string instead of a UChar*.  Also added an optional offset
    argument to handle string+offset.  The actual string append now uses the appropriate string
    size.
    
    * dom/CharacterData.cpp:
    (WebCore::CharacterData::parserAppendData):
    * dom/CharacterData.h:
    (CharacterData):
    * dom/Text.cpp:
    (WebCore::Text::createWithLengthLimit):
    * html/parser/HTMLConstructionSite.cpp:
    (WebCore::HTMLConstructionSite::insertTextNode):
    
    Source/WTF: 
    
    Added an append method that takes an LChar source.  Made both the UChar and LChar versions optimally handle
    the appendee and appendend string bitness.
    
    * wtf/text/WTFString.cpp:
    (WTF::String::append):
    * wtf/text/WTFString.h:
    (String):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    16b0eaf9