Skip to content
  • commit-queue@webkit.org's avatar
    Add support for 8 bits strings to Document::isValidName() · 44da6440
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=74784
    
    Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-19
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    Avoid the conversion to 16bits when we are in the ASCII fast path,
    otherwise fallback to the Unicode testing in 16bits.
    
    * dom/Document.cpp:
    (WebCore::isValidNameASCII):
    (WebCore::Document::isValidName):
    
    LayoutTests:
    
    Add tests for valid and invalid names for nodes.
    
    * fast/dom/Document/createElement-invalid-names-expected.txt: Added.
    * fast/dom/Document/createElement-invalid-names.html: Added.
    * fast/dom/Document/createElement-valid-names-expected.txt: Added.
    * fast/dom/Document/createElement-valid-names.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    44da6440