- 20 Mar, 2008 1 commit
-
-
aroben@apple.com authored
Part of Bug 17133: Should support pausing JavaScript execution without hanging the process <http://bugs.webkit.org/show_bug.cgi?id=17133> <rdar://problem/5719551> Two new methods are added to KJSProxy: setPaused and isPaused. When setPaused(true) is called, JS event handlers are blocked and javascript: URIs will not be evaluated. Reviewed by Tim Hatcher. * bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): - Removed some old KJS_DEBUGGER code - Don't run the handler if the KJSProxy is paused. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::KJSProxy): Initialize new member. * bindings/js/kjs_proxy.h: Added new methods. * loader/FrameLoader.cpp: (WebCore::FrameLoader::executeScript): Don't execute the script if the KJSProxy is paused. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Mar, 2008 2 commits
-
-
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
-
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
-
- 14 Mar, 2008 1 commit
-
-
andersca@apple.com authored
Reviewed by Sam. <rdar://problem/5794989> https://bugs.webkit.org/show_bug.cgi?id=17792 REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame. * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::createWindow): * loader/FrameLoader.h: LayoutTests: Reviewed by Sam. <rdar://problem/5794989> https://bugs.webkit.org/show_bug.cgi?id=17792 REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work Add tests. * fast/dom/Window/window-open-self-from-other-frame-expected.txt: Added. * fast/dom/Window/window-open-self-from-other-frame.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 10 Mar, 2008 6 commits
-
-
justin.garcia@apple.com authored
Reviewed by Sam. <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): Fixed a typo. The code was only comparing the first character of the prefix to the first character of the property name. LayoutTests: Reviewed by Sam. <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog * editing/pasteboard/5780697-2-expected.txt: Added. * editing/pasteboard/5780697-2.html: Added. * editing/selection/5779984-1-expected.txt: Added. * editing/selection/5779984-1.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Remove KJS::UChar, use ::UChar instead http://bugs.webkit.org/show_bug.cgi?id=17017 To functional changes, thus no tests. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): (WebCore::cssPropertyName): * bindings/js/JSDOMWindowBase.cpp: (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA): * bindings/js/JSSVGPODTypeWrapper.h: * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): * bridge/objc/objc_utility.mm: (KJS::Bindings::throwError): * dom/Document.cpp: (WebCore::Document::parseQualifiedName): * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): * platform/text/String.cpp: (WebCore::String::String): (WebCore::String::operator Identifier): (WebCore::String::operator UString): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): * svg/SVGAnimatedTemplate.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
* bindings/js/JSDOMWindowCustom.cpp: (WebCore::markDOMObjectWrapper): Tweaked a tiny bit. (WebCore::JSDOMWindow::mark): Sorted alphabetically. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
- fix failing regression test (window.navigator is getting garbage collected and thus losing its custom properties) * bindings/js/JSDOMWindowCustom.cpp: (WebCore::markDOMObject): Added helper function. (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang off the window object. * page/DOMWindow.h: (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without creating it if it's already there. (WebCore::DOMWindow::optionalSelection): Ditto. (WebCore::DOMWindow::optionalHistory): Ditto. (WebCore::DOMWindow::optionalLocationbar): Ditto. (WebCore::DOMWindow::optionalMenubar): Ditto. (WebCore::DOMWindow::optionalPersonalbar): Ditto. (WebCore::DOMWindow::optionalScrollbars): Ditto. (WebCore::DOMWindow::optionalStatusbar): Ditto. (WebCore::DOMWindow::optionalToolbar): Ditto. (WebCore::DOMWindow::optionalConsole): Ditto. (WebCore::DOMWindow::optionalNavigator): Ditto. * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in alphabetical order since there are a lot of them. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed and landed by Darin. bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR. * bindings/js/kjs_binding.cpp: (WebCore::setDOMException): Removed PERMISSION_DENIED code. * dom/ExceptionCode.cpp: Added SECURITY_ERR exception. * dom/ExceptionCode.h: Ditto. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now. * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED. LayoutTests: Reviewed and landed by Darin. bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations * http/tests/xmlhttprequest/exceptions-expected.txt: Updated results git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
hausmann@webkit.org authored
http://bugs.webkit.org/show_bug.cgi?id=16815 Reviewed by Darin. Done with Lars. WebCore: Ported the manually written JS bindings of window.navigator, window.navigator.plugins and window.navigator.mimeTypes to auto-generated bindings. Moved the globally cached plugin and mimetype information to a per WebCore::Page shared PluginData structure. Implemented window.navigator.plugins.refresh() in a platform-independent way. LayoutTests: Added a testcase for http://bugs.webkit.org/show_bug.cgi?id=16815 WebKit/qt: Replaced the QWebObjectPlugin interfaces with QWebPluginFactory. WebKit/mac: Simplified WebViewFactory's refreshPlugins method to only refresh the plugins and not reload the frames anymore since that's now done in a platform independent manner by WebCore::Page. Also removed the now unused pluginNameForMIMEType and pluginSupportsMIMEType methods. WebKitTools/DumpRenderTree/qt: Ported the netscape test plugin to QWebPluginFactory. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 09 Mar, 2008 1 commit
-
-
darin@apple.com authored
* bindings/js/JSRGBColor.cpp: And touching this file. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 08 Mar, 2008 1 commit
-
-
oliver@apple.com authored
Reviewed by Mitz Trivial fix, we were calling toString on null which produces the string "null", we just needed to switch to using valueToStringWithNullCheck rather than JSValue::toString directly Test: fast/canvas/canvas-pattern-behaviour.html git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 05 Mar, 2008 3 commits
-
-
andersca@apple.com authored
Reviewed by Geoff. Don't build JavaScriptCore/bindings. * JavaScriptCore.exp: Export a couple of new functions. * JavaScriptCore.xcodeproj/project.pbxproj: Remove bindings/ * kjs/config.h: No need to define HAVE_JNI anymore. * kjs/interpreter.cpp: Remove unnecessary include. WebCore: Reviewed by Geoff. * WebCore.base.exp: Add the NPN and KJS methods. * WebCore.xcodeproj/project.pbxproj: Bring in bridge/ * config.h: Add HAVE_JNI define. * bindings/js/kjs_html.cpp: * bindings/objc/DOMInternal.mm: * bindings/objc/DOMUtility.mm: * bindings/objc/WebScriptObject.mm: * html/HTMLAppletElement.cpp: * html/HTMLEmbedElement.cpp: * html/HTMLObjectElement.cpp: * html/HTMLPlugInElement.cpp: * page/Frame.cpp: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.mm: * page/mac/WebCoreScriptDebugger.mm: * plugins/win/PluginViewWin.cpp: Include file changes. WebKit/mac: Reviewed by Geoff. Include file changes. * Plugins/WebBaseNetscapePluginView.mm: * Plugins/WebNetscapePluginPackage.m: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
* bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mjs@apple.com authored
Reviewed by Sam and Oliver. - fixed http://bugs.webkit.org/show_bug.cgi?id=16289 - fixed Acid3 tests 26 and 27 (not exactly the same issue but related) * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::mark): When marking a node that's in-document, mark the owner document if it hasn't been already. This means holding on to a single node from an unreferenced document now keeps the whole document alive. We are now at 90/100 on Acid3. LayoutTests: Reviewed by Sam and Oliver. - test for http://bugs.webkit.org/show_bug.cgi?id=16289 - test for Acid3 tests 26 and 27 (not exactly the same issue but related) * fast/dom/gc-11-expected.txt: Added. Test case from bug 16289. * fast/dom/gc-11.html: Added. * fast/dom/gc-acid3.html: Added. DOM garbage collection part of Acid3. * fast/dom/gc-acid3-expected.txt: Added. * fast/dom/gc-6-expected.txt: Updated results. The old assumptions of this test were in conflict with the requirements of Acid3. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 04 Mar, 2008 10 commits
-
-
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
-
weinig@apple.com authored
Use JSDOMWindow exclusively instead of JSDOMWindowBase. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::timerFired): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Rename kjs_css to JSRGBColor. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp. * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h. * bindings/js/kjs_css.cpp: Removed. * bindings/js/kjs_css.h: Removed. * bindings/js/kjs_window.cpp: * bindings/objc/DOMUtility.mm: * bindings/scripts/CodeGeneratorJS.pm: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
andersca@apple.com authored
* bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::attachDebugger): * page/Page.cpp: (WebCore::Page::setDebuggerForAllPages): (WebCore::Page::setDebugger): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
aroben@apple.com authored
WebCore: Make it possible to set a KJS::Debugger on all Frames in a Page and all Pages in the process Reviewed by Kevin M. * ForwardingHeaders/kjs/debugger.h: Added. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScript): Attach the Page's debugger if there is one. (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or detach any existing debugger if none was passed in. * bindings/js/kjs_proxy.h: * page/Page.cpp: (WebCore::Page::Page): Initialize new member. (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page in the process. (WebCore::Page::setDebugger): Store the debugger and pass it off to all our Frames. * page/Page.h: WebKit/win: Use WebCore's new debugger-attaching code Reviewed by Kevin M. * WebCoreSupport/WebFrameLoaderClient.cpp: Moved a kit() function to WebView.{cpp,h} so that other files can call it. * WebFrame.cpp: (WebFrame::WebFrame): Removed m_scriptDebugger member. (WebFrame::windowObjectCleared): Removed attach/detach calls. This is no longer needed because WebScriptDebugger no longer stores any per-WebFrame state. * WebFrame.h: * WebScriptDebugServer.cpp: (WebScriptDebugServer::pageCreated): Added. Attaches our shared debugger to the Page if we have any listeners. (WebScriptDebugServer::addListener): Sets our shared debugger for all Pages when we get our first listener. (WebScriptDebugServer::removeListener): Removes our shared debugger from all Pages when we lose our last listener. * WebScriptDebugServer.h: * WebScriptDebugger.cpp: (WebScriptDebugger::shared): Added. (WebScriptDebugger::WebScriptDebugger): Removed m_frame member. (WebScriptDebugger::~WebScriptDebugger): Added. (frame): Gets a Frame from an ExecState. (webFrame): Gets a WebFrame from an ExecState. (webView): Gets a WebView from an ExecState. (WebScriptDebugger::sourceParsed): Changed to call webFrame() and webView() instead of using m_frame and m_webView members. (WebScriptDebugger::callEvent): Ditto. (WebScriptDebugger::atStatement): Ditto. (WebScriptDebugger::returnEvent): Ditto. (WebScriptDebugger::exception): Ditto. * WebScriptDebugger.h: * WebView.cpp: (kit): Moved here from WebFrameLoaderClient.cpp. (WebView::initWithFrame): Tell the WebScriptDebugServer about the new Page so it can attach a debugger if needed. * WebView.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Reviewed by Darin Adler. Add ClassInfo to custom constructors so that they toString properly - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp, and XSLTProcessorConstructorImp and prefix all the classes with JS. * bindings/js/JSAudioConstructor.cpp: (WebCore::): Added ClassInfo definition. (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::JSAudioConstructor::construct): Cleanup. * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document. (WebCore::JSAudioConstructor::classInfo): Added. * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype to JSHTMLInputElementBasePrototype as seen if toString'ed. (WebCore::): * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::): Added ClassInfo definition. * bindings/js/JSHTMLOptionElementConstructor.h: (WebCore::JSHTMLOptionElementConstructor::classInfo): Added. * bindings/js/JSImageConstructor.cpp: (WebCore::): Added ClassInfo definition. (WebCore::JSImageConstructor::implementsConstruct): Moved here from header. * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::classInfo): Added. * bindings/js/JSXMLHttpRequest.cpp: (WebCore::): Rename XMLHttpRequestPrototype to JSXMLHttpRequestPrototype as seen if toString'ed. (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): (WebCore::JSXMLHttpRequestConstructor::implementsConstruct): (WebCore::JSXMLHttpRequestConstructor::construct): * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to JSXMLHttpRequestConstructor and doc to m_document and (WebCore::JSXMLHttpRequestConstructor::classInfo): Added. * bindings/js/JSXSLTProcessor.cpp: (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and XSLTProcessorConstructorImp to JSXSLTProcessorConstructor. (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): (WebCore::JSXSLTProcessorConstructor::implementsConstruct): (WebCore::JSXSLTProcessorConstructor::construct): * bindings/js/JSXSLTProcessor.h: (WebCore::JSXSLTProcessorConstructor::classInfo): Added. * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names. WebKitTools: Reviewed by Darin Adler. * Scripts/do-webcore-rename: Update renaming plan. LayoutTests: Reviewed by Darin Adler. Update results for fixed class names. * fast/dom/Window/window-properties-expected.txt: * fast/dom/xmlhttprequest-get-expected.txt: * http/tests/xmlhttprequest/event-target-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Remame ImageConstructorImp to JSImageConstructor and move it into its own file. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp. (WebCore::JSImageConstructor::JSImageConstructor): (WebCore::JSImageConstructor::construct): * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h. * bindings/js/kjs_html.cpp: (WebCore::getRuntimeObject): Make this function static since it is only used in this file. * bindings/js/kjs_html.h: * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::getValueProperty): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
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
-
weinig@apple.com authored
* bindings/js/kjs_events.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Reviewed by Mark Rowe. Move JSClipboard into its own file. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSAttrCustom.cpp: * bindings/js/JSClipboardCustom.cpp: Added. (WebCore::JSClipboard::types): (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSElementCustom.cpp: * bindings/js/JSEventCustom.cpp: * bindings/js/JSHTMLFrameElementCustom.cpp: * bindings/js/JSHTMLIFrameElementCustom.cpp: * bindings/js/kjs_events.cpp: * bindings/js/kjs_events.h: * bindings/js/kjs_window.cpp: * bindings/scripts/CodeGeneratorJS.pm: * dom/Clipboard.cpp: (WebCore::Clipboard::setDropEffect): (WebCore::Clipboard::setEffectAllowed): * dom/Clipboard.idl: Added. LayoutTests: Reviewed by Mark Rowe. Update test results. * fast/dom/Window/window-properties-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 03 Mar, 2008 2 commits
-
-
weinig@apple.com authored
Cleanup and plumbing in preparation for the great Window split. - Rename KJS::Window to WebCore::JSDOMWindowBase. - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace with the new toJSDOMWindow(). - Remove KJS::Window::retrieveActive() and replace with explicit call to exec->dynamicGlobalObject() and toJSDOMWindow(). * bindings/js/JSCustomVoidCallback.cpp: (WebCore::toVoidCallback):. * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): (WebCore::toJS): * bindings/js/JSEventTargetBase.cpp: (WebCore::jsEventTargetAddEventListener): (WebCore::jsEventTargetRemoveEventListener): * bindings/js/JSEventTargetNode.cpp: (WebCore::JSEventTargetNode::setListener): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): (WebCore::JSHTMLDocument::open): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSLocation.cpp: (WebCore::JSLocation::put): (WebCore::jsLocationProtoFuncReplace): (WebCore::jsLocationProtoFuncReload): (WebCore::jsLocationProtoFuncAssign): * bindings/js/JSLocation.h: * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSVGLazyEventListener.cpp: (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener): (WebCore::JSSVGLazyEventListener::eventParameterName): * bindings/js/JSSVGLazyEventListener.h: * bindings/js/JSXMLHttpRequest.cpp: (WebCore::JSXMLHttpRequest::putValueProperty): (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener): (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: * bindings/js/kjs_binding.cpp: (WebCore::allowsAccessFromFrame): (WebCore::printErrorMessageForFrame): * bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::windowObj): (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::windowObj): (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/kjs_events.h: * bindings/js/kjs_navigator.cpp: (WebCore::MimeType::getValueProperty): * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): (WebCore::KJSProxy::createHTMLEventHandler): (WebCore::KJSProxy::createSVGEventHandler): * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate): (WebCore::DOMWindowTimer::DOMWindowTimer): (WebCore::DOMWindowTimer::action): (WebCore::DOMWindowTimer::takeAction): (WebCore::): (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::~JSDOMWindowBase): (WebCore::JSDOMWindowBase::location): (WebCore::JSDOMWindowBase::mark): (WebCore::allowPopUp): (WebCore::createWindow): (WebCore::showModalDialog): (WebCore::JSDOMWindowBase::getValueProperty): (WebCore::JSDOMWindowBase::childFrameGetter): (WebCore::JSDOMWindowBase::indexGetter): (WebCore::JSDOMWindowBase::namedItemGetter): (WebCore::JSDOMWindowBase::getOwnPropertySlot): (WebCore::JSDOMWindowBase::put): (WebCore::JSDOMWindowBase::allowsAccessFrom): (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage): (WebCore::JSDOMWindowBase::allowsAccessFromPrivate): (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): (WebCore::JSDOMWindowBase::printErrorMessage): (WebCore::JSDOMWindowBase::globalExec): (WebCore::JSDOMWindowBase::shouldInterruptScript): (WebCore::JSDOMWindowBase::setListener): (WebCore::JSDOMWindowBase::getListener): (WebCore::JSDOMWindowBase::findJSEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSEventListener): (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::clearHelperObjectProperties): (WebCore::JSDOMWindowBase::clear): (WebCore::JSDOMWindowBase::setCurrentEvent): (WebCore::JSDOMWindowBase::currentEvent): (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA): (WebCore::windowProtoFuncOpen): (WebCore::windowProtoFuncSetTimeout): (WebCore::windowProtoFuncClearTimeout): (WebCore::windowProtoFuncSetInterval): (WebCore::windowProtoFuncAddEventListener): (WebCore::windowProtoFuncRemoveEventListener): (WebCore::windowProtoFuncShowModalDialog): (WebCore::windowProtoFuncNotImplemented): (WebCore::JSDOMWindowBase::setReturnValueSlot): (WebCore::JSDOMWindowBase::clearAllTimeouts): (WebCore::JSDOMWindowBase::installTimeout): (WebCore::JSDOMWindowBase::pauseTimeouts): (WebCore::JSDOMWindowBase::resumeTimeouts): (WebCore::JSDOMWindowBase::clearTimeout): (WebCore::JSDOMWindowBase::timerFired): (WebCore::JSDOMWindowBase::disconnectFrame): (WebCore::JSDOMWindowBase::jsEventListeners): (WebCore::JSDOMWindowBase::jsHTMLEventListeners): (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners): (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners): (WebCore::toJS): (WebCore::toJSDOMWindow): (WebCore::toJSDOMWindow): * bindings/js/kjs_window.h: (WebCore::JSDOMWindowBase::impl): (WebCore::JSDOMWindowBase::classInfo): (WebCore::JSDOMWindowBase::): * bindings/objc/DOMUtility.mm: (KJS::createDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): * page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): * page/DOMWindow.idl: * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::windowScriptNPObject): (WebCore::Frame::pageDestroyed): * page/InspectorController.cpp: (WebCore::inspectedWindow): * page/mac/FrameMac.mm: (WebCore::Frame::windowScriptObject): * page/mac/WebCoreFrameBridge.mm: (updateRenderingForBindings): * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canAccess): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
andersca@apple.com authored
Include fixes, in preparation of using the headers in WebCore/bridge. * bindings/js/kjs_binding.h: * bindings/js/kjs_dom.cpp: * bindings/objc/DOMInternal.mm: * bindings/objc/DOMUtility.mm: * bindings/objc/WebScriptObject.mm: * bindings/objc/WebScriptObjectPrivate.h: * bridge/objc/objc_class.h: * bridge/objc/objc_instance.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_utility.h: * bridge/runtime.h: * bridge/runtime_object.h: * bridge/runtime_root.h: * html/HTMLAppletElement.cpp: * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: * html/HTMLEmbedElement.h: * html/HTMLObjectElement.cpp: * html/HTMLPlugInElement.cpp: * html/HTMLPlugInElement.h: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.h: * page/mac/WebCoreFrameBridge.mm: * page/mac/WebCoreScriptDebugger.mm: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Mar, 2008 2 commits
-
-
oliver@apple.com authored
Reviewed by Sam Weinig. Implement support for HTML5's putImageData for the CG port. All other ports are currently just using stubs for the final blit. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Reviewed by Darin Adler. Search the entire prototype chain when doing early prototype lookup in the Window's getOwnPropertySlot method. Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests. * bindings/js/kjs_window.cpp: (KJS::Window::getOwnPropertySlot): LayoutTests: Reviewed by Darin Adler. Update test result. * fast/dom/Window/window-function-name-getter-precedence-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Feb, 2008 1 commit
-
-
weinig@apple.com authored
Reviewed by Darin. Fix for <rdar://problem/5768769> - Don't allow cross-origin calls using window.functionName.call(otherFrame) syntax. * bindings/js/JSLocation.cpp: (WebCore::jsLocationProtoFuncToString): Do same-origin check. * bindings/js/kjs_window.cpp: (KJS::windowProtoFuncAToB): Ditto. (KJS::windowProtoFuncBToA): Ditto. (KJS::windowProtoFuncOpen): Ditto. (KJS::windowProtoFuncClearTimeout): Ditto. * bindings/scripts/CodeGeneratorJS.pm: Ditto. LayoutTests: Reviewed by Darin. Updates tests for <rdar://problem/5768769> * http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt: * http/tests/security/cross-frame-access-call-expected.txt: * http/tests/security/cross-frame-access-call.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 26 Feb, 2008 1 commit
-
-
antti@apple.com authored
Fix <rdar://problem/5761326> REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang) Generate better code with VS: - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions - Refactor error reporting so that there is no need to construct/destruct Strings in common cases - Add a separate version of the function for cases where error messages are not wanted * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): * bindings/js/kjs_window.cpp: (KJS::Window::allowsAccessFrom): (KJS::Window::allowsAccessFromNoErrorMessage): (KJS::Window::allowsAccessFromPrivate): (KJS::Window::crossDomainAccessErrorMessage): * bindings/js/kjs_window.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 23 Feb, 2008 3 commits
-
-
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
-
ap@webkit.org authored
Reviewed by Darin. Move basic threading support from WebCore to WTF. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ddkilzer@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 22 Feb, 2008 1 commit
-
-
oliver@apple.com authored
Support Canvas.getImageData and Canvas.createImageData Reviewed by Sam W. This patch adds support for all the pixel reading portions of the HTML5 Canvas spec. There are two new types ImageData and CanvasPixelArray which are used to provide the HTML5 ImageData object, and the required semantics for assignment to the ImageData data array. We only implement the CG version of ImageBuffer::getImageData, but the logic is null safe, so this will not introduce any crashes into other platforms, unfortunately it will result in JS Object detection "lying" on non-CG platforms. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 21 Feb, 2008 2 commits
-
-
weinig@apple.com authored
Reviewed by Anders Carlsson. Fix for <rdar://problem/5757946> - Parse URLs before checking whether they are javascript: urls (which require security checks). * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL): * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): LayoutTests: Reviewed by Anders Carlsson. Update tests and results for <rdar://problem/5757946> * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS-expected.txt: * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
antti@apple.com authored
<rdar://problem/5753789> REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang) Ensure all versions of allowsAccessFrom are inlined to single functions. This is a 2% win in browser hosted Sunspider. * bindings/js/kjs_window.cpp: (KJS::Window::allowsAccessFrom): (KJS::Window::allowsAccessFromPrivate): * bindings/js/kjs_window.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 20 Feb, 2008 3 commits
-
-
darin@apple.com authored
(WebCore::needsYouTubeQuirk): Tweak comments. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Reviewed by Darin and Geoff. - <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack * WebCore.base.exp: Updated. * bindings/js/kjs_navigator.cpp: (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed. (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk return true, then return the empty string. * page/Settings.cpp: (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false. (WebCore::Settings::setNeedsSiteSpecificQuirks): Added. * page/Settings.h: Added m_needsSiteSpecificQuirks. (WebCore::Settings::needsSiteSpecificQuirks): Added. WebKit/mac: Reviewed by Darin and Geoff. - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): Added a call to Settings::setNeedsSiteSpecificQuirks. There are currently no site-specific quirks on Mac, but we will propagate the state to WebCore to avoid possible mistakes later. WebKit/win: Reviewed by Darin and Geoff. - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack * WebView.cpp: (WebView::notifyPreferencesChanged): Added a call to Settings::setNeedsSiteSpecificQuirks. (WebView::setAllowSiteSpecificHacks): Added a comment about the problem Darin noticed, where after you disable the site-specific hacks they persist until you open a new window or tweak some other preference. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
andersca@apple.com authored
Change most SVG related classes to start out with a ref count of 1. * bindings/js/JSSVGPointListCustom.cpp: (WebCore::JSSVGPointList::initialize): (WebCore::JSSVGPointList::insertItemBefore): (WebCore::JSSVGPointList::replaceItem): (WebCore::JSSVGPointList::appendItem): * bindings/js/JSSVGTransformListCustom.cpp: (WebCore::JSSVGTransformList::initialize): (WebCore::JSSVGTransformList::insertItemBefore): (WebCore::JSSVGTransformList::replaceItem): (WebCore::JSSVGTransformList::appendItem): * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGCharOnPath::create): (WebCore::SVGCharOnPath::SVGCharOnPath): * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseBeginOrEndValue): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::childNodes): * svg/SVGElementInstanceList.cpp: (WebCore::SVGElementInstanceList::SVGElementInstanceList): * svg/SVGElementInstanceList.h: (WebCore::SVGElementInstanceList::create): * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::SVGFitToViewBox): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::canvasResource): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGLengthList.h: (WebCore::SVGLengthList::create): * svg/SVGList.h: (WebCore::SVGList::SVGList): (WebCore::SVGPODListItem::create): (WebCore::SVGPODListItem::copy): (WebCore::SVGPODListItem::SVGPODListItem): (WebCore::SVGPODList::initialize): (WebCore::SVGPODList::insertItemBefore): (WebCore::SVGPODList::replaceItem): (WebCore::SVGPODList::appendItem): (WebCore::SVGPODList::SVGPODList): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::canvasResource): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::canvasResource): * svg/SVGNumberList.h: (WebCore::SVGNumberList::create): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::createSVGPathSegClosePath): (WebCore::SVGPathElement::createSVGPathSegMovetoAbs): (WebCore::SVGPathElement::createSVGPathSegMovetoRel): (WebCore::SVGPathElement::createSVGPathSegLinetoAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel): (WebCore::SVGPathElement::createSVGPathSegArcAbs): (WebCore::SVGPathElement::createSVGPathSegArcRel): (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel): (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel): (WebCore::SVGPathElement::pathSegList): * svg/SVGPathElement.h: * svg/SVGPathSeg.h: (WebCore::SVGPathSeg::SVGPathSeg): * svg/SVGPathSegArc.h: (WebCore::SVGPathSegArcAbs::create): (WebCore::SVGPathSegArcRel::create): * svg/SVGPathSegClosePath.h: (WebCore::SVGPathSegClosePath::create): * svg/SVGPathSegCurvetoCubic.h: (WebCore::SVGPathSegCurvetoCubicAbs::create): (WebCore::SVGPathSegCurvetoCubicRel::create): * svg/SVGPathSegCurvetoCubicSmooth.h: (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create): (WebCore::SVGPathSegCurvetoCubicSmoothRel::create): * svg/SVGPathSegCurvetoQuadratic.h: (WebCore::SVGPathSegCurvetoQuadraticAbs::create): (WebCore::SVGPathSegCurvetoQuadraticRel::create): * svg/SVGPathSegCurvetoQuadraticSmooth.h: (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create): (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create): * svg/SVGPathSegLineto.h: (WebCore::SVGPathSegLinetoAbs::create): (WebCore::SVGPathSegLinetoRel::create): * svg/SVGPathSegLinetoHorizontal.h: (WebCore::SVGPathSegLinetoHorizontalAbs::create): (WebCore::SVGPathSegLinetoHorizontalRel::create): * svg/SVGPathSegLinetoVertical.h: (WebCore::SVGPathSegLinetoVerticalAbs::create): (WebCore::SVGPathSegLinetoVerticalRel::create): * svg/SVGPathSegList.h: (WebCore::SVGPathSegList::create): * svg/SVGPathSegMoveto.h: (WebCore::SVGPathSegMovetoAbs::create): (WebCore::SVGPathSegMovetoRel::create): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::canvasResource): * svg/SVGPointList.h: (WebCore::SVGPointList::create): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::points): * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): * svg/SVGPreserveAspectRatio.h: (WebCore::SVGPreserveAspectRatio::create): * svg/SVGRenderingIntent.h: (WebCore::SVGRenderingIntent::SVGRenderingIntent): * svg/SVGStringList.h: (WebCore::SVGStringList::create): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): * svg/SVGTests.cpp: (WebCore::SVGTests::requiredFeatures): (WebCore::SVGTests::requiredExtensions): (WebCore::SVGTests::systemLanguage): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::SVGTextElement): * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::SVGTextPositioningElement): * svg/SVGTransformList.h: (WebCore::SVGTransformList::create): * svg/SVGUnitTypes.h: (WebCore::SVGUnitTypes::SVGUnitTypes): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::viewTarget): * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::SVGViewSpec): * svg/graphics/SVGPaintServer.cpp: (WebCore::SVGPaintServer::sharedSolidPaintServer): * svg/graphics/SVGPaintServer.h: * svg/graphics/SVGPaintServerGradient.h: (WebCore::SVGPaintServerGradient::SharedStopCache::create): (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache): * svg/graphics/SVGPaintServerLinearGradient.h: (WebCore::SVGPaintServerLinearGradient::create): * svg/graphics/SVGPaintServerPattern.h: (WebCore::SVGPaintServerPattern::create): * svg/graphics/SVGPaintServerRadialGradient.h: (WebCore::SVGPaintServerRadialGradient::create): * svg/graphics/SVGPaintServerSolid.h: (WebCore::SVGPaintServerSolid::create): * svg/graphics/SVGResource.cpp: (WebCore::SVGResource::SVGResource): * svg/graphics/SVGResource.h: * svg/graphics/SVGResourceClipper.h: (WebCore::SVGResourceClipper::create): * svg/graphics/SVGResourceMarker.h: (WebCore::SVGResourceMarker::create): * svg/graphics/SVGResourceMasker.h: (WebCore::SVGResourceMasker::create): * svg/graphics/cg/SVGPaintServerGradientCg.cpp: (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-