• benjamin@webkit.org's avatar
    Simplify and clean SpaceSplitString · 590e91cd
    benjamin@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=120385
    
    Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-08-27
    Reviewed by Ryosuke Niwa.
    
    Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
    This brings the following:
    - Fix the coding style of the header.
    - Remove the concepts of empty and null. The list can now be empty or have something.
      There is no null state.
    - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
    
    * WebCore.exp.in:
    * dom/ElementData.h:
    (WebCore::ElementData::hasClass):
    * dom/SpaceSplitString.cpp:
    (WebCore::tokenizeSpaceSplitString):
    (WebCore::SpaceSplitStringData::containsAll):
    (WebCore::SpaceSplitString::set):
    (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
    (WebCore::TokenCounterProcessor::TokenCounterProcessor):
    (WebCore::TokenCounterProcessor::processToken):
    (WebCore::TokenCounterProcessor::tokenCount):
    (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
    (WebCore::TokenInitializerProcessor::processToken):
    (WebCore::TokenInitializerProcessor::nextMemoryBucket):
    (WebCore::SpaceSplitStringData::create):
    (WebCore::SpaceSplitStringData::destroy):
    * dom/SpaceSplitString.h:
    (WebCore::SpaceSplitStringData::contains):
    (WebCore::SpaceSplitStringData::size):
    (WebCore::SpaceSplitStringData::operator[]):
    (WebCore::SpaceSplitStringData::ref):
    (WebCore::SpaceSplitStringData::deref):
    (WebCore::SpaceSplitStringData::SpaceSplitStringData):
    (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
    (WebCore::SpaceSplitStringData::tokenArrayStart):
    (WebCore::SpaceSplitString::SpaceSplitString):
    (WebCore::SpaceSplitString::operator!=):
    (WebCore::SpaceSplitString::clear):
    (WebCore::SpaceSplitString::contains):
    (WebCore::SpaceSplitString::containsAll):
    (WebCore::SpaceSplitString::size):
    (WebCore::SpaceSplitString::isEmpty):
    (WebCore::SpaceSplitString::operator[]):
    (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
    * html/ClassList.cpp:
    (WebCore::ClassList::classNames):
    * page/EventHandler.cpp:
    (WebCore::findDropZone):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    590e91cd
EventHandler.cpp 157 KB