1. 28 Mar, 2008 1 commit
    • darin@apple.com's avatar
      2008-03-28 Darin Adler <darin@apple.com> · 3cd8ef7a
      darin@apple.com authored
              Reviewed by Adam.
      
              - eliminate a tiny bit of unnecessary refcount churn
      
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::eventNameForPropertyToken): Return const AtomicString&.
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::getValueProperty): Update for above change.
              (WebCore::JSEventTargetBase::putValueProperty): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cd8ef7a
  2. 04 Mar, 2008 2 commits
    • weinig@apple.com's avatar
      WebCore: · 730d0a9c
      weinig@apple.com authored
              Reviewed by Mark Rowe.
      
              Rename kjs_window to JSDOMWindowBase.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * ChangeLog:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
              * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSEventTargetNode.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSLocation.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSXMLHttpRequest.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/kjs_binding.cpp:
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_navigator.cpp:
              * bindings/js/kjs_proxy.cpp:
              * bindings/js/kjs_window.cpp: Removed.
              * bindings/js/kjs_window.h: Removed.
              * bindings/scripts/CodeGeneratorJS.pm:
              * history/CachedPage.cpp:
              * loader/FrameLoader.cpp:
              * page/Chrome.cpp:
              * page/InspectorController.cpp:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.mm:
              * page/qt/FrameQt.cpp:
              * page/win/FrameWin.cpp:
              * plugins/win/PluginViewWin.cpp:
      
      WebKit/gtk:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              * webkit/webkitwebframe.cpp:
      
      WebKit/qt:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * Api/qwebframe.cpp:
              (QWebFrame::addToJSWindowObject):
      
      WebKit/win:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * WebFrame.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      730d0a9c
    • weinig@apple.com's avatar
      Reviewed by Darin Adler. · 116c68e4
      weinig@apple.com authored
              Remove kjs_dom.{h,cpp}.
      
              - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
                to us a null return value as an indication of failure. (This new logic is used
                for toVoidCallback as well.)
              - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
                functions currently live.
              - Move checkNodeSecurity to kjs_binding, where other frame security functions 
                currently live.
              - Remove getNodeConstructor.  It had no implementation.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::toVoidCallback):
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDatabaseCustom.cpp:
              (WebCore::JSDatabase::changeVersion):
              (WebCore::JSDatabase::transaction):
              * bindings/js/JSElementCustom.cpp:
              (WebCore::JSElement::setAttributeNode):
              (WebCore::JSElement::setAttributeNodeNS):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::toJS):
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLElementCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSXSLTProcessor.cpp:
              * bindings/js/kjs_binding.cpp:
              (WebCore::checkNodeSecurity):
              * bindings/js/kjs_binding.h:
              * bindings/js/kjs_css.cpp:
              * bindings/js/kjs_dom.cpp: Removed.
              * bindings/js/kjs_dom.h: Removed.
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_html.cpp:
              (WebCore::getRuntimeObject):
              * bindings/js/kjs_html.h:
              * bindings/js/kjs_window.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Attr.idl:
              * html/HTMLPlugInElement.cpp:
              * page/InspectorController.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      116c68e4
  3. 23 Feb, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · e25e04e3
      darin@apple.com authored
              Reviewed by Anders.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17067
                eliminate attributes parameter from JSObject::put for speed/clarity
      
              * API/JSCallbackObject.h: Removed attribute arguments.
              * API/JSCallbackObjectFunctions.h:
              (KJS::JSCallbackObject<Base>::put): Ditto.
              * API/JSObjectRef.cpp:
              (JSObjectSetProperty): Use initializeVariable or putDirect when necessary
              to set attribute values.
              * JavaScriptCore.exp: Updated.
              * bindings/objc/objc_runtime.h: Removed attribute arguments.
              * bindings/objc/objc_runtime.mm:
              (ObjcFallbackObjectImp::put): Ditto.
              * bindings/runtime_array.cpp:
              (RuntimeArray::put): Ditto.
              * bindings/runtime_array.h: Ditto.
              * bindings/runtime_object.cpp:
              (RuntimeObjectImp::put): Ditto.
              * bindings/runtime_object.h: Ditto. Also removed canPut which was only
              called from one place in WebCore that can use hasProperty instead.
      
              * kjs/Activation.h: Removed attribute argument from put and added the new
              initializeVariable function that's used to put variables in variable objects.
              Also made isActivationObject a const member.
      
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::put): Removed attribute argument.
              (KJS::JSGlobalObject::initializeVariable): Added. Used to give variables
              their initial values, which can include the read-only property.
              (KJS::JSGlobalObject::reset): Removed obsolete comments about flags.
              Removed Internal flag, which is no longer needed.
              * kjs/JSGlobalObject.h: More of the same.
      
              * kjs/JSVariableObject.h: Added pure virtual initializeVariable function.
              (KJS::JSVariableObject::symbolTablePut): Removed checkReadOnly flag; we always
              check read-only.
              (KJS::JSVariableObject::symbolTableInitializeVariable): Added.
      
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::put): Removed attribute argument.
              * kjs/array_instance.h: Ditto.
      
              * kjs/function.cpp:
              (KJS::FunctionImp::put): Ditto.
              (KJS::Arguments::put): Ditto.
              (KJS::ActivationImp::put): Ditto.
              (KJS::ActivationImp::initializeVariable): Added.
              * kjs/function.h: Removed attribute arguments.
      
              * kjs/function_object.cpp:
              (KJS::FunctionObjectImp::construct): Removed Internal flag.
      
              * kjs/lookup.h:
              (KJS::lookupPut): Removed attributes argument. Also changed to use putDirect
              instead of calling JSObject::put.
              (KJS::cacheGlobalObject): Ditto.
      
              * kjs/nodes.cpp:
              (KJS::ConstDeclNode::handleSlowCase): Call initializeVariable to initialize
              the constant.
              (KJS::ConstDeclNode::evaluateSingle): Ditto.
              (KJS::TryNode::execute): Use putDirect to set up the new object.
              (KJS::FunctionBodyNode::processDeclarations): Removed Internal.
              (KJS::ProgramNode::processDeclarations): Ditto.
              (KJS::EvalNode::processDeclarations): Call initializeVariable to initialize
              the variables and functions.
              (KJS::FuncDeclNode::makeFunction): Removed Internal.
              (KJS::FuncExprNode::evaluate): Ditto.
      
              * kjs/object.cpp: Removed canPut, which was only being used in one code path,
              not the normal high speed one.
              (KJS::JSObject::put): Removed attribute argument. Moved the logic from
              canPut here, in the one code ath that was still using it.
              * kjs/object.h: Removed Internal attribute, ad canPut function. Removed the
              attributes argument to the put function. Made isActivationObject const.
      
              * kjs/regexp_object.cpp:
              (KJS::RegExpImp::put): Removed attributes argument.
              (KJS::RegExpImp::putValueProperty): Ditto.
              (KJS::RegExpObjectImp::put): Ditto.
              (KJS::RegExpObjectImp::putValueProperty): Ditto.
              * kjs/regexp_object.h: Ditto.
      
              * kjs/string_object.cpp:
              (KJS::StringInstance::put): Removed attributes argument.
              * kjs/string_object.h: Ditto.
      
      WebCore:
      
              Reviewed by Anders.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17067
                eliminate attributes parameter from JSObject::put for speed/clarity
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
      
              * bindings/js/JSCanvasPixelArrayCustom.cpp:
              (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
              (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
              CanvasPixelArray object, for consistency with the getter. Removed attributes
              argument.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customPut): Removed special case for variable
              initialization, which is not needed since that does use put any more.
              Removed attributes argument.
      
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
              (WebCore::JSEventTargetBase::put): Ditto.
              (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNode::put): Removed attributes argument.
              (WebCore::JSEventTargetNode::putValueProperty): Ditto.
              * bindings/js/JSEventTargetNode.h: Ditto.
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              (WebCore::JSHTMLAppletElement::customPut): Ditto.
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              (WebCore::JSHTMLEmbedElement::customPut): Ditto.
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::put): Ditto.
              (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
              * bindings/js/JSHTMLInputElementBase.h: Ditto.
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              (WebCore::JSHTMLObjectElement::customPut): Ditto.
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::customPut): Ditto.
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::put): Ditto.
              * bindings/js/JSLocation.h: Ditto.
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::JSXMLHttpRequest::put): Ditto.
              (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
              * bindings/js/JSXMLHttpRequest.h: Ditto.
      
              * bindings/js/kjs_dom.cpp:
              (WebCore::getRuntimeObject): Changed return type to JSObject*.
              * bindings/js/kjs_dom.h: Ditto.
      
              * bindings/js/kjs_events.cpp:
              (WebCore::JSClipboard::put): Removed attributes argument.
              (WebCore::JSClipboard::putValueProperty): Ditto.
              * bindings/js/kjs_events.h: Ditto.
      
              * bindings/js/kjs_html.cpp:
              (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
              return a JSObject. Used early exit idiom.
              (WebCore::runtimeObjectPropertyGetter): Ditto.
              (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
              (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
              that we should put with the property syntax instead of canPut.
              (WebCore::runtimeObjectImplementsCall): Ditto.
              (WebCore::runtimeObjectCallAsFunction): Ditto.
              * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
      
              * bindings/js/kjs_window.cpp:
              (KJS::Window::put): Removed attributes argument.
              * bindings/js/kjs_window.h: Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
              putValueProperty, customPut, and indexSetter.
      
              * html/CanvasPixelArray.h:
              (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
              function. Before, the checking was done in the JavaScript bindings for set.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e25e04e3
  4. 06 Feb, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 8e21ef11
      darin@apple.com authored
              Reviewed by Sam.
      
              - replace calls to put to set up properties with calls to putDirect, to
                prepare for a future change where put won't take attributes any more,
                and for a slight performance boost
      
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor): Use putDirect instead of put.
              * kjs/CommonIdentifiers.h: Removed lastIndex.
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::reset): Use putDirect instead of put.
              * kjs/array_object.cpp:
              (KJS::arrayProtoFuncConcat): Took out extra call to get length (unused).
              (KJS::ArrayObjectImp::ArrayObjectImp): Use putDirect instead of put.
              * kjs/error_object.cpp:
              (KJS::ErrorPrototype::ErrorPrototype): Use putDirect instead of put.
              * kjs/function.cpp:
              (KJS::Arguments::Arguments): Use putDirect instead of put.
              (KJS::PrototypeFunction::PrototypeFunction): Use putDirect instead of put.
              * kjs/function_object.cpp:
              (KJS::FunctionObjectImp::construct): Use putDirect instead of put.
              * kjs/nodes.cpp:
              (KJS::FuncDeclNode::makeFunction): Use putDirect instead of put.
              (KJS::FuncExprNode::evaluate): Use putDirect instead of put.
              * kjs/regexp_object.cpp:
              (KJS::regExpProtoFuncCompile): Use setLastIndex instead of put(lastIndex).
              (KJS::RegExpImp::match): Get and set lastIndex by using m_lastIndex instead of
              calling get and put.
              * kjs/regexp_object.h:
              (KJS::RegExpImp::setLastIndex): Added.
              * kjs/string_object.cpp:
              (KJS::stringProtoFuncMatch): Use setLastIndex instead of put(lastIndex).
      
      WebCore:
      
              Reviewed by Sam.
      
              - replace calls to put to set up properties with calls to putDirect, to
                prepare for a future change where put won't take attributes any more,
                and for a slight performance boost
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetPrototype::self): Ditto.
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e21ef11
  5. 15 Jan, 2008 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · 5902380f
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
      
              - This changes the way JS functions that use Lookup tables are handled.  Instead using
                one class per function, which allowed specialization of the virtual callAsFunction
                method, we now use on class, PrototypeFunction, which takes a pointer to a static
                function to use as the implementation.  This significantly decreases the binary size
                of JavaScriptCore (about 145k on an Intel only build) while still keeping some of the
                speedup r27608 garnered (SunSpider says this is 1.005x as slow, which should leave some
                wiggle room from the original 1% speedup) and keeps the functions implementations in separate
                functions to help with optimizations.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * kjs/array_object.cpp:
              (KJS::arrayProtoFuncToString):
              (KJS::arrayProtoFuncToLocaleString):
              (KJS::arrayProtoFuncJoin):
              (KJS::arrayProtoFuncConcat):
              (KJS::arrayProtoFuncPop):
              (KJS::arrayProtoFuncPush):
              (KJS::arrayProtoFuncReverse):
              (KJS::arrayProtoFuncShift):
              (KJS::arrayProtoFuncSlice):
              (KJS::arrayProtoFuncSort):
              (KJS::arrayProtoFuncSplice):
              (KJS::arrayProtoFuncUnShift):
              (KJS::arrayProtoFuncFilter):
              (KJS::arrayProtoFuncMap):
              (KJS::arrayProtoFuncEvery):
              (KJS::arrayProtoFuncForEach):
              (KJS::arrayProtoFuncSome):
              (KJS::arrayProtoFuncIndexOf):
              (KJS::arrayProtoFuncLastIndexOf):
              * kjs/array_object.h:
              * kjs/date_object.cpp:
              (KJS::DatePrototype::getOwnPropertySlot):
              (KJS::dateProtoFuncToString):
              (KJS::dateProtoFuncToUTCString):
              (KJS::dateProtoFuncToDateString):
              (KJS::dateProtoFuncToTimeString):
              (KJS::dateProtoFuncToLocaleString):
              (KJS::dateProtoFuncToLocaleDateString):
              (KJS::dateProtoFuncToLocaleTimeString):
              (KJS::dateProtoFuncValueOf):
              (KJS::dateProtoFuncGetTime):
              (KJS::dateProtoFuncGetFullYear):
              (KJS::dateProtoFuncGetUTCFullYear):
              (KJS::dateProtoFuncToGMTString):
              (KJS::dateProtoFuncGetMonth):
              (KJS::dateProtoFuncGetUTCMonth):
              (KJS::dateProtoFuncGetDate):
              (KJS::dateProtoFuncGetUTCDate):
              (KJS::dateProtoFuncGetDay):
              (KJS::dateProtoFuncGetUTCDay):
              (KJS::dateProtoFuncGetHours):
              (KJS::dateProtoFuncGetUTCHours):
              (KJS::dateProtoFuncGetMinutes):
              (KJS::dateProtoFuncGetUTCMinutes):
              (KJS::dateProtoFuncGetSeconds):
              (KJS::dateProtoFuncGetUTCSeconds):
              (KJS::dateProtoFuncGetMilliSeconds):
              (KJS::dateProtoFuncGetUTCMilliseconds):
              (KJS::dateProtoFuncGetTimezoneOffset):
              (KJS::dateProtoFuncSetTime):
              (KJS::dateProtoFuncSetMilliSeconds):
              (KJS::dateProtoFuncSetUTCMilliseconds):
              (KJS::dateProtoFuncSetSeconds):
              (KJS::dateProtoFuncSetUTCSeconds):
              (KJS::dateProtoFuncSetMinutes):
              (KJS::dateProtoFuncSetUTCMinutes):
              (KJS::dateProtoFuncSetHours):
              (KJS::dateProtoFuncSetUTCHours):
              (KJS::dateProtoFuncSetDate):
              (KJS::dateProtoFuncSetUTCDate):
              (KJS::dateProtoFuncSetMonth):
              (KJS::dateProtoFuncSetUTCMonth):
              (KJS::dateProtoFuncSetFullYear):
              (KJS::dateProtoFuncSetUTCFullYear):
              (KJS::dateProtoFuncSetYear):
              (KJS::dateProtoFuncGetYear):
              * kjs/date_object.h:
              * kjs/function.cpp:
              (KJS::PrototypeFunction::PrototypeFunction):
              (KJS::PrototypeFunction::callAsFunction):
              * kjs/function.h:
              * kjs/lookup.h:
              (KJS::HashEntry::):
              (KJS::staticFunctionGetter):
              * kjs/math_object.cpp:
              (KJS::mathProtoFuncAbs):
              (KJS::mathProtoFuncACos):
              (KJS::mathProtoFuncASin):
              (KJS::mathProtoFuncATan):
              (KJS::mathProtoFuncATan2):
              (KJS::mathProtoFuncCeil):
              (KJS::mathProtoFuncCos):
              (KJS::mathProtoFuncExp):
              (KJS::mathProtoFuncFloor):
              (KJS::mathProtoFuncLog):
              (KJS::mathProtoFuncMax):
              (KJS::mathProtoFuncMin):
              (KJS::mathProtoFuncPow):
              (KJS::mathProtoFuncRandom):
              (KJS::mathProtoFuncRound):
              (KJS::mathProtoFuncSin):
              (KJS::mathProtoFuncSqrt):
              (KJS::mathProtoFuncTan):
              * kjs/math_object.h:
              * kjs/string_object.cpp:
              (KJS::stringProtoFuncToString):
              (KJS::stringProtoFuncValueOf):
              (KJS::stringProtoFuncCharAt):
              (KJS::stringProtoFuncCharCodeAt):
              (KJS::stringProtoFuncConcat):
              (KJS::stringProtoFuncIndexOf):
              (KJS::stringProtoFuncLastIndexOf):
              (KJS::stringProtoFuncMatch):
              (KJS::stringProtoFuncSearch):
              (KJS::stringProtoFuncReplace):
              (KJS::stringProtoFuncSlice):
              (KJS::stringProtoFuncSplit):
              (KJS::stringProtoFuncSubstr):
              (KJS::stringProtoFuncSubstring):
              (KJS::stringProtoFuncToLowerCase):
              (KJS::stringProtoFuncToUpperCase):
              (KJS::stringProtoFuncToLocaleLowerCase):
              (KJS::stringProtoFuncToLocaleUpperCase):
              (KJS::stringProtoFuncLocaleCompare):
              (KJS::stringProtoFuncBig):
              (KJS::stringProtoFuncSmall):
              (KJS::stringProtoFuncBlink):
              (KJS::stringProtoFuncBold):
              (KJS::stringProtoFuncFixed):
              (KJS::stringProtoFuncItalics):
              (KJS::stringProtoFuncStrike):
              (KJS::stringProtoFuncSub):
              (KJS::stringProtoFuncSup):
              (KJS::stringProtoFuncFontcolor):
              (KJS::stringProtoFuncFontsize):
              (KJS::stringProtoFuncAnchor):
              (KJS::stringProtoFuncLink):
              * kjs/string_object.h:
      
      WebCore:
      
              Reviewed by Geoffrey Garen.
      
              Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
      
              - Update JS Function implementations to use a static function based method. This decreases
                the binary size of an Intel only build by 1013.5K.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::jsEventTargetAddEventListener):
              (WebCore::jsEventTargetRemoveEventListener):
              (WebCore::jsEventTargetDispatchEvent):
              (WebCore::retrieveEventTargetAndCorrespondingNode):
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::getOwnPropertySlot):
              (WebCore::jsLocationProtoFuncReplace):
              (WebCore::jsLocationProtoFuncReload):
              (WebCore::jsLocationProtoFuncAssign):
              (WebCore::jsLocationProtoFuncToString):
              * bindings/js/JSLocation.h:
              * bindings/js/JSXMLHttpRequest.cpp:
              (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
              (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
              (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
              (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
              (KJS::jsXMLHttpRequestPrototypeFunctionSend):
              (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
              (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
              (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
              (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
              (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
              * bindings/js/JSXMLHttpRequest.h:
              * bindings/js/JSXSLTProcessor.cpp:
              (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
              (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
              (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
              (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
              (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
              (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
              (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
              (KJS::jsXSLTProcessorPrototypeFunctionReset):
              * bindings/js/JSXSLTProcessor.h:
              * bindings/js/kjs_events.cpp:
              (WebCore::jsClipboardPrototypeFunctionClearData):
              (WebCore::jsClipboardPrototypeFunctionGetData):
              (WebCore::jsClipboardPrototypeFunctionSetData):
              (WebCore::jsClipboardPrototypeFunctionSetDragImage):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_navigator.cpp:
              (KJS::pluginsFunctionRefresh):
              (KJS::navigatorProtoFuncJavaEnabled):
              * bindings/js/kjs_navigator.h:
              * bindings/js/kjs_window.cpp:
              (KJS::Window::getOwnPropertySlot):
              (KJS::windowProtoFuncAToB):
              (KJS::windowProtoFuncBToA):
              (KJS::windowProtoFuncOpen):
              (KJS::windowProtoFuncSetTimeout):
              (KJS::windowProtoFuncClearTimeout):
              (KJS::windowProtoFuncSetInterval):
              (KJS::windowProtoFuncAddEventListener):
              (KJS::windowProtoFuncRemoveEventListener):
              (KJS::windowProtoFuncShowModalDialog):
              (KJS::windowProtoFuncNotImplemented):
              * bindings/js/kjs_window.h:
              * bindings/scripts/CodeGenerator.pm:
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5902380f
  6. 15 Dec, 2007 2 commits
    • darin@apple.com's avatar
      Reviewed by Mark Rowe. · b66f7faf
      darin@apple.com authored
              - better build fix for the problem affecting GTK and some other platforms
                "this time for sure"
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
              * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
              which won't work, declare the tables that are in the .lut.h file in the header.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b66f7faf
    • zimmermann@webkit.org's avatar
      Reviewed by Eric. · 10eb8420
      zimmermann@webkit.org authored
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
      
      Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
      in the base class. Applied the same refactorization to EventTargetNode.
      
      This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
      to share as much code as possible with the EventTargetNode classes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10eb8420