12 years agoSQUIRRELFISH: JavaScript error messages are missing informative text
oliver@apple.com [Fri, 23 May 2008 14:23:23 +0000 (14:23 +0000)]
SQUIRRELFISH: JavaScript error messages are missing informative text

Reviewed by Anders

Partial fix.
Tidy up error messages, makes a couple of them provide slightly more info.
Inexplicably leads to a 1% SunSpider Progression.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix call stack reported by profiler when entering event handlers.
oliver@apple.com [Fri, 23 May 2008 11:37:32 +0000 (11:37 +0000)]
Fix call stack reported by profiler when entering event handlers.

Reviewed by Tim H

JSObject::call was arbitrarily notifying the profiler when it was
called, even if it was JS code, which notifies the profile on entry
in any case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoJavaScriptCore:
mjs@apple.com [Fri, 23 May 2008 10:43:08 +0000 (10:43 +0000)]

2008-05-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - fixed <rdar://problem/5957662> REGRESSION(r33943-r33980): Can't send email , attach file or save as draft from hotmail.com

        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::CodeGenerator): Delete any existing
        properties before creating the function (this should really be
        done at execution time not codegen time).


2008-05-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - test case <rdar://problem/5957662> REGRESSION(r33943-r33980): Can't send email , attach file or save as draft from hotmail.com

        * fast/js/function-redefinition-expected.txt: Added.
        * fast/js/function-redefinition.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFixes a bug where the Inspector could have 0ms timers firing
timothy@apple.com [Fri, 23 May 2008 10:12:33 +0000 (10:12 +0000)]
Fixes a bug where the Inspector could have 0ms timers firing
even after it is closed.


Reviewed by Oliver Hunt.

* page/inspector/DatabasesPanel.js: Removes setTimeouts that call
the same function with a 0ms delay. These we not doing any good anyway,
so they weren't needed and just caused problems.
* page/inspector/ElementsPanel.js: Ditto.
* page/inspector/ProfilesPanel.js: Ditto.
* page/inspector/ResourcesPanel.js: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago+2008-05-16 Alp Toker <alp@nuanti.com>
alp@webkit.org [Fri, 23 May 2008 09:54:05 +0000 (09:54 +0000)]
+2008-05-16  Alp Toker  <alp@nuanti.com>

        Build fix for gcc 3. Default constructor required in ExecState,
        used by OldInterpreterExecState.

        * kjs/ExecState.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoMake the Inspector correctly populate the profiles when
timothy@apple.com [Fri, 23 May 2008 09:41:52 +0000 (09:41 +0000)]
Make the Inspector correctly populate the profiles when
closed and re-opened.

Reviewed by Adam Roben.

* page/InspectorController.cpp:
(WebCore::InspectorController::populateScriptObjects): Call populateInterface
in inspector.js.
* page/inspector/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.populateInterface): If visible,
call _populateProfiles. Else just set this._shouldPopulateProfiles to true.
(WebInspector.ProfilesPanel.prototype.reset): Don't call _populateProfiles.
Just set this._shouldPopulateProfiles to true.
(WebInspector.ProfilesPanel.prototype._populateProfiles): Delete
* page/inspector/inspector.js:
(WebInspector.populateInterface): Added. Call populateInterface on all the
panels if they implement it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix <rdar://problem/5954997> global-recursion-on-full-stack.html crashes under guardm...
mrowe@apple.com [Fri, 23 May 2008 09:38:30 +0000 (09:38 +0000)]
Fix <rdar://problem/5954997> global-recursion-on-full-stack.html crashes under guardmalloc.

Growing the register file with uncheckedGrow from within Machine::execute is not safe as the
register file may be too close to its maximum size to grow successfully.  By using grow,
checking the result and throwing a stack overflow error we can avoid crashing.

Reviewed by Oliver Hunt.

* VM/Machine.cpp:
* VM/RegisterFile.h: Remove the now-unused uncheckedGrow.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-23 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Fri, 23 May 2008 09:32:06 +0000 (09:32 +0000)]
2008-05-23  Kevin McCullough  <kmccullough@apple.com>

        RS = Adam.

        Editorial changes

        * manual-tests/inspector/profiler-test-apply.html:
        * manual-tests/inspector/profiler-test-document-dot-write.html:
        * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html:
        * manual-tests/inspector/profiler-test-one-execution-context.html:
        * manual-tests/inspector/profiler-test-two-execution-contexts.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRemove JAVASCRIPT_PROFILER define
oliver@apple.com [Fri, 23 May 2008 09:07:06 +0000 (09:07 +0000)]

RS=Kevin McCullough

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFixes the bug where the profile was not added when finished.
timothy@apple.com [Fri, 23 May 2008 09:01:42 +0000 (09:01 +0000)]
Fixes the bug where the profile was not added when finished.

<rdar://problem/5958851> Stop Profiling from the Develop menu does
not add the Profile to the Inspector

Reviewed by Adam Roben.

* page/InspectorController.cpp:
(WebCore::InspectorController::stopUserInitiatedProfiling): Call
addProfile with the result of stopProfiling.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago<rdar://problem/5951561> Turn on JavaScript Profiler
oliver@apple.com [Fri, 23 May 2008 08:56:21 +0000 (08:56 +0000)]
<rdar://problem/5951561> Turn on JavaScript Profiler

Reviewed by Kevin McCullough

Flipped the switch on the profiler, rearranged how we
signal the the profiler is active so that calls aren't
needed in the general case.

Also fixed the entry point for Machine::execute(FunctionBodyNode..)
to correctly indicate function exit.

