WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-06-02  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by David Hyatt and Mitz.
4
5         <rdar://problem/5704119> 
6         repro crash in WebCore::RenderPart::setWidget (plugin-related?)
7         
8         Test: platform/mac/plugins/update-widget-from-style-recalc.html
9
10         Make sure to update the document's rendering before calling updateWidget.
11         
12         * html/HTMLEmbedElement.cpp:
13         (WebCore::HTMLEmbedElement::updateWidget):
14         * html/HTMLObjectElement.cpp:
15         (WebCore::HTMLObjectElement::updateWidget):
16
17 2008-06-02  Kevin McCullough  <kmccullough@apple.com>
18
19         Reviewed by Adam.
20
21         <rdar://problem/5954226> JSProfiler: Move the calls from
22         JavaScriptProfileNode to JavaScriptProfile in WebCore (19231)
23         - This Makes the profiler now call sorting function s on a per-profile
24         basis instead of on a node in the profile.
25         - This is also needed to remove the recursion limit in the profiler
26         <rdar://problem/5969992> JSProfiler: Remove the recursion limit in the
27         profiler
28         since once the limit is removed calling sort on a node will only sort
29         that node's children not the entire sub-tree of that node.
30
31         * page/JavaScriptProfile.cpp: All of these functions were moved from 
32         JavaScriptProfileNode.
33         (WebCore::sortTotalTimeDescending):
34         (WebCore::sortTotalTimeAscending):
35         (WebCore::sortSelfTimeDescending):
36         (WebCore::sortSelfTimeAscending):
37         (WebCore::sortCallsDescending):
38         (WebCore::sortCallsAscending):
39         (WebCore::sortFunctionNameDescending):
40         (WebCore::sortFunctionNameAscending):
41         (WebCore::ProfileClass):
42         * page/JavaScriptProfileNode.cpp:
43         (WebCore::ProfileNodeClass):
44         * page/inspector/ProfileView.js: Change uses of JavaScriptProfileNode
45         for sorting to JavaScriptProfile.
46
47 2008-06-02  Dan Bernstein  <mitz@apple.com>
48
49         Reviewed by Oliver Hunt.
50
51         - fix more cases of https://bugs.webkit.org/show_bug.cgi?id=19344
52           <rdar://problem/5977300> Regression: Shadow offsets seem to have changed in 10.5.3 in canvas
53
54         Tests: fast/canvas/shadow-offset-1.html
55                fast/canvas/shadow-offset-2.html
56                fast/canvas/shadow-offset-3.html
57                fast/canvas/shadow-offset-4.html
58                fast/canvas/shadow-offset-5.html
59                fast/canvas/shadow-offset-6.html
60                fast/canvas/shadow-offset-7.html
61
62         * html/CanvasRenderingContext2D.cpp:
63         (WebCore::adjustedShadowSize): Added this helper function.
64         (WebCore::CanvasRenderingContext2D::setShadow): Changed to call
65         adjustedShadowSize().
66         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
67
68 2008-06-02  Julien Chaffraix  <jchaffraix@webkit.org>
69
70         Reviewed by Darin.
71
72         Bug 18066: REGRESSION: createAttribute throws NAMESPACE_ERR exception
73         https://bugs.webkit.org/show_bug.cgi?id=18066
74
75         Test: fast/dom/createAttribute-exception.html
76
77         * dom/Document.cpp:
78         (WebCore::Document::createAttributeNS):
79         * dom/Document.h: Add a bool parameter shouldIgnoreNamespaceChecks
80         to createNamespaceNS() used by createAttribute() to bypass namespace
81         checking.
82
83 2008-06-02  Darin Adler  <darin@apple.com>
84
85         Reviewed by John Sullivan.
86
87         - fix https://bugs.webkit.org/show_bug.cgi?id=18799
88           apl.aip.org menu does not work (property names should be case sensitive)
89           <rdar://problem/5900484>
90
91         Test: fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html
92
93         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
94         (WebCore::hasCSSPropertyNamePrefix): Tweak implementation a tiny bit for
95         improved performance when the first character does not match.
96         (WebCore::cssPropertyName): Reject property names with a leading uppercase
97         letter.
98
99 2008-06-02  Darin Adler  <darin@apple.com>
100
101         Reviewed by Mitz.
102
103         - fix https://bugs.webkit.org/show_bug.cgi?id=19358
104           <rdar://problem/5951986> first line break in <pre> elements ignored
105           (chess boards at http://rankzero.de/)
106
107         Test: fast/parser/pre-first-line-break.html
108
109         * editing/markup.cpp:
110         (WebCore::appendStartMarkup): Fix handling of <listing>. Not part of the
111         bug mentioned above, but uncovered by the regression test.
112
113         * html/HTMLTokenizer.cpp:
114         (WebCore::HTMLTokenizer::write): Clear the "discardLF" flag when
115         processing a new tag.
116
117 2008-06-02  Timothy Hatcher  <timothy@apple.com>
118
119         Fixes a bug where only the last breakpoint would be hit after reloading
120         the page. Also fixes a bug where disabled breakpoints would be hit
121         after reloading the page.
122
123         Reviewed by Darin Adler.
124
125         * page/inspector/BreakpointsSidebarPane.js:
126         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): Don't call
127         InspectorController.addBreakpoint() unless the breakpoint is enabled.
128         * page/inspector/ScriptsPanel.js:
129         (WebInspector.ScriptsPanel.prototype.addScript): Move the addBreakpoint()
130         call inside the for loop so each breakpoint is added. Also check the
131         breakpoint's enabled state before calling addBreakpoint().
132
133 2008-06-02  Timothy Hatcher  <timothy@apple.com>
134
135         Fixes a bug where the line highlight and the execution line were conflicting.
136         The line highlight no longer shows up when the execution line changes, only
137         when showResource or showScript is called with a line number.
138
139         Reviewed by Darin Adler.
140
141         * page/inspector/ScriptsPanel.js:
142         (WebInspector.ScriptsPanel.prototype.showScript): Pass true for shouldHighlightLine.
143         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
144         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Added a shouldHighlightLine
145         argument that triggers the highlightLine() call on the SourceFrame.
146         (WebInspector.ScriptsPanel.prototype._goBack): Pass false for shouldHighlightLine since
147         we need to pass true for fromBackForwardAction.
148         (WebInspector.ScriptsPanel.prototype._goForward): Ditto.
149
150 2008-06-02  Timothy Hatcher  <timothy@apple.com>
151
152         Bring the Web Inspector forward when the debugger pauses.
153
154         https://bugs.webkit.org/show_bug.cgi?id=19095
155
156         Reviewed by Darin Adler.
157
158         * page/inspector/ScriptsPanel.js:
159         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Call window.focus() and
160         make the Scripts panel the current panel.
161
162 2008-06-02  Jan Michael Alonzo  <jmalonzo@webkit.org>
163
164         Reviewed by Alp Toker.
165
166         Build WebCore GTK+ sources as part of WebCore, not WebKit.
167         Split common and GTK+-specific sources into separate file lists.
168
169         * GNUmakefile.am:
170
171 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
172
173         Reviewed by Simon.
174
175         Implement basic media element controls for the QtWebKit port.
176
177         * platform/qt/RenderThemeQt.cpp:
178         (WebCore::WorldMatrixTransformer::WorldMatrixTransformer):
179         (WebCore::WorldMatrixTransformer::~WorldMatrixTransformer):
180         (WebCore::RenderThemeQt::getMediaElementFromRenderObject):
181         (WebCore::RenderThemeQt::paintMediaBackground):
182         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
183         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
184         (WebCore::RenderThemeQt::paintMediaMuteButton):
185         (WebCore::RenderThemeQt::paintMediaPlayButton):
186         (WebCore::RenderThemeQt::paintMediaSeekBackButton):
187         (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
188         (WebCore::RenderThemeQt::paintMediaSliderTrack):
189         (WebCore::RenderThemeQt::paintMediaSliderThumb):
190         (WebCore::RenderThemeQt::adjustSliderThumbSize):
191         * platform/qt/RenderThemeQt.h:
192         * platform/qt/html4-adjustments-qt.css:
193
194 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
195
196         Reviewed by Simon.
197
198         Change default styling of media elements to allow controls
199         to be placed at any position within the media element.
200
201         * css/html4.css:
202
203 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
204
205         Reviewed by Simon.
206
207         Use intrinsic size for media elements with no natural size.
208
209         * rendering/RenderVideo.cpp:
210         (WebCore::RenderVideo::videoSizeChanged):
211
212 2008-05-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
213
214         Reviewed by Simon.
215
216         Allow platform specific adjustments to the default style sheet.
217
218         Clients will change the #ifdef in RenderTheme.cpp and implement
219         any platform specific adjustments in RenderThemeXXX.cpp, either
220         by loading a file as the Qt port does, or by modifying the style
221         directly.
222
223         * WebCore.pro: Add new resource file
224         * css/CSSStyleSelector.cpp:
225         (WebCore::loadDefaultStyle): adjust default stylesheet
226         * platform/qt/RenderThemeQt.cpp:
227         (WebCore::RenderTheme::adjustDefaultStyleSheet): Qt adjustments
228         * platform/qt/WebCoreResources.qrc: Added.
229         * platform/qt/html4-adjustments-qt.css: Added.
230         * rendering/RenderTheme.cpp: Default adjustments (none)
231         * rendering/RenderTheme.h:
232
233 2008-06-02  Siraj Razick  <siraj.razick@collabora.co.uk>
234
235         Reviewed by Simon
236
237         Allow button fonts to scale based on the text size multiplier.
238
239         https://bugs.webkit.org/show_bug.cgi?id=19251
240
241         * platform/qt/RenderThemeQt.cpp:
242         (WebCore::RenderThemeQt::adjustButtonStyle):
243
244 2008-06-01  Rob Buis  <buis@kde.org>
245
246         Reviewed by Darin.
247
248         https://bugs.webkit.org/show_bug.cgi?id=15823
249         getPropertyValue for border returns null, should compute the shorthand value
250
251         Compute the value for the border shorthand property by computing
252         its shorthand subproperties.
253
254         Test: fast/css/getPropertyValue-border.html
255
256         * css/CSSMutableStyleDeclaration.cpp:
257         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
258         (WebCore::CSSMutableStyleDeclaration::getCommonValue):
259         * css/CSSMutableStyleDeclaration.h:
260
261 2008-06-01  Dan Bernstein  <mitz@apple.com>
262
263         Reviewed by Darin Adler.
264
265         - fix https://bugs.webkit.org/show_bug.cgi?id=19344
266           <rdar://problem/5977300> Regression: Shadow offsets seem to have changed in 10.5.3 in canvas
267
268         Test: fast/canvas/shadow-offset.html
269
270         * html/CanvasRenderingContext2D.cpp:
271         (WebCore::CanvasRenderingContext2D::applyShadow): Slightly increase the
272         magnitude of the offsets passed to CGContextSetShadow* to ensure that
273         the end result after truncation is the desired integer offsets. This is
274         the same workaround for <rdar://problem/5539388> that is used in
275         GraphicsContext::setShadow(). Also correct a recent regression where
276         shadow Y offsets were flipped.
277
278 2008-05-31  Maciej Stachowiak  <mjs@apple.com>
279
280         Reviewed by Sam.
281
282         - avoid assertion in updateDocument() when running debug
283
284         * bindings/js/kjs_proxy.cpp:
285         (WebCore::KJSProxy::updateDocument): Exit early if the document is null. We
286         don't need to update in this case.
287
288 2008-05-30  Dan Bernstein  <mitz@apple.com>
289
290         Reviewed by Darin Adler.
291
292         - fix https://bugs.webkit.org/show_bug.cgi?id=19278
293           <rdar://problem/5968621> REGRESSION (r31114-r31132): image float disappears on refresh
294
295         Test: fast/dynamic/float-in-trailing-whitespace-after-last-line-break.html
296
297         * rendering/bidi.cpp:
298         (WebCore::RenderBlock::layoutInlineChildren): Ensured that floats
299         occurring in trailing whitespace after a line break are added to the
300         last line's floats vector.
301
302 2008-05-30  Timothy Hatcher  <timothy@apple.com>
303
304         Implements the back and forward buttons in the Scripts panel.
305
306         Reviewed by Adam Roben.
307
308         * page/inspector/ScriptsPanel.js:
309         (WebInspector.ScriptsPanel): Add the back and forward button elements
310         and remove the FIXMEs.
311         (WebInspector.ScriptsPanel.prototype.reset): Reset _backForwardList
312         and _currentBackForwardIndex. Then call _updateBackAndForwardButtons().
313         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
314         Added a fromBackForwardAction argument. If fromBackForwardAction is false
315         then update the _currentBackForwardIndex and _backForwardList.
316         (WebInspector.ScriptsPanel.prototype._updateBackAndForwardButtons):
317         Update the disabled state of the buttons.
318         (WebInspector.ScriptsPanel.prototype._goBack): Update the _currentBackForwardIndex
319         and call _showScriptOrResource() and _updateBackAndForwardButtons().
320         (WebInspector.ScriptsPanel.prototype._goForward): Ditto.
321
322 2008-05-30  Timothy Hatcher  <timothy@apple.com>
323
324         Made clicking a Console message URL originating from a JavaScript
325         source show the Resource in the Scripts panel. This only happens
326         when the debugger is attached.
327
328         Reviewed by Adam Roben.
329
330         * page/inspector/Console.js:
331         (WebInspector.Console.prototype._formaterror):
332         Add a preferredPanel of "scripts".
333         (WebInspector.ConsoleMessage.prototype.toMessageElement):
334         Add a preferredPanel of "scripts" when the source is JS.
335         * page/inspector/ScriptView.js:
336         (WebInspector.ScriptView.prototype.highlightLine): Added.
337         Calls through to the sourceFrame. Matches SourceView.
338         * page/inspector/ScriptsPanel.js:
339         (WebInspector.ScriptsPanel.prototype.canShowResource): Added.
340         Returns true if the debugger is attached and the resource has scripts.
341         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Call
342         highlightLine on the view.
343         * page/inspector/inspector.js:
344         (WebInspector.documentClick): Pass the preferredPanel to showResourceForURL.
345         (WebInspector.showResourceForURL): Resolve the preferredPanel from the string
346         passed in. Checks if the panel implements showResource and canShowResource.
347         Reverts to the Resources panel if any of that is false or not implemented.
348
349 2008-05-30  Timothy Hatcher  <timothy@apple.com>
350
351         Fixed an "undefined type" exception that was being thrown when
352         selecting a eval script from the file menu in the Scripts panel.
353         This would also happen when stepping into an eval which would
354         break other parts of the Inspector interface.
355
356         Reviewed by Adam Roben.
357
358         * page/inspector/ScriptsPanel.js:
359         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
360         Use the scriptOrResource variable instead of the undefined script variable.
361
362 2008-05-30  Timothy Hatcher  <timothy@apple.com>
363
364         Made the starting line number of scripts be 1-based throughout the engine.
365         This cleans up script line numbers so they are all consistent now and fixes
366         some cases where script execution was shown as off by one line in the debugger.
367
368         Doing this also exposed a bug where JSLazyEventListener created in XHML or SVG
369         documents would always have a line number of 0. So this change fixed that bug
370         to pass all the SVG and XHTML tests.
371
372         All layout tests pass.
373
374         Reviewed by Oliver Hunt.
375
376         * bindings/js/kjs_events.cpp:
377         (WebCore::JSLazyEventListener::JSLazyEventListener): Set the line number to 1
378         if it was passed in as 0. This can happen when listeners are created with
379         a setAttribute call from JavaScript.
380         (WebCore::JSLazyEventListener::parseCode): Add a FIXME about the URL being
381         incorrect when listeners are created with a setAttribute call from JavaScript.
382         * bindings/js/kjs_events.h: Remove the default value for lineNumber, since no
383         callers need it.
384         * bindings/objc/WebScriptObject.mm:
385         (-[WebScriptObject evaluateWebScript:]): Pass a line number of 1 instead of 0
386         to Interpreter::evaluate().
387         * bridge/NP_jsobject.cpp:
388         (_NPN_Evaluate): Ditto.
389         * bridge/jni/jni_jsobject.mm:
390         (JavaJSObject::eval): Ditto.
391         * dom/XMLTokenizer.cpp:
392         (WebCore::XMLTokenizer::startElementNs): Call KJSProxy::setEventHandlerLineno()
393         around the call to handleElementAttributes, so any JSLazyEventListener created
394         from those attributes have line numbers.
395         (WebCore::XMLTokenizer::endElementNs): Remove a minus 1 of the line number.
396         (WebCore::XMLTokenizer::notifyFinished): Pass a line number of 1 instead of 0.
397         (WebCore::XMLTokenizer::parseEndElement): Remove a minus 1 of the line number.
398         * html/HTMLScriptElement.cpp:
399         (WebCore::HTMLScriptElement::evaluateScript): Add a FIXME about the starting
400         line number being incorrect in some cases when this function is called.
401         * html/HTMLTokenizer.cpp:
402         (WebCore::HTMLTokenizer::parseSpecial): Add a plus 1 to the line number when
403         setting scriptStartLineno so it is 1-based. Same for calling setEventHandlerLineno().
404         (WebCore::HTMLTokenizer::processToken): Ditto.
405         * html/HTMLTokenizer.h: Change the default line number on scriptExecution() to 1 from 0.
406         * loader/FrameLoader.cpp:
407         (FrameLoader::executeIfJavaScriptURL): Pass a line number of 1 instead of 0 to executeScript().
408
409 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
410
411         Reviewed by Oliver (earlier version reviewed by Alexey).
412
413         - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
414         https://bugs.webkit.org/show_bug.cgi?id=19285
415         
416         ("This Time for Sure" Edition)
417
418         I'm pretty sure this fixes it but I have not been able to
419         reproduce and am unsure if my theory of the bug is right.
420
421         I belive the bug was because JSDOMWindowBase accessed
422         JSDOMWindowShell in its destructor to remove itself from a
423         hashtable, but GC destructor order is not guaranteed, so the
424         hashtable may have been freed already. This patch changes things
425         so that a non-GC object (the KJSProxy) does the tracking of live
426         window objects for a frame. JSDOMWindowBase can null check the frame
427         pointer to verify if it is still good.
428         
429         In addition, we must create a similar setup between DOMWindow and
430         Frame; since the DOMWindow of a given frame can now change over
431         time, we must ensure that the Frame disconnects every live
432         DOMWindow when destroyed, not just the last.
433
434         * bindings/js/JSDOMWindowBase.cpp:
435         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
436         * bindings/js/JSDOMWindowShell.cpp:
437         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
438         * bindings/js/JSDOMWindowShell.h:
439         (WebCore::JSDOMWindowShell::setWindow):
440         * bindings/js/kjs_proxy.cpp:
441         (WebCore::KJSProxy::clear):
442         (WebCore::KJSProxy::initScript):
443         (WebCore::KJSProxy::updateDocument):
444         * bindings/js/kjs_proxy.h:
445         (WebCore::KJSProxy::clearFormerWindow):
446         * page/DOMWindow.cpp:
447         (WebCore::DOMWindow::~DOMWindow):
448         * page/Frame.cpp:
449         (WebCore::Frame::~Frame):
450         (WebCore::Frame::setDocument):
451         (WebCore::Frame::clearDOMWindow):
452         (WebCore::Frame::clearFormerDOMWindow):
453         * page/Frame.h:
454         * page/FramePrivate.h:
455
456 2008-05-30  Dan Bernstein  <mitz@apple.com>
457
458         Reviewed by Darin Adler and Dave Hyatt.
459
460         - eliminate excessive repainting when an object's final position
461           after layout is unchanged
462
463         * rendering/RenderBlock.cpp:
464         (WebCore::RenderBlock::layoutBlockChildren): Removed the full repaint
465         for the case that the final position is unchanged but the position at
466         which an intermediate layout occurred was different. Any repainting
467         done during the intermediate layout would have happened at the object's
468         initial (and also final) coordinates, since layoutDelta is factored
469         into repaint rect calculations.
470
471 2008-05-30  Chris Fleizach  <cfleizach@apple.com>
472
473         Reviewed by Beth Dakin.
474
475         <rdar://problem/5959478> r34079: AX: crash at stringForReplacedNode
476
477         * page/AccessibilityObject.cpp:
478         (WebCore::stringForReplacedNode):
479
480 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
481
482         Reviewed by Simon.
483
484         Fix the build dependencies for the Qt build. Don't generate
485         SVGCSSPropertyNames.cpp for every build.
486
487         * WebCore.pro: The output file was renamed, so the compiler rule needs
488         to be adjusted in order for qmake to generate correct depdencies.
489
490 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
491
492         Revert fix for 19285, it just caused more crashes and I need time
493         to fix it properly.
494
495         * bindings/js/JSDOMWindowBase.cpp:
496         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
497         * bindings/js/JSDOMWindowShell.cpp:
498         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
499         (WebCore::JSDOMWindowShell::updateDocument):
500         * bindings/js/JSDOMWindowShell.h:
501         (WebCore::JSDOMWindowShell::setWindow):
502         (WebCore::JSDOMWindowShell::clearFormerWindow):
503         * bindings/js/kjs_proxy.cpp:
504         (WebCore::KJSProxy::clear):
505         (WebCore::KJSProxy::initScript):
506         * bindings/js/kjs_proxy.h:
507         * page/Frame.cpp:
508         (WebCore::Frame::setDocument):
509
510 2008-05-30  Adam Treat  <treat@kde.org>
511
512         Reviewed by Simon.
513
514         Fix a huge memory leak by ensuring that on application shutdown
515         the shared timer is fired one last time if it is active. This
516         ensures that the GCController timer is fired at the end to free
517         references to JavaScript objects.
518
519         * platform/qt/SharedTimerQt.h:
520         (WebCore::SharedTimerQt::cleanup):
521         (WebCore::SharedTimerQt::inst):
522
523 2008-05-30  Alexey Proskuryakov  <ap@webkit.org>
524
525         Reviewed by Darin.
526
527         http://bugs.webkit.org/show_bug.cgi?id=7466
528         <rdar://problem/4657563> Use of Ctrl as access key modifier conflicts with Mac OS X
529         emacs-style keybindings
530
531         * page/EventHandler.cpp:
532         (WebCore::EventHandler::handleAccessKey): Use Ctrl+Option for access keys on Mac OS X.
533
534 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
535
536         Reviewed by Alexey.
537         
538         - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
539         https://bugs.webkit.org/show_bug.cgi?id=19285
540
541         I'm pretty sure this fixes it but I have not been able to
542         reproduce and am unsure if my theory of the bug is right.
543
544         I belive the bug was because JSDOMWindowBase accessed
545         JSDOMWindowShell in its destructor to remove itself from a
546         hashtable, but GC destructor order is not guaranteed, so the
547         hashtable may have been freed already. This patch changes things
548         so that a non-GC object (the KJSProxy) does the tracking of live
549         window objects for a frame. JSDOMWindowBase can null check the frame
550         pointer to verify if it is still good.
551         
552         * bindings/js/JSDOMWindowBase.cpp:
553         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
554         * bindings/js/JSDOMWindowShell.cpp:
555         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
556         * bindings/js/JSDOMWindowShell.h:
557         (WebCore::JSDOMWindowShell::setWindow):
558         * bindings/js/kjs_proxy.cpp:
559         (WebCore::KJSProxy::clear):
560         (WebCore::KJSProxy::initScript):
561         (WebCore::KJSProxy::updateDocument):
562         * bindings/js/kjs_proxy.h:
563         (WebCore::KJSProxy::clearFormerWindow):
564         * page/Frame.cpp:
565         (WebCore::Frame::setDocument):
566
567 2008-05-29  Chris Fleizach  <cfleizach@apple.com>
568
569         Reviewed by Darin Adler.
570
571         <rdar://problem/4783102> Radio button/checkbox embedded with <label> tag should combine the text and the label as a single element
572         <rdar://problem/5091386> Seed: VO reads form labels twice in Safari
573
574         * page/AccessibilityObject.cpp:
575         (WebCore::AccessibilityObject::titleUIElement):
576         * page/AccessibilityObject.h:
577         (WebCore::AccessibilityObject::isControl):
578         * page/AccessibilityRenderObject.cpp:
579         (WebCore::AccessibilityRenderObject::isControl):
580         (WebCore::AccessibilityRenderObject::labelElementContainer):
581         (WebCore::AccessibilityRenderObject::title):
582         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
583         (WebCore::AccessibilityRenderObject::elementRect):
584         (WebCore::AccessibilityRenderObject::titleUIElement):
585         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
586         (WebCore::AccessibilityRenderObject::roleValue):
587         * page/AccessibilityRenderObject.h:
588         * page/mac/AccessibilityObjectWrapper.mm:
589         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
590         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
591
592 2008-05-29  Timothy Hatcher  <timothy@apple.com>
593
594         Fixes the regression where image resources don't have a preview icon.
595
596         https://bugs.webkit.org/show_bug.cgi?id=18500
597
598         Reviewed by Adam Roben.
599
600         * page/inspector/ResourcesPanel.js:
601         (WebInspector.ResourceSidebarTreeElement): Call createIconElement before
602         calling the superclass.
603         (WebInspector.ResourceSidebarTreeElement.prototype.createIconElement):
604         Create an iconElement, if the category is images then make a div that
605         contains a preview image. Otherwise just make an img element. If there
606         was a previous iconElement, then replace it.
607         (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
608         createIconElement if the category changed.
609         * page/inspector/SidebarTreeElement.js:
610         (WebInspector.SidebarTreeElement): Create an iconElement if one hasn't
611         been made already by a subclass.
612         (WebInspector.SidebarTreeElement.prototype.onattach): Append the iconElement
613         instead of creating one each time.
614         * page/inspector/inspector.css: New and updated style rules.
615
616 2008-05-29  Timothy Hatcher  <timothy@apple.com>
617
618         Removes a use of the internal _childrenListNode property by adding
619         a getter/setter for smallChildren to SidebarSectionTreeElement.
620
621         Reviewed by Adam Roben.
622
623         * page/inspector/ResourcesPanel.js:
624         (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
625         Toggle smallChildren on the resourcesTreeElement instead of setting
626         the style class directly.
627         * page/inspector/SidebarTreeElement.js:
628         (WebInspector.SidebarSectionTreeElement.prototype.smallChildren):
629         Sets or removes the small class on the _childrenListNode.
630
631 2008-05-29  Timothy Hatcher  <timothy@apple.com>
632
633         Fixes a bug where the className would be reset for Resource
634         tree elements and the selected state would be lost. This could
635         happen when sorting the resources.
636
637         https://bugs.webkit.org/show_bug.cgi?id=19211
638
639         Reviewed by Adam Roben.
640
641         * page/inspector/ResourcesPanel.js:
642         (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
643         removeMatchingStyleClasses to remove previous category classes instead
644         of setting the whole className directly.
645         * page/inspector/utilities.js:
646         (Element.prototype.removeStyleClass): Moved code to
647         removeMatchingStyleClasses and call removeMatchingStyleClasses.
648         (Element.prototype.removeMatchingStyleClasses): Added. Code moved from
649         removeStyleClass and don't escape the string.
650
651 2008-05-29  David Hyatt  <hyatt@apple.com>
652
653         Improve the performance of the GUIMark benchmark by 2x in the CoreGraphics code path.
654
655         Whenever a foreground image changes size rapidly, we will now dynamically shift into rendering it
656         using low quality scaling.  Once the animation completes, the image will repaint at high quality.
657         Scaled images will still render at high quality by default, only shifting into low quality if
658         the scale factor is rapidly changing.  This change raises GUIMark from 21fps to 34fps on my machine.
659
660         Rewrite the Image draw method to avoid the use of throwaway CG subimages.  Instead the entire image is
661         always drawn (with the appropriate clip and scale set up to make sure the correct subimage portion shows up
662         in the destination rect).  This change raises GUIMark from 34fps to 43fps on my machine.
663
664         Reviewed by Darin
665
666         * platform/graphics/GraphicsContext.cpp:
667         (WebCore::GraphicsContext::drawImage):
668         * platform/graphics/cg/ImageCG.cpp:
669         (WebCore::BitmapImage::draw):
670         * rendering/RenderImage.cpp:
671         (WebCore::RenderImageScaleData::RenderImageScaleData):
672         (WebCore::RenderImageScaleData::~RenderImageScaleData):
673         (WebCore::RenderImageScaleData::size):
674         (WebCore::RenderImageScaleData::time):
675         (WebCore::RenderImageScaleData::useLowQualityScale):
676         (WebCore::RenderImageScaleData::hiqhQualityRepaintTimer):
677         (WebCore::RenderImageScaleData::setSize):
678         (WebCore::RenderImageScaleData::setTime):
679         (WebCore::RenderImageScaleData::setUseLowQualityScale):
680         (WebCore::RenderImageScaleObserver::shouldImagePaintAtLowQuality):
681         (WebCore::RenderImageScaleObserver::imageDestroyed):
682         (WebCore::RenderImageScaleObserver::highQualityRepaintTimerFired):
683         (WebCore::RenderImage::highQualityRepaintTimerFired):
684         (WebCore::RenderImage::~RenderImage):
685         (WebCore::RenderImage::paintReplaced):
686         * rendering/RenderImage.h:
687
688 2008-05-29  Justin Garcia  <justin.garcia@apple.com>
689
690         Reviewed by Eric.
691
692         <rdar://problem/5847330> REGRESSION CrashTracer: [USER] 536 crashes at WebCore::highestAncestor
693
694         * editing/CompositeEditCommand.cpp:
695         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Don't break out of an empty
696         list item if its parent is non-editable, since doing so will move into non-editable content.
697         * editing/DeleteSelectionCommand.cpp:
698         (WebCore::DeleteSelectionCommand::initializePositionData): We want to prevent merges from
699         table cells even if those table cells are non-editable.
700         * editing/htmlediting.cpp:
701         (WebCore::enclosingNodeOfType): Can now return non-editable nodes, for cases where the caller 
702         isn't going to do editing in the returned node.
703         * editing/htmlediting.h:
704
705 2008-05-29  Anders Carlsson  <andersca@apple.com>
706
707         Reviewed by Mitz.
708
709         <rdar://problem/5971845>
710         https://bugs.webkit.org/show_bug.cgi?id=19313
711         Add version member to NPCocoaEvent
712         
713         * bridge/npapi.h:
714
715 2008-05-29  Alexey Proskuryakov  <ap@webkit.org>
716
717         Reviewed by Adam Roben.
718
719         <rdar://problem/5960682> REGRESSION(r30535): Crashes on iExploder in checkForHeadCharset().
720
721         I don't see how to make a reliable test, but iExploder catches this quickly.
722
723         * loader/TextResourceDecoder.cpp:
724         (WebCore::TextResourceDecoder::checkForHeadCharset): Correct the length passed to
725         findIgnoringCase().
726
727 2008-05-29  Peter Kasting  <zerodpx@gmail.com>
728
729         Reviewed by Dave Hyatt.
730
731         https://bugs.webkit.org/show_bug.cgi?id=19273
732         Handle looping GIFs correctly (at least in the open source GIF decoder) even when
733         the loop count doesn't appear in the initial data packets.
734
735         * platform/graphics/BitmapImage.cpp:
736         (WebCore::BitmapImage::cacheFrame):
737         (WebCore::BitmapImage::startAnimation):
738         (WebCore::BitmapImage::advanceAnimation):
739         * platform/image-decoders/gif/GIFImageDecoder.cpp:
740         (WebCore::GIFImageDecoder::GIFImageDecoder):
741         (WebCore::GIFImageDecoder::repetitionCount):
742         (WebCore::GIFImageDecoder::gifComplete):
743         * platform/image-decoders/gif/GIFImageDecoder.h:
744
745 2008-05-29  Brent Fulgham  <bfulgham@gmail.com>
746
747         Reviewed by Alp Toker.
748
749         http://bugs.webkit.org/show_bug.cgi?id=19284
750         Correct Windows (Cairo) Build Regressions
751
752         Correct small Windows (Cairo) build regressions in recent updates.
753
754         * platform/graphics/SimpleFontData.h:  Correct build regression due
755           to r32781 (additional use of m_syntheticBoldOffset in GDI code).
756         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
757           Correct build regression due to r31830 (change of clip signature
758           to use FloatRect rather than IntRect).
759         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
760         (WebCore::SimpleFontData::platformInit):  Initialize
761         m_syntheticBoldOffset
762         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
763         (WebCore::JPEGImageReader::JPEGImageReader):  Work around build
764           error due to warnings about _setjmp treated as errors.
765         * platform/image-decoders/png/PNGImageDecoder.cpp:  Work around
766           build error due to warnings about _setjmp treated as errors.
767         * platform/network/curl/ResourceHandleCurl.cpp:  Correct build error
768           due to different order (and content) of include files when building
769           with CoreFoundation (but not CoreGraphics).
770         * platform/network/curl/ResourceHandleManager.cpp:
771         (WebCore::ResourceHandleManager::setupPOST):  Correct build error
772           due to Visual Studio compiler bug.
773
774 2008-05-29  Alexey Proskuryakov  <ap@webkit.org>
775
776         Reviewed by Darin.
777
778         https://bugs.webkit.org/show_bug.cgi?id=19215
779         REGRESSION: transformToDocument fails when xsl includes &#160;
780
781         Test: fast/xsl/nbsp-in-stylesheet.html
782
783         * editing/markup.cpp:
784         (WebCore::appendAttributeValue):
785         (WebCore::appendEscapedContent):
786         (WebCore::escapeContentText):
787         (WebCore::appendQuotedURLAttributeValue):
788         (WebCore::appendNamespace):
789         (WebCore::appendStartMarkup):
790         (WebCore::appendDocumentType):
791         (WebCore::createMarkup):
792         Only escape non-breaking spaces in HTML documents. In Firefox, this behavior is also limited
793         to innerHTML, but we don't have a separate code path for it, and do not necessarily want to.
794
795         * page/Frame.cpp:
796         (WebCore::Frame::documentTypeString):
797         * dom/CDATASection.cpp:
798         * dom/CDATASection.h:
799         * dom/Comment.cpp:
800         * dom/Comment.h:
801         * dom/DocumentType.cpp:
802         * dom/DocumentType.h:
803         * dom/ProcessingInstruction.cpp:
804         * dom/ProcessingInstruction.h:
805         While at it, I also wanted to fix escaping for these nodes, but it turned out that FIXMEs were
806         incorrect. So, I just moved their serialization to markup.cpp for consistency.
807
808 2008-05-29  Maciej Stachowiak  <mjs@apple.com>
809
810         Reviewed by Dave Hyatt.
811
812         - speed up DHTML using lazy style resolution and renderer creation
813
814         This change introduces the concept of "lazy attach" - when a node
815         is lazy attached, then instead of resolving style and creating a
816         renderer right away, we just mark it as needing a style recalc.
817         
818         The patch makes use of this mechanism when inserting nodes directly
819         using DOM APIs from script. For now this is only done for the
820         JavaScript language binding but could also be done for other
821         bindings in the future.
822         
823         Lazy attach helps some common DHTML patterns - when a node is
824         added to the DOM, and then subsequently changed in a
825         style-affecting way, this causes an extra style recalc. This is a
826         fairly common pattern so it is better to be lazy.
827         
828         * bindings/js/JSNodeCustom.cpp:
829         (WebCore::JSNode::insertBefore): Request lazy attach.
830         (WebCore::JSNode::replaceChild): ditto
831         (WebCore::JSNode::appendChild): ditto
832         * dom/ContainerNode.cpp:
833         (WebCore::ContainerNode::insertBefore): Support lazy attach.
834         (WebCore::ContainerNode::replaceChild): ditto
835         (WebCore::ContainerNode::appendChild): ditto
836         (WebCore::ContainerNode::detach): Clear "changed child" bit if still set.
837         * dom/ContainerNode.h:
838         * dom/Element.cpp:
839         (WebCore::Element::recalcStyle): Adjusted to properly reattach a
840         lazy-attached node.
841         * dom/Node.cpp:
842         (WebCore::Node::insertBefore): Extra parameter for lazy attach
843         (still doesn't do anything).
844         (WebCore::Node::replaceChild): ditto
845         (WebCore::Node::appendChild): ditto
846         (WebCore::Node::setChanged): Unrelated but obvious optimization -
847         stop marking ancestor as having a changed child once we already reach
848         an ancestor so marked.
849         (WebCore::outermostLazyAttachedAncestor): Helper function for lazyAttach.
850         (WebCore::Node::lazyAttach): Implement lazy attach.
851         (WebCore::Node::canLazyAttach): Virtual method - true for most nodes.
852         * dom/Node.h:
853         * dom/Text.cpp:
854         (WebCore::Text::recalcStyle): Properly handle the case of a reattached node.
855         * html/HTMLEmbedElement.h:
856         (WebCore::HTMLEmbedElement::canLazyAttach): Refuse lazy attach, since
857         plugins and frames do important work at rederer creation time.
858         * html/HTMLFrameElementBase.h:
859         (WebCore::HTMLFrameElementBase::canLazyAttach): Refuse lazy attach, since
860         plugins and frames do important work at rederer creation time.
861         * html/HTMLFrameSetElement.cpp:
862         (WebCore::HTMLFrameSetElement::recalcStyle): Change order so that
863         reattach works properly.
864         * html/HTMLObjectElement.h:
865         (WebCore::HTMLObjectElement::canLazyAttach): Refuse lazy attach, since
866         plugins and frames do important work at rederer creation time.
867         * html/HTMLOptGroupElement.cpp:
868         (WebCore::HTMLOptGroupElement::insertBefore): Pass along extra param.
869         (WebCore::HTMLOptGroupElement::replaceChild): ditto
870         (WebCore::HTMLOptGroupElement::appendChild): ditto
871         * html/HTMLOptGroupElement.h:
872         * html/HTMLSelectElement.cpp:
873         (WebCore::HTMLSelectElement::insertBefore): Pass along extra param.
874         (WebCore::HTMLSelectElement::replaceChild): ditto
875         (WebCore::HTMLSelectElement::appendChild): ditto
876         * html/HTMLSelectElement.h:
877         * svg/SVGLocatable.cpp:
878         (WebCore::SVGLocatable::getBBox): Add missing updateLayout call.
879         * svg/SVGTextContentElement.cpp:
880         (WebCore::SVGTextContentElement::getNumberOfChars): ditto
881         (WebCore::SVGTextContentElement::getComputedTextLength): ditto
882         (WebCore::SVGTextContentElement::getSubStringLength): ditto
883         (WebCore::SVGTextContentElement::getStartPositionOfChar): ditto
884         (WebCore::SVGTextContentElement::getEndPositionOfChar): ditto
885         (WebCore::SVGTextContentElement::getExtentOfChar): ditto
886         (WebCore::SVGTextContentElement::getRotationOfChar): ditto
887         (WebCore::SVGTextContentElement::getCharNumAtPosition): ditto
888
889 2008-05-28  Ada Chan  <adachan@apple.com>
890
891         <rdar://problem/5957036> REGRESSION (r31960): 20-30% slowdown in i-Bench JavaScript test on XP Home
892         Conditionalize the timer latency change (r31960) only for vista since it does not
893         help xp anyway.
894
895         Reviewed by Steve Falkenburg.
896
897         * platform/win/SharedTimerWin.cpp:
898         (WebCore::isRunningOnVistaOrLater):
899         (WebCore::TimerWindowWndProc):
900         (WebCore::setSharedTimerFireTime):
901
902 2008-05-28  Anders Carlsson  <andersca@apple.com>
903
904         Build fix.
905         
906         * storage/LocalStorage.cpp:
907         (WebCore::LocalStorage::scheduleImport):
908
909 2008-05-28  Anders Carlsson  <andersca@apple.com>
910
911         Reviewed by Tim.
912
913         <rdar://problem/5965960>
914         CrashTracer: [USER] 4 crashes in Safari at libxml2.2.dylib: xmlGenericErrorDefaultFunc + 76
915         
916         Turns out that while libxml has two different error callbacks, they both use the same context, so we need to 
917         set both error callbacks to prevent one of the error callbacks from using the context as a FILE pointer.
918         
919         * xml/XSLStyleSheet.cpp:
920         (WebCore::XSLStyleSheet::parseString):
921         * xml/XSLTProcessor.cpp:
922         (WebCore::XSLTProcessor::genericErrorFunc):
923         (WebCore::docLoaderFunc):
924         * xml/XSLTProcessor.h:
925
926 2008-05-28  Brady Eidson  <beidson@apple.com>
927
928         Reviewed by Adam
929
930         Fix hang I introduced to WebKit clients without their LocalStorage paths set
931         Such as DRT...
932
933         * storage/LocalStorage.cpp:
934         (WebCore::LocalStorage::scheduleImport): Return a bool, namely to signify
935           whether or not there is a LocalStorageThread to schedule the import on.
936         * storage/LocalStorage.h:
937
938         * storage/LocalStorageArea.cpp:
939         (WebCore::LocalStorageArea::LocalStorageArea): If the scheduleImport failed,
940           mark the imported flag as true so the LocalStorageArea doesn't wait around
941           locking the main thread.
942
943 2008-05-28  Anthony Ricaud  <rik24d@gmail.com>
944
945         User stylesheets are now non-editable and displayed as user-stylesheets
946
947         <https://bugs.webkit.org/show_bug.cgi?id=17602>
948         <rdar://problem/5967637>
949
950         Reviewed by Tim Hatcher.
951
952         * English.lproj/localizedStrings.js: Added a string
953         * page/inspector/StylesSidebarPane.js:
954
955 2008-05-28  Anders Carlsson  <andersca@apple.com>
956
957         Reviewed by Mitz.
958
959         <rdar://problem/5819989> 
960         Crash in WebKit!KJS::Window::printErrorMessage quitting Safari after pop up window on uk.real.com was closed
961
962         Add null check for Frame::settings().
963         
964         * bindings/js/JSDOMWindowBase.cpp:
965         (WebCore::JSDOMWindowBase::printErrorMessage):
966
967 2008-05-27  Geoffrey Garen  <ggaren@apple.com>
968
969         Reviewed by Tim Hatcher.
970
971         Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
972         REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
973         clicking button in returnEvent-crash.html
974         
975         Added implementations for willExecuteProgram and didExecuteProgram. They
976         take care to update our call frame when entering and exiting programs,
977         preventing us from keeping around a stale global frame after executing
978         a program.
979         
980         eval programs now show up as "anonymous function" in a new scope. This
981         is slightly better than what they used to do -- overwriting the current
982         scope -- but obviously we can do better.
983
984 2008-05-28  Brady Eidson  <beidson@apple.com>
985
986         Reviewed by Dan Bernstein
987
988         <rdar://problem/5946834> - LocalStorage threads appearing in apps that don't want them.
989
990         Decided to fix this bug from a few different avenues to make sure we only create LocalStorage resources
991         when we *really* want them.
992
993         * page/DOMWindow.cpp:
994         (WebCore::DOMWindow::localStorage): Account for the possibility that the LocalStorage object might be null.
995
996         * storage/LocalStorage.cpp:
997         (WebCore::LocalStorage::LocalStorage): Don't create the thread if there is no path name - we know we'll never
998           be needing it when there is no file backing us on disk.
999         (WebCore::LocalStorage::scheduleImport): Null check the thread, as it might not exist.
1000         (WebCore::LocalStorage::scheduleSync): Ditto
1001
1002         * storage/LocalStorageThread.cpp:
1003         (WebCore::LocalStorageThread::localStorageThread): Clear the threadID after termination - clear way to signify
1004           that this thread is truly done.
1005         (WebCore::LocalStorageThread::scheduleImport): ASSERT that the queue is live, and the threadID exists
1006         (WebCore::LocalStorageThread::scheduleSync): Ditto
1007         (WebCore::LocalStorageThread::terminate): Don't schedule termination and wait for it to complete if the thread 
1008           isn't live.
1009
1010 2008-05-28  Alexander Vassilev  <avasilev@voipgate.com>
1011
1012         Reviewed by Kevin Ollivier.
1013
1014         Rescale image to fit the destination rect so that we don't get a crash when drawing
1015         in a destination rect that's bigger than the image rect. Also adds an optimization for
1016         drawing an image that is a solid color.
1017         
1018         https://bugs.webkit.org/show_bug.cgi?id=18465
1019
1020         * platform/graphics/wx/ImageWx.cpp:
1021         (WebCore::BitmapImage::draw):
1022
1023 2008-05-27  Tor Arne Vestbø  <tavestbo@trolltech.com>
1024
1025         Reviewed by Simon
1026
1027         Close the video widget explicitly so we don't hang
1028         when exiting the application.
1029
1030         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1031         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1032
1033 2008-05-27  Justin Garcia  <justin.garcia@apple.com>
1034
1035         Reviewed by Oliver.
1036
1037         <rdar://problem/5803706> Pressing return at the end of a header doesn't break out of header (17460)
1038         
1039         It wasn't enough to break out of the header, to match other browsers we 
1040         also need to not preserve the typing style.
1041
1042         * editing/InsertParagraphSeparatorCommand.cpp:
1043         (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion):
1044         (WebCore::InsertParagraphSeparatorCommand::doApply):
1045         * editing/InsertParagraphSeparatorCommand.h:
1046
1047 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1048
1049         <rdar://problem/5966961> REGRESSION: Font previews in the Web
1050         Inspector always show in Lucida Grande (not the real font)
1051
1052         Reviewed by Adam Roben.
1053
1054         * page/inspector/FontView.js: Add a style element that loads the
1055         @font-face rule that is excepted by the preview element.
1056
1057 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1058
1059         Fixes a regression where the Image and Font preview views do not
1060         size correctly.
1061
1062         <rdar://problem/5966723> REGRESSION (r33991): Image and font previews
1063         are shrunken and can't be made larger (19281)
1064
1065         Reviewed by Adam Roben.
1066
1067         * page/inspector/FontView.js: Adjust the font size based only on the
1068         container width minus padding.
1069         * page/inspector/inspector.css: Updated styles for the image and
1070         font views.
1071
1072 2008-05-27  Adam Roben  <aroben@apple.com>
1073
1074         Fix Bug 19276: XHR resources are classified as "Other" until Inspector
1075         is closed and reopened
1076
1077         <https://bugs.webkit.org/show_bug.cgi?id=19276>
1078         <rdar://problem/5965742>
1079
1080         Reviewed by Tim Hatcher.
1081
1082         * page/InspectorController.cpp:
1083         (WebCore::InspectorController::updateScriptResourceResponse): Moved
1084         code that updates the resource's type from here...
1085         (WebCore::InspectorController::updateScriptResourceType): ...to here.
1086         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1087         Call updateScriptResourceType now that we know this resource was
1088         retrieved via an XHR.
1089         * page/InspectorController.h:
1090
1091 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1092
1093         Removes a redundant call to InspectorController::stopDebugging().
1094
1095         Rubber-stamped by Adam Roben.
1096
1097         * page/InspectorController.cpp:
1098         (WebCore::InspectorController::showWindow):
1099
1100 2008-05-27  Kevin McCullough  <kmccullough@apple.com>
1101
1102         Reviewed by Tim.
1103
1104         - Added and updated some manual test for the profiler.
1105
1106         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html:
1107         * manual-tests/inspector/profiler-test-apply.html:
1108         * manual-tests/inspector/profiler-test-call.html:
1109         * manual-tests/inspector/profiler-test-deep-recursion.html: Added.
1110         * manual-tests/inspector/profiler-test-simple-event-call.html: Added.
1111
1112 2008-05-27  Kevin Ollivier  <kevino@theolliviers.com>
1113
1114         wx build fix. Accidently left a couple fixes out of the previous commit.
1115
1116         * webcore-base.bkl:
1117
1118 2008-05-27  Kevin Ollivier  <kevino@theolliviers.com>
1119
1120         wx build fix. Adding JSHTMLElementWrapperFactory.cpp.
1121         
1122         * WebCoreSources.bkl:
1123
1124 2008-05-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1125
1126         Reviewed by Simon.
1127
1128         Fix linking error (missing gdi32 and user32 libraries).
1129
1130         * WebCore.pro:
1131
1132 2008-05-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1133
1134         Reviewed by Simon.
1135
1136         Update the WebKit.qrc so that Web Inspector is functional again.
1137
1138         * page/inspector/WebKit.qrc:
1139
1140 2008-05-26  Alp Toker  <alp@nuanti.com>
1141
1142         Reviewed by Anders.
1143
1144         http://bugs.webkit.org/show_bug.cgi?id=16495
1145         [GTK] Accessibility support with ATK/AT-SPI
1146
1147         Implement basic action, text and editable text accessibility.
1148
1149         Provide utility functions to simplify const string return and casting
1150         and add some more stubs.
1151
1152         It's now possible to navigate and manipulate forms and text using
1153         assistive technologies.
1154
1155         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
1156         (returnString):
1157         (core):
1158         * platform/gtk/LocalizedStringsGtk.cpp:
1159         (WebCore::AXButtonActionVerb):
1160         (WebCore::AXRadioButtonActionVerb):
1161         (WebCore::AXTextFieldActionVerb):
1162         (WebCore::AXCheckedCheckBoxActionVerb):
1163         (WebCore::AXUncheckedCheckBoxActionVerb):
1164         (WebCore::AXLinkActionVerb):
1165         (WebCore::imageTitle):
1166
1167 2008-05-25  Maciej Stachowiak  <mjs@apple.com>
1168
1169         Reviewed by Anders.
1170
1171         - bind the window's "document" and "window" properties to static slots
1172         1.7% speedup on Acid3 test 26
1173         
1174         Only the "document" part matters for Acid3, but since I was doing
1175         this anyway, "window" also seemed like a good one to optimize.
1176
1177         * bindings/js/JSDOMWindowBase.cpp:
1178         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Allocate variable
1179         slots for document and window; but just put null in the document
1180         slot for now.
1181         (WebCore::JSDOMWindowBase::updateDocument): Fill in the document
1182         slot.        
1183         (WebCore::JSDOMWindowBase::~JSDOMWindowBase): Make our shell stop
1184         tracking us.
1185         * bindings/js/JSDOMWindowBase.h:
1186         * bindings/js/JSDOMWindowShell.cpp:
1187         (WebCore::JSDOMWindowShell::JSDOMWindowShell): Allocate HashSet
1188         for our still-not-dead inner windows.
1189         (WebCore::JSDOMWindowShell::updateDocument): Update all our
1190         inner windows ever (to make sure the update to the document
1191         property shows up everywhere).
1192         * bindings/js/JSDOMWindowShell.h:
1193         (WebCore::JSDOMWindowShell::setWindow): Update our hash.
1194         (WebCore::JSDOMWindowShell::clearFormerWindow): Ditto.
1195         * bindings/js/JSDocumentCustom.cpp:
1196         (WebCore::toJS): Don't set self as a property map property of
1197         the window, this is no longer necessary.
1198         * bindings/js/kjs_proxy.cpp:
1199         (WebCore::KJSProxy::initScript): Update document for the
1200         newly created window.
1201         * bindings/js/kjs_proxy.h:
1202         * page/Frame.cpp:
1203         (WebCore::Frame::setDocument): If the document is not null,
1204         update our window.
1205
1206 2008-05-26  Anders Carlsson  <andersca@apple.com>
1207
1208         Reviewed by Sam.
1209
1210         This patch does two things:
1211         
1212         * It adds a toJSNewlyCreated function for creating JS wrappers for nodes where we know
1213         that the node doesn't have a wrapper. This avoids a hash lookup.
1214         
1215         * It adds toJSNewlyCreated methods for JSElement and JSText. 
1216         
1217         All in all this is a 4.3% speedup on Acid 3 test 26.
1218         
1219         * WebCore.vcproj/WebCore.vcproj:
1220         * WebCore.xcodeproj/project.pbxproj:
1221         * bindings/js/JSElementCustom.cpp:
1222         (WebCore::toJSNewlyCreated):
1223         * bindings/js/JSNodeCustom.cpp:
1224         (WebCore::createWrapper):
1225         (WebCore::toJSNewlyCreated):
1226         (WebCore::toJS):
1227         * bindings/js/JSTextCustom.cpp: Added.
1228         (WebCore::toJSNewlyCreated):
1229         * bindings/scripts/CodeGeneratorJS.pm:
1230         * dom/Document.idl:
1231
1232 2008-05-26  Sam Weinig  <sam@webkit.org>
1233
1234         Reviewed by Anders Carlsson.
1235
1236         Inline the getOwnPropertySlot for JSNode, JSEventTargetNode, JSElement,
1237         and JSDocument for a 1-2% speedup on Acid 3 test 26.
1238
1239         * bindings/js/JSEventTargetNode.cpp:
1240         * bindings/js/JSEventTargetNode.h:
1241         (WebCore::JSEventTargetNode::getOwnPropertySlot):
1242         (WebCore::JSEventTargetNode::getValueProperty):
1243         (WebCore::JSEventTargetNode::put):
1244         (WebCore::JSEventTargetNode::putValueProperty):
1245         * bindings/scripts/CodeGeneratorJS.pm:
1246         * dom/Document.idl:
1247         * dom/Element.idl:
1248         * dom/Node.idl:
1249
1250 2008-05-26  Darin Adler  <darin@apple.com>
1251
1252         Reviewed by Maciej.
1253
1254         - https://bugs.webkit.org/show_bug.cgi?id=19239
1255
1256         Removed code that would only useful if if there was any way to create an Entity
1257         node or if we populated EntityReference nodes. It's likely that we'll remove
1258         these node types entirely in some future version of WebKit, depending in part
1259         on what happens with these in HTML 5.
1260
1261         1.8% speedup of Acid3 test 26.
1262
1263         The only read-only nodes we ever create are EntityReference nodes.
1264         These are only created by explicit calls to the Document.createEntityReference
1265         function. Since the created nodes are read-only, there can be no children of
1266         these nodes, so no other types of nodes can be read-only despite the rule that
1267         makes descendants of Entity and EntityReference nodes read-only.
1268
1269         * bindings/objc/DOM.mm: Removed unneeded include.
1270
1271         * dom/Attr.cpp:
1272         (WebCore::Attr::setValue): Removed unnecessary isReadOnlyNode check.
1273         (WebCore::Attr::setNodeValue): Ditto.
1274         * dom/CharacterData.cpp:
1275         (WebCore::CharacterData::setData): Removed unnecessary isReadOnlyNode check.
1276         (WebCore::CharacterData::substringData): Don't initialize the ec variable before
1277         calling checkCharDataOperation, since that function already does it.
1278         (WebCore::CharacterData::appendData): Removed unnecessary isReadOnlyNode check.
1279         (WebCore::CharacterData::insertData): Don't initialize ec.
1280         (WebCore::CharacterData::deleteData): Ditto.
1281         (WebCore::CharacterData::replaceData): Ditto.
1282         (WebCore::CharacterData::setNodeValue): Removed now-misleading comment.
1283         (WebCore::CharacterData::checkCharDataOperation): Removed unnecessary
1284         isReadOnlyNode check.
1285         * dom/CharacterData.h: Made checkCharDataOperation private and non-virtual
1286         since it's never used or defined in any other class.
1287
1288         * dom/Element.cpp:
1289         (WebCore::Element::setAttribute): Removed unneeded isReadOnlyNode check.
1290
1291         * dom/Entity.cpp: Removed the entire contents of this file.
1292
1293         * dom/Entity.h: Replaced the class with a stub -- just enough to keep the
1294         public bindings (JavaScript and Objective-C compiling), but the class is
1295         abstract and can't be instantianted.
1296
1297         * dom/EntityReference.cpp: Removed unused constructor.
1298         (WebCore::EntityReference::cloneNode): Removed unneeded code and comments
1299         to clone nonexistent child nodes.
1300         * dom/EntityReference.h: Removed unused constructor and unnecessary override
1301         of childTypeAllowed, since no children are allowed at all.
1302
1303         * dom/NamedAttrMap.cpp:
1304         (WebCore::NamedAttrMap::setNamedItem): Removed unneeded isReadOnlyNode check.
1305         (WebCore::NamedAttrMap::removeNamedItem): Ditto.
1306         * dom/NamedAttrMap.h: Removed isReadOnlyNode function.
1307
1308         * dom/Node.cpp: Removed the old isReadOnlyNode function. It made lots of
1309         virtual nodeType function calls.
1310         * dom/Node.h:
1311         (WebCore::Node::isReadOnlyNode): Replaced the old virtual isReadOnlyNode
1312         function with a new simple non-virtual one.
1313
1314         * dom/ProcessingInstruction.cpp:
1315         (WebCore::ProcessingInstruction::setData): Removed unneeded isReadOnlyNode
1316         check.
1317
1318         * dom/Text.cpp:
1319         (WebCore::Text::splitText): Removed unneeded isReadOnlyNode check.
1320         (WebCore::Text::replaceWholeText): Removed unnecessary isReadOnlyNode assertion.
1321         There is no reason for this function to go out of its way to mention the
1322         read-only node issue when none of the other DOM mutation functions do.
1323
1324 2008-05-26  Adam Barth  <abarth@webkit.org>
1325
1326         Reviewed by Sam.
1327
1328         Cleanup SecurityOrigin::canAccess.  Removed comment referring to an
1329         old version of the code.  Removed some useless code.
1330
1331         * platform/SecurityOrigin.cpp:
1332         (WebCore::SecurityOrigin::canAccess):
1333
1334 2008-05-26  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
1335
1336         Reviewed by Alp Toker.
1337
1338         * platform/gtk/LocalizedStringsGtk.cpp:
1339         (WebCore::contextMenuItemTagSelectAll): Fix GTK+ version check.
1340
1341 2008-05-25  Chris Fleizach  <cfleizach@apple.com>
1342
1343         Reviewed by David Harrison
1344
1345         <rdar://problem/3582905> elements on separate pages need to be distinct
1346
1347         * page/AccessibilityListBox.h:
1348         * page/AccessibilityObject.h:
1349         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
1350         * page/AccessibilityRenderObject.cpp:
1351         * page/AccessibilityRenderObject.h:
1352
1353 2008-05-25  Maciej Stachowiak  <mjs@apple.com>
1354
1355         Reviewed by Darin.
1356
1357         - don't repaint nodes that are removed before layout
1358         4.3% speedup on Acid3 test 26
1359
1360         Mitz points out the new flag can also be used to optimize other
1361         cases of needless repaint such as
1362         <https://bugs.webkit.org/show_bug.cgi?id=15129>.
1363         
1364         * rendering/RenderContainer.cpp:
1365         (WebCore::RenderContainer::removeChildNode): If the child has never had a layout,
1366         don't bother to repaint it, since there's nothing to dirty.
1367         * rendering/RenderObject.cpp:
1368         (WebCore::RenderObject::RenderObject): Initialize m_everHadLayout to false.
1369         (WebCore::RenderObject::setNeedsLayout): Set m_everHadLayout to true if we
1370         are being marked as not needing layout.
1371         * rendering/RenderObject.h:
1372
1373 2008-05-25  Dan Bernstein  <mitz@apple.com>
1374
1375         Reviewed by Darin Adler.
1376
1377         - fix https://bugs.webkit.org/show_bug.cgi?id=19086
1378           <rdar://problem/5962254> REGRESSION (r28519-r28535): Caret doesn't paint past the right edge of a block
1379
1380         Test: fast/repaint/caret-outside-block.html
1381
1382         * editing/SelectionController.cpp:
1383         (WebCore::repaintRectForCaret): Restored this function which was removed
1384         in r28523, but changed it to inflate only the width.
1385         (WebCore::SelectionController::caretRepaintRect): Changed back to use
1386         repaintRectForCaret().
1387         (WebCore::SelectionController::recomputeCaretRect): Ditto.
1388
1389 2008-05-25  Marco Barisione  <marco.barisione@collabora.co.uk>
1390
1391         Reviewed by Alp Toker.
1392
1393         http://bugs.webkit.org/show_bug.cgi?id=18940
1394         [CURL] Allow \n as line terminator for headers
1395
1396         The line terminator for message-header fields should be CRLF. However,
1397         it is recommended to recognise as a line terminator also a single LF.
1398
1399         * platform/network/curl/ResourceHandleManager.cpp:
1400         (WebCore::headerCallback): Allow headers to be terminated by "\n" and
1401         not just by "\r\n".
1402
1403 2008-05-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
1404
1405         Reviewed by Alp Toker.
1406
1407         WARNING: NO TEST CASES ADDED OR CHANGED
1408
1409         http://bugs.webkit.org/show_bug.cgi?id=19142
1410         [Gtk] Remove build options --svg-experimental and --cross-document-messaging
1411
1412         * GNUmakefile.am:
1413
1414 2008-05-24  Rob Buis  <buis@kde.org>
1415
1416         Reviewed by Eric.
1417
1418         https://bugs.webkit.org/show_bug.cgi?id=18927
1419         Unify path data debug output
1420
1421         Implement unified path data output for Mac svg tests.
1422
1423         * platform/graphics/cg/PathCG.cpp:
1424         (WebCore::CGPathToCFStringApplierFunction):
1425         (WebCore::CFStringFromCGPath):
1426
1427 2008-05-24  Timothy Hatcher  <timothy@apple.com>
1428
1429         Fixes a huge leak with the Inspector where it was protecting
1430         a large object that was not being unprotected.
1431
1432         <rdar://problem/5961999> Inspector protects a large JavaScript
1433         object and never unprotects it (large leak)
1434
1435         Reviewed by Darin Adler.
1436
1437         * page/InspectorController.cpp:
1438         (WebCore::InspectorController::inspectedPageDestroyed): Call close()
1439         and removed a call to stopDebugging() and moved it to close().
1440         (WebCore::InspectorController::close): Add stopDebugging() and
1441         stopUserInitiatedProfiling(). Removed an ASSERT and added an
1442         if statement before calling JSValueUnprotect. We don't always have
1443         a m_scriptContext and m_scriptObject.
1444
1445 2008-05-24  Alp Toker  <alp@nuanti.com>
1446
1447         Win32/gcc3 build fix in Pango font backend. UChar needs to be
1448         explicitly cast to gunichar2.
1449
1450         * platform/graphics/gtk/FontGtk.cpp:
1451         (WebCore::utf16_to_utf8):
1452
1453 2008-05-24  Timothy Hatcher  <timothy@apple.com>
1454
1455         Fixes a crash where a new Inspector would get an old
1456         JSInspectedObjectWrapper for a user agent CSSStyleDeclaration.
1457         Since these style objects shared between pages, the wrapper cache
1458         would have a wrapper for the object still. But the wrapper was
1459         for a previous global object and with a disconnected frame. This
1460         fixes the wrapper cache so wrappers are remembered per global object
1461         and the object they are wrapping.
1462
1463         <rdar://problem/5958567> repro crash in WebCore::Frame::keepAlive()
1464         opening inspector window after closing it
1465
1466         Reviewed by Darin Adler.
1467
1468         * bindings/js/JSInspectedObjectWrapper.cpp:
1469         (WebCore::wrappers): Return a GlobalObjectWrapperMap reference.
1470         (WebCore::JSInspectedObjectWrapper::wrap): Find the WrapperMap
1471         by the dynamicGlobalObject then find the wrapper for unwrappedObject.
1472         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Changes
1473         how the wrapper is added to the wrapper cache.
1474         (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Changes
1475         how the wrapper is removed from the wrapper cache.
1476         * bindings/js/JSQuarantinedObjectWrapper.h:
1477         (WebCore::JSQuarantinedObjectWrapper:unwrappedGlobalObject): Added.
1478
1479 2008-05-24  Alexey Proskuryakov  <ap@webkit.org>
1480
1481         Reviewed by Maciej.
1482
1483         Optimize Node::textContent() to avoid O(n^2) string appending behavior.
1484
1485         1.6% speedup at Acid3 test 26.
1486
1487         * WebCore.xcodeproj/project.pbxproj:
1488         * GNUmakefile.am:
1489         * WebCore.pro:
1490         * WebCoreSources.bkl:
1491         * WebCore.vcproj/WebCore.vcproj:
1492         * platform/text/StringBuilder.cpp: Added.
1493         (WebCore::StringBuilder::append):
1494         (WebCore::StringBuilder::toString):
1495         * platform/text/StringBuilder.h: Added.
1496         (WebCore::StringBuilder::StringBuilder):
1497         (WebCore::StringBuilder::isNull):
1498         Added a simple class to efficiently build a string by appending. Potentially, it can be
1499         extended to be more like java.lang.StringBuilder, but we don't need that much flexibility now.
1500
1501         * dom/Node.cpp:
1502         (WebCore::Node::appendTextContent):
1503         (WebCore::Node::textContent):
1504         * dom/Node.h:
1505         Changed to use StringBuilder.
1506
1507 2008-05-24  Julien Chaffraix  <jchaffraix@webkit.org>
1508
1509         Reviewed by Eric.
1510
1511         Bug 9191: JS*ElementWrapperFactory should be autogenerated
1512         https://bugs.webkit.org/show_bug.cgi?id=9191
1513
1514         This is a first pass for generation of JS*ElementWrapperFactory, in the long term we should move the make_names.pl
1515         intelligence to the *.in files.
1516
1517         - Add a new parameter to make_names.pl --wrapperFactory which works like --wrapper but generates the
1518         JS*ElementWrapperFactory files.
1519
1520         - Removed JS*ElementWrapperFactory files in WebCore/bindings/js, replaced by the generated ones.
1521
1522         - Updated the build systems to account for the previous changes.
1523
1524         * DerivedSources.make:
1525         * GNUmakefile.am:
1526         * WebCore.pro:
1527         * WebCore.vcproj/WebCore.vcproj:
1528         * WebCore.xcodeproj/project.pbxproj:
1529         * WebCoreSources.bkl:
1530         * bindings/js/JSHTMLElementWrapperFactory.cpp: Removed.
1531         * bindings/js/JSHTMLElementWrapperFactory.h: Removed.
1532         * bindings/js/JSSVGElementWrapperFactory.cpp: Removed.
1533         * bindings/js/JSSVGElementWrapperFactory.h: Removed.
1534         * dom/make_names.pl:
1535
1536 2008-05-24  Oleg Finkelshteyn <olegfink@gmail.com>
1537
1538         Rubber-stamped and landed by Alexey.
1539
1540         Build fix for gcc 4.3.
1541
1542         * WebCore/page/Console.cpp:
1543         Add missing standard includes.
1544
1545 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1546
1547         Fixes a bug where a timer would keep firing after the Inspector
1548         was closed. It turns out this timer wasn't needed anymore now
1549         that we can add an event listener to the inspected page and have
1550         it get called in the Inspector's context.
1551
1552         https://bugs.webkit.org/show_bug.cgi?id=18577
1553
1554         Reviewed by Mark Rowe.
1555
1556         * page/inspector/ElementsPanel.js:
1557
1558 2008-05-23  Anthony Ricaud  <rik24d@gmail.com>
1559
1560         Changes the largerResourcesButton tooltip to toggle.
1561
1562         https://bugs.webkit.org/show_bug.cgi?id=19210
1563
1564         Reviewed by Tim Hatcher.
1565
1566         * WebCore/English.lproj/localizedStrings.js: New string and clean an
1567         double string "Dock to main window."
1568         * WebCore/page/inspector/ResourcesPanel.js: Toggle the tooltip and
1569         change the default tooltip
1570
1571 2008-05-23  Justin Garcia  <justin.garcia@apple.com>
1572
1573         Reviewed by Darin.
1574
1575         <rdar://problem/5939887> REGRESSION: With no selection, copy does not fire oncopy handler (affects CIFilterBrowser widget)
1576         
1577         Execute cut, copy and paste if they are invoked explicitly, via execCommand or -[WebView copy:], even
1578         if they are disabled.  This will fire oncopy, oncut and onpaste, but won't perform any other work, like
1579         writing to the pasteboard during cut/copy or deleting the selection during cut/paste.  This matches FF3,
1580         which actually goes further and fires oncopy on any Command-C.
1581         
1582         * editing/EditorCommand.cpp:
1583         (WebCore::CommandEntry::):
1584         (WebCore::Editor::Command::execute):
1585
1586 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1587
1588         Adds a percentage toggle button the profile view status bar that
1589         changes the time columns between absolute and percents.
1590
1591         https://bugs.webkit.org/show_bug.cgi?id=19224
1592
1593         Reviewed by Kevin McCullough.
1594
1595         * English.lproj/localizedStrings.js: New strings.
1596         * page/inspector/Images/percentButtons.png: Added.
1597         * page/inspector/ProfileView.js: Make the button and add it to the
1598         status bar. Make clicking toggle the showAsPercent* properties.
1599         * page/inspector/inspector.css: New styles.
1600
1601 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1602
1603         Fixes a bug where excluding nodes from the profile could
1604         show an empty parent node.
1605
1606         <rdar://problem/5959573> Excluding nodes from the profile could show
1607         an empty parent node
1608
1609         Reviewed by Kevin McCullough.
1610
1611         * page/inspector/ProfileView.js: Only say we have children if
1612         all of our children nodes are visible.
1613
1614 2008-05-23  Anders Carlsson  <andersca@apple.com>
1615
1616         Reviewed by Adam.
1617
1618         Add IconFetcher to project.
1619         
1620         * WebCore.vcproj/WebCore.vcproj:
1621
1622 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1623
1624         Fixes a bug where the Web Insepctor would jump back to
1625         Elements each time it is opened instead of staying at the
1626         last selected panel.
1627
1628         <rdar://problem/5959475> Inspector jumps to the Elements panel
1629         each time it is opened, instead of staying at the previous panel
1630
1631         Reviewed by Adam Roben.
1632
1633         * page/InspectorController.cpp:
1634         (WebCore::InspectorController::setWindowVisible): Reset
1635         m_showAfterVisible to CurrentPanel, so the next time setWindowVisible
1636         is called it will use CurrentPanel unless showPanel was called again.
1637
1638 2008-05-23  chris fleizach  <cfleizach@apple.com>
1639
1640         Reviewed by Darin Adler.
1641
1642         <rdar://problem/5933759> REGRESSION: Frames don't appear as AX children of the top level web area
1643
1644         * page/AccessibilityRenderObject.cpp:
1645         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1646
1647 2008-05-23  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1648
1649         Reviewed by Simon.
1650
1651         For Qt port, support painting to native Windows HDC.
1652
1653         * platform/graphics/GraphicsContext.h:
1654         * platform/graphics/qt/GraphicsContextQt.cpp:
1655         (WebCore::GraphicsContext::getWindowsContext):
1656         (WebCore::GraphicsContext::releaseWindowsContext):
1657
1658 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1659
1660         Fixes a bug where the Inspector could have 0ms timers firing
1661         even after it is closed.
1662
1663         https://bugs.webkit.org/show_bug.cgi?id=18577
1664
1665         Reviewed by Oliver Hunt.
1666
1667         * page/inspector/DatabasesPanel.js: Removes setTimeouts that call
1668         the same function with a 0ms delay. These we not doing any good anyway,
1669         so they weren't needed and just caused problems.
1670         * page/inspector/ElementsPanel.js: Ditto.
1671         * page/inspector/ProfilesPanel.js: Ditto.
1672         * page/inspector/ResourcesPanel.js: Ditto.
1673
1674 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1675
1676         Make the Inspector correctly populate the profiles when
1677         closed and re-opened.
1678
1679         Reviewed by Adam Roben.
1680
1681         * page/InspectorController.cpp:
1682         (WebCore::InspectorController::populateScriptObjects): Call populateInterface
1683         in inspector.js.
1684         * page/inspector/ProfilesPanel.js:
1685         (WebInspector.ProfilesPanel.prototype.populateInterface): If visible,
1686         call _populateProfiles. Else just set this._shouldPopulateProfiles to true.
1687         (WebInspector.ProfilesPanel.prototype.reset): Don't call _populateProfiles.
1688         Just set this._shouldPopulateProfiles to true.
1689         (WebInspector.ProfilesPanel.prototype._populateProfiles): Delete
1690         this._shouldPopulateProfiles.
1691         * page/inspector/inspector.js:
1692         (WebInspector.populateInterface): Added. Call populateInterface on all the
1693         panels if they implement it.
1694
1695 2008-05-23  Kevin McCullough  <kmccullough@apple.com>
1696
1697         RS = Adam.
1698
1699         Editorial changes
1700
1701         * manual-tests/inspector/profiler-test-apply.html:
1702         * manual-tests/inspector/profiler-test-document-dot-write.html:
1703         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html:
1704         * manual-tests/inspector/profiler-test-one-execution-context.html:
1705         * manual-tests/inspector/profiler-test-two-execution-contexts.html:
1706
1707 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1708
1709         Fixes the bug where the profile was not added when finished.
1710
1711         <rdar://problem/5958851> Stop Profiling from the Develop menu does
1712         not add the Profile to the Inspector
1713
1714         Reviewed by Adam Roben.
1715
1716         * page/InspectorController.cpp:
1717         (WebCore::InspectorController::stopUserInitiatedProfiling): Call
1718         addProfile with the result of stopProfiling.
1719
1720 2008-05-23  Timothy Hatcher  <timothy@apple.com>
1721
1722         Tweak the Web Insector toolbar look to be smaller when attached to
1723         the inspected page.
1724
1725         Reviewed by Adam Roben.
1726
1727         * page/inspector/inspector.css:
1728
1729 2008-05-23  Simon Hausmann  <hausmann@webkit.org>
1730
1731         Fix compilation without accessibility by providing an empty stub for
1732         AXObjectCache::handleAriaRoleChanged.
1733
1734         * page/AXObjectCache.h:
1735
1736 2008-05-23  Alice Liu  <alice.liu@apple.com>
1737
1738         Reviewed by Mark Rowe.
1739
1740         Remove call to function whose body was commented out. Returning the
1741         children for a menu button by the normal calculation works just as well. 
1742
1743         * page/AccessibilityRenderObject.cpp:
1744         (WebCore::AccessibilityRenderObject::addChildren):
1745         * page/AccessibilityRenderObject.h:
1746
1747 2008-05-22  Timothy Hatcher  <timothy@apple.com>
1748
1749         Fixes the bug where resource would show up multiple times in the
1750         Inspector. This happened when a resource was used multiple times or
1751         when the preloader was scanning ahead to fetch resources.
1752
1753         <rdar://problem/5689373> Cached resources re-appear in Web Inspector
1754         for each access (18223)
1755
1756         Reviewed by Adam Roben.
1757
1758         * page/InspectorController.cpp:
1759         (WebCore::InspectorController::addResource): Add the URL to m_knownResources.
1760         (WebCore::InspectorController::removeResource): Remove the URL from m_knownResources
1761         (WebCore::InspectorController::didLoadResourceFromMemoryCache): If the URL
1762         is in m_knownResources, then early return.
1763         * page/InspectorController.h: Added m_knownResources.
1764
1765 2008-05-22  Alice Liu  <alice.liu@apple.com>
1766
1767         Reviewed by Adele, Dan Bernstein.
1768
1769         Fixed <rdar://problem/5943104> Need to implement ARIA role="menu" and related roles
1770         <rdar://problem/5943132> Need to implement ARIA role="menuitem"
1771         <rdar://problem/5943173> Need to implement ARIA role="menubar" 
1772
1773         These changes added a handler for determining the ARIA role when the
1774         attribute changes.  Before we were querying for the attribute over and
1775         over every time we queried for the role.
1776         * dom/Element.cpp:
1777         (WebCore::Element::attributeChanged):
1778         * page/AXObjectCache.cpp:
1779         (WebCore::AXObjectCache::handleAriaRoleChanged):
1780         * page/AXObjectCache.h:
1781
1782         The rest of these changes implement menu, menuitem, and menubar. the last 2 of those
1783         have to, for now, be represented as a Group and MenuButton instead, because AppKit 
1784         won't recognize menubar and menubaritems within apps. 
1785         * page/AccessibilityObject.h:
1786         (WebCore::AccessibilityObject::isMenuRelated):
1787         (WebCore::AccessibilityObject::isMenu):
1788         (WebCore::AccessibilityObject::isMenuBar):
1789         (WebCore::AccessibilityObject::isMenuButton):
1790         (WebCore::AccessibilityObject::isMenuItem):
1791         * page/AccessibilityRenderObject.cpp:
1792         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
1793         (WebCore::AccessibilityRenderObject::parentObject):
1794         (WebCore::AccessibilityRenderObject::isMenuRelated):
1795         (WebCore::AccessibilityRenderObject::isMenu):
1796         (WebCore::AccessibilityRenderObject::isMenuBar):
1797         (WebCore::AccessibilityRenderObject::isMenuButton):
1798         (WebCore::AccessibilityRenderObject::isMenuItem):
1799         (WebCore::siblingWithAriaRole):
1800         (WebCore::AccessibilityRenderObject::menuElementForMenuButton):
1801         (WebCore::AccessibilityRenderObject::menuForMenuButton):
1802         (WebCore::AccessibilityRenderObject::menuItemElementForMenu):
1803         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
1804         (WebCore::AccessibilityRenderObject::title):
1805         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
1806         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1807         (WebCore::RoleEntry::):
1808         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
1809         (WebCore::AccessibilityRenderObject::setAriaRole):
1810         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
1811         (WebCore::AccessibilityRenderObject::addChildren):
1812         (WebCore::AccessibilityRenderObject::ariaMenuButtonChildren):
1813         * page/AccessibilityRenderObject.h:
1814         * page/mac/AccessibilityObjectWrapper.mm:
1815         (-[AccessibilityObjectWrapper accessibilityActionNames]):
1816         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1817         (-[AccessibilityObjectWrapper roleDescription]):
1818         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1819         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1820
1821 2008-05-22  Adam Roben  <aroben@apple.com>
1822
1823         Make top-level resources show their full URLs again instead of just
1824         "/"
1825
1826         Reviewed by Tim Hatcher.
1827
1828         * page/inspector/Resource.js:
1829         (WebInspector.Resource.prototype.displayName): If the title has gotten
1830         down to just "/", which will happen for, e.g., http://webkit.org/,
1831         just show the entire URL.
1832
1833 2008-05-22  Timothy Hatcher  <timothy@apple.com>
1834
1835         Shorten URLs shown in the Web Inspector to the file name. This makes
1836         finding files in the Console or the Scripts panel easier.
1837
1838         Reviewed by Adam Roben.
1839
1840         * page/inspector/Console.js:
1841         (WebInspector.ConsoleMessage.prototype.get shortURL): Removed dead code.
1842         (WebInspector.ConsoleMessage.prototype.toMessageElement): Call WebInspector.displayNameForURL
1843         for the URL before making the link element.
1844         * page/inspector/ProfileView.js:
1845         (WebInspector.ProfileDataGridNode.prototype.createCell): Use WebInspector.displayNameForURL.
1846         * page/inspector/Resource.js:
1847         (WebInspector.Resource.prototype.get displayName): Use trimURL to
1848         trim the URL with the main resource's domain.
1849         * page/inspector/ScriptsPanel.js:
1850         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use WebInspector.displayNameForURL.
1851         * page/inspector/StylesSidebarPane.js:
1852         (WebInspector.StylePropertiesSection): Ditto.
1853         * page/inspector/inspector.js:
1854         (WebInspector.displayNameForURL): Added.
1855         (WebInspector.resourceForURL): Check for a direct match in resourceURLMap first.
1856
1857 2008-05-22  Adam Roben  <aroben@apple.com>
1858
1859         Fix Bug 19204: Inspector should highlight source lines when following
1860         links to them
1861
1862         <https://bugs.webkit.org/show_bug.cgi?id=19204>
1863
1864         Reviewed by Tim Hatcher.
1865
1866         Test: manual-tests/inspector/highlight-source-line.html
1867
1868         * manual-tests/inspector/highlight-source-line.html: Added.
1869         * page/inspector/ResourcesPanel.js:
1870         (WebInspector.ResourcesPanel.prototype.showResource): Call
1871         highlightLine on the view if that function exists.
1872         * page/inspector/SourceFrame.js:
1873         (WebInspector.SourceFrame.prototype.highlightLine): Added. Adds the
1874         webkit-highlighted-line class to the relevant line, then removes it
1875         after a short delay.
1876         (WebInspector.SourceFrame.prototype._loaded): Added styles for the
1877         highlighted line(s).
1878         * page/inspector/SourceView.js:
1879         (WebInspector.SourceView.prototype.highlightLine): Added. Calls
1880         through to the SourceFrame.
1881
1882 2008-05-22  Rob Buis  <buis@kde.org>
1883
1884         Reviewed by Eric.
1885
1886         https://bugs.webkit.org/show_bug.cgi?id=12053
1887         SVGPathSeg*(Abs|Rel) classses should be combined to reduce code size
1888
1889         Reduce code size through shared base classes.
1890
1891         * svg/SVGPathSeg.h:
1892         (WebCore::SVGPathSegSingleCoord::SVGPathSegSingleCoord):
1893         (WebCore::SVGPathSegSingleCoord::setX):
1894         (WebCore::SVGPathSegSingleCoord::x):
1895         (WebCore::SVGPathSegSingleCoord::setY):
1896         (WebCore::SVGPathSegSingleCoord::y):
1897         (WebCore::SVGPathSegSingleCoord::toString):
1898         * svg/SVGPathSegArc.cpp:
1899         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
1900         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
1901         * svg/SVGPathSegArc.h:
1902         (WebCore::SVGPathSegArc::SVGPathSegArc):
1903         (WebCore::SVGPathSegArc::toString):
1904         (WebCore::SVGPathSegArc::setX):
1905         (WebCore::SVGPathSegArc::x):
1906         (WebCore::SVGPathSegArc::setY):
1907         (WebCore::SVGPathSegArc::y):
1908         (WebCore::SVGPathSegArc::setR1):
1909         (WebCore::SVGPathSegArc::r1):
1910         (WebCore::SVGPathSegArc::setR2):
1911         (WebCore::SVGPathSegArc::r2):
1912         (WebCore::SVGPathSegArc::setAngle):
1913         (WebCore::SVGPathSegArc::angle):
1914         (WebCore::SVGPathSegArc::setLargeArcFlag):
1915         (WebCore::SVGPathSegArc::largeArcFlag):
1916         (WebCore::SVGPathSegArc::setSweepFlag):
1917         (WebCore::SVGPathSegArc::sweepFlag):
1918         (WebCore::SVGPathSegArcAbs::create):
1919         (WebCore::SVGPathSegArcAbs::pathSegType):
1920         (WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
1921         (WebCore::SVGPathSegArcRel::create):
1922         (WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
1923         * svg/SVGPathSegCurvetoCubic.cpp:
1924         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
1925         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
1926         * svg/SVGPathSegCurvetoCubic.h:
1927         (WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
1928         (WebCore::SVGPathSegCurvetoCubic::toString):
1929         (WebCore::SVGPathSegCurvetoCubic::setX):
1930         (WebCore::SVGPathSegCurvetoCubic::x):
1931         (WebCore::SVGPathSegCurvetoCubic::setY):
1932         (WebCore::SVGPathSegCurvetoCubic::y):
1933         (WebCore::SVGPathSegCurvetoCubic::setX1):
1934         (WebCore::SVGPathSegCurvetoCubic::x1):
1935         (WebCore::SVGPathSegCurvetoCubic::setY1):
1936         (WebCore::SVGPathSegCurvetoCubic::y1):
1937         (WebCore::SVGPathSegCurvetoCubic::setX2):
1938         (WebCore::SVGPathSegCurvetoCubic::x2):
1939         (WebCore::SVGPathSegCurvetoCubic::setY2):
1940         (WebCore::SVGPathSegCurvetoCubic::y2):
1941         (WebCore::SVGPathSegCurvetoCubicAbs::create):
1942         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
1943         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
1944         (WebCore::SVGPathSegCurvetoCubicRel::create):
1945         (WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
1946         * svg/SVGPathSegCurvetoCubicSmooth.cpp:
1947         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
1948         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
1949         * svg/SVGPathSegCurvetoCubicSmooth.h:
1950         (WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
1951         (WebCore::SVGPathSegCurvetoCubicSmooth::toString):
1952         (WebCore::SVGPathSegCurvetoCubicSmooth::setX):
1953         (WebCore::SVGPathSegCurvetoCubicSmooth::x):
1954         (WebCore::SVGPathSegCurvetoCubicSmooth::setY):
1955         (WebCore::SVGPathSegCurvetoCubicSmooth::y):
1956         (WebCore::SVGPathSegCurvetoCubicSmooth::setX2):
1957         (WebCore::SVGPathSegCurvetoCubicSmooth::x2):
1958         (WebCore::SVGPathSegCurvetoCubicSmooth::setY2):
1959         (WebCore::SVGPathSegCurvetoCubicSmooth::y2):
1960         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
1961         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
1962         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
1963         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
1964         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
1965         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
1966         * svg/SVGPathSegCurvetoQuadratic.cpp:
1967         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
1968         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
1969         * svg/SVGPathSegCurvetoQuadratic.h:
1970         (WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
1971         (WebCore::SVGPathSegCurvetoQuadratic::toString):
1972         (WebCore::SVGPathSegCurvetoQuadratic::setX):
1973         (WebCore::SVGPathSegCurvetoQuadratic::x):
1974         (WebCore::SVGPathSegCurvetoQuadratic::setY):
1975         (WebCore::SVGPathSegCurvetoQuadratic::y):
1976         (WebCore::SVGPathSegCurvetoQuadratic::setX1):
1977         (WebCore::SVGPathSegCurvetoQuadratic::x1):
1978         (WebCore::SVGPathSegCurvetoQuadratic::setY1):
1979         (WebCore::SVGPathSegCurvetoQuadratic::y1):
1980         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
1981         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
1982         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
1983         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
1984         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
1985         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
1986         * svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
1987         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
1988         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
1989         * svg/SVGPathSegCurvetoQuadraticSmooth.h:
1990         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
1991         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
1992         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
1993         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
1994         * svg/SVGPathSegLineto.cpp:
1995         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
1996         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
1997         * svg/SVGPathSegLineto.h:
1998         (WebCore::SVGPathSegLinetoAbs::create):
1999         (WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
2000         (WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
2001         * svg/SVGPathSegLinetoHorizontal.cpp:
2002         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
2003         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
2004         * svg/SVGPathSegLinetoHorizontal.h:
2005         (WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
2006         (WebCore::SVGPathSegLinetoHorizontal::toString):
2007         (WebCore::SVGPathSegLinetoHorizontal::setX):
2008         (WebCore::SVGPathSegLinetoHorizontal::x):
2009         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2010         (WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
2011         (WebCore::SVGPathSegLinetoHorizontalRel::create):
2012         (WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
2013         * svg/SVGPathSegLinetoVertical.cpp:
2014         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
2015         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
2016         * svg/SVGPathSegLinetoVertical.h:
2017         (WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
2018         (WebCore::SVGPathSegLinetoVertical::toString):
2019         (WebCore::SVGPathSegLinetoVertical::setY):
2020         (WebCore::SVGPathSegLinetoVertical::y):
2021         (WebCore::SVGPathSegLinetoVerticalAbs::create):
2022         (WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
2023         (WebCore::SVGPathSegLinetoVerticalRel::create):
2024         (WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
2025         * svg/SVGPathSegMoveto.cpp:
2026         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
2027         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
2028         * svg/SVGPathSegMoveto.h:
2029         (WebCore::SVGPathSegMovetoAbs::create):
2030         (WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
2031         (WebCore::SVGPathSegMovetoRel::create):
2032         (WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
2033
2034 2008-05-22  Alp Toker  <alp@nuanti.com>
2035
2036         GTK+/DirectFB build fix attempt.
2037
2038         * plugins/PluginDatabase.cpp:
2039         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2040         * plugins/gtk/PluginDatabaseGtk.cpp:
2041         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2042
2043 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2044
2045         Adds Focus, Exclude and Restore buttons to the Profile view
2046         Status bar. Also adds a Record button to create new profiles.
2047
2048         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
2049         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.
2050
2051         Reviewed by Adam Roben.
2052
2053         * English.lproj/localizedStrings.js: Added new strings.
2054         * page/JavaScriptProfile.cpp:
2055         (WebCore::restoreAll): Call Profile::restoreAll.
2056         (WebCore::ProfileClass): Added restoreAll to the static functions.
2057         * page/inspector/Images/excludeButtons.png: Added.
2058         * page/inspector/Images/focusButtons.png: Added.
2059         * page/inspector/Images/recordButtons.png: Added.
2060         * page/inspector/Images/reloadButtons.png: Added.
2061         * page/inspector/ProfileView.js:
2062         (WebInspector.ProfileView): Create the buttons elements.
2063         (WebInspector.ProfileView.prototype.get statusBarItems): Return the three
2064         status bar buttons.
2065         (WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
2066         for ProfileNodes that are visible.
2067         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
2068         refresh on the children, now that they have access to the ProfileView's properties.
2069         (WebInspector.ProfileView.prototype._focusClicked): Call focus
2070         on the profile, refresh the ProfileView and show the reset button.
2071         (WebInspector.ProfileView.prototype._excludeClicked): Call exclude
2072         on the profile, refresh the ProfileView and show the reset button.
2073         (WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
2074         on the profile, refresh the ProfileView and hide the reset button.
2075         (WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the 
2076         focus and exclude buttons.
2077         (WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
2078         focus and exclude buttons.
2079         (WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the 
2080         showPercentAs* arguments.
2081         * page/inspector/ProfilesPanel.js: Add a record status bar button and
2082         th ability to have per-view status bar buttons.
2083         * page/inspector/inspector.css: New styles.
2084
2085 2008-05-22  Mark Rowe  <mrowe@apple.com>
2086
2087         Reviewed by Tim Hatcher.
2088
2089         <rdar://problem/5956612> ibtool crashes during build
2090
2091         SCDynamicStoreCreate will return null if it cannot create a dynamic store object.  We need
2092         to check for failure rather than continuing with a null store as this results in us
2093         passing a null CFRunLoopSourceRef to CFRunLoopAddSource, which promptly crashes.
2094
2095         * platform/network/mac/NetworkStateNotifierMac.cpp:
2096         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Null check SCDynamicStoreCreate and
2097         SCDynamicStoreCreateRunLoopSource as it is possible for them to fail.
2098
2099 2008-05-22  Adam Roben  <aroben@apple.com>
2100
2101         Add a test for calling a NodeList as a function while profiling
2102
2103         Reviewed by Kevin McCullough.
2104
2105         * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Added.
2106
2107 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
2108
2109         Rubber stamped by Adam.
2110
2111         -Added new profiler tests.
2112
2113         * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Added.
2114         * manual-tests/inspector/profiler-test-constructor.html: Added.
2115         * manual-tests/inspector/profiler-test-document-dot-write.html: Added.
2116         * manual-tests/inspector/profiler-test-simple-no-level-change.html: Added.
2117         * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Added.
2118         * manual-tests/inspector/profiler-test-window-dot-eval.html: Added.
2119
2120 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
2121
2122         Reviewed by Tim.
2123
2124         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a
2125         profile node.
2126         -Expose the 'exclude' function to the WebInspector.
2127         -Also fix a bug with 'focus' and expose whether or not a node is visible
2128
2129         * page/JavaScriptProfile.cpp: Renamed profileClass to have a capital P.
2130         (WebCore::getTitleCallback):
2131         (WebCore::getHeadCallback):
2132         (WebCore::focus): Now correctly compares against a ProfileNodeClass
2133         instead of ProfileClass.
2134         (WebCore::exclude): Expose 'exclude' function to the WebInspector.
2135         (WebCore::ProfileClass):
2136         (WebCore::toJS):
2137         * page/JavaScriptProfileNode.cpp: Declare the ProfileNodeClass in the
2138         header so that ProfileClass can use it.
2139         (WebCore::getVisible): Expose a node's visiblity to the WebInspector.
2140         (WebCore::ProfileNodeClass):
2141         * page/JavaScriptProfileNode.h:
2142
2143 2008-05-22  Sam Weinig  <sam@webkit.org>
2144
2145         Reviewed by Anders Carlsson.
2146
2147         <rdar://problem/5838772> Support cross-site XMLHttpRequest
2148
2149         - Implement support for cross-site non-GET requests using the HTTP header
2150           Access-control mechanism.
2151
2152         Tests: http/tests/xmlhttprequest/access-control-basic-allow-async.html
2153                http/tests/xmlhttprequest/access-control-basic-not-get-allow-async.html
2154                http/tests/xmlhttprequest/access-control-basic-not-get-allow.html
2155
2156         * xml/XMLHttpRequest.cpp:
2157         (WebCore::XMLHttpRequest::XMLHttpRequest):
2158         (WebCore::XMLHttpRequest::send):
2159         Don't continue send if inside the method check preflight (only happens for async).
2160         
2161         (WebCore::XMLHttpRequest::crossSiteAccessRequest):
2162         Add support for non-GET requests, starting off a method check preflight.
2163
2164         (WebCore::XMLHttpRequest::handleAsynchronousMethodCheckResult):
2165         Handler for finishing up after an asynchronous method check has completed.
2166
2167         (WebCore::XMLHttpRequest::didFinishLoading):
2168         (WebCore::XMLHttpRequest::didFinishLoadingMethodCheck):
2169         (WebCore::XMLHttpRequest::didReceiveResponse):
2170         (WebCore::XMLHttpRequest::didReceiveResponseMethodCheck):
2171         (WebCore::XMLHttpRequest::didReceiveData):
2172         Do a limited set of access control when in the method check preflight.
2173         * xml/XMLHttpRequest.h:
2174
2175 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2176
2177         Make sure we don't call findTreeElement with the same representedObject
2178         again, to prevent infinite recursion. Added many comments to this
2179         code so it can be understood later.
2180
2181         https://bugs.webkit.org/show_bug.cgi?id=19164
2182
2183         Reviewed by Adam Roben.
2184
2185         * page/inspector/treeoutline.js:
2186
2187 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2188
2189         Re-word the "Attach Debugger" overlay to never say "Attach". The new
2190         wording is "Start Debugging". This makes the overlay consistent with
2191         other wording used for starting the debugger. Also fixes the tooltips
2192         for the Pause on Exceptions button.
2193
2194         Reviewed by Adam Roben and Dan Bernstein.
2195
2196         * English.lproj/localizedStrings.js: Adds new strings.
2197         * page/inspector/ScriptsPanel.js: Changes the wording. Flips the
2198         tooltips for the Pause on Exceptions buttons so the tooltip says
2199         what will happen when the button is pressed.
2200
2201 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2202
2203         Remove some non-functional elements from the Scripts panel
2204         so they don't confuse users why they aren't working.
2205
2206         Reviewed by Adam Roben.
2207
2208         * page/inspector/ScriptsPanel.js: Removes the back/forward buttons
2209         and the function menu.
2210         * page/inspector/inspector.css: Make the files menu wider since there
2211         is more room now.
2212
2213 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2214
2215         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
2216
2217         Reviewed by Adam Roben.
2218
2219         * English.lproj/localizedStrings.js:
2220         * WebCore.base.exp:
2221         * page/InspectorController.cpp:
2222         (WebCore::InspectorController::InspectorController):
2223         (WebCore::InspectorController::inspect):
2224         (WebCore::InspectorController::setWindowVisible):
2225         (WebCore::InspectorController::showPanel):
2226         (WebCore::InspectorController::startUserInitiatedProfiling):
2227         (WebCore::InspectorController::stopUserInitiatedProfiling):
2228         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
2229         (WebCore::InspectorController::stopDebugging):
2230         * page/InspectorController.h:
2231         (WebCore::InspectorController::):
2232         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
2233         * page/inspector/ProfilesPanel.js:
2234         * page/inspector/ScriptsPanel.js:
2235         * page/inspector/inspector.js:
2236
2237 2008-05-22  Josh Aas  <joshmoz@gmail.com>
2238
2239         Reviewed by Anders.
2240
2241         <rdar://problem/5956429> 
2242         https://bugs.webkit.org/show_bug.cgi?id=19192
2243         remove NPNVpluginEventModel, fix example plugin
2244         
2245         Remove NPNVpluginEventModel enum variable.
2246         
2247         * bridge/npapi.h:
2248
2249 2008-05-22  Stephanie Lewis  <slewis@apple.com>
2250
2251         Reviewed by Dan.
2252
2253         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.
2254
2255         Test: fast/events/onunload-clears-onbeforeunload.html
2256
2257         * loader/FrameLoader.cpp:
2258         (WebCore::FrameLoader::stopLoading):
2259         * page/Frame.cpp:
2260         (WebCore::Frame::shouldClose):
2261
2262 2008-05-22  Simon Hausmann  <hausmann@webkit.org>
2263
2264         Reviewed by Oliver.
2265
2266         Qt build fix.
2267
2268         * bindings/js/StringSourceProvider.h: Remove text at end of
2269         preprocessor statement.
2270         * bridge/qt/qt_instance.cpp:
2271         (KJS::Bindings::QtRuntimeObjectImp::getConstructData): Replaced
2272         implementsConstruct() with getConstructData().
2273         (KJS::Bindings::QtInstance::getCallData): Replaced implementsCall with
2274         getCallData().
2275         (KJS::Bindings::QtInstance::invokeDefaultMethod): Use getCallData()
2276         instead of implementsCall().
2277         * bridge/qt/qt_instance.h:
2278
2279 2008-05-22  Adam Roben  <aroben@apple.com>
2280
2281         Massively speed up date-format-tofte with the debugger attached
2282
2283         On a debug Windows build (I know, hardly a good testcase) this patch
2284         makes this test run 57.25x as fast.
2285
2286         Reviewed by Mark Rowe.
2287
2288         * page/inspector/ScriptsPanel.js:
2289         (WebInspector.ScriptsPanel.prototype.reset): Clear the
2290         _scriptsForURLsInFilesSelect object.
2291         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Instead
2292         of looping over all the options in the select to find the option we
2293         want, get the script object from _scriptsForURLsInFilesSelect and get
2294         the option element from the script object.
2295         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use
2296         _scriptsForURLsInFilesSelect to cache the script objects. Store the
2297         option element for each script on the script object so we can quickly
2298         retrieve it later.
2299
2300 2008-05-22  Adam Roben  <aroben@apple.com>
2301
2302         Remove some dead code from ScriptsPanel.js
2303
2304         Reviewed by Mark Rowe.
2305
2306         * page/inspector/ScriptsPanel.js:
2307
2308 2008-05-21  Adam Roben  <aroben@apple.com>
2309
2310         Fix Bug 19178: Inspector should support sorting resources by latency
2311
2312         <https://bugs.webkit.org/show_bug.cgi?id=19178>
2313
2314         I replaced "Sort by Time" with the following sorting options:
2315           - Sort by Start Time
2316           - Sort by Response Time
2317           - Sort by End Time
2318           - Sort by Duration
2319           - Sort by Latency
2320
2321         You can no longer sort by Size when looking at the Time graph, and you
2322         can't use any of the time-based sorting functions when looking at the
2323         Size graph.
2324
2325         Reviewed by Tim Hatcher.
2326
2327         * page/inspector/Resource.js:
2328         (WebInspector.Resource.prototype.get duration): Added.
2329         (WebInspector.Resource.prototype.get latency): Added.
2330         (WebInspector.Resource.CompareByStartTime): Added.
2331         (WebInspector.Resource.CompareByResponseReceivedTime): Added.
2332         (WebInspector.Resource.CompareByEndTime): Added.
2333         (WebInspector.Resource.CompareByDuration): Added.
2334         (WebInspector.Resource.CompareByLatency): Added.
2335         * page/inspector/ResourcesPanel.js:
2336         (WebInspector.ResourcesPanel):
2337           - Each graph sidebar item now holds a list of sorting options
2338           - Graph sidebar items no longer have a calculator property. This is
2339             stored on the sorting options instead, to allow each kind of
2340             sorting to have a different calculator.
2341           - The sortingSelectElement starts out empty, and is populated in
2342             _graphSelected
2343           - The sortingFunction starts out uninitialized and is set as a
2344             side-effect of _graphSelected.
2345         (WebInspector.ResourcesPanel.prototype.set calculator): Don't do
2346         anything if the calculator hasn't changed.
2347         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
2348         _lastSelectedGraphTreeElement property instead of getting the graph
2349         element from the calculator.
2350         (WebInspector.ResourcesPanel.prototype._graphSelected):
2351           - Store the tree element in the _lastSelectedGraphTreeElement
2352             property
2353           - Popuplate sortingSelectElement with the sortingOptions and select
2354             the option that was last selected
2355         (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
2356         our calculator from the sorting option.
2357         (WebInspector.ResourceTimeCalculator): Renamed from
2358         ResourceTransferTimeCalculator. Now takes a parameter to specify
2359         whether the bars should all start at zero.
2360         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages):
2361         Take this.startAtZero into account.
2362         (WebInspector.ResourceTimeCalculator.prototype.updateBoundries):
2363         Abstracted the lower/upper bounds of a resource into methods.
2364         (WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
2365         (WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
2366         (WebInspector.ResourceTransferTimeCalculator): Added. This is now a
2367         subclass of ResourceTimeCalculator
2368         (WebInspector.ResourceTransferDurationCalculator): Added.
2369         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
2370         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
2371         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
2372         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
2373         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
2374         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingSize):
2375         Changed to call CompareBySize.
2376
2377 2008-05-21  Adam Roben  <aroben@apple.com>
2378
2379         Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are
2380         wrong/missing
2381
2382         <https://bugs.webkit.org/show_bug.cgi?id=19173>
2383
2384         Reviewed by Tim Hatcher.
2385
2386         * manual-tests/inspector/debugger-status-bar-buttons-state.html:
2387         Added.
2388         * page/inspector/ScriptsPanel.js:
2389         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call
2390         _clearInterface (which updates the buttons' tool tips) after
2391         attaching/detaching the debugger so that the buttons will reflect the
2392         new state.
2393         (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
2394         Set the title of the pauseOnExceptionsButton, not the debuggingButton.
2395
2396 2008-05-20  Adam Roben  <aroben@apple.com>
2397
2398         Fix Bug 19153: Inspector should support console.debug
2399
2400         <https://bugs.webkit.org/show_bug.cgi?id=19153>
2401         <rdar://problem/5950856>
2402
2403         Reviewed by Tim Hatcher.
2404
2405         Test: manual-tests/inspector/console-log-formatting.html
2406
2407         * bindings/js/JSConsoleCustom.cpp:
2408         (WebCore::JSConsole::debug): Added.
2409         * manual-tests/inspector/console-log-formatting.html: Changed to test
2410         console.debug as well.
2411         * page/Console.cpp:
2412         (WebCore::Console::debug): Added. Just calls through to log().
2413         * page/Console.h:
2414         * page/Console.idl: Added debug() declaration.
2415
2416 2008-05-21  Kevin McCullough  <kmccullough@apple.com>
2417
2418         Reviewed by Adam.
2419
2420         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
2421         profile node.
2422         - Expose the Profile's 'focus' ability to WebCore and the WebInspector.
2423
2424         * page/JavaScriptProfile.cpp:
2425         (WebCore::focus):
2426         (WebCore::profileClass):
2427
2428 2008-05-21  Timothy Hatcher  <timothy@apple.com>
2429
2430         Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
2431         since the parts the remain aren't useful.
2432
2433         * page/JavaScriptDebugServer.cpp:
2434         (WebCore::JavaScriptDebugServer::sourceParsed):
2435
2436 2008-05-21  Beth Dakin  <bdakin@apple.com>
2437
2438         Reviewed by Anders.
2439
2440         Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash 
2441         beneath ResourceHandle::setDefersLoading while running fast/loader/
2442         simultaneous-reloads-assert.html (null CFURLConnection)
2443
2444         * platform/network/cf/ResourceHandleCFNet.cpp:
2445         (WebCore::ResourceHandle::setDefersLoading): Added simple null-
2446         check.
2447
2448 2008-05-21  Timothy Hatcher  <timothy@apple.com>
2449
2450         Adds the Request and Response headers to the Resource view.
2451
2452         <rdar://problem/5940782> REGRESSION: Resource Request and Response
2453         headers aren't shown (18451)
2454
2455         Reviewed by Adam Roben.
2456
2457         * English.lproj/localizedStrings.js: Added new strings.
2458         * css/view-source.css: Add comments to make sure a couple of
2459         style rules stay in sync with inspector.css.
2460         * page/inspector/Resource.js:
2461         (WebInspector.Resource.prototype.set url): Dispatch an event when
2462         this property changes.
2463         (WebInspector.Resource.prototype.set requestHeaders): Ditto.
2464         (WebInspector.Resource.prototype.set responseHeaders): Ditto.
2465         * page/inspector/ResourceView.js:
2466         (WebInspector.ResourceView): Add new elements for the headers
2467         and a headers TreeOutline. Add event listeners for resource
2468         property changes. Calls the three new refresh functions.
2469         (WebInspector.ResourceView.prototype.set headersVisible): Implemented.
2470         Toggles the headers-visible class name.
2471         (WebInspector.ResourceView.prototype._refreshURL): Update the URL
2472         tree element.
2473         (WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
2474         (WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
2475         (WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
2476         headers fromm the tree element. Loop throuh the headers and create new
2477         tree elements and append them.
2478         * page/inspector/ResourcesPanel.js:
2479         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
2480         on the visible view if it is implemented.
2481         * page/inspector/SourceFrame.js:
2482         (WebInspector.SourceFrame.prototype.get autoSizesToFitContentHeight):
2483         (WebInspector.SourceFrame.prototype.set autoSizesToFitContentHeight):
2484         (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
2485         (WebInspector.SourceFrame.prototype._loaded): 
2486         (WebInspector.SourceFrame.prototype._windowResized): 
2487         * page/inspector/SourceView.js:
2488         (WebInspector.SourceView): Move the SourceFrame creation so it is
2489         available when headersVisible is set. Add a gutter element to fill
2490         the vertical space no covered by the SourceFrame now.
2491         (WebInspector.SourceView.prototype.set headersVisible): Set the
2492         SourceFrame.autoSizesToFitContentHeight when this property changes.
2493         (WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
2494         when autoSizesToFitContentHeight is true. This happens when resizing the 
2495         Resources sidebar.
2496         * page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
2497         and a comment to keep in sync with view-source.css. Adds other styles
2498         for the headers area of resource-view.
2499
2500 2008-05-21  Sam Weinig  <sam@webkit.org>
2501
2502         Reviewed by Anders Carlsson.
2503
2504         <rdar://problem/5838772> Support cross-site XMLHttpRequest
2505
2506         - Implement support for cross-site GET requests using the HTTP header
2507           Access-control mechanism.
2508
2509         Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html
2510                http/tests/xmlhttprequest/access-control-basic-allow.html
2511                http/tests/xmlhttprequest/access-control-basic-denied.html
2512                http/tests/xmlhttprequest/access-control-basic-exclude.html
2513
2514         * xml/AccessControlList.cpp:
2515         (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
2516         * xml/AccessControlList.h:
2517
2518         * xml/AccessItem.cpp:
2519         (WebCore::AccessItem::AccessItem):
2520         (WebCore::AccessItem::matches):
2521         * xml/AccessItem.h:
2522         Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using
2523         the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset
2524         of the AccessItem match algorithm to be used, until the complete parsing of
2525         the wildcards and optional pieces is complete. 
2526
2527         * xml/AccessItemRule.cpp:
2528         (WebCore::matchesAny):
2529         (WebCore::AccessItemRule::allowListMatchesAny):
2530         (WebCore::AccessItemRule::excludeListMatchesAny):
2531         * xml/AccessItemRule.h:
2532         More of the implementation of the list check algorithm.  Check if any of the items
2533         in the rule match the control origin.
2534
2535         * xml/XMLHttpRequest.cpp:
2536         (WebCore::XMLHttpRequest::XMLHttpRequest):
2537         (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore.
2538         (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests.
2539         (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for
2540         cross-domain requests.  
2541         (WebCore::XMLHttpRequest::loadRequestSynchronously):
2542         (WebCore::XMLHttpRequest::processSyncLoadResults):
2543         This can now throw an exception if a cross-domain request is denied by the access control
2544         (WebCore::XMLHttpRequest::didFinishLoading):
2545         Add support for cross-domain GET request.  ASSERT temporarily that the method is GET, since we
2546         should have bailed out much earlier for non-GET methods.
2547         (WebCore::XMLHttpRequest::willSendRequest):
2548         (WebCore::XMLHttpRequest::didReceiveResponse):
2549         Do the HTTP header access-control check as soon as the headers arrive.
2550         * xml/XMLHttpRequest.h:
2551
2552 2008-05-21  Alp Toker  <alp@nuanti.com>
2553
2554         Rubber-stamped by Maciej.
2555
2556         Replace non-standard #pragma marks with comments to avoid compiler
2557         warnings.
2558
2559         * page/InspectorController.cpp:
2560
2561 === End merge of squirrelfish ===
2562
2563 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
2564
2565         Reviewed by Tim Hatcher.
2566
2567         Merged with trunk WebCore's new debugger.
2568
2569         * page/InspectorController.cpp:
2570         (WebCore::currentCallFrame): Updated to use the DebuggerCallFrame API.
2571         (WebCore::InspectorController::pauseInDebugger): Updated for name change
2572         explained below.
2573         (WebCore::InspectorController::resumeDebugger): ditto
2574         (WebCore::InspectorController::didParseSource): Fixed a bug that would
2575         produce garbled text in some cases: Don't treat JS source as null-
2576         terminated UTF8; it's UTF16.
2577
2578         * page/JavaScriptCallFrame.cpp:
2579         * page/JavaScriptCallFrame.h: Changed this class to do all of its processing
2580         through a JavaScriptCore DebuggerCallFrame. We have to copy the DebuggerCallFrame
2581         because it's a temporary.
2582         (WebCore::JavaScriptCallFrame::update): Added an API for updating a call
2583         frame during execution: this is how we handle "with" and "eval".
2584
2585         * page/JavaScriptDebugServer.cpp: Separated "m_paused" from
2586         "m_doneProcessingDebuggerEvents", because they have different semantics:
2587         "m_paused" is the flag the debug server uses to indicate that new debugger
2588         callbacks should be ignored, because they come from the debugger's own
2589         JS code; "m_doneProcessingDebuggerEvents" is the flag the debugger UI
2590         uses to indicate that it's done processing events, and would like execution
2591         to continue. When these flags were one, the debugger would erroneously
2592         process callbacks that ocurred while unwinding from its own JS code.
2593
2594         (WebCore::toPage): Removed some unnecessary NULL checking. Added some
2595         missing NULL checking.
2596         
2597         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Changed pause tracking
2598         to track a JavaScriptCallFrame instead of an ExecState, since ExecState
2599         is no longer a unique identifier for a call frame.
2600
2601         I removed the updateCurrentCallFrame scheme, and replaced it with
2602         individual tracking inside these callbacks:
2603         
2604         (WebCore::JavaScriptDebugServer::callEvent):
2605         (WebCore::JavaScriptDebugServer::atStatement):
2606         (WebCore::JavaScriptDebugServer::returnEvent):
2607         (WebCore::JavaScriptDebugServer::exception):
2608         
2609         The updateCurrentCallFrame scheme was just too incompatible with the
2610         squirrelfish execution model. Everything still works as before, except
2611         for eval, which no longer shows up as an independent call frame. We'll
2612         need to augment our debugger callbacks to bring back support for that.
2613
2614         * page/inspector/ScopeChainSidebarPane.js: Updated to use the activation
2615         class's new name.
2616
2617 2008-05-21  Maciej Stachowiak  <mjs@apple.com>
2618
2619         Reviewed by Oliver.
2620
2621         - write directly to the slot we used to check for override properties, when possible
2622         2.6% speedup on in-browser SunSpider
2623
2624         * bindings/js/JSDOMWindowCustom.h:
2625         (WebCore::JSDOMWindow::customPut):
2626
2627 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
2628
2629         Reviewed by Oliver.
2630
2631         - inline JSDOMWindow security checks
2632         0.9% speedup to SunSpider in-browser
2633
2634         * bindings/js/JSDOMWindowBase.cpp:
2635         * bindings/js/JSDOMWindowCustom.h:
2636         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
2637         (WebCore::JSDOMWindowBase::allowsAccessFrom):
2638         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
2639         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
2640         * bindings/js/kjs_binding.cpp:
2641
2642 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
2643
2644         Reviewed by Adam.
2645
2646         - use ALWAYS_INLINE on customGetOwnPropertySlot since it wasn't inlining
2647         2% speedup to SunSpider in-browser
2648
2649         * bindings/js/JSDOMWindowCustom.h:
2650         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2651
2652 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
2653
2654         Reviewed by Adam.
2655
2656         - inline JSDOMWindow's customPut and customGetOwnPropertySlot methods
2657         1.2% speedup to SunSpider in-browser
2658         
2659         The approach here is to make the code generator include a
2660         JS{classname}Custom.h header in the autogenerated implementation,
2661         which we can use to provide inline versions.
2662
2663         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2664         * bindings/js/JSCSSStyleDeclarationCustom.h: Added.
2665         * bindings/js/JSDOMWindowCustom.cpp:
2666         * bindings/js/JSDOMWindowCustom.h:
2667         (WebCore::asJSDOMWindow):
2668         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2669         (WebCore::JSDOMWindow::customPut):
2670         * bindings/js/JSHTMLAppletElementCustom.cpp:
2671         * bindings/js/JSHTMLAppletElementCustom.h: Added.
2672         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2673         * bindings/js/JSHTMLEmbedElementCustom.h: Added.
2674         * bindings/js/JSHTMLObjectElementCustom.cpp:
2675         * bindings/js/JSHTMLObjectElementCustom.h: Added.
2676         * bindings/js/JSHistoryCustom.cpp:
2677         * bindings/js/JSHistoryCustom.h: Added.
2678         * bindings/js/JSLocationCustom.cpp:
2679         * bindings/js/JSLocationCustom.h: Added.
2680         * bindings/js/JSStorageCustom.cpp:
2681         * bindings/js/JSStorageCustom.h: Added.
2682         * bindings/scripts/CodeGeneratorJS.pm:
2683
2684 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
2685
2686         Reviewed by Anders.
2687
2688         - inline asDOMWindow (using a new JSDOMWindowCustom.h header) since it is just a cast
2689         1% speedup to SunSpider in-browser
2690
2691         * WebCore.vcproj/WebCore.vcproj:
2692         * WebCore.xcodeproj/project.pbxproj:
2693         * bindings/js/JSCustomVoidCallback.cpp:
2694         * bindings/js/JSCustomXPathNSResolver.cpp:
2695         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2696         * bindings/js/JSDOMWindowBase.cpp:
2697         * bindings/js/JSDOMWindowBase.h:
2698         * bindings/js/JSDOMWindowCustom.cpp:
2699         * bindings/js/JSDOMWindowCustom.h: Added.
2700         (WebCore::asJSDOMWindow):
2701         * bindings/js/JSDatabaseCustom.cpp:
2702         * bindings/js/JSDocumentCustom.cpp:
2703         * bindings/js/JSLocationCustom.cpp:
2704         * bindings/js/JSSQLTransactionCustom.cpp:
2705         * bindings/js/JSXMLHttpRequestCustom.cpp:
2706         * page/JavaScriptDebugServer.cpp:
2707
2708 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
2709
2710         Reviewed by Oliver.
2711
2712         - obtain current inner window of outer window in a more efficient way
2713         1.6% speedup to SunSpider in-browser
2714
2715         * bindings/js/JSDOMWindowBase.cpp:
2716         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
2717
2718 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
2719
2720         Reviewed by Adam.
2721
2722         - make impl() method for JSWindow inline
2723         0.6% speedup to SunSpider in-browser
2724
2725         * WebCore.base.exp: Remove now-inline symbol
2726         * bindings/scripts/CodeGeneratorJS.pm: Make the codegen script inline impl()
2727         even for classes with a parent class.
2728
2729 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
2730
2731         Reviewed by Oliver Hunt.
2732
2733         Updated for API changes in KJS::Debugger.
2734
2735 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
2736
2737         Reviewed by Oliver Hunt.
2738
2739         Updated for API changes in KJS::Debugger.
2740
2741         * page/JavaScriptDebugServer.cpp:
2742         (WebCore::JavaScriptDebugServer::callEvent):
2743         (WebCore::JavaScriptDebugServer::atStatement):
2744         (WebCore::JavaScriptDebugServer::returnEvent):
2745         (WebCore::JavaScriptDebugServer::exception):
2746         * page/JavaScriptDebugServer.h:
2747
2748 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
2749
2750         Reviewed by Oliver Hunt.
2751         
2752         Updated JavaScriptDebugServer API to accept a SourceProvider instead
2753         of a UString, to avoid copying.
2754
2755         * page/JavaScriptDebugServer.cpp:
2756         (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function
2757         not to return a value.
2758
2759 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
2760
2761         Build fix.
2762         
2763         - add missing forwarding header
2764
2765         * ForwardingHeaders/kjs/SourceProvider.h: Added.
2766
2767 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
2768
2769         Reviewed by Oliver.
2770
2771         - WebCore part of fix for: "SQUIRRELFISH: function toString broken after calling"
2772         https://bugs.webkit.org/show_bug.cgi?id=18869
2773
2774         * bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String.
2775         (WebCore::StringSourceProvider::create):
2776         (WebCore::StringSourceProvider::getRange):
2777         (WebCore::StringSourceProvider::data):
2778         (WebCore::StringSourceProvider::length):
2779         (WebCore::StringSourceProvider::StringSourceProvider):
2780         * bindings/js/kjs_proxy.cpp:
2781         (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to
2782         evaluate() instead of UChar* / length.
2783         * html/HTMLScriptElement.cpp:
2784         (WebCore::HTMLScriptElement::text): Modified to return the
2785         original string as-is when the script element contains only a
2786         single text node, to avoid excess memory use.
2787         
2788         * WebCore.vcproj/WebCore.vcproj: Add new file to build.
2789         * WebCore.xcodeproj/project.pbxproj: ditto
2790
2791 2008-05-09  Oliver Hunt  <oliver@apple.com>
2792
2793         Reviewed by Geoff.
2794
2795         Build fixes for SquirrelFish on windows.
2796
2797         * bindings/js/JSNavigatorCustom.cpp:
2798
2799 2008-05-08  Geoffrey Garen  <ggaren@apple.com>
2800
2801         Reviewed by Oliver Hunt.
2802
2803         Fixed platform/mac/plugins/bindings-test-objc.html.
2804         
2805         I've restored -[WebScriptObject setException] and
2806         +[WebScriptObject throwException].
2807         
2808         Instead of mucking around in the JavaScript engine's execution state,
2809         throwing an exception sets a global exception string, along with the
2810         environment in which to throw it. An ObjC callback checks the global
2811         exception string and, if it's non-nil and the environment matches the
2812         current exceution environment, throws the global exception string as a
2813         JS exception.
2814
2815         I also removed the old currentGlobalObject infrastructure: it's no longer
2816         used.
2817
2818 2008-05-06  Oliver Hunt  <oliver@apple.com>
2819
2820         Reviewed by Maciej.
2821
2822         Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
2823         Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>
2824
2825         This fixes function binding logic for the ObjC and NPRuntime by
2826         replacing incorrect implementations of implementsCall (which is
2827         no longer virtual) with implementations of getCallData.
2828
2829         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2830         (WebCore::JSQuarantinedObjectWrapper::getCallData):
2831         * bindings/js/JSQuarantinedObjectWrapper.h:
2832         * bridge/c/c_instance.cpp:
2833         * bridge/c/c_instance.h:
2834         * bridge/objc/objc_instance.h:
2835         * bridge/objc/objc_instance.mm:
2836         * bridge/objc/objc_runtime.h:
2837         * bridge/objc/objc_runtime.mm:
2838         (ObjcFallbackObjectImp::getCallData):
2839         * bridge/runtime.h:
2840         * bridge/runtime_object.cpp:
2841         (RuntimeObjectImp::getCallData):
2842         * bridge/runtime_object.h:
2843
2844 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
2845
2846         Build fix: supply a parameter that used to be implicit to
2847         Interpreter::evaluate.
2848
2849 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
2850
2851         Build fix: #ifdef'd out some code that doesn't work anymore.
2852
2853         * bindings/objc/WebScriptObject.mm:
2854         (+[WebScriptObject throwException:]):
2855         (-[WebScriptObject setException:]):
2856
2857 2008-04-14  Gabor Loki  <loki@inf.u-szeged.hu>
2858
2859         Reviewed by Geoffrey Garen.
2860
2861         Bug 18489: Squirrelfish doesn't build on linux
2862         <https://bugs.webkit.org/show_bug.cgi?id=18489>
2863
2864         * WebCore.pro: Add JavaScriptCore/VM into include path
2865
2866 2008-04-10  Sam Weinig  <sam@webkit.org>
2867
2868         Reviewed by Geoffrey Garen.
2869
2870         Adjusted WebCore JS functions to the new "getConstructData" calling convention.
2871
2872 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
2873
2874         Reviewed by Oliver Hunt.
2875         
2876         Adjusted WebCore JS functions to the new "getCallData" calling convention.
2877
2878 === Start merge of squirrelfish ===
2879
2880 2008-05-21  Anders Carlsson  <andersca@apple.com>
2881
2882         Reviewed by Mitz.
2883
2884         Add IconFetcher implementation.
2885
2886         * WebCore.base.exp:
2887         * WebCore.xcodeproj/project.pbxproj:
2888         * html/HTMLLinkElement.h:
2889         (WebCore::HTMLLinkElement::isIcon):
2890         * loader/icon/IconFetcher.cpp: Added.
2891         (WebCore::IconLinkEntry::):
2892         (WebCore::IconLinkEntry::IconLinkEntry):
2893         (WebCore::IconLinkEntry::type):
2894         (WebCore::IconLinkEntry::url):
2895         (WebCore::IconLinkEntry::buffer):
2896         (WebCore::parseIconLink):
2897         (WebCore::IconFetcher::create):
2898         (WebCore::IconFetcher::IconFetcher):
2899         (WebCore::IconFetcher::~IconFetcher):
2900         (WebCore::IconFetcher::cancel):
2901         (WebCore::IconFetcher::createIcon):
2902         (WebCore::IconFetcher::loadEntry):
2903         (WebCore::IconFetcher::loadFailed):
2904         (WebCore::IconFetcher::didReceiveResponse):
2905         (WebCore::IconFetcher::didReceiveData):
2906         (WebCore::IconFetcher::didFinishLoading):
2907         (WebCore::IconFetcher::didFail):
2908         * loader/icon/IconFetcher.h: Added.
2909         (WebCore::IconFetcherClient::~IconFetcherClient):
2910
2911 2008-05-21  Dan Bernstein  <mitz@apple.com>
2912
2913         Reviewed by Dave Hyatt.
2914
2915         - fix https://bugs.webkit.org/show_bug.cgi?id=18352
2916           <rdar://problem/5854517> crash loading malicious font
2917
2918         * platform/graphics/mac/SimpleFontDataMac.mm:
2919         (WebCore::SimpleFontData::platformInit): In the case of a custom font,
2920         there is no NSFont to base the fallback font on, so get a font based on
2921         fallback family name alone.
2922
2923 2008-05-21  Timothy Hatcher  <timothy@apple.com>
2924
2925         Adds the files and line numbers to the Profile call tree.
2926
2927         <rdar://problem/5952924> Inspector needs to show file and line number
2928         in the Profile call tree
2929
2930         Reviewed by Geoff Garen.
2931
2932         * page/JavaScriptProfileNode.cpp:
2933         (WebCore::getFunctionName): Fixes a JSStringRef leak.
2934         (WebCore::getURL): Call ProfileNode::url.
2935         (WebCore::getLineNumber): Call ProfileNode::lineNumber.
2936         (WebCore::ProfileNodeClass): Add the url and lineNumber properties.
2937         * page/inspector/ProfileView.js:
2938         (WebInspector.ProfileDataGridNode.prototype.createCell): Overload the
2939         DataGridNode.createCell and add the file and lineNumber to the
2940         cell if the column is the function column.
2941         * page/inspector/inspector.css: New styles for the file and line.
2942
2943 2008-05-21  Timothy Hatcher  <timothy@apple.com>
2944
2945         Restores logging of console calls to the STDOUT
2946         when Interpreter::shouldPrintExceptions() is true.
2947
2948         <rdar://problem/5636442> REGRESSION: Console.log no longer logs to
2949         the system console or terminal
2950
2951         <rdar://problem/5146079> JavaScript exception logging should print
2952         accurate file and line info when called from WebScriptObject
2953
2954         Reviewed by Adam Roben.
2955
2956         * bindings/js/JSCustomSQLStatementCallback.cpp:
2957         (WebCore::JSCustomSQLStatementCallback::handleEvent): Remove existing
2958         printf and check for Interpreter::shouldPrintExceptions() since there is
2959         a call to Console::addMessage.
2960         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2961         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): Ditto.
2962         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2963         (WebCore::JSCustomSQLTransactionCallback::handleEvent): Ditto.
2964         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2965         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Ditto.
2966         * bindings/js/JSCustomVoidCallback.cpp:
2967         (WebCore::JSCustomVoidCallback::handleEvent): Ditto.
2968         * bindings/js/JSCustomXPathNSResolver.cpp:
2969         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Ditto.
2970         * bindings/js/JSDOMWindowBase.cpp:
2971         (WebCore::JSDOMWindowBase::printErrorMessage): Ditto.
2972         * bindings/js/ScheduledAction.cpp:
2973         (WebCore::ScheduledAction::execute): Ditto.
2974         * bindings/js/kjs_events.cpp:
2975         (WebCore::JSAbstractEventListener::handleEvent): Ditto.
2976         * loader/FrameLoader.cpp:
2977         (WebCore::FrameLoader::shouldAllowNavigation): Ditto.
2978         * bindings/objc/WebScriptObject.mm:
2979         (WebCore::addExceptionToConsole): Added helper static function that
2980         calls Console::addMessage.
2981         (-[WebScriptObject callWebScriptMethod:withArguments:]): Call addExceptionToConsole.
2982         (-[WebScriptObject evaluateWebScript:]): Ditto.
2983         (-[WebScriptObject setValue:forKey:]): Ditto.
2984         (-[WebScriptObject valueForKey:]): Ditto.
2985         (-[WebScriptObject removeWebScriptKey:]): Ditto.
2986         (-[WebScriptObject webScriptValueAtIndex:]): Ditto.
2987         (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
2988         * page/Console.cpp:
2989         (WebCore::Console::addMessage): Print the level, message,
2990         URL and line number to STDOUT.
2991         (WebCore::printToStandardOut): Helper static function that
2992         takes a prefix string, ExecState, an argument List and URL.
2993         Prints the prefix and loops through the arguments calling
2994         toString on each and printing the string. Finally printing
2995         the URL and new line.
2996         (WebCore::Console::error): Call printToStandardOut.
2997         (WebCore::Console::info): Ditto.
2998         (WebCore::Console::log): Ditto.
2999         (WebCore::Console::assertCondition): Ditto.
3000         (WebCore::Console::warn): Ditto.
3001
3002 2008-05-20  Timothy Hatcher  <timothy@apple.com>
3003
3004         Changes to work with the new Profiler API. The Profile is now
3005         stored by the InspectorController when Console.profileEnd is called.
3006         This solves three issues with the previous design. First, we don't
3007         keep profiles around unless the Inspector is enabled. Second, we
3008         only show Profiles initiated by the Page in it's Inspector, not every
3009         Profile for the whole process. Third, we now show Profiles in the
3010         Inspector when they are created.
3011
3012         <rdar://problem/5951562> New profiles aren't added to the Inspector
3013         as they finish
3014
3015         Reviewed by Kevin McCullough.
3016
3017         * bindings/js/JSConsoleCustom.cpp:
3018         (WebCore::JSConsole::profileEnd): Added. Calls impl()->profileEnd()
3019         and passes the ExecState and arguments.
3020         * page/Console.cpp:
3021         (WebCore::Console::profile):
3022         (WebCore::Console::profileEnd): Accept the optional title argument
3023         and pass it to Profilier::stopProfiling along with the ExecState.
3024         Calls InspectorController::addProfile with the result Profile.
3025         * page/Console.h:
3026         * page/Console.idl: Made profileEnd Custom so we can get the ExecState.
3027         * page/InspectorController.cpp:
3028         (WebCore::profiles): Renamed from allProfiles. Uses the controller's
3029         profiles vector.
3030         (WebCore::InspectorController::addProfile): Appends to m_profiles.
3031         Calls addScriptProfile if the window is visible.
3032         (WebCore::InspectorController::windowScriptObjectAvailable): Renamed
3033         allProfiles to profiles.
3034         (WebCore::InspectorController::addScriptProfile): Calls addProfile on
3035         the JavaScript side.
3036         (WebCore::InspectorController::didCommitLoad): Clears m_profiles.
3037         * page/InspectorController.h:
3038         * page/inspector/ProfilesPanel.js: Populates the profiles sidebar the first
3039         time the panel is shown after a rest.
3040         * page/inspector/inspector.js: Added addProfile, calls ProfilesPanel's
3041         addProfile function.
3042
3043 2008-05-21  Alexey Proskuryakov  <ap@webkit.org>
3044
3045         Reviewed by Darin.
3046
3047         https://bugs.webkit.org/show_bug.cgi?id=19169
3048         <rdar://5952342> REGRESSION: nakarte.ru searches don't work
3049
3050         Test: http/tests/xmlhttprequest/encode-request-url.html
3051
3052         * platform/KURL.cpp: (WebCore::KURL::init): Don't allow UTF-8 encoded data to be implicitly
3053         converted to String, as it will be encoded again by parse().
3054
3055 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3056
3057         Reviewed by Simon.
3058
3059         For the Qt port, fix building with Qt for Embedded Linux.
3060
3061         * WebCore.pro:
3062
3063 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3064
3065         Reviewed by Simon.
3066
3067         For the Qt port, allow building without NPAPI plugin support.
3068
3069         * WebCore.pro:
3070         * plugins/PluginView.h:
3071
3072 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
3073
3074         Reviewed by Tim.
3075
3076         Added all of my personal manual tests for the profiler.
3077
3078         * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Added.
3079         * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Added.
3080         * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Added.
3081         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Added.
3082         * manual-tests/inspector/profiler-test-apply.html: Added.
3083         * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Added.
3084         * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Added.
3085         * manual-tests/inspector/profiler-test-call.html: Added.
3086         * manual-tests/inspector/profiler-test-dead-time.html: Added.
3087         * manual-tests/inspector/profiler-test-event-handler.html: Added.
3088         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Added.
3089         * manual-tests/inspector/profiler-test-inline-event-handler.html: Added.
3090         * manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html: Added.
3091         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Added.
3092         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Added.
3093         * manual-tests/inspector/profiler-test-multiple-frames.html: Added.
3094         * manual-tests/inspector/profiler-test-multiple-windows.html: Added.
3095         * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Added.
3096         * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Added.
3097         * manual-tests/inspector/profiler-test-no-execution-context.html: Added.
3098         * manual-tests/inspector/profiler-test-one-execution-context.html: Added.
3099         * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Added.
3100         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Added.
3101         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Added.
3102         * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Added.
3103         * manual-tests/inspector/profiler-test-two-execution-contexts.html: Added.
3104         * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Added.
3105         * manual-tests/inspector/resources: Added.
3106         * manual-tests/inspector/resources/other-frame.html: Added.
3107         * manual-tests/inspector/resources/other-window.html: Added.
3108         * manual-tests/inspector/resources/profiler-test-JS-resources.js: Added.
3109
3110 2008-05-20  Adam Roben  <aroben@apple.com>
3111
3112         Use KJS::List::getSlice instead of reimplementing it
3113
3114         Rubberstamped and suggested by Sam Weinig.
3115
3116         * bindings/js/JSConsoleCustom.cpp:
3117         (WebCore::JSConsole::assertCondition):
3118
3119 2008-05-20  Kevin Calhoun  <kcalhoun@apple.com>
3120
3121         Reviewed by Darin.
3122
3123         Fix <rdar://problem/5929010> Adopt new QTKit methods for <video> implementation
3124
3125         If the class QTVideoRendererWebKitOnly is present use it to render video,
3126         otherwise fall back to existing use of QTMovieView/QTMovieContentView.
3127
3128         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3129         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3130         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3131         (WebCore::MediaPlayerPrivate::createQTMovie):
3132         (WebCore::QTVideoRendererClass):
3133         (WebCore::MediaPlayerPrivate::detachQTMovieView):
3134         (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
3135         (WebCore::MediaPlayerPrivate::destroyQTVideoRenderer):
3136         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
3137         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
3138         (WebCore::MediaPlayerPrivate::load):
3139         (WebCore::MediaPlayerPrivate::cancelLoad):
3140         (WebCore::MediaPlayerPrivate::setVisible):
3141         (WebCore::MediaPlayerPrivate::paint):
3142         (-[WebCoreMovieObserver newImageAvailable:]):
3143
3144 2008-05-19  Adam Roben  <aroben@apple.com>
3145
3146         Fix Bug 19134: Inspector should support console.assert
3147
3148         <https://bugs.webkit.org/show_bug.cgi?id=19134>
3149
3150         Reviewed by Tim Hatcher.
3151
3152         Test: manual-tests/inspector/console-assert.html
3153
3154         * bindings/js/JSConsoleCustom.cpp:
3155         (WebCore::JSConsole::assertCondition): Added.
3156         * bindings/scripts/CodeGeneratorJS.pm: Added parsing of the
3157         ImplementationFunction extended attribute, which allows you to
3158         override the name of the C++ function used to implement this method.
3159         * manual-tests/inspector/console-assert.html: Added.
3160         * page/Console.cpp:
3161         (WebCore::Console::assertCondition): Added.
3162         * page/Console.h:
3163         * page/Console.idl: Added assert().
3164
3165 2008-05-20  Alice Liu  <alice.liu@apple.com>
3166
3167         Reviewed by Brady.
3168
3169         fix <rdar://problem/5908580> 10A58: Dictionary Panel hangs in WebCore::Cache::pruneDeadResources()
3170
3171         * loader/Cache.cpp:
3172         (WebCore::Cache::requestUserCSSStyleSheet):
3173         Add a call to resourceAccessed() to more closely mirror what is done in requestResource()
3174         (WebCore::Cache::insertInLRUList):
3175         Assert that any resource in the LRU list has been accessed.  This is early detection of a
3176         potential hang later when pruning resources, and also agrees with the early return in 
3177         removeFromLRUList().
3178
3179 2008-05-20  Dan Bernstein  <mitz@apple.com>
3180
3181         Reviewed by Darin Adler.
3182
3183         - fix https://bugs.webkit.org/show_bug.cgi?id=17655
3184           <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
3185
3186         Test: fast/dom/SelectorAPI/viewless-document.html
3187
3188         * css/CSSStyleSelector.cpp:
3189         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated to initialize the
3190         selector checker.
3191         (WebCore::CSSStyleSelector::init): Removed initialization of
3192         m_collectRulesOnly, which is now part of the selector checker.
3193         (WebCore::CSSStyleSelector::matchRules): Updated for renames and data
3194         moved into the selector checker.
3195         (WebCore::CSSStyleSelector::matchRulesForList): Ditto.
3196         (WebCore::CSSStyleSelector::initForStyleResolve): Added a PseudoId
3197         argument, which is used to initialize a data member of the selector
3198         checker. Updated for renames. Removed initialization of m_isXMLDoc
3199         because this bit is now initialized only once in the selector checker's
3200         constructor.
3201         (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added.
3202         (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Changed
3203         into a SelectorChecker method.
3204         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added. Used
3205         by querySelector() and querySelectorAll().
3206         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for data
3207         moved into the selector checker.
3208         (WebCore::CSSStyleSelector::matchUARules): Ditto.
3209         (WebCore::CSSStyleSelector::styleForElement):
3210         (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto. Also removed
3211         code that set the parentStyle variable after the last place it is
3212         accessed, and changed to ensure that m_style is set early in this
3213         function.
3214         (WebCore::CSSStyleSelector::adjustRenderStyle): Updated for data moved
3215         into the selector checker.
3216         (WebCore::CSSStyleSelector::styleRulesForElement): Ditto.
3217         (WebCore::CSSStyleSelector::checkSelector): Ditto. Also changed to pass
3218         the element's style and the parent style to the selector checker, as
3219         well as the dynamic pseudo variable and the selector attributes vector.
3220         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added
3221         arguments for the style of the base element and its parent. When the
3222         elementStyle argument is 0, the style is fetched from the element
3223         and its parent as needed. Also changed to take a reference to the
3224         dynamic pseudo ID and a pointer to the vector of attributes affecting
3225         the match.
3226         (WebCore::CSSStyleSelector::applyProperty): Updated for data moved
3227         into the selector checker.
3228         (WebCore::CSSStyleSelector::checkForGenericFamilyChange): Ditto.
3229         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
3230         (WebCore::CSSStyleSelector::fontSizeForKeyword): Ditto.
3231         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
3232         (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged):
3233         Changed into a SelectorChecker method.
3234         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
3235         Ditto.
3236
3237         * css/CSSStyleSelector.h:
3238         Added a SelectorChecker class and moved data and methods used in
3239         checking selectors into it.
3240         (WebCore::CSSStyleSelector::allVisitedStateChanged): Changed to call the
3241         SelectorChecker method.
3242         (WebCore::CSSStyleSelector::visitedStateChanged): Ditto.
3243         * dom/Node.cpp:
3244         (WebCore::Node::querySelector): Changed to use a SelectorChecker instead
3245         of the document's style selector.
3246         * dom/SelectorNodeList.cpp:
3247         (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
3248
3249 2008-05-20  Timothy Hatcher  <timothy@apple.com>
3250
3251         Implements the Profiles panel and Profile view.
3252
3253         Reviewed by Kevin McCullough.
3254
3255         * English.lproj/localizedStrings.js: Added new strings.
3256         * page/inspector/Images/profileIcon.png: Added.
3257         * page/inspector/Images/profilesIcon.png: Changed. New icon design
3258         that fits in with the other toolbar icons.
3259         * page/inspector/ProfileView.js:
3260         (WebInspector.ProfileView): Remove custom table elements
3261         and create a DataGrid. Sorts the profile by descending total time,
3262         since the profiles aren't sorted by default.
3263         (WebInspector.ProfileView.prototype.refresh): Clears the DataGrid
3264         and recreates all the nodes. The selection is preserved.
3265         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Traverse
3266         all the children and change showTotalTimeAsPercent and showSelfTimeAsPercent
3267         to match the ProfileView values. Then call refresh on the child.
3268         (WebInspector.ProfileView.prototype._sortData): Determine the sort
3269         function to call on the head profile node. Call it and then call
3270         refresh to rebuild the DataGrid.
3271         (WebInspector.ProfileView.prototype._mouseDownInDataGrid): Return early
3272         if the event is not a double-click. When it is a double-click, determine
3273         the column that was targeted and if it was total or self toggle the
3274         show as percent property. Call refreshShowAsPercents.
3275         (WebInspector.ProfileDataGridNode): 
3276         (WebInspector.ProfileDataGridNode.prototype.get data): 
3277         (WebInspector.ProfileDataGridNode.prototype.expand): 
3278         (WebInspector.ProfileDataGridNode.prototype.collapse): 
3279         (WebInspector.ProfileDataGridNode.prototype._populate): 
3280         * page/inspector/ProfilesPanel.js:
3281         (WebInspector.ProfilesPanel): 
3282         (WebInspector.ProfilesPanel.prototype.show): Populate the sidebar
3283         with all profiles. This is a workaround until the Inspector
3284         is told about new profiles.
3285         (WebInspector.ProfilesPanel.prototype.reset): Clear the sidebar and
3286         profile views.
3287         (WebInspector.ProfilesPanel.prototype.handleKeyEvent): Pass the key
3288         event to the sidebar.
3289         (WebInspector.ProfilesPanel.prototype.addProfile): Create a
3290         ProfileSidebarTreeElement object and add it to the sidebar.
3291         (WebInspector.ProfilesPanel.prototype.showProfile): Create a ProfileView
3292         and show it.
3293         (WebInspector.ProfilesPanel.prototype.closeVisibleView): Hide the
3294         visible view.
3295         (WebInspector.ProfilesPanel.prototype._startSidebarDragging): Call
3296         WebInspector.elementDragStart.
3297         (WebInspector.ProfilesPanel.prototype._sidebarDragging): Call _updateSidebarWidth.
3298         (WebInspector.ProfilesPanel.prototype._endSidebarDragging):
3299         Call WebInspector.elementDragEnd.
3300         (WebInspector.ProfilesPanel.prototype._updateSidebarWidth): Update the
3301         sidebar width based on the passed in value.
3302         (WebInspector.ProfileSidebarTreeElement): Subclass WebInspector.SidebarTreeElement.
3303         (WebInspector.ProfileSidebarTreeElement.prototype.onselect): Call ProfilesPanel.showProfile.
3304         (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): Return profile.title.
3305         (WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle): Do nothing.
3306         (WebInspector.ProfileSidebarTreeElement.prototype.get subtitle): Ditto.
3307         (WebInspector.ProfileSidebarTreeElement.prototype.set subtitle): Ditto.
3308         * page/inspector/inspector.css: New styles for the profile sidebar
3309         item and profile data grid columns.
3310         * page/inspector/inspector.js:
3311         * page/inspector/utilities.js:
3312         (Number.secondsToString): Added a higherResolution argument
3313         that returns fractional milliseconds.
3314
3315 2008-05-20  chris fleizach  <cfleizach@apple.com>
3316
3317         Reviewed by Darin Adler, Alice Liu
3318
3319         <rdar://problem/3438014> Might need accessibility solution for context menus in web pages
3320         <rdar://problem/5060458> Elements without AXActions should not return kAXErrorFailure
3321
3322         * page/AccessibilityObject.cpp:
3323         (WebCore::AccessibilityObject::clickPoint):
3324         * page/AccessibilityObject.h:
3325         * page/mac/AccessibilityObjectWrapper.mm:
3326         (-[AccessibilityObjectWrapper accessibilityActionNames]):
3327         (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
3328         (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
3329         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
3330         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
3331
3332 2008-05-20  Timothy Hatcher  <timothy@apple.com>
3333
3334         Expose the ProfileNode functionName sorting functions on
3335         JavaScriptProfileNode.
3336
3337         Reviewed by Kevin McCullough.
3338
3339         * page/JavaScriptProfileNode.cpp:
3340         (WebCore::sortFunctionNameDescending): Call ProfileNode.
3341         (WebCore::sortFunctionNameAscending): Ditto.
3342         (WebCore::ProfileNodeClass): Add static functions.
3343
3344 2008-05-20  Darin Adler  <darin@apple.com>
3345
3346         Reviewed by Mitz.
3347
3348         - a first small step of CSS DOM refactoring -- the eventual goal is to
3349           reduce StyleBase and possibly eliminate it, since it has multiple
3350           purposes and unneccessarily ties many classes together
3351
3352         * css/CSSCursorImageValue.cpp:
3353         (WebCore::isSVGCursorIdentifier): Mark static so it has internal linkage.
3354         (WebCore::resourceReferencedByCursorElement): Ditto.
3355         (WebCore::CSSCursorImageValue::CSSCursorImageValue): Removed unused style
3356         argument.
3357         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Removed code to
3358         check if X and Y changed before changing them -- there's no reason to do
3359         that. Removed code that depended on the internals of CSSImageValue. The
3360         new code uses only protected functions rather than going right at the
3361         fields and uing internal knowledge of the base class.
3362         * css/CSSCursorImageValue.h: Added a create function, made constructor
3363         private, removed unused style argument.
3364
3365         * css/CSSImageValue.cpp:
3366         (WebCore::CSSImageValue::CSSImageValue): Removed unused style argument.
3367         (WebCore::CSSImageValue::cachedImageURL): Added. A protected function for
3368         use by CSSCursorImageValue that gives the URL.
3369         (WebCore::CSSImageValue::clearCachedImage): Added. A protected function for
3370         use by CSSCursorImageValue that clears the CachedImage.
3371         * css/CSSImageValue.h: Added create functions, made constructors protected
3372         and private, removed unused style argument, made data members private, added
3373         some protected functions for use by CSSCursorImageValue.
3374
3375         * css/CSSImportRule.cpp:
3376         (WebCore::CSSImportRule::setCSSStyleSheet): Changed to call checkLoaded on
3377         the parent. This is part of preparation to move the checkLoaded function from
3378         StyleBase to StyleSheet.
3379         (WebCore::CSSImportRule::insertedIntoParent): Changed code to check the URL
3380         of the style sheet to use the href function of the style sheet rather than
3381         the baseURL function. This eliminates an O(n^2) algorithm here and reduces
3382         the use of baseURL, part of preparation to move it from StyleBase
3383         to CSSStyleSheet.
3384
3385         * css/CSSMutableStyleDeclaration.cpp:
3386         (WebCore::CSSMutableStyleDeclaration::setImageProperty): Changed to use create
3387         function instead of a direct call to new for the CSSImageValue classes.
3388         * css/CSSParser.cpp:
3389         (WebCore::CSSParser::parseValue): Ditto.
3390         (WebCore::CSSParser::parseContent): Ditto.
3391         (WebCore::CSSParser::parseFillImage): Ditto.
3392         (WebCore::CSSParser::parseBorderImage): Ditto.
3393
3394         * css/CSSStyleSelector.cpp: Removed unneeded include of CSSImageValue.h.
3395         * rendering/style/RenderStyle.h: Removed unneeded include of
3396         CSSCursorImageValue.h, which was causing us to rebuild the world way too often.
3397
3398         * xml/XSLImportRule.cpp:
3399         (WebCore::XSLImportRule::setXSLStyleSheet): See change to CSSImportRule above.
3400         (WebCore::XSLImportRule::loadSheet): Ditto.
3401
3402 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
3403
3404         Rubber stamped by Adam.
3405
3406         -Minor fix. Should not use a reference since the original may disappear.
3407
3408         * page/Console.cpp:
3409         (WebCore::Console::profile):
3410
3411 2008-05-20  Kevin Ollivier  <kevino@theolliviers.com>
3412
3413         wx build fix. userAgent should return a value.
3414
3415         * plugins/wx/PluginViewWx.cpp:
3416         (WebCore::PluginView::userAgent):
3417
3418 2008-05-19  Timothy Hatcher  <timothy@apple.com>
3419
3420         Expose the ProfileNode sorting functions on JavaScriptProfileNode.
3421
3422         Reviewed by Kevin McCullough.
3423
3424         * page/JavaScriptProfileNode.cpp:
3425         (WebCore::sortTotalTimeDescending): Call ProfileNode.
3426         (WebCore::sortTotalTimeAscending): Ditto.
3427         (WebCore::sortSelfTimeDescending): Ditto.
3428         (WebCore::sortSelfTimeAscending): Ditto.
3429         (WebCore::sortCallsDescending): Ditto.
3430         (WebCore::sortCallsAscending): Ditto.
3431         (WebCore::ProfileNodeClass): Add static functions.
3432
3433 2008-05-19  Timothy Hatcher  <timothy@apple.com>
3434
3435         * page/InspectorController.cpp: Change the include for
3436         JavaScriptProfile.h to sue double quotes instead of backets.
3437
3438 2008-05-19  Timothy Hatcher  <timothy@apple.com>
3439
3440         Adds a DataGrid object that is used for multi-column data
3441         and can contain hierarchical content with disclosure arrows.
3442         A lot of DataGrid was copied from treeoutline.js. This change
3443         makes the database views use the DataGrid. It will later be
3444         used by the ProfileView.
3445
3446         Reviewed by Adam Roben.
3447
3448         * page/inspector/DataGrid.js: Added. Most copied from treeoutline.js
3449         and modified to work with table elements.
3450         * page/inspector/DatabaseQueryView.js:
3451         (WebInspector.DatabaseQueryView.prototype._queryFinished):
3452         Call DatabasesPanel.dataGridForResult and adds the inline style to
3453         the DataGrid element.
3454         * page/inspector/DatabaseTableView.js:
3455         (WebInspector.DatabaseTableView.prototype._queryFinished):
3456         Call DatabasesPanel.dataGridForResult.
3457         * page/inspector/DatabasesPanel.js:
3458         (WebInspector.DatabasesPanel.prototype._tableForResult): Removed.
3459         (WebInspector.DatabasesPanel.prototype.dataGridForResult): Added.
3460         Similar to the previous _tableForResult function, but makes a DataGrid.
3461         * page/inspector/inspector.css: Changes to the data-grid
3462         style rules.
3463         * WebCore.vcproj/WebCore.vcproj: Add DataGrid.js.
3464         * page/inspector/WebKit.qrc: Ditto.
3465         * page/inspector/inspector.html: Ditto.
3466
3467 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
3468
3469         Reviewed by Adam.
3470
3471         -build fix.
3472
3473         * bindings/js/JSConsoleCustom.cpp:
3474         (WebCore::JSConsole::profile):
3475         * page/Console.cpp:
3476         (WebCore::Console::profile):
3477         * page/Console.h:
3478         * page/Console.idl:
3479
3480 2008-05-19  Alp Toker  <alp@nuanti.com>
3481
3482         Reviewed by Maciej.
3483
3484         GTK+/soup fixes:
3485
3486         Remove the fragment part of the URL since the file backend doesn't
3487         deal with it.
3488
3489         Fix a typo in the cleanup function.
3490
3491         * platform/network/soup/ResourceHandleSoup.cpp:
3492         (WebCore::cleanupGioOperation):
3493         (WebCore::ResourceHandle::startGio):
3494
3495 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
3496
3497         Reviewed by Adam.
3498
3499         <rdar://problem/5770054> JavaScript profiler (10928)
3500         - Send the executing context to the profiler so it can attribute time
3501         correctly to parent functions when calling profile() and profileEnd()
3502         while nested.
3503
3504         * page/Console.cpp:
3505         (WebCore::Console::profile):
3506         (WebCore::Console::profileEnd):
3507         * page/Console.h:
3508
3509 2008-05-19  Alp Toker  <alp@nuanti.com>
3510
3511         Reviewed by Anders and Beth.
3512
3513         http://bugs.webkit.org/show_bug.cgi?id=16495
3514         [GTK] Accessibility support with ATK/AT-SPI
3515
3516         Initial ATK/AT-SPI accessibility support for the GTK+ port.
3517
3518         * GNUmakefile.am:
3519         * page/AccessibilityObject.cpp:
3520         (WebCore::AccessibilityObject::AccessibilityObject):
3521         (WebCore::AccessibilityObject::detach):
3522         * page/AccessibilityObject.h:
3523         * page/gtk/AXObjectCacheAtk.cpp: Added.
3524         (WebCore::AXObjectCache::detachWrapper):
3525         (WebCore::AXObjectCache::attachWrapper):
3526         (WebCore::AXObjectCache::postNotification):
3527         (WebCore::AXObjectCache::postNotificationToElement):
3528         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
3529         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Added.
3530         (WebCore::):
3531         (WebCore::AccessibilityObject::wrapper):
3532         (WebCore::AccessibilityObject::setWrapper):
3533         * page/gtk/AccessibilityObjectWrapperAtk.h: Added.
3534