1. 28 Mar, 2008 3 commits
    • ap@webkit.org's avatar
      Reviewed by Sam Weinig. · 8027278e
      ap@webkit.org authored
              Fix a dtoa thread safety issue.
      
              WebCore can call kjs_strtod without holding JS lock, but we didn't have thread safety
              compiled in for dtoa.
      
              This is a 0.5% regression on SunSpider, which Sam Weinig has volunteered to cover with
              his recent improvement.
      
              * kjs/dtoa.cpp:
              (Bigint::Balloc):
              (Bigint::Bfree):
              Changed to use fastMalloc/fastDelete - they are much faster than the dtoa custom version was
              in the presence of locking (but somewhat slower in single-threaded case).
              (Bigint::pow5mult): Got rid of the dreaded double-checked locking anti-pattern (had to
              restructure the code to avoid significant performance implications).
              (Bigint::lshift): Rewrote to avoid an allocation, if possible.
      
              (Bigint::rv_alloc):
              (Bigint::kjs_freedtoa):
              (Bigint::kjs_dtoa):
              Check for USE(MULTIPLE_THREADS), not dtoa legacy MULTIPLE_THREADS.
      
              * kjs/InitializeThreading.cpp: Added.
              (KJS::initializeThreading):
              * kjs/InitializeThreading.h: Added.
              Initialize threading at KJS level, if enabled.
      
              * kjs/dtoa.h: Expose dtoa mutex for KJS::initializeThreading.
      
              * kjs/testkjs.cpp: (kjsmain): Call initializeThreading.
      
              * JavaScriptCore.exp: Export KJS::initializeThreading.
      
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCoreSources.bkl:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              Added InitializeThreading.{h,cpp}.
      
              * wtf/Threading.h: Removed a using directive for WTF::initializeThreading - it is only
              to be called from KJS::initializeThreading, and having it in the global namespace is useless.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8027278e
    • beidson@apple.com's avatar
      JavaScriptCore: · 347c0326
      beidson@apple.com authored
      2008-03-28  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin
      
              Export Unicode/UTF8.h and convertUTF16ToUTF8() for more flexible conversion in WebCore
      
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
      
      WebCore:
      
      2008-03-28  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin
      
              Using convertUTF16ToUTF8() from WTF, add a helper function that gives you a UTF8 SharedBuffer
              created from a String.
      
              * ForwardingHeaders/wtf/unicode/UTF8.h: Added.
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::utf8Buffer):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      347c0326
    • mrowe@apple.com's avatar
      2008-03-27 Darin Adler <darin@apple.com> · cb17bd09
      mrowe@apple.com authored
              Reviewed by Mark Rowe.
      
              <rdar://problem/5826236> Regular expressions with large nested repetition counts can have their
              compiled length calculated incorrectly.
      
              * pcre/pcre_compile.cpp:
              (multiplyWithOverflowCheck):
              (calculateCompiledPatternLength): Check for overflow when dealing with nested repetition counts
              and bail with an error rather than returning incorrect results.
      
      2008-03-27  Mark Rowe  <mrowe@apple.com>
      
              Reviewed by Adam Roben.
      
              Tests for <rdar://problem/5826236> Regular expressions with large nested repetition counts can have their
              compiled length calculated incorrectly.
      
              * fast/js/regexp-overflow-expected.txt:
              * fast/js/resources/regexp-overflow.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb17bd09
  2. 26 Mar, 2008 8 commits
  3. 25 Mar, 2008 5 commits
    • aroben@apple.com's avatar
      Fix Bug 18077: Integrate testapi.c into the Windows build · c7d2e7ef
      aroben@apple.com authored
      JavaScriptCore:
      
              Fix Bug 18077: Integrate testapi.c into the Windows build
      
              <http://bugs.webkit.org/show_bug.cgi?id=18077>
      
              Reviewed by Steve Falkenburg.
      
              * JavaScriptCore.vcproj/testapi/testapi.vcproj: Added.
      
      WebCore:
      
              Add an UnusedParam.h forwarding header for use by testapi
      
              Reviewed by Steve Falkenburg.
      
              * ForwardingHeaders/wtf/UnusedParam.h: Added.
      
      WebKit/win:
      
              Fix Bug 18077: Integrate testapi.c into the Windows build
      
              <http://bugs.webkit.org/show_bug.cgi?id=18077>
      
              Reviewed by Steve Falkenburg.
      
              * WebKit.vcproj/WebKit.sln: Added testapi.vcproj to the solution.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7d2e7ef
    • aroben@apple.com's avatar
      Make testapi.c compile under MSVC · 9c907cfc
      aroben@apple.com authored
               Currently you must compile testapi.c as C++ code since MSVC does not
               support many C features that GCC does.
      
               Reviewed by Steve Falkenburg.
      
               * API/testapi.c:
               (nan): Added an implementation of this for MSVC.
               (assertEqualsAsUTF8String): Use malloc instead of dynamically-sized
               stack arrays.
               (assertEqualsAsCharactersPtr): Ditto.
               (print_callAsFunction): Ditto.
               (main): Ditto, and explicitly cast from UniChar* to JSChar*.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c907cfc
    • aroben@apple.com's avatar
      Stop using JavaScriptCore's custom stdbool.h and stdint.h on Windows · eb58f072
      aroben@apple.com authored
               We can't remove the os-win32 directory yet because other ports (at
               least wx) are still relying on it.
      
               Reviewed by Steve Falkenburg.
      
               * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
                 - Made all the include paths match the one for the Debug
                   configuration (these got out of sync in r30797)
                 - Removed os-win32 from the include path
                 - Removed os-win32 from the directories we copy to $WebKitOutputDir.
                 - Removed stdint.h from the project
               * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
               Delete the files that we may have previously copied from the os-win32
               directory.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb58f072
    • ap@webkit.org's avatar
      Windows build fix. · b47ed1e3
      ap@webkit.org authored
              * kjs/dtoa.cpp: Include stdint.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b47ed1e3
    • ap@webkit.org's avatar
      Rubber-stamped by Darin. · 05e93564
      ap@webkit.org authored
              Cleanup dtoa.cpp style.
      
              * kjs/dtoa.cpp:
              (Bigint::Balloc):
              (Bigint::Bfree):
              (Bigint::multadd):
              (Bigint::s2b):
              (Bigint::hi0bits):
              (Bigint::lo0bits):
              (Bigint::i2b):
              (Bigint::mult):
              (Bigint::pow5mult):
              (Bigint::lshift):
              (Bigint::cmp):
              (Bigint::diff):
              (Bigint::ulp):
              (Bigint::b2d):
              (Bigint::d2b):
              (Bigint::ratio):
              (Bigint::):
              (Bigint::match):
              (Bigint::hexnan):
              (Bigint::kjs_strtod):
              (Bigint::quorem):
              (Bigint::rv_alloc):
              (Bigint::nrv_alloc):
              (Bigint::kjs_freedtoa):
              (Bigint::kjs_dtoa):
              * kjs/dtoa.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05e93564
  4. 24 Mar, 2008 2 commits
    • darin@apple.com's avatar
      2008-03-24 Darin Adler <darin@apple.com> · baa2a4bf
      darin@apple.com authored
              Reviewed by Sam.
      
              - convert a JavaScript immediate number to a string more efficiently
      
              2% speedup of Acid3 test 26
      
              * kjs/JSImmediate.cpp:
              (KJS::JSImmediate::toString): Take advantage of the fact that all immediate
              numbers are integers, and use the faster UString function for formatting integers
              instead of the slower one that works for floating point. I think this is a leftover
              from when immediate numbers were floating point.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      baa2a4bf
    • weinig@apple.com's avatar
      JavaScriptCore: · 9aa392a8
      weinig@apple.com authored
      2008-03-23  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=18048
              The "thisObject" parameter to JSEvaluateScript is not used properly
      
              Making passing a thisObject to JSEvaluateScript actually set the thisObject of the created
              ExecState.
      
              * API/testapi.c:
              (main): Add tests for setting the thisObject when calling JSEvaluateScript.
      
              * kjs/ExecState.cpp:
              (KJS::ExecState::ExecState): Assign the thisObject to m_thisValue and remove the comment. 
      
      WebCore:
      
      2008-03-24  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=18048
              The "thisObject" parameter to JSEvaluateScript is not used properly
      
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::evaluate): No need to pass a thisObject since we want the global object to be used.
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::eval): To avoid any change to this function, don't pass a thisObject to keep the same
              behavior.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9aa392a8
  5. 22 Mar, 2008 1 commit
  6. 21 Mar, 2008 5 commits
  7. 20 Mar, 2008 6 commits
  8. 19 Mar, 2008 5 commits
    • mrowe@apple.com's avatar
      2008-03-19 Mark Rowe <mrowe@apple.com> · 3005eed5
      mrowe@apple.com authored
              Reviewed by Sam Weinig.
      
              Fix release build.
      
              * kjs/JSGlobalObject.cpp:  Add missing #include.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3005eed5
    • weinig@apple.com's avatar
      JavaScriptCore: · ccbb2d03
      weinig@apple.com authored
      2008-03-19  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for <rdar://problem/5785694>
              Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
      
              Make the activeExecStates stack per JSGlobalObject instead of static to ensure
              thread safety.
      
              * JavaScriptCore.exp:
              * kjs/ExecState.cpp:
              (KJS::InterpreterExecState::InterpreterExecState):
              (KJS::InterpreterExecState::~InterpreterExecState):
              (KJS::EvalExecState::EvalExecState):
              (KJS::EvalExecState::~EvalExecState):
              (KJS::FunctionExecState::FunctionExecState):
              (KJS::FunctionExecState::~FunctionExecState):
              * kjs/ExecState.h:
              (KJS::):
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::mark):
              * kjs/JSGlobalObject.h:
              (KJS::JSGlobalObject::activeExecStates):
              * kjs/collector.cpp:
              (KJS::Collector::collect):
              (KJS::Collector::reportOutOfMemoryToAllExecStates): Iterate all JSGlobalObjects and report
              the OutOfMemory condition to all the ExecStates in each.
      
      WebCore:
      
      2008-03-19  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for <rdar://problem/5785694>
              Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
      
              Make the activeExecStates stack per JSGlobalObject instead of static to ensure
              thread safety.
      
              * bindings/objc/WebScriptObject.mm:
              (+[WebScriptObject throwException:]): Change to throw an exception on the current
              GlobalObject instead of the top of the static activeExecStates stack.
              (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
              instead of the top of the static activeExecStates stack.
      
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/jni/jni_instance.cpp:
              (JavaInstance::virtualBegin):
              (JavaInstance::virtualEnd):
              * bridge/jni/jni_instance.h:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::~ObjcInstance):
              (ObjcInstance::virtualBegin):
              (ObjcInstance::virtualEnd):
              * bridge/runtime.cpp:
              (KJS::Bindings::Instance::setDidExecuteFunction):
              (KJS::Bindings::Instance::didExecuteFunction):
              (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
              (KJS::Bindings::Instance::currentGlobalObject): Added.
              (KJS::Bindings::Instance::begin):
              (KJS::Bindings::Instance::end):
              * bridge/runtime.h:
              (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
              (KJS::Bindings::Instance::virtualEnd): Renamed from end().
              We now store the currently active globalObject everytime we cross the runtime
              object boundary.  To do this, we take advantage of the existing begin/end
              methods that are called when crossing this boundary, making begin set the current
              globalObject and then call the old begin, now called virtualBegin.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccbb2d03
    • mrowe@apple.com's avatar
      2008-03-19 Jasper Bryant-Greene <jasper@unix.geek.nz> · eef17d7e
      mrowe@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=17941
              Bug 17941: C++-style comments in JavaScriptCore API
      
              * API/JSBase.h:
              Remove C++-style comments from public JavaScriptCore API, replacing
              with standard C90 block comments.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eef17d7e
    • mrowe@apple.com's avatar
      2008-03-19 Mark Rowe <mrowe@apple.com> · 23332b1b
      mrowe@apple.com authored
              Reviewed by Oliver Hunt.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=17939
              Bug 17939: Crash decompiling "const a = 1, b;"
      
              * kjs/nodes2string.cpp:
              (KJS::ConstDeclNode::streamTo): Null-check the correct variable.
      
      2008-03-19  Mark Rowe  <mrowe@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Test for http://bugs.webkit.org/show_bug.cgi?id=17939
              Bug 17939: Crash decompiling "const a = 1, b;"
      
              * fast/js/function-toString-parentheses-expected.txt:
              * fast/js/resources/function-toString-parentheses.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23332b1b
    • oliver@apple.com's avatar
      Bug 17929: Incorrect decompilation with |const|, comma · 823096fa
      oliver@apple.com authored
      http://bugs.webkit.org/show_bug.cgi?id=17929
      
      Reviewed by Mark Rowe
      
      There were actually two bugs here. First we weren't correctly handling const
      nodes with multiple declarations. The second issue was caused by us not
      giving the correct precedence to the initialisers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      823096fa
  9. 18 Mar, 2008 5 commits
    • darin@apple.com's avatar
      JavaScriptCore: · 8a1c16ec
      darin@apple.com authored
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * JavaScriptCore.exp: Updated.
              * kjs/create_hash_table: Compute size of hash table large enough so that there
              are no collisions, but don't generate the hash table.
              * kjs/identifier.h: Made the add function that returns a PassRefPtr public.
              * kjs/lexer.cpp:
              (KJS::Lexer::lex): Updated for change to HashTable interface.
              * kjs/lookup.cpp:
              (KJS::HashTable::changeKeysToIdentifiers): Added. Finds the identifier for
              each property so the equality comparision can be done with pointer comparision.
              * kjs/lookup.h: Made the key be a union of char* with UString::Rep* so it can
              hold identifiers. Added a keysAreIdentifiers flag to the HashTable. Changed
              the Lookup functions to be member functions of HashTable instead.
              * kjs/object.cpp:
              (KJS::JSObject::deleteProperty): Update for change to HashTable.
              (KJS::JSObject::findPropertyHashEntry): Ditto.
              (KJS::JSObject::getPropertyAttributes): Ditto.
              (KJS::JSObject::getPropertyNames): Ditto.
      
      WebCore:
      
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
              (WebCore::JSDOMWindowBase::put): Ditto.
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
              (WebCore::JSLocation::put): Ditto.
              * bindings/js/kjs_binding.cpp:
              (WebCore::nonCachingStaticFunctionGetter): Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
              create_hash_table script.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a1c16ec
    • mrowe@apple.com's avatar
      Fix http://bugs.webkit.org/show_bug.cgi?id=17925 and http://bugs.webkit.org/show_bug.cgi?id=17927. · a9d96b81
      mrowe@apple.com authored
      - Bug 17925: Crash in KJS::JSObject::put after setting this.__proto__
      - Bug 17927: Hang after attempting to create circular __proto__
      
      * kjs/object.cpp:
      (KJS::JSObject::put): Silently ignore attempts to set __proto__ to a non-object, non-null value.
      Return after setting the exception when an attempt to set a cyclic __proto__ is detected so that
      the cyclic value is not set.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9d96b81
    • mjs@apple.com's avatar
      2008-03-18 Maciej Stachowiak <mjs@apple.com> · 30548770
      mjs@apple.com authored
              Reviewed by Oliver.
              
              - inline ActivationImp::init for 0.8% SunSpider speedup
      
              * kjs/Activation.h:
              (KJS::ActivationImp::init): Moved here from function.cpp
              * kjs/function.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30548770
    • hausmann@webkit.org's avatar
      Fix the Qt build. · 312c8e27
      hausmann@webkit.org authored
      Including config.h like in the other .cpp files gets the #ifdeffery
      correct for rand_s.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      312c8e27
    • darin@apple.com's avatar
      JavaScriptCore: · a3c493e3
      darin@apple.com authored
      2008-03-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              JavaScriptCore changes to support a WebCore speedup.
      
              * JavaScriptCore.exp: Export the UString::Rep::computeHash function.
              * wtf/HashSet.h: Added a find and contains function that take a translator,
              like the add function.
      
      WebCore:
      
      2008-03-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - speed up document property fetching (eliminate the AtomicString
                objects made during document property lookup)
      
              3% speedup for Acid3 test 26
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
              locate the AtomicString, only if already present. Also call the new faster
              versions of the hasNamedItem and hasElementWithId functions that don't
              ref/deref the AtomicStringImpl, get inlined, etc.
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
              (WebCore::writeHelper): Use a Vector instead of a String to build up
              the string to avoid the bad performance of string append.
      
              * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
              * dom/Document.h: Added new hasElementWithId function that's faster than
              getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
              inlined, doesn't have to handle the 0 case, and doesn't try to return the
              element pointer (just a boolean).
      
              * html/HTMLAppletElement.cpp:
              (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
              * html/HTMLAppletElement.h: Ditto.
      
              * html/HTMLDocument.cpp:
              (WebCore::addItemToMap): Use AtomicString instead of String.
              (WebCore::removeItemFromMap): Ditto.
              (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
              (WebCore::HTMLDocument::removeNamedItem): Ditto.
              (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
              (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
              (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
              bindings. If we're going to have an empty placeholder function, there's no
              reason to have it in the bindings instead of here.
              * html/HTMLDocument.h: Added clear. Changed the named item function
              arguments to AtomicString insted of String. Changed the NameCountMap to
              use AtomicStringImpl* instead of StringImpl*. Renamed the data members
              to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
              and hasExtraNamedItem functions that are inlined and faster than the old
              idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
              and don't have to handle the 0 case.
              * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
              it out of the JavaScript-specific section.
      
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLFormElement::removedFromDocument): Ditto.
              (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
              * html/HTMLFormElement.h: Ditto.
      
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
              clarity, since the frame name is not the same as the name attribute.
              (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
              (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
              * html/HTMLFrameElementBase.h: Ditto.
      
              * html/HTMLIFrameElement.cpp:
              (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
              * html/HTMLIFrameElement.h: Ditto.
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
              (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLImageElement::removedFromDocument): Ditto.
              * html/HTMLImageElement.h: Ditto.
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
              (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
              (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
              * html/HTMLObjectElement.h: Ditto.
      
              * html/HTMLParamElement.cpp:
              (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
              of callling lower().
      
              * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
              uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
      
              * platform/text/AtomicString.cpp:
              (WebCore::equal): Moved to an inline so we can share this code between a
              few different functions. It could move to a header too if we want to use
              it elsewhere.
              (WebCore::UCharBufferTranslator::equal): Change to use inline.
              (WebCore::HashAndCharactersTranslator::hash): Added.
              (WebCore::HashAndCharactersTranslator::equal): Added.
              (WebCore::HashAndCharactersTranslator::translate): Added.
              (WebCore::AtomicString::add): Improved the Identifier and UString overloads
              to use the already-computed hash code instead of rehashing the string.
              (WebCore::AtomicString::find): Added.
              * platform/text/AtomicString.h: Added a find function so we can avoid
              allocating memory just to look up a string in an atomic string set or map.
      
              * platform/text/StringImpl.h: Added declarations needed for the
              AtomicString changes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3c493e3