Results in a 0.7-1.0% regression in SunSpider :-(

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34065 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoTweak the Web Insector toolbar look to be smaller when attached to
timothy@apple.com [Fri, 23 May 2008 08:35:29 +0000 (08:35 +0000)]
Tweak the Web Insector toolbar look to be smaller when attached to
the inspected page.

Reviewed by Adam Roben.

* page/inspector/inspector.css:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix attaching and detaching the Web Inspector. This change removes
timothy@apple.com [Fri, 23 May 2008 08:03:56 +0000 (08:03 +0000)]
Fix attaching and detaching the Web Inspector. This change removes
the clunky animation that never looked right and was causing issues
where the inspected WebView would get into a no useable state.

<rdar://problem/5958812> Attaching and Detaching the Web Inspector
can cause the inspected WebVIew to be unusable

Reviewed by Adam Roben.

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController close]): Removes animation code.
Sets the frame directly and does a displayIfNeeded to prevent
showing the Inspector in the page and in the Inspector window.
(-[WebInspectorWindowController showWindow:]): Removes animation code.
Sets the frame directly.
(-[WebInspectorWindowController attach]): Simplified.
(-[WebInspectorWindowController detach]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix the Qt build by adding profiler/ to the include path and providing
hausmann@webkit.org [Fri, 23 May 2008 07:58:09 +0000 (07:58 +0000)]
Fix the Qt build by adding profiler/ to the include path and providing
an empty stub for AXObjectCache::handleAriaRoleChanged to build without

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-23 Alice Liu <alice.liu@apple.com>
alice.liu@apple.com [Fri, 23 May 2008 07:05:44 +0000 (07:05 +0000)]
2008-05-23  Alice Liu  <alice.liu@apple.com>

        Reviewed by Mark Rowe.

        Remove call to function whose body was commented out. Returning the
        children for a menu button by the normal calculation works just as well.

        * page/AccessibilityRenderObject.cpp:
        * page/AccessibilityRenderObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34061 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Fri, 23 May 2008 06:57:44 +0000 (06:57 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam.

        Fix a bug in the profiler where time in the current function is given to

        * profiler/Profile.cpp:
        (KJS::Profile::didExecute): Set the start time and then call didExecute
        to calculate the time spent in this function.
        * profiler/ProfileNode.cpp: Remove confusing calculations that are no
        longer necessary.
        * profiler/ProfileNode.h: Expose access to the start time to allow the
        simpler time calculations above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34060 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFixes the bug where resource would show up multiple times in the
timothy@apple.com [Fri, 23 May 2008 06:57:32 +0000 (06:57 +0000)]
Fixes the bug where resource would show up multiple times in the
Inspector. This happened when a resource was used multiple times or
when the preloader was scanning ahead to fetch resources.

<rdar://problem/5689373> Cached resources re-appear in Web Inspector
for each access (18223)

Reviewed by Adam Roben.

* page/InspectorController.cpp:
(WebCore::InspectorController::addResource): Add the URL to m_knownResources.
(WebCore::InspectorController::removeResource): Remove the URL from m_knownResources
(WebCore::InspectorController::didLoadResourceFromMemoryCache): If the URL
is in m_knownResources, then early return.
* page/InspectorController.h: Added m_knownResources.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Alice Liu <alice.liu@apple.com>
alice.liu@apple.com [Fri, 23 May 2008 06:44:23 +0000 (06:44 +0000)]
2008-05-22  Alice Liu  <alice.liu@apple.com>

        Reviewed by Adele, Dan Bernstein.

        Fixed <rdar://problem/5943104> Need to implement ARIA role="menu" and related roles
        <rdar://problem/5943132> Need to implement ARIA role="menuitem"
        <rdar://problem/5943173> Need to implement ARIA role="menubar"

        These changes added a handler for determining the ARIA role when the
        attribute changes.  Before we were querying for the attribute over and
        over every time we queried for the role.
        * dom/Element.cpp:
        * page/AXObjectCache.cpp:
        * page/AXObjectCache.h:

        The rest of these changes implement menu, menuitem, and menubar. the last 2 of those
        have to, for now, be represented as a Group and MenuButton instead, because AppKit
        won't recognize menubar and menubaritems within apps.
        * page/AccessibilityObject.h:
        * page/AccessibilityRenderObject.cpp:
        * page/AccessibilityRenderObject.h:
        * page/mac/AccessibilityObjectWrapper.mm:
        (-[AccessibilityObjectWrapper accessibilityActionNames]):
        (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
        (-[AccessibilityObjectWrapper roleDescription]):
        (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Make top-level resources show their full URLs again instead of just "/"
aroben@apple.com [Fri, 23 May 2008 06:43:23 +0000 (06:43 +0000)]
    Make top-level resources show their full URLs again instead of just "/"

        Reviewed by Tim Hatcher.

        * page/inspector/Resource.js:
        (WebInspector.Resource.prototype.displayName): If the title has gotten
        down to just "/", which will happen for, e.g., http://webkit.org/,
        just show the entire URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoShorten URLs shown in the Web Inspector to the file name. This makes
timothy@apple.com [Fri, 23 May 2008 06:12:57 +0000 (06:12 +0000)]
Shorten URLs shown in the Web Inspector to the file name. This makes
finding files in the Console or the Scripts panel easier.

Reviewed by Adam Roben.

* page/inspector/Console.js:
(WebInspector.ConsoleMessage.prototype.get shortURL): Removed dead code.
(WebInspector.ConsoleMessage.prototype.toMessageElement): Call WebInspector.displayNameForURL
for the URL before making the link element.
* page/inspector/ProfileView.js:
(WebInspector.ProfileDataGridNode.prototype.createCell): Use WebInspector.displayNameForURL.
* page/inspector/Resource.js:
(WebInspector.Resource.prototype.get displayName): Use trimURL to
trim the URL with the main resource's domain.
* page/inspector/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use WebInspector.displayNameForURL.
* page/inspector/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection): Ditto.
* page/inspector/inspector.js:
(WebInspector.displayNameForURL): Added.
(WebInspector.resourceForURL): Check for a direct match in resourceURLMap first.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Fix Bug 19204: Inspector should highlight source lines when following links...
aroben@apple.com [Fri, 23 May 2008 06:09:46 +0000 (06:09 +0000)]
    Fix Bug 19204: Inspector should highlight source lines when following links to them


        Reviewed by Tim Hatcher.

        Test: manual-tests/inspector/highlight-source-line.html

        * manual-tests/inspector/highlight-source-line.html: Added.
        * page/inspector/ResourcesPanel.js:
        (WebInspector.ResourcesPanel.prototype.showResource): Call
        highlightLine on the view if that function exists.
        * page/inspector/SourceFrame.js:
        (WebInspector.SourceFrame.prototype.highlightLine): Added. Adds the
        webkit-highlighted-line class to the relevant line, then removes it
        after a short delay.
        (WebInspector.SourceFrame.prototype._loaded): Added styles for the
        highlighted line(s).
        * page/inspector/SourceView.js:
        (WebInspector.SourceView.prototype.highlightLine): Added. Calls
        through to the SourceFrame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Show "(Function object)" instead of "(JSInpectorCallbackWrapper object)"...
aroben@apple.com [Fri, 23 May 2008 06:09:33 +0000 (06:09 +0000)]
    Show "(Function object)" instead of "(JSInpectorCallbackWrapper object)" in profiles

        Reviewed by Kevin McCullough.

        * profiler/Profiler.cpp:
        (KJS::createCallIdentifier): Use JSObject::className instead of
        getting the class name from the ClassInfo directly. JSObject
        subclasses can override className to provide a custom class name, and
        it seems like we should honor that.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Reviewed by Eric.
rwlbuis@webkit.org [Fri, 23 May 2008 06:08:09 +0000 (06:08 +0000)]
 Reviewed by Eric.

        SVGPathSeg*(Abs|Rel) classses should be combined to reduce code size

        Reduce code size through shared base classes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Alp Toker <alp@nuanti.com>
alp@webkit.org [Fri, 23 May 2008 05:49:30 +0000 (05:49 +0000)]
2008-05-22  Alp Toker  <alp@nuanti.com>

        GTK+/DirectFB build fix attempt.

        * plugins/PluginDatabase.cpp:
        * plugins/gtk/PluginDatabaseGtk.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoAdds Focus, Exclude and Restore buttons to the Profile view
timothy@apple.com [Fri, 23 May 2008 05:15:28 +0000 (05:15 +0000)]
Adds Focus, Exclude and Restore buttons to the Profile view
Status bar. Also adds a Record button to create new profiles.

<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
<rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.

Reviewed by Adam Roben.

* English.lproj/localizedStrings.js: Added new strings.
* page/JavaScriptProfile.cpp:
(WebCore::restoreAll): Call Profile::restoreAll.
(WebCore::ProfileClass): Added restoreAll to the static functions.
* page/inspector/Images/excludeButtons.png: Added.
* page/inspector/Images/focusButtons.png: Added.
* page/inspector/Images/recordButtons.png: Added.
* page/inspector/Images/reloadButtons.png: Added.
* page/inspector/ProfileView.js:
(WebInspector.ProfileView): Create the buttons elements.
(WebInspector.ProfileView.prototype.get statusBarItems): Return the three
status bar buttons.
(WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
for ProfileNodes that are visible.
(WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
refresh on the children, now that they have access to the ProfileView's properties.
(WebInspector.ProfileView.prototype._focusClicked): Call focus
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._excludeClicked): Call exclude
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
on the profile, refresh the ProfileView and hide the reset button.
(WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the
focus and exclude buttons.
(WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
focus and exclude buttons.
(WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the
showPercentAs* arguments.
* page/inspector/ProfilesPanel.js: Add a record status bar button and
th ability to have per-view status bar buttons.
* page/inspector/inspector.css: New styles.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago<rdar://problem/5956612> ibtool crashes during build
mrowe@apple.com [Fri, 23 May 2008 05:10:10 +0000 (05:10 +0000)]
<rdar://problem/5956612> ibtool crashes during build

SCDynamicStoreCreate will return null if it cannot create a dynamic store object.  We need
to check for failure rather than continuing with a null store as this results in us
passing a null CFRunLoopSourceRef to CFRunLoopAddSource, which promptly crashes.

Reviewed by Tim Hatcher.

* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::NetworkStateNotifier): Null check SCDynamicStoreCreate and
SCDynamicStoreCreateRunLoopSource as it is possible for them to fail.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34050 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Alp Toker <alp@nuanti.com>
alp@webkit.org [Fri, 23 May 2008 04:39:23 +0000 (04:39 +0000)]
2008-05-22  Alp Toker  <alp@nuanti.com>

        GTK+ build fix. Add JavaScriptCore/profiler to include path.

        * GNUmakefile.am:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Implement sub-millisecond profiling on Windows
aroben@apple.com [Fri, 23 May 2008 04:32:47 +0000 (04:32 +0000)]
    Implement sub-millisecond profiling on Windows

        Reviewed by Kevin McCullough.

        * profiler/ProfileNode.cpp:
        (KJS::getCount): Added. On Windows, we use QueryPerformanceCounter. On
        other platforms, we use getCurrentUTCTimeWithMicroseconds.
        (KJS::ProfileNode::endAndRecordCall): Use getCount instead of
        (KJS::ProfileNode::startTimer): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix a profiler assertion when calling a NodeList as a function
aroben@apple.com [Fri, 23 May 2008 04:32:33 +0000 (04:32 +0000)]
Fix a profiler assertion when calling a NodeList as a function


        Fix a profiler assertion when calling a NodeList as a function

        Reviewed by Kevin McCullough.

        * profiler/Profiler.cpp:
        (KJS::createCallIdentifier): Don't assert when a non-function object
        is called as a function. Instead, build up a CallIdentifier using the
        object's class name.


        Add a test for calling a NodeList as a function while profiling

        Reviewed by Kevin McCullough.

        * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Fri, 23 May 2008 03:49:22 +0000 (03:49 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Rubber stamped by Adam.

        -Added new profiler tests.

        * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Added.
        * manual-tests/inspector/profiler-test-constructor.html: Added.
        * manual-tests/inspector/profiler-test-document-dot-write.html: Added.
        * manual-tests/inspector/profiler-test-simple-no-level-change.html: Added.
        * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Added.
        * manual-tests/inspector/profiler-test-window-dot-eval.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Fri, 23 May 2008 03:46:18 +0000 (03:46 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim.

        <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a
        profile node.
        -Expose the 'exclude' function to the WebInspector.
        -Also fix a bug with 'focus' and expose whether or not a node is visible

        * page/JavaScriptProfile.cpp: Renamed profileClass to have a capital P.
        (WebCore::focus): Now correctly compares against a ProfileNodeClass
        instead of ProfileClass.
        (WebCore::exclude): Expose 'exclude' function to the WebInspector.
        * page/JavaScriptProfileNode.cpp: Declare the ProfileNodeClass in the
        header so that ProfileClass can use it.
        (WebCore::getVisible): Expose a node's visiblity to the WebInspector.
        * page/JavaScriptProfileNode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Add functions to IWebInspector to start/stop profiling/debugging
aroben@apple.com [Fri, 23 May 2008 02:39:43 +0000 (02:39 +0000)]
    Add functions to IWebInspector to start/stop profiling/debugging


        Reviewed by Jon Honeycutt.

        * Interfaces/IWebInspector.idl:
        * WebInspector.cpp:
        * WebInspector.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Fri, 23 May 2008 01:03:17 +0000 (01:03 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin.

        <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a
        profile node.
        -Implement 'exclude'; where the excluded node attributes its time to its
        parent's self time.

        * JavaScriptCore.exp: Export the exclude function.
        * profiler/Profile.h:
        * profiler/ProfileNode.cpp:
        (KJS::ProfileNode::setTreeVisible): New function that allows a change in
        visiblitiy to be propogated to all the children of a node.
        (KJS::ProfileNode::exclude): If the node matches the callIdentifier then
        set the visiblity of this node and all of its children to false and
        attribute it's total time to it's caller's self time.
        * profiler/ProfileNode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34043 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix access to static global variables in Windows release builds.
mrowe@apple.com [Fri, 23 May 2008 00:45:17 +0000 (00:45 +0000)]
Fix access to static global variables in Windows release builds.

Reviewed by Oliver Hunt.

* kjs/JSGlobalObject.h: Don't store a reference to an Identifier
in GlobalPropertyInfo as the Identifier is likely to be a temporary
and therefore may be destroyed before the GlobalPropertyInfo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoWebCore:
weinig@apple.com [Fri, 23 May 2008 00:41:49 +0000 (00:41 +0000)]

2008-05-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        <rdar://problem/5838772> Support cross-site XMLHttpRequest

        - Implement support for cross-site non-GET requests using the HTTP header
          Access-control mechanism.

        Tests: http/tests/xmlhttprequest/access-control-basic-allow-async.html

        * xml/XMLHttpRequest.cpp:
        Don't continue send if inside the method check preflight (only happens for async).

        Add support for non-GET requests, starting off a method check preflight.

        Handler for finishing up after an asynchronous method check has completed.

        Do a limited set of access control when in the method check preflight.
        * xml/XMLHttpRequest.h:


2008-05-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        <rdar://problem/5838772> Support cross-site XMLHttpRequest

        - Add more tests for cross-domain XHR.

        * http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header.html:
        * http/tests/xmlhttprequest/access-control-basic-allow-async-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-allow-async.html: Added.
        * http/tests/xmlhttprequest/access-control-basic-denied.html:
        * http/tests/xmlhttprequest/access-control-basic-exclude.html:
        * http/tests/xmlhttprequest/access-control-basic-not-get-allow-async-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-not-get-allow-async.html: Added.
        * http/tests/xmlhttprequest/access-control-basic-not-get-allow-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-not-get-allow.html: Added.
        * http/tests/xmlhttprequest/resources/access-control-basic-non-get-allow.cgi: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoMake sure we don't call findTreeElement with the same representedObject
timothy@apple.com [Thu, 22 May 2008 23:30:41 +0000 (23:30 +0000)]
Make sure we don't call findTreeElement with the same representedObject
again, to prevent infinite recursion. Added many comments to this
code so it can be understood later.


Reviewed by Adam Roben.

* page/inspector/treeoutline.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRe-word the "Attach Debugger" overlay to never say "Attach". The new
timothy@apple.com [Thu, 22 May 2008 22:48:38 +0000 (22:48 +0000)]
Re-word the "Attach Debugger" overlay to never say "Attach". The new
wording is "Start Debugging". This makes the overlay consistent with
other wording used for starting the debugger. Also fixes the tooltips
for the Pause on Exceptions button.

Reviewed by Adam Roben and Dan Bernstein.

* English.lproj/localizedStrings.js: Adds new strings.
* page/inspector/ScriptsPanel.js: Changes the wording. Flips the
tooltips for the Pause on Exceptions buttons so the tooltip says
what will happen when the button is pressed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRemove some non-functional elements from the Scripts panel
timothy@apple.com [Thu, 22 May 2008 22:48:28 +0000 (22:48 +0000)]
Remove some non-functional elements from the Scripts panel
so they don't confuse users why they aren't working.

Reviewed by Adam Roben.

* page/inspector/ScriptsPanel.js: Removes the back/forward buttons
and the function menu.
* page/inspector/inspector.css: Make the files menu wider since there
is more room now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 22:22:28 +0000 (22:22 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Build fix.

        * VM/Machine.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 22:09:43 +0000 (22:09 +0000)]
2008-05-22  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        <rdar://problem/5951561> Turn on JavaScript Profiler
        Get basic JS profiling working.
        Even with this patch the profiler will not be compiled in because we do
        not know the extend, if any, of the performance regression it would cause
        when it is not in use. However with these changes, if the profiler were
        on, it would not crash and show good profiling data.

        * VM/Machine.cpp: Instrument the calls sites that are needed for profiling.
        * kjs/function.cpp: Ditto.
        * kjs/interpreter.cpp: Ditto.
        * profiler/Profile.cpp:
        (KJS::Profile::didExecute): Because we do not get a good context when
        startProfiling is called it is possible that m_currentNode will be at the
        top of the known stack when a didExecute() is called.  What we then do is
        create a new node that represents the function being exited and insert
        it between the head and the currently known children, since they should
        be children of this new node.
        * profiler/ProfileNode.cpp:
        (KJS::ProfileNode::willExecute): Rename the add function for consistency.
        (KJS::ProfileNode::addChild): Appends the child to this node but also
        sets the parent pointer of the children to this node.
        (KJS::ProfileNode::insertNode): Insert a node between this node and its
        children.  Also set the time for the new node since it is now exiting
        and we don't really know when it started.
        * profiler/ProfileNode.h:
        (KJS::CallIdentifier::toString): Added for debugging.
        (KJS::ProfileNode::setSelfTime): Fixed an old bug where we set the
        visibleTotalTime not the visibleSelfTime.
        (KJS::ProfileNode::toString): Added for debugging.
        * profiler/Profiler.cpp: remove unecessary calls.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRoll out 34034, it broke the build.
andersca@apple.com [Thu, 22 May 2008 22:05:10 +0000 (22:05 +0000)]
Roll out 34034, it broke the build.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Julien Chaffraix <jchaffraix@webkit.org>
jchaffraix@webkit.org [Thu, 22 May 2008 21:17:43 +0000 (21:17 +0000)]
2008-05-21  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Eric.

        Bug 9191: JS*ElementWrapperFactory should be autogenerated

        - Add a new parameter to make_names.pl --wrapperFactory which works like --wrapper but generates the

        - Added the new parameter to the different build systems.

        - Removed JS*ElementWrapperFactories in WebCore/bindings/js, replaced by the generated ones.

        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.pro:
        * bindings/js/JSHTMLElementWrapperFactory.cpp: Removed.
        * bindings/js/JSHTMLElementWrapperFactory.h: Removed.
        * bindings/js/JSSVGElementWrapperFactory.cpp: Removed.
        * bindings/js/JSSVGElementWrapperFactory.h: Removed.
        * dom/make_names.pl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Steve Falkenburg <sfalken@apple.com>
sfalken@apple.com [Thu, 22 May 2008 20:39:47 +0000 (20:39 +0000)]
2008-05-22  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * Interfaces/IWebInspector.idl:
        * Interfaces/WebKit.idl:
        * WebInspector.cpp:
        * WebInspector.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Sam Weinig <sam@webkit.org>
weinig@apple.com [Thu, 22 May 2008 19:55:18 +0000 (19:55 +0000)]
2008-05-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver Hunt.

        Rename register arguments for op_call, op_call_eval, op_end, and op_construct
        to document what they are for.

        * VM/CodeGenerator.cpp:
        * VM/CodeGenerator.h:
        * VM/Machine.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Reviewed by Darin Adler.
mitz@apple.com [Thu, 22 May 2008 19:51:17 +0000 (19:51 +0000)]
    Reviewed by Darin Adler.

        - fix broken documentation of

        * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoBug 19116: SquirrelFish shouldn't regress on variable lookups
oliver@apple.com [Thu, 22 May 2008 19:36:52 +0000 (19:36 +0000)]
Bug 19116: SquirrelFish shouldn't regress on variable lookups

Reviewed by Darin.

Last of the multiscope look up optimisations.  This is a wash overall on SunSpider
but is a factor of 5-10 improvement in multiscope read/write/modify (eg. ++, --, +=,
... applied to any non-local var).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Rubber-stamped by Darin.
ap@webkit.org [Thu, 22 May 2008 19:03:02 +0000 (19:03 +0000)]
    Rubber-stamped by Darin.

        Fix tests failing on Tiger.

        * fast/loader/data-url-encoding-html.html:
        * fast/loader/data-url-encoding-html-expected.txt:
        * fast/loader/data-url-encoding-svg.html:
        * fast/loader/data-url-encoding-svg-expected.txt:
        Changed these tests to always use an explicit charset - otherwise, they were failing on
        Leopard because of a CFNetwork bug, and on Tiger because of WebKit bug 19193. Also, changed
        them to test that decoding was performed correctly, not just that document.charset matched

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago <rdar://problem/5954233> Add method to release free memory from FastMalloc
ddkilzer@apple.com [Thu, 22 May 2008 18:40:38 +0000 (18:40 +0000)]
    <rdar://problem/5954233> Add method to release free memory from FastMalloc

        Patch suggested by Mark Rowe.  Rubber-stamped by Maciej.

        * JavaScriptCore.exp: Export _releaseFastMallocFreeMemory.
        * wtf/FastMalloc.cpp:
        (WTF::TCMallocStats::): Added releaseFastMallocFreeMemory() for both
        system malloc and FastMalloc code paths.
        * wtf/FastMalloc.h: Define releaseFastMallocFreeMemory().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago<rdar://problem/5956403> Update the Develop menu to match the new Inspector items
timothy@apple.com [Thu, 22 May 2008 18:37:59 +0000 (18:37 +0000)]
<rdar://problem/5956403> Update the Develop menu to match the new Inspector items

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoWebCore:
andersca@apple.com [Thu, 22 May 2008 18:27:35 +0000 (18:27 +0000)]

2008-05-22  Josh Aas  <joshmoz@gmail.com>

        Reviewed by Anders.

        remove NPNVpluginEventModel, fix example plugin

        Remove NPNVpluginEventModel enum variable.

        * bridge/npapi.h:


2008-05-22  Josh Aas  <joshmoz@gmail.com>

        Reviewed by Anders.

        remove NPNVpluginEventModel, fix example plugin

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView getVariable:value:]):


2008-05-22  Josh Aas  <joshmoz@gmail.com>

        Reviewed by Anders.

        Use correct enum.

        * NetscapeCocoaPlugin/main.m:
        * NetscapeInputMethodPlugin/main.m:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago..:
andersca@apple.com [Thu, 22 May 2008 18:26:10 +0000 (18:26 +0000)]

2008-05-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej.

        Add WebIconFetcher files.

        * WebKit.xcodeproj/project.pbxproj:


2008-05-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej.

        Add WebIconFetcher.

        * Misc/WebIconFetcher.h: Added.
        * Misc/WebIconFetcher.mm: Added.
        (-[WebIconFetcher init]):
        (-[WebIconFetcher dealloc]):
        (-[WebIconFetcher finalize]):
        (-[WebIconFetcher cancel]):
        (-[WebIconFetcher _initWithIconFetcher:client:]):
        (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
        * Misc/WebIconFetcherInternal.h: Added.
        * WebView/WebFrame.mm:
        (-[WebFrame fetchApplicationIcon:selector:]):
        * WebView/WebFramePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRoll out r34020 as it causes recursion tests to fail.
oliver@apple.com [Thu, 22 May 2008 09:53:25 +0000 (09:53 +0000)]
Roll out r34020 as it causes recursion tests to fail.


git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Stephanie Lewis <slewis@apple.com>
slewis@apple.com [Thu, 22 May 2008 09:36:19 +0000 (09:36 +0000)]
2008-05-22  Stephanie Lewis  <slewis@apple.com>

        Reviewed by Dan.

        Fix <rdar://problem/5952405>.  The unbeforeunload count cannot be cleared when it is dispatched because it is possible to be called again.  Clear it after the unload event is dispatched.

        Test: fast/events/onunload-clears-onbeforeunload.html

        * loader/FrameLoader.cpp:
        * page/Frame.cpp:

        implement the beforeUnload UI delegate so that DRT will dispatch beforeunload events.

        * DumpRenderTree/mac/UIDelegate.mm:
        (-[UIDelegate webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:]):
        * DumpRenderTree/win/UIDelegate.cpp:

        add test to test for beforeunload event handlers being removed after they have been fired.

        * fast/events/onunload-clears-onbeforeunload-expected.txt: Added.
        * fast/events/onunload-clears-onbeforeunload.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoDon't leak the SymbolTable when compiling eval code.
oliver@apple.com [Thu, 22 May 2008 09:34:57 +0000 (09:34 +0000)]
Don't leak the SymbolTable when compiling eval code.

Reviewed by Mark

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Simon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Thu, 22 May 2008 09:07:01 +0000 (09:07 +0000)]
2008-05-22  Simon Hausmann  <hausmann@webkit.org>

        Reviewed by Oliver.

        Qt build fixes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-22 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 22 May 2008 08:37:35 +0000 (08:37 +0000)]
2008-05-22  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Adam Roben.

        Removed the old recursion guard mechanism, since squirrelfish has its
        own mechanism. Also removed some old JS call tracing code, since we
        have other ways to do that, too.

        SunSpider reports no change.

        * kjs/object.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Massively speed up date-format-tofte with the debugger attached
aroben@apple.com [Thu, 22 May 2008 08:19:21 +0000 (08:19 +0000)]
    Massively speed up date-format-tofte with the debugger attached

        On a debug Windows build (I know, hardly a good testcase) this patch
        makes this test run 57.25x as fast.

        Reviewed by Mark Rowe.

        * page/inspector/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype.reset): Clear the
        _scriptsForURLsInFilesSelect object.
        (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Instead
        of looping over all the options in the select to find the option we
        want, get the script object from _scriptsForURLsInFilesSelect and get
        the option element from the script object.
        (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use
        _scriptsForURLsInFilesSelect to cache the script objects. Store the
        option element for each script on the script object so we can quickly
        retrieve it later.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Remove some dead code from ScriptsPanel.js
aroben@apple.com [Thu, 22 May 2008 08:18:49 +0000 (08:18 +0000)]
    Remove some dead code from ScriptsPanel.js

        Reviewed by Mark Rowe.

        * page/inspector/ScriptsPanel.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoJavaScriptCore:
mjs@apple.com [Thu, 22 May 2008 08:17:38 +0000 (08:17 +0000)]

2008-05-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - fixed <rdar://problem/5954979> crash on celtic kane JS benchmark

        * kjs/nodes.cpp:


2008-05-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - test case for <rdar://problem/5954979> crash on celtic kane JS benchmark

        * fast/js/try-catch-crash-expected.txt: Added.
        * fast/js/try-catch-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34017 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 06:21:59 +0000 (06:21 +0000)]
2008-05-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Maciej and Geoff.

        <rdar://problem/5951561> Turn on JavaScript Profiler
        -As part of the effort to turn on the profiler it would be helpful if it
        did not need ExecStates to represent the stack location of the currently
        executing statement.
        -We now create each node as necessary with a reference to the current
        node and each node knows its parent so that the tree can be made without
        the entire stack.

        * profiler/Profile.cpp:
        (KJS::Profile::Profile): The current node starts at the head.
        (KJS::Profile::stopProfiling): The current node is cleared when profiling
        (KJS::Profile::willExecute): The current node either adds a new child or
        starts and returns a reference to an already existing child if the call
        ID that is requested already exists.
        (KJS::Profile::didExecute): The current node finishes and returns its
        * profiler/Profile.h: Use a single callIdentifier instead of a vector
        since we no longer use the whole stack.
        * profiler/ProfileNode.cpp: Now profile nodes keep a reference to their
        (KJS::ProfileNode::ProfileNode): Initialize the parent.
        (KJS::ProfileNode::didExecute): Record the time and return the parent.
        (KJS::ProfileNode::addOrStartChild): If the given callIdentifier is
        already a child, start it and return it, otherwise create a new one and
        return that.
        (KJS::ProfileNode::stopProfiling): Same logic, just use the new function.
        * profiler/ProfileNode.h: Utilize the parent.
        * profiler/Profiler.cpp:
        (KJS::Profiler::startProfiling): Here is the only place where the
        ExecState is used to figure out where in the stack the profiler is
        currently profiling.
        (KJS::dispatchFunctionToProfiles): Only send one CallIdentifier instead
        of a vector of them.
        (KJS::Profiler::willExecute): Ditto.
        (KJS::Profiler::didExecute): Ditto.
        (KJS::createCallIdentifier): Create only one CallIdentifier.
        (KJS::createCallIdentifierFromFunctionImp): Ditto.
        * profiler/Profiler.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34013 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Fix Bug 19178: Inspector should support sorting resources by latency
aroben@apple.com [Thu, 22 May 2008 05:59:36 +0000 (05:59 +0000)]
    Fix Bug 19178: Inspector should support sorting resources by latency


        I replaced "Sort by Time" with the following sorting options:
          - Sort by Start Time
          - Sort by Response Time
          - Sort by End Time
          - Sort by Duration
          - Sort by Latency

        You can no longer sort by Size when looking at the Time graph, and you
        can't use any of the time-based sorting functions when looking at the
        Size graph.

        Reviewed by Tim Hatcher.

        * page/inspector/Resource.js:
        (WebInspector.Resource.prototype.get duration): Added.
        (WebInspector.Resource.prototype.get latency): Added.
        (WebInspector.Resource.CompareByStartTime): Added.
        (WebInspector.Resource.CompareByResponseReceivedTime): Added.
        (WebInspector.Resource.CompareByEndTime): Added.
        (WebInspector.Resource.CompareByDuration): Added.
        (WebInspector.Resource.CompareByLatency): Added.
        * page/inspector/ResourcesPanel.js:
          - Each graph sidebar item now holds a list of sorting options
          - Graph sidebar items no longer have a calculator property. This is
            stored on the sorting options instead, to allow each kind of
            sorting to have a different calculator.
          - The sortingSelectElement starts out empty, and is populated in
          - The sortingFunction starts out uninitialized and is set as a
            side-effect of _graphSelected.
        (WebInspector.ResourcesPanel.prototype.set calculator): Don't do
        anything if the calculator hasn't changed.
        (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
        _lastSelectedGraphTreeElement property instead of getting the graph
        element from the calculator.
          - Store the tree element in the _lastSelectedGraphTreeElement
          - Popuplate sortingSelectElement with the sortingOptions and select
            the option that was last selected
        (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
        our calculator from the sorting option.
        (WebInspector.ResourceTimeCalculator): Renamed from
        ResourceTransferTimeCalculator. Now takes a parameter to specify
        whether the bars should all start at zero.
        Take this.startAtZero into account.
        Abstracted the lower/upper bounds of a resource into methods.
        (WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
        (WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
        (WebInspector.ResourceTransferTimeCalculator): Added. This is now a
        subclass of ResourceTimeCalculator
        (WebInspector.ResourceTransferDurationCalculator): Added.
        (WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
        (WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
        (WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
        (WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
        (WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
        Changed to call CompareBySize.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are wrong...
aroben@apple.com [Thu, 22 May 2008 05:59:24 +0000 (05:59 +0000)]
    Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are wrong/missing


        Reviewed by Tim Hatcher.

        * manual-tests/inspector/debugger-status-bar-buttons-state.html:
        * page/inspector/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call
        _clearInterface (which updates the buttons' tool tips) after
        attaching/detaching the debugger so that the buttons will reflect the
        new state.
        Set the title of the pauseOnExceptionsButton, not the debuggingButton.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix Bug 19153: Inspector should support console.debug
aroben@apple.com [Thu, 22 May 2008 05:58:51 +0000 (05:58 +0000)]
Fix Bug 19153: Inspector should support console.debug


        Fix Bug 19153: Inspector should support console.debug


        Reviewed by Tim Hatcher.

        Test: manual-tests/inspector/console-log-formatting.html

        * bindings/js/JSConsoleCustom.cpp:
        (WebCore::JSConsole::debug): Added.
        * manual-tests/inspector/console-log-formatting.html: Changed to test
        console.debug as well.
        * page/Console.cpp:
        (WebCore::Console::debug): Added. Just calls through to log().
        * page/Console.h:
        * page/Console.idl: Added debug() declaration.


        Update window-properties results for new console functions

        Reviewed by Tim Hatcher.

        * fast/dom/Window/window-properties-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Darin Adler <darin@apple.com>
darin@apple.com [Thu, 22 May 2008 05:19:01 +0000 (05:19 +0000)]
2008-05-21  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - https://bugs.webkit.org/show_bug.cgi?id=19180
          speed up the < operator for the case when both values are integers

        Makes standalone SunSpider 1.022x faster.

        * VM/Machine.cpp:
        (KJS::jsLess): Add a special case for when both are numbers that fit in a JSImmediate.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoCheck in files I forgot to last time.
mjs@apple.com [Thu, 22 May 2008 05:18:36 +0000 (05:18 +0000)]
Check in files I forgot to last time.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoJavaScriptCore:
mjs@apple.com [Thu, 22 May 2008 05:02:47 +0000 (05:02 +0000)]

2008-05-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver and Sam.

        - fixed <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)

        Track global this value in the scope chain so we can retrieve it
        efficiently but it follows lexical scope properly.

        * kjs/ExecState.h:
        * kjs/JSGlobalObject.h:
        * kjs/function_object.cpp:
        * kjs/scope_chain.h:


2008-05-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver and Sam.

        - tests for <rdar://problem/5815631> REGRESSION (r31239): Multiscope optimisation of function calls results in incorrect this value (breaks tvtv.de)

        * fast/frames/cross-site-this-expected.txt: Added.
        * fast/frames/cross-site-this.html: Added.
        * fast/frames/resources/cross-site-this-helper.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoWebKit/win:
adele@apple.com [Thu, 22 May 2008 04:57:47 +0000 (04:57 +0000)]

2008-05-21  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        WebKit part of for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows

        * WebCoreSupport/WebChromeClient.cpp:
        (WebChromeClient::focus): Call updateActiveState directly.
         Normally this would happen on a timer, but JS might need to know this earlier, so we'll update here.
        (WebChromeClient::unfocus): ditto.
        * WebView.cpp: (WebView::updateActiveStateSoon): Added comment about why we use a timer for this.


2008-05-21  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        DumpRenderTree support for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows

        * DumpRenderTree/win/UIDelegate.cpp:
        (UIDelegate::webViewFocus): Added.
        (UIDelegate::webViewUnfocus): Added.
        * DumpRenderTree/win/UIDelegate.h:


2008-05-21  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        Enhanced and enabled test for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows

        * fast/dom/HTMLDocument/hasFocus-expected.txt:
        * fast/dom/HTMLDocument/hasFocus.html:
        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 04:56:22 +0000 (04:56 +0000)]
2008-05-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam.

        <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
        profile node.
        - Expose the Profile's 'focus' ability to WebCore and the WebInspector.

        * page/JavaScriptProfile.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 04:52:43 +0000 (04:52 +0000)]
2008-05-21  Kevin McCullough  <kmccullough@apple.com>

        Sadness :(

        * kjs/config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Thu, 22 May 2008 04:51:03 +0000 (04:51 +0000)]
2008-05-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
        profile node.
        - This patch updatest the times of the visible nodes correctly, but to do
        so, some of the design of the ProfileNode changed.

        * JavaScriptCore.exp: export focus' symbol.
        * profiler/Profile.cpp: ProfileNodes now take a reference to the head of
        the profile tree to get up-to-date accurate total profile time.
        (KJS::Profile::Profile): Pass 0 for the head node.
        (KJS::Profile::stopProfiling): stopProfiling no longer needs the time
        passed into it, since it can get it from the head and it does not need to
        be told it is the head because it can figure it out on it's own.
        (KJS::Profile::willExecute): Set the head node for each created node.
        * profiler/Profile.h:
        (KJS::Profile::focus): Instead of taking a CallIdentifier that the caller
        would have to create, now focus() takes a ProfileNode that they should
        already have a reference to and focus() can extract the CallIdentifier
        from it.
        * profiler/ProfileNode.cpp: Create actual and visible versions fo the
        total and self times for focus and exclude.  Also add a head node
        reference so that nodes can get information from their head.
        (KJS::ProfileNode::stopProfiling): Rename the total and self time
        variables and set the visual ones to the actual ones, so that without any
        changes to the visual versions of these variables, their times will match
        the actual times.
        (KJS::ProfileNode::focus): Now focus() has a bool to force it's children
        to be visible if this node is visible.  If this node does not match the
        CallIdentifier being focused then the visibleTotalTime is only updated if
        one or more of it's children is the CallIdentifier being focused.
        (KJS::ProfileNode::restoreAll): Restores all variables with respect to
        the visible data in the ProfileNode.
        (KJS::ProfileNode::endAndRecordCall): Name change.
        (KJS::ProfileNode::debugPrintData): Dump the new variables.
        (KJS::ProfileNode::debugPrintDataSampleStyle): Name change.
        * profiler/ProfileNode.h: Use the new variables and reference to the head

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Sam Weinig <sam@webkit.org>
weinig@apple.com [Thu, 22 May 2008 04:50:47 +0000 (04:50 +0000)]
2008-05-21  Sam Weinig  <sam@webkit.org>

        Review by Mark Rowe.

        Change test so that its result are not different all the time.

        * http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header-expected.txt: Copied from http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt.
        * http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header.html: Copied from http/tests/xmlhttprequest/access-control-basic-allow-headers.html.
        * http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt: Removed.
        * http/tests/xmlhttprequest/access-control-basic-allow-headers.html: Removed.
        * http/tests/xmlhttprequest/resources/access-control-basic-allow-access-control-origin-header.cgi: Copied from http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi.
        * http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Brady Eidson <beidson@apple.com>
beidson@apple.com [Thu, 22 May 2008 04:33:17 +0000 (04:33 +0000)]
2008-05-21  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Adam

        <rdar://problem/5787763> - Hang in Storage tests on windows

        Since the hang was originally noticed and investigated, no one has revisited it.
        Adam and I just spent some time trying to reproduce and were unable.

        Lets give the bots another go, shall we?

        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoVersioning.
mrowe@apple.com [Thu, 22 May 2008 04:14:18 +0000 (04:14 +0000)]

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33999 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoSet the pass_through flag on Getopt so that extra arguments can be passed through...
mrowe@apple.com [Thu, 22 May 2008 04:02:31 +0000 (04:02 +0000)]
Set the pass_through flag on Getopt so that extra arguments can be passed through to Safari,
rather than trigger an unknown argument message.  This allows run-webkit-tests to display results
once more.

Rubber-stamped by Stephanie Lewis.

* Scripts/run-safari:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoYet more windows builds fixes
oliver@apple.com [Thu, 22 May 2008 03:52:16 +0000 (03:52 +0000)]
Yet more windows builds fixes

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRemove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
timothy@apple.com [Thu, 22 May 2008 03:46:31 +0000 (03:46 +0000)]
Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
since the parts the remain aren't useful.

* page/JavaScriptDebugServer.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Alp Toker <alp@nuanti.com>
alp@webkit.org [Thu, 22 May 2008 03:44:21 +0000 (03:44 +0000)]
2008-05-21  Alp Toker  <alp@nuanti.com>

        GTK+/UNIX testkjs build fix. Include signal.h.

        * kjs/testkjs.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33994 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Beth Dakin <bdakin@apple.com>
bdakin@apple.com [Thu, 22 May 2008 03:41:03 +0000 (03:41 +0000)]
2008-05-21  Beth Dakin  <bdakin@apple.com>

        Reviewed by Anders.

        Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash
        beneath ResourceHandle::setDefersLoading while running fast/loader/
        simultaneous-reloads-assert.html (null CFURLConnection)

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::setDefersLoading): Added simple null-

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33993 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoYet more windows build fixes
oliver@apple.com [Thu, 22 May 2008 03:34:40 +0000 (03:34 +0000)]
Yet more windows build fixes

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoAdds the Request and Response headers to the Resource view.
timothy@apple.com [Thu, 22 May 2008 03:31:50 +0000 (03:31 +0000)]
Adds the Request and Response headers to the Resource view.

<rdar://problem/5940782> REGRESSION: Resource Request and Response
headers aren't shown (18451)

Reviewed by Adam Roben.

* English.lproj/localizedStrings.js: Added new strings.
* css/view-source.css: Add comments to make sure a couple of
style rules stay in sync with inspector.css.
* page/inspector/Resource.js:
(WebInspector.Resource.prototype.set url): Dispatch an event when
this property changes.
(WebInspector.Resource.prototype.set requestHeaders): Ditto.
(WebInspector.Resource.prototype.set responseHeaders): Ditto.
* page/inspector/ResourceView.js:
(WebInspector.ResourceView): Add new elements for the headers
and a headers TreeOutline. Add event listeners for resource
property changes. Calls the three new refresh functions.
(WebInspector.ResourceView.prototype.set headersVisible): Implemented.
Toggles the headers-visible class name.
(WebInspector.ResourceView.prototype._refreshURL): Update the URL
tree element.
(WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
(WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
(WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
headers fromm the tree element. Loop throuh the headers and create new
tree elements and append them.
* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
on the visible view if it is implemented.
* page/inspector/SourceFrame.js:
(WebInspector.SourceFrame.prototype.get autoSizeToFitContentHeight):
(WebInspector.SourceFrame.prototype.set autoSizeToFitContentHeight):
* page/inspector/SourceView.js:
(WebInspector.SourceView): Move the SourceFrame creation so it is
available when headersVisible is set. Add a gutter element to fill
the vertical space no covered by the SourceFrame now.
(WebInspector.SourceView.prototype.set headersVisible): Set the
SourceFrame.autoSizeToFitContentHeight when this property changes.
(WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
when autoSizeToFitContentHeight is true. This happens when resizing the
Resources sidebar.
* page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
and a comment to keep in sync with view-source.css. Adds other styles
for the headers area of resource-view.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33991 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoWebCore:
weinig@apple.com [Thu, 22 May 2008 03:23:02 +0000 (03:23 +0000)]

2008-05-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        <rdar://problem/5838772> Support cross-site XMLHttpRequest

        - Implement support for cross-site GET requests using the HTTP header
          Access-control mechanism.

        Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html

        * xml/AccessControlList.cpp:
        (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
        * xml/AccessControlList.h:

        * xml/AccessItem.cpp:
        * xml/AccessItem.h:
        Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using
        the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset
        of the AccessItem match algorithm to be used, until the complete parsing of
        the wildcards and optional pieces is complete.

        * xml/AccessItemRule.cpp:
        * xml/AccessItemRule.h:
        More of the implementation of the list check algorithm.  Check if any of the items
        in the rule match the control origin.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore.
        (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests.
        (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for
        cross-domain requests.
        This can now throw an exception if a cross-domain request is denied by the access control
        Add support for cross-domain GET request.  ASSERT temporarily that the method is GET, since we
        should have bailed out much earlier for non-GET methods.
        Do the HTTP header access-control check as soon as the headers arrive.
        * xml/XMLHttpRequest.h:


2008-05-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        <rdar://problem/5838772> Support cross-site XMLHttpRequest

        - Add tests for basic cross-domain XHR.

        * http/tests/xmlhttprequest/access-control-basic-allow-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-allow-headers-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-allow-headers.html: Added.
        * http/tests/xmlhttprequest/access-control-basic-allow.html: Added.
        * http/tests/xmlhttprequest/access-control-basic-denied-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-denied.html: Added.
        * http/tests/xmlhttprequest/access-control-basic-exclude-expected.txt: Added.
        * http/tests/xmlhttprequest/access-control-basic-exclude.html: Added.
        * http/tests/xmlhttprequest/exceptions-expected.txt:
        * http/tests/xmlhttprequest/exceptions.html:
        * http/tests/xmlhttprequest/resources/access-control-basic-allow-headers.cgi: Added.
        * http/tests/xmlhttprequest/resources/access-control-basic-allow.cgi: Added.
        * http/tests/xmlhttprequest/resources/access-control-basic-denied.cgi: Added.
        * http/tests/xmlhttprequest/resources/access-control-basic-exclude.cgi: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33990 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Alp Toker <alp@nuanti.com>
alp@webkit.org [Thu, 22 May 2008 03:20:58 +0000 (03:20 +0000)]
2008-05-21  Alp Toker  <alp@nuanti.com>

        GTK+ build fix. Add DebuggerCallFrame.cpp and take AllInOneFile.cpp
        changes into account.

        * GNUmakefile.am:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33989 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix windows build
oliver@apple.com [Thu, 22 May 2008 02:51:45 +0000 (02:51 +0000)]
Fix windows build

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33988 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Stephanie Lewis <slewis@apple.com>
slewis@apple.com [Thu, 22 May 2008 02:36:39 +0000 (02:36 +0000)]
2008-05-21  Stephanie Lewis  <slewis@apple.com>

        Reviewed by Maciej.

        arch doesn't take arguments on tiger.  expand DRT timeout for guardMalloc.

        * Scripts/run-webkit-tests:
        * Scripts/webkitdirs.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33987 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoImprove the behavior of run-webkit-tests with 64-bit WebKit by automatically inferrin...
mrowe@apple.com [Thu, 22 May 2008 02:19:19 +0000 (02:19 +0000)]
Improve the behavior of run-webkit-tests with 64-bit WebKit by automatically inferring whether to run 64-bit.

If --64-bit is not passed to run-webkit-tests, attempt to guess whether we should run 64-bit.
This decision is made based on the 64-bitness of the built WebKit framework if it exists, and
can be manually overridden by passing --64-bit or --no-64-bit.  This removes the need to always
pass an argument to run-webkit-tests after having built with "make x86_64".

Reviewed by Stephanie Lewis.

* Scripts/gdb-safari:
* Scripts/run-safari:
* Scripts/run-webkit-tests:
* Scripts/webkitdirs.pm: Split the setting of the 64-bit flag, the determination of the
preferred architecture, and exporting of the environment variables for 'arch' out into
separate subroutines.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33986 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix "make x86_64" by adding x86_64 target to WebKitTools Makefile.
mrowe@apple.com [Thu, 22 May 2008 02:19:17 +0000 (02:19 +0000)]
Fix "make x86_64" by adding x86_64 target to WebKitTools Makefile.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Alp Toker <alp@nuanti.com>
alp@webkit.org [Thu, 22 May 2008 02:06:46 +0000 (02:06 +0000)]
2008-05-21  Alp Toker  <alp@nuanti.com>

        GTK+ port build fixes following squirrelfish merge r33979.

        * GNUmakefile.am:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Maciej Stachowiak <mjs@apple.com>
mjs@apple.com [Thu, 22 May 2008 02:03:39 +0000 (02:03 +0000)]
2008-05-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - save a hash lookup wne writing to global properties
        0.3% speedup on SunSpider, 7% on bitops-bitwise-and

        * VM/Machine.cpp:
        (KJS::resolveBase): Check for being a the end of the scope chain
        before hash lookup.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33983 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Alp Toker <alp@nuanti.com>
alp@webkit.org [Thu, 22 May 2008 01:31:29 +0000 (01:31 +0000)]
2008-05-21  Alp Toker  <alp@nuanti.com>

        Rubber-stamped by Maciej.

        Replace non-standard #pragma marks with comments to avoid compiler

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Geoffrey Garen <ggaren@apple.com>
mrowe@apple.com [Thu, 22 May 2008 01:21:18 +0000 (01:21 +0000)]
2008-05-21  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Mark Rowe.

        Fix layout test failure in fast/dom/getter-on-window-object2 introduced in r33961.

        * JavaScriptCore.exp:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33980 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoMerge squirrelfish branch into trunk.
mrowe@apple.com [Thu, 22 May 2008 01:20:45 +0000 (01:20 +0000)]
Merge squirrelfish branch into trunk.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Wed, 21 May 2008 23:18:09 +0000 (23:18 +0000)]
2008-05-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        Add IconFetcher implementation.

        * WebCore.base.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLLinkElement.h:
        * loader/icon/IconFetcher.cpp: Added.
        * loader/icon/IconFetcher.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago Reviewed by Dave Hyatt.
mitz@apple.com [Wed, 21 May 2008 21:50:52 +0000 (21:50 +0000)]
    Reviewed by Dave Hyatt.

        - fix https://bugs.webkit.org/show_bug.cgi?id=18352
          <rdar://problem/5854517> crash loading malicious font

        * platform/graphics/mac/SimpleFontDataMac.mm:
        (WebCore::SimpleFontData::platformInit): In the case of a custom font,
        there is no NSFont to base the fallback font on, so get a font based on
        fallback family name alone.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoAdds the files and line numbers to the Profile call tree.
timothy@apple.com [Wed, 21 May 2008 21:09:59 +0000 (21:09 +0000)]
Adds the files and line numbers to the Profile call tree.

<rdar://problem/5952924> Inspector needs to show file and line number
in the Profile call tree

Reviewed by Geoff Garen.

* page/JavaScriptProfileNode.cpp:
(WebCore::getFunctionName): Fixes a JSStringRef leak.
(WebCore::getURL): Call ProfileNode::url.
(WebCore::getLineNumber): Call ProfileNode::lineNumber.
(WebCore::ProfileNodeClass): Add the url and lineNumber properties.
* page/inspector/ProfileView.js:
(WebInspector.ProfileDataGridNode.prototype.createCell): Overload the
DataGridNode.createCell and add the file and lineNumber to the
cell if the column is the function column.
* page/inspector/inspector.css: New styles for the file and line.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33976 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Darin Adler <darin@apple.com>
darin@apple.com [Wed, 21 May 2008 19:25:03 +0000 (19:25 +0000)]
2008-05-21  Darin Adler  <darin@apple.com>

        * Scripts/make-js-test-wrappers: Added another exception.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Darin Adler <darin@apple.com>
darin@apple.com [Wed, 21 May 2008 19:16:47 +0000 (19:16 +0000)]
2008-05-21  Darin Adler  <darin@apple.com>

        - try to fix the Windows build

        * profiler/Profiler.cpp:
        (KJS::Profiler::stopProfiling): Use ptrdiff_t instead of the less-common but incredibly
        similar ssize_t type.
        * wtf/AVLTree.h:
        (KJS::AVLTree::search): Added a typename for a dependent name that's a type.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoJavaScriptCore:
darin@apple.com [Wed, 21 May 2008 19:15:01 +0000 (19:15 +0000)]

2008-05-21  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix <rdar://problem/5952721> bug in JavaScript arguments object property lookup

        Test: fast/js/arguments-bad-index.html

        * kjs/function.cpp:
        (KJS::IndexToNameMap::IndexToNameMap): Use unsigned instead of int.
        (KJS::IndexToNameMap::isMapped): Use unsigned instead of int, and also use the
        strict version of the numeric conversion function, since we don't want to allow
        trailing junk.
        (KJS::IndexToNameMap::unMap): Ditto.
        (KJS::IndexToNameMap::operator[]): Ditto.
        * kjs/function.h: Changed IndexToNameMap::size type from int to unsigned.


2008-05-21  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - test for <rdar://problem/5952721> bug in JavaScript arguments object property lookup

        * fast/js/arguments-bad-index-expected.txt: Added.
        * fast/js/arguments-bad-index.html: Added.
        * fast/js/resources/arguments-bad-index.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years ago2008-05-21 Darin Adler <darin@apple.com>
darin@apple.com [Wed, 21 May 2008 18:34:47 +0000 (18:34 +0000)]
2008-05-21  Darin Adler  <darin@apple.com>

        - fix build

        * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later
        if we want, but if we do, we should probably make some refinements like checking _private->closed
        and applicationIsTerminating.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoRestores logging of console calls to the STDOUT
timothy@apple.com [Wed, 21 May 2008 18:16:46 +0000 (18:16 +0000)]
Restores logging of console calls to the STDOUT
when Interpreter::shouldPrintExceptions() is true.

<rdar://problem/5636442> REGRESSION: Console.log no longer logs to
the system console or terminal

<rdar://problem/5146079> JavaScript exception logging should print
accurate file and line info when called from WebScriptObject

Reviewed by Adam Roben.

* bindings/js/JSCustomSQLStatementCallback.cpp:
(WebCore::JSCustomSQLStatementCallback::handleEvent): Remove existing
printf and check for Interpreter::shouldPrintExceptions() since there is
a call to Console::addMessage.
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSCustomSQLStatementErrorCallback::handleEvent): Ditto.
* bindings/js/JSCustomSQLTransactionCallback.cpp:
(WebCore::JSCustomSQLTransactionCallback::handleEvent): Ditto.
* bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
(WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Ditto.
* bindings/js/JSCustomVoidCallback.cpp:
(WebCore::JSCustomVoidCallback::handleEvent): Ditto.
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Ditto.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::printErrorMessage): Ditto.
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute): Ditto.
* bindings/js/kjs_events.cpp:
(WebCore::JSAbstractEventListener::handleEvent): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldAllowNavigation): Ditto.
* bindings/objc/WebScriptObject.mm:
(WebCore::addExceptionToConsole): Added helper static function that
calls Console::addMessage.
(-[WebScriptObject callWebScriptMethod:withArguments:]): Call addExceptionToConsole.
(-[WebScriptObject evaluateWebScript:]): Ditto.
(-[WebScriptObject setValue:forKey:]): Ditto.
(-[WebScriptObject valueForKey:]): Ditto.
(-[WebScriptObject removeWebScriptKey:]): Ditto.
(-[WebScriptObject webScriptValueAtIndex:]): Ditto.
(-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
* page/Console.cpp:
(WebCore::Console::addMessage): Print the level, message,
URL and line number to STDOUT.
(WebCore::printToStandardOut): Helper static function that
takes a prefix string, ExecState, an argument List and URL.
Prints the prefix and loops through the arguments calling
toString on each and printing the string. Finally printing
the URL and new line.
(WebCore::Console::error): Call printToStandardOut.
(WebCore::Console::info): Ditto.
(WebCore::Console::log): Ditto.
(WebCore::Console::assertCondition): Ditto.
(WebCore::Console::warn): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoChanges to the ownership of Profiles and allows multiple Profiles at a time
timothy@apple.com [Wed, 21 May 2008 18:16:18 +0000 (18:16 +0000)]
Changes to the ownership of Profiles and allows multiple Profiles at a time


        Change the Profiler to allow multiple profiles to be running at
        the same time. This can happen when you have nested console.profile()
        calls. This required two changes. First, the Profiler needed to keep a
        Vector of current profiles, instead of one. Second, a Profile needs
        to keep track of the global ExecState it started in and the page group
        identifier it is tracking.

        The stopProfiling call now takes the same arguments as startProfiling.
        This makes sure the correct profile is stopped. Passing a null UString
        as the title will stop the last profile for the matching ExecState.

        <rdar://problem/5951559> Multiple pages profiling can interfere with each other

        Reviewed by Kevin McCullough.

        * JavaScriptCore.exp: Added new exports. Removed old symbols.
        * profiler/Profile.cpp:
        (KJS::Profile::Profile): New constructor arguments for the
        originatingGlobalExec and pageGroupIdentifier.
        (KJS::Profile::stopProfiling): Set the m_originatingGlobalExec to null.
        * profiler/Profile.h:
        (KJS::Profile::create): Additional arguments.
        (KJS::Profile::originatingGlobalExec): Return m_originatingGlobalExec.
        (KJS::Profile::pageGroupIdentifier): Return m_pageGroupIdentifier.
        * profiler/Profiler.cpp:
        (KJS::Profiler::findProfile): Added. Finds a Profile that matches
        the ExecState and title.
        (KJS::Profiler::startProfiling): Return early if there is already
        a Profile with the ExecState and title. If not, create a new profile
        and append it to m_currentProfiles.
        (KJS::Profiler::stopProfiling): Loops through m_currentProfiles
        and find the one matching the ExecState and title. If one is found
        call stopProfiling and return the Profile after removing it
        from m_currentProfiles.
        (KJS::dispatchFunctionToProfiles): Helper inline function to loop through
        m_currentProfiles and call a Profile function.
        (KJS::Profiler::willExecute): Call dispatchFunctionToProfiles.
        (KJS::Profiler::didExecute): Ditto.
        * profiler/Profiler.h:


        Changes to work with the new Profiler API. The Profile is now
        stored by the InspectorController when Console.profileEnd is called.
        This solves three issues with the previous design. First, we don't
        keep profiles around unless the Inspector is enabled. Second, we
        only show Profiles initiated by the Page in it's Inspector, not every
        Profile for the whole process. Third, we now show Profiles in the
        Inspector when they are created.

        <rdar://problem/5951562> New profiles aren't added to the Inspector
        as they finish

        Reviewed by Kevin McCullough.

        * bindings/js/JSConsoleCustom.cpp:
        (WebCore::JSConsole::profileEnd): Added. Calls impl()->profileEnd()
        and passes the ExecState and arguments.
        * page/Console.cpp:
        (WebCore::Console::profileEnd): Accept the optional title argument
        and pass it to Profilier::stopProfiling along with the ExecState.
        Calls InspectorController::addProfile with the result Profile.
        * page/Console.h:
        * page/Console.idl: Made profileEnd Custom so we can get the ExecState.
        * page/InspectorController.cpp:
        (WebCore::profiles): Renamed from allProfiles. Uses the controller's
        profiles vector.
        (WebCore::InspectorController::addProfile): Appends to m_profiles.
        Calls addScriptProfile if the window is visible.
        (WebCore::InspectorController::windowScriptObjectAvailable): Renamed
        allProfiles to profiles.
        (WebCore::InspectorController::addScriptProfile): Calls addProfile on
        the JavaScript side.
        (WebCore::InspectorController::didCommitLoad): Clears m_profiles.
        * page/InspectorController.h:
        * page/inspector/ProfilesPanel.js: Populates the profiles sidebar the first
        time the panel is shown after a rest.
        * page/inspector/inspector.js: Added addProfile, calls ProfilesPanel's
        addProfile function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33969 268f45cc-cd09-0410-ab3c-d52691b4dbfc