Reviewed by Eric.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jan 2008 19:19:41 +0000 (19:19 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jan 2008 19:19:41 +0000 (19:19 +0000)
commit4db8bb132ee47c877a32a782fcd9e4eca2652727
tree48c06900fc9e3c7f159c8a300c524fc2ec407909
parent779355fb904f71cbe933549177b816366cfd0f96
    Reviewed by Eric.

        - http://bugs.webkit.org/show_bug.cgi?id=16861
          get rid of unnecessary string copying

        * dom/Document.cpp:
        (WebCore::Document::setDomain): Removed unneeded call to copy.
        (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
        unneeded length argument to substring, which stops at the end of the string
        if you don't specify a length.
        (WebCore::Document::createAttributeNS): Replaced code that was calling copy
        with more-efficient code using the substring function.
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
        * editing/InsertIntoTextNodeCommand.cpp:
        (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
        unneeded copy and also initialized text instead of assigning to it.
        (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
        (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.

        * editing/htmlediting.cpp:
        (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
        This one was particularly bad since we just turned around and copied it again!

        * editing/markup.cpp:
        (WebCore::stringValueForRange): Removed unneeded call to copy.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
        get the path from the database object. This was the only reason the database
        had to keep its path around.

        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
        convert the string to a null-terminated one.
        (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
        * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
        functio member. Also tweaked formatting and comments a bit. Removed the unused
        escapeSQLString function.

        * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/StyledElement.cpp
WebCore/editing/InsertIntoTextNodeCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/markup.cpp
WebCore/loader/icon/IconDatabase.cpp
WebCore/platform/sql/SQLiteDatabase.cpp
WebCore/platform/sql/SQLiteDatabase.h
WebCore/platform/text/String.cpp