Re-word the "Attach Debugger" overlay to never say "Attach". The new
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2
3         Re-word the "Attach Debugger" overlay to never say "Attach". The new
4         wording is "Start Debugging". This makes the overlay consistent with
5         other wording used for starting the debugger. Also fixes the tooltips
6         for the Pause on Exceptions button.
7
8         Reviewed by Adam Roben and Dan Bernstein.
9
10         * English.lproj/localizedStrings.js: Adds new strings.
11         * page/inspector/ScriptsPanel.js: Changes the wording. Flips the
12         tooltips for the Pause on Exceptions buttons so the tooltip says
13         what will happen when the button is pressed.
14
15 2008-05-22  Timothy Hatcher  <timothy@apple.com>
16
17         Remove some non-functional elements from the Scripts panel
18         so they don't confuse users why they aren't working.
19
20         Reviewed by Adam Roben.
21
22         * page/inspector/ScriptsPanel.js: Removes the back/forward buttons
23         and the function menu.
24         * page/inspector/inspector.css: Make the files menu wider since there
25         is more room now.
26
27 2008-05-22  Timothy Hatcher  <timothy@apple.com>
28
29         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
30
31         Reviewed by Adam Roben.
32
33         * English.lproj/localizedStrings.js:
34         * WebCore.base.exp:
35         * page/InspectorController.cpp:
36         (WebCore::InspectorController::InspectorController):
37         (WebCore::InspectorController::inspect):
38         (WebCore::InspectorController::setWindowVisible):
39         (WebCore::InspectorController::showPanel):
40         (WebCore::InspectorController::startUserInitiatedProfiling):
41         (WebCore::InspectorController::stopUserInitiatedProfiling):
42         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
43         (WebCore::InspectorController::stopDebugging):
44         * page/InspectorController.h:
45         (WebCore::InspectorController::):
46         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
47         * page/inspector/ProfilesPanel.js:
48         * page/inspector/ScriptsPanel.js:
49         * page/inspector/inspector.js:
50
51 2008-05-22  Josh Aas  <joshmoz@gmail.com>
52
53         Reviewed by Anders.
54
55         <rdar://problem/5956429> 
56         https://bugs.webkit.org/show_bug.cgi?id=19192
57         remove NPNVpluginEventModel, fix example plugin
58         
59         Remove NPNVpluginEventModel enum variable.
60         
61         * bridge/npapi.h:
62
63 2008-05-22  Stephanie Lewis  <slewis@apple.com>
64
65         Reviewed by Dan.
66
67         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.
68
69         Test: fast/events/onunload-clears-onbeforeunload.html
70
71         * loader/FrameLoader.cpp:
72         (WebCore::FrameLoader::stopLoading):
73         * page/Frame.cpp:
74         (WebCore::Frame::shouldClose):
75
76 2008-05-22  Simon Hausmann  <hausmann@webkit.org>
77
78         Reviewed by Oliver.
79
80         Qt build fix.
81
82         * bindings/js/StringSourceProvider.h: Remove text at end of
83         preprocessor statement.
84         * bridge/qt/qt_instance.cpp:
85         (KJS::Bindings::QtRuntimeObjectImp::getConstructData): Replaced
86         implementsConstruct() with getConstructData().
87         (KJS::Bindings::QtInstance::getCallData): Replaced implementsCall with
88         getCallData().
89         (KJS::Bindings::QtInstance::invokeDefaultMethod): Use getCallData()
90         instead of implementsCall().
91         * bridge/qt/qt_instance.h:
92
93 2008-05-22  Adam Roben  <aroben@apple.com>
94
95         Massively speed up date-format-tofte with the debugger attached
96
97         On a debug Windows build (I know, hardly a good testcase) this patch
98         makes this test run 57.25x as fast.
99
100         Reviewed by Mark Rowe.
101
102         * page/inspector/ScriptsPanel.js:
103         (WebInspector.ScriptsPanel.prototype.reset): Clear the
104         _scriptsForURLsInFilesSelect object.
105         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Instead
106         of looping over all the options in the select to find the option we
107         want, get the script object from _scriptsForURLsInFilesSelect and get
108         the option element from the script object.
109         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use
110         _scriptsForURLsInFilesSelect to cache the script objects. Store the
111         option element for each script on the script object so we can quickly
112         retrieve it later.
113
114 2008-05-22  Adam Roben  <aroben@apple.com>
115
116         Remove some dead code from ScriptsPanel.js
117
118         Reviewed by Mark Rowe.
119
120         * page/inspector/ScriptsPanel.js:
121
122 2008-05-21  Adam Roben  <aroben@apple.com>
123
124         Fix Bug 19178: Inspector should support sorting resources by latency
125
126         <https://bugs.webkit.org/show_bug.cgi?id=19178>
127
128         I replaced "Sort by Time" with the following sorting options:
129           - Sort by Start Time
130           - Sort by Response Time
131           - Sort by End Time
132           - Sort by Duration
133           - Sort by Latency
134
135         You can no longer sort by Size when looking at the Time graph, and you
136         can't use any of the time-based sorting functions when looking at the
137         Size graph.
138
139         Reviewed by Tim Hatcher.
140
141         * page/inspector/Resource.js:
142         (WebInspector.Resource.prototype.get duration): Added.
143         (WebInspector.Resource.prototype.get latency): Added.
144         (WebInspector.Resource.CompareByStartTime): Added.
145         (WebInspector.Resource.CompareByResponseReceivedTime): Added.
146         (WebInspector.Resource.CompareByEndTime): Added.
147         (WebInspector.Resource.CompareByDuration): Added.
148         (WebInspector.Resource.CompareByLatency): Added.
149         * page/inspector/ResourcesPanel.js:
150         (WebInspector.ResourcesPanel):
151           - Each graph sidebar item now holds a list of sorting options
152           - Graph sidebar items no longer have a calculator property. This is
153             stored on the sorting options instead, to allow each kind of
154             sorting to have a different calculator.
155           - The sortingSelectElement starts out empty, and is populated in
156             _graphSelected
157           - The sortingFunction starts out uninitialized and is set as a
158             side-effect of _graphSelected.
159         (WebInspector.ResourcesPanel.prototype.set calculator): Don't do
160         anything if the calculator hasn't changed.
161         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
162         _lastSelectedGraphTreeElement property instead of getting the graph
163         element from the calculator.
164         (WebInspector.ResourcesPanel.prototype._graphSelected):
165           - Store the tree element in the _lastSelectedGraphTreeElement
166             property
167           - Popuplate sortingSelectElement with the sortingOptions and select
168             the option that was last selected
169         (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
170         our calculator from the sorting option.
171         (WebInspector.ResourceTimeCalculator): Renamed from
172         ResourceTransferTimeCalculator. Now takes a parameter to specify
173         whether the bars should all start at zero.
174         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages):
175         Take this.startAtZero into account.
176         (WebInspector.ResourceTimeCalculator.prototype.updateBoundries):
177         Abstracted the lower/upper bounds of a resource into methods.
178         (WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
179         (WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
180         (WebInspector.ResourceTransferTimeCalculator): Added. This is now a
181         subclass of ResourceTimeCalculator
182         (WebInspector.ResourceTransferDurationCalculator): Added.
183         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
184         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
185         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
186         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
187         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
188         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingSize):
189         Changed to call CompareBySize.
190
191 2008-05-21  Adam Roben  <aroben@apple.com>
192
193         Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are
194         wrong/missing
195
196         <https://bugs.webkit.org/show_bug.cgi?id=19173>
197
198         Reviewed by Tim Hatcher.
199
200         * manual-tests/inspector/debugger-status-bar-buttons-state.html:
201         Added.
202         * page/inspector/ScriptsPanel.js:
203         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call
204         _clearInterface (which updates the buttons' tool tips) after
205         attaching/detaching the debugger so that the buttons will reflect the
206         new state.
207         (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
208         Set the title of the pauseOnExceptionsButton, not the debuggingButton.
209
210 2008-05-20  Adam Roben  <aroben@apple.com>
211
212         Fix Bug 19153: Inspector should support console.debug
213
214         <https://bugs.webkit.org/show_bug.cgi?id=19153>
215         <rdar://problem/5950856>
216
217         Reviewed by Tim Hatcher.
218
219         Test: manual-tests/inspector/console-log-formatting.html
220
221         * bindings/js/JSConsoleCustom.cpp:
222         (WebCore::JSConsole::debug): Added.
223         * manual-tests/inspector/console-log-formatting.html: Changed to test
224         console.debug as well.
225         * page/Console.cpp:
226         (WebCore::Console::debug): Added. Just calls through to log().
227         * page/Console.h:
228         * page/Console.idl: Added debug() declaration.
229
230 2008-05-21  Kevin McCullough  <kmccullough@apple.com>
231
232         Reviewed by Adam.
233
234         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
235         profile node.
236         - Expose the Profile's 'focus' ability to WebCore and the WebInspector.
237
238         * page/JavaScriptProfile.cpp:
239         (WebCore::focus):
240         (WebCore::profileClass):
241
242 2008-05-21  Timothy Hatcher  <timothy@apple.com>
243
244         Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
245         since the parts the remain aren't useful.
246
247         * page/JavaScriptDebugServer.cpp:
248         (WebCore::JavaScriptDebugServer::sourceParsed):
249
250 2008-05-21  Beth Dakin  <bdakin@apple.com>
251
252         Reviewed by Anders.
253
254         Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash 
255         beneath ResourceHandle::setDefersLoading while running fast/loader/
256         simultaneous-reloads-assert.html (null CFURLConnection)
257
258         * platform/network/cf/ResourceHandleCFNet.cpp:
259         (WebCore::ResourceHandle::setDefersLoading): Added simple null-
260         check.
261
262 2008-05-21  Timothy Hatcher  <timothy@apple.com>
263
264         Adds the Request and Response headers to the Resource view.
265
266         <rdar://problem/5940782> REGRESSION: Resource Request and Response
267         headers aren't shown (18451)
268
269         Reviewed by Adam Roben.
270
271         * English.lproj/localizedStrings.js: Added new strings.
272         * css/view-source.css: Add comments to make sure a couple of
273         style rules stay in sync with inspector.css.
274         * page/inspector/Resource.js:
275         (WebInspector.Resource.prototype.set url): Dispatch an event when
276         this property changes.
277         (WebInspector.Resource.prototype.set requestHeaders): Ditto.
278         (WebInspector.Resource.prototype.set responseHeaders): Ditto.
279         * page/inspector/ResourceView.js:
280         (WebInspector.ResourceView): Add new elements for the headers
281         and a headers TreeOutline. Add event listeners for resource
282         property changes. Calls the three new refresh functions.
283         (WebInspector.ResourceView.prototype.set headersVisible): Implemented.
284         Toggles the headers-visible class name.
285         (WebInspector.ResourceView.prototype._refreshURL): Update the URL
286         tree element.
287         (WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
288         (WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
289         (WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
290         headers fromm the tree element. Loop throuh the headers and create new
291         tree elements and append them.
292         * page/inspector/ResourcesPanel.js:
293         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
294         on the visible view if it is implemented.
295         * page/inspector/SourceFrame.js:
296         (WebInspector.SourceFrame.prototype.get autoSizesToFitContentHeight):
297         (WebInspector.SourceFrame.prototype.set autoSizesToFitContentHeight):
298         (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
299         (WebInspector.SourceFrame.prototype._loaded): 
300         (WebInspector.SourceFrame.prototype._windowResized): 
301         * page/inspector/SourceView.js:
302         (WebInspector.SourceView): Move the SourceFrame creation so it is
303         available when headersVisible is set. Add a gutter element to fill
304         the vertical space no covered by the SourceFrame now.
305         (WebInspector.SourceView.prototype.set headersVisible): Set the
306         SourceFrame.autoSizesToFitContentHeight when this property changes.
307         (WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
308         when autoSizesToFitContentHeight is true. This happens when resizing the 
309         Resources sidebar.
310         * page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
311         and a comment to keep in sync with view-source.css. Adds other styles
312         for the headers area of resource-view.
313
314 2008-05-21  Sam Weinig  <sam@webkit.org>
315
316         Reviewed by Anders Carlsson.
317
318         <rdar://problem/5838772> Support cross-site XMLHttpRequest
319
320         - Implement support for cross-site GET requests using the HTTP header
321           Access-control mechanism.
322
323         Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html
324                http/tests/xmlhttprequest/access-control-basic-allow.html
325                http/tests/xmlhttprequest/access-control-basic-denied.html
326                http/tests/xmlhttprequest/access-control-basic-exclude.html
327
328         * xml/AccessControlList.cpp:
329         (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
330         * xml/AccessControlList.h:
331
332         * xml/AccessItem.cpp:
333         (WebCore::AccessItem::AccessItem):
334         (WebCore::AccessItem::matches):
335         * xml/AccessItem.h:
336         Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using
337         the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset
338         of the AccessItem match algorithm to be used, until the complete parsing of
339         the wildcards and optional pieces is complete. 
340
341         * xml/AccessItemRule.cpp:
342         (WebCore::matchesAny):
343         (WebCore::AccessItemRule::allowListMatchesAny):
344         (WebCore::AccessItemRule::excludeListMatchesAny):
345         * xml/AccessItemRule.h:
346         More of the implementation of the list check algorithm.  Check if any of the items
347         in the rule match the control origin.
348
349         * xml/XMLHttpRequest.cpp:
350         (WebCore::XMLHttpRequest::XMLHttpRequest):
351         (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore.
352         (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests.
353         (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for
354         cross-domain requests.  
355         (WebCore::XMLHttpRequest::loadRequestSynchronously):
356         (WebCore::XMLHttpRequest::processSyncLoadResults):
357         This can now throw an exception if a cross-domain request is denied by the access control
358         (WebCore::XMLHttpRequest::didFinishLoading):
359         Add support for cross-domain GET request.  ASSERT temporarily that the method is GET, since we
360         should have bailed out much earlier for non-GET methods.
361         (WebCore::XMLHttpRequest::willSendRequest):
362         (WebCore::XMLHttpRequest::didReceiveResponse):
363         Do the HTTP header access-control check as soon as the headers arrive.
364         * xml/XMLHttpRequest.h:
365
366 2008-05-21  Alp Toker  <alp@nuanti.com>
367
368         Rubber-stamped by Maciej.
369
370         Replace non-standard #pragma marks with comments to avoid compiler
371         warnings.
372
373         * page/InspectorController.cpp:
374
375 === End merge of squirrelfish ===
376
377 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
378
379         Reviewed by Tim Hatcher.
380
381         Merged with trunk WebCore's new debugger.
382
383         * page/InspectorController.cpp:
384         (WebCore::currentCallFrame): Updated to use the DebuggerCallFrame API.
385         (WebCore::InspectorController::pauseInDebugger): Updated for name change
386         explained below.
387         (WebCore::InspectorController::resumeDebugger): ditto
388         (WebCore::InspectorController::didParseSource): Fixed a bug that would
389         produce garbled text in some cases: Don't treat JS source as null-
390         terminated UTF8; it's UTF16.
391
392         * page/JavaScriptCallFrame.cpp:
393         * page/JavaScriptCallFrame.h: Changed this class to do all of its processing
394         through a JavaScriptCore DebuggerCallFrame. We have to copy the DebuggerCallFrame
395         because it's a temporary.
396         (WebCore::JavaScriptCallFrame::update): Added an API for updating a call
397         frame during execution: this is how we handle "with" and "eval".
398
399         * page/JavaScriptDebugServer.cpp: Separated "m_paused" from
400         "m_doneProcessingDebuggerEvents", because they have different semantics:
401         "m_paused" is the flag the debug server uses to indicate that new debugger
402         callbacks should be ignored, because they come from the debugger's own
403         JS code; "m_doneProcessingDebuggerEvents" is the flag the debugger UI
404         uses to indicate that it's done processing events, and would like execution
405         to continue. When these flags were one, the debugger would erroneously
406         process callbacks that ocurred while unwinding from its own JS code.
407
408         (WebCore::toPage): Removed some unnecessary NULL checking. Added some
409         missing NULL checking.
410         
411         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Changed pause tracking
412         to track a JavaScriptCallFrame instead of an ExecState, since ExecState
413         is no longer a unique identifier for a call frame.
414
415         I removed the updateCurrentCallFrame scheme, and replaced it with
416         individual tracking inside these callbacks:
417         
418         (WebCore::JavaScriptDebugServer::callEvent):
419         (WebCore::JavaScriptDebugServer::atStatement):
420         (WebCore::JavaScriptDebugServer::returnEvent):
421         (WebCore::JavaScriptDebugServer::exception):
422         
423         The updateCurrentCallFrame scheme was just too incompatible with the
424         squirrelfish execution model. Everything still works as before, except
425         for eval, which no longer shows up as an independent call frame. We'll
426         need to augment our debugger callbacks to bring back support for that.
427
428         * page/inspector/ScopeChainSidebarPane.js: Updated to use the activation
429         class's new name.
430
431 2008-05-21  Maciej Stachowiak  <mjs@apple.com>
432
433         Reviewed by Oliver.
434
435         - write directly to the slot we used to check for override properties, when possible
436         2.6% speedup on in-browser SunSpider
437
438         * bindings/js/JSDOMWindowCustom.h:
439         (WebCore::JSDOMWindow::customPut):
440
441 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
442
443         Reviewed by Oliver.
444
445         - inline JSDOMWindow security checks
446         0.9% speedup to SunSpider in-browser
447
448         * bindings/js/JSDOMWindowBase.cpp:
449         * bindings/js/JSDOMWindowCustom.h:
450         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
451         (WebCore::JSDOMWindowBase::allowsAccessFrom):
452         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
453         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
454         * bindings/js/kjs_binding.cpp:
455
456 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
457
458         Reviewed by Adam.
459
460         - use ALWAYS_INLINE on customGetOwnPropertySlot since it wasn't inlining
461         2% speedup to SunSpider in-browser
462
463         * bindings/js/JSDOMWindowCustom.h:
464         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
465
466 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
467
468         Reviewed by Adam.
469
470         - inline JSDOMWindow's customPut and customGetOwnPropertySlot methods
471         1.2% speedup to SunSpider in-browser
472         
473         The approach here is to make the code generator include a
474         JS{classname}Custom.h header in the autogenerated implementation,
475         which we can use to provide inline versions.
476
477         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
478         * bindings/js/JSCSSStyleDeclarationCustom.h: Added.
479         * bindings/js/JSDOMWindowCustom.cpp:
480         * bindings/js/JSDOMWindowCustom.h:
481         (WebCore::asJSDOMWindow):
482         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
483         (WebCore::JSDOMWindow::customPut):
484         * bindings/js/JSHTMLAppletElementCustom.cpp:
485         * bindings/js/JSHTMLAppletElementCustom.h: Added.
486         * bindings/js/JSHTMLEmbedElementCustom.cpp:
487         * bindings/js/JSHTMLEmbedElementCustom.h: Added.
488         * bindings/js/JSHTMLObjectElementCustom.cpp:
489         * bindings/js/JSHTMLObjectElementCustom.h: Added.
490         * bindings/js/JSHistoryCustom.cpp:
491         * bindings/js/JSHistoryCustom.h: Added.
492         * bindings/js/JSLocationCustom.cpp:
493         * bindings/js/JSLocationCustom.h: Added.
494         * bindings/js/JSStorageCustom.cpp:
495         * bindings/js/JSStorageCustom.h: Added.
496         * bindings/scripts/CodeGeneratorJS.pm:
497
498 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
499
500         Reviewed by Anders.
501
502         - inline asDOMWindow (using a new JSDOMWindowCustom.h header) since it is just a cast
503         1% speedup to SunSpider in-browser
504
505         * WebCore.vcproj/WebCore.vcproj:
506         * WebCore.xcodeproj/project.pbxproj:
507         * bindings/js/JSCustomVoidCallback.cpp:
508         * bindings/js/JSCustomXPathNSResolver.cpp:
509         * bindings/js/JSDOMApplicationCacheCustom.cpp:
510         * bindings/js/JSDOMWindowBase.cpp:
511         * bindings/js/JSDOMWindowBase.h:
512         * bindings/js/JSDOMWindowCustom.cpp:
513         * bindings/js/JSDOMWindowCustom.h: Added.
514         (WebCore::asJSDOMWindow):
515         * bindings/js/JSDatabaseCustom.cpp:
516         * bindings/js/JSDocumentCustom.cpp:
517         * bindings/js/JSLocationCustom.cpp:
518         * bindings/js/JSSQLTransactionCustom.cpp:
519         * bindings/js/JSXMLHttpRequestCustom.cpp:
520         * page/JavaScriptDebugServer.cpp:
521
522 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
523
524         Reviewed by Oliver.
525
526         - obtain current inner window of outer window in a more efficient way
527         1.6% speedup to SunSpider in-browser
528
529         * bindings/js/JSDOMWindowBase.cpp:
530         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
531
532 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
533
534         Reviewed by Adam.
535
536         - make impl() method for JSWindow inline
537         0.6% speedup to SunSpider in-browser
538
539         * WebCore.base.exp: Remove now-inline symbol
540         * bindings/scripts/CodeGeneratorJS.pm: Make the codegen script inline impl()
541         even for classes with a parent class.
542
543 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
544
545         Reviewed by Oliver Hunt.
546
547         Updated for API changes in KJS::Debugger.
548
549 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
550
551         Reviewed by Oliver Hunt.
552
553         Updated for API changes in KJS::Debugger.
554
555         * page/JavaScriptDebugServer.cpp:
556         (WebCore::JavaScriptDebugServer::callEvent):
557         (WebCore::JavaScriptDebugServer::atStatement):
558         (WebCore::JavaScriptDebugServer::returnEvent):
559         (WebCore::JavaScriptDebugServer::exception):
560         * page/JavaScriptDebugServer.h:
561
562 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
563
564         Reviewed by Oliver Hunt.
565         
566         Updated JavaScriptDebugServer API to accept a SourceProvider instead
567         of a UString, to avoid copying.
568
569         * page/JavaScriptDebugServer.cpp:
570         (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function
571         not to return a value.
572
573 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
574
575         Build fix.
576         
577         - add missing forwarding header
578
579         * ForwardingHeaders/kjs/SourceProvider.h: Added.
580
581 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
582
583         Reviewed by Oliver.
584
585         - JavaScriptGlue part of fix for: "SQUIRRELFISH: function toString broken after calling"
586         https://bugs.webkit.org/show_bug.cgi?id=18869
587
588         * bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String.
589         (WebCore::StringSourceProvider::create):
590         (WebCore::StringSourceProvider::getRange):
591         (WebCore::StringSourceProvider::data):
592         (WebCore::StringSourceProvider::length):
593         (WebCore::StringSourceProvider::StringSourceProvider):
594         * bindings/js/kjs_proxy.cpp:
595         (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to
596         evaluate() instead of UChar* / length.
597         * html/HTMLScriptElement.cpp:
598         (WebCore::HTMLScriptElement::text): Modified to return the
599         original string as-is when the script element contains only a
600         single text node, to avoid excess memory use.
601         
602         * WebCore.vcproj/WebCore.vcproj: Add new file to build.
603         * WebCore.xcodeproj/project.pbxproj: ditto
604
605 2008-05-09  Oliver Hunt  <oliver@apple.com>
606
607         Reviewed by Geoff.
608
609         Build fixes for SquirrelFish on windows.
610
611         * bindings/js/JSNavigatorCustom.cpp:
612
613 2008-05-08  Geoffrey Garen  <ggaren@apple.com>
614
615         Reviewed by Oliver Hunt.
616
617         Fixed platform/mac/plugins/bindings-test-objc.html.
618         
619         I've restored -[WebScriptObject setException] and
620         +[WebScriptObject throwException].
621         
622         Instead of mucking around in the JavaScript engine's execution state,
623         throwing an exception sets a global exception string, along with the
624         environment in which to throw it. An ObjC callback checks the global
625         exception string and, if it's non-nil and the environment matches the
626         current exceution environment, throws the global exception string as a
627         JS exception.
628
629         I also removed the old currentGlobalObject infrastructure: it's no longer
630         used.
631
632 2008-05-06  Oliver Hunt  <oliver@apple.com>
633
634         Reviewed by Maciej.
635
636         Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
637         Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>
638
639         This fixes function binding logic for the ObjC and NPRuntime by
640         replacing incorrect implementations of implementsCall (which is
641         no longer virtual) with implementations of getCallData.
642
643         * bindings/js/JSQuarantinedObjectWrapper.cpp:
644         (WebCore::JSQuarantinedObjectWrapper::getCallData):
645         * bindings/js/JSQuarantinedObjectWrapper.h:
646         * bridge/c/c_instance.cpp:
647         * bridge/c/c_instance.h:
648         * bridge/objc/objc_instance.h:
649         * bridge/objc/objc_instance.mm:
650         * bridge/objc/objc_runtime.h:
651         * bridge/objc/objc_runtime.mm:
652         (ObjcFallbackObjectImp::getCallData):
653         * bridge/runtime.h:
654         * bridge/runtime_object.cpp:
655         (RuntimeObjectImp::getCallData):
656         * bridge/runtime_object.h:
657
658 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
659
660         Build fix: supply a parameter that used to be implicit to
661         Interpreter::evaluate.
662
663 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
664
665         Build fix: #ifdef'd out some code that doesn't work anymore.
666
667         * bindings/objc/WebScriptObject.mm:
668         (+[WebScriptObject throwException:]):
669         (-[WebScriptObject setException:]):
670
671 2008-04-14  Gabor Loki  <loki@inf.u-szeged.hu>
672
673         Reviewed by Geoffrey Garen.
674
675         Bug 18489: Squirrelfish doesn't build on linux
676         <https://bugs.webkit.org/show_bug.cgi?id=18489>
677
678         * WebCore.pro: Add JavaScriptCore/VM into include path
679
680 2008-04-10  Sam Weinig  <sam@webkit.org>
681
682         Reviewed by Geoffrey Garen.
683
684         Adjusted WebCore JS functions to the new "getConstructData" calling convention.
685
686 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
687
688         Reviewed by Oliver Hunt.
689         
690         Adjusted WebCore JS functions to the new "getCallData" calling convention.
691
692 === Start merge of squirrelfish ===
693
694 2008-05-21  Anders Carlsson  <andersca@apple.com>
695
696         Reviewed by Mitz.
697
698         Add IconFetcher implementation.
699
700         * WebCore.base.exp:
701         * WebCore.xcodeproj/project.pbxproj:
702         * html/HTMLLinkElement.h:
703         (WebCore::HTMLLinkElement::isIcon):
704         * loader/icon/IconFetcher.cpp: Added.
705         (WebCore::IconLinkEntry::):
706         (WebCore::IconLinkEntry::IconLinkEntry):
707         (WebCore::IconLinkEntry::type):
708         (WebCore::IconLinkEntry::url):
709         (WebCore::IconLinkEntry::buffer):
710         (WebCore::parseIconLink):
711         (WebCore::IconFetcher::create):
712         (WebCore::IconFetcher::IconFetcher):
713         (WebCore::IconFetcher::~IconFetcher):
714         (WebCore::IconFetcher::cancel):
715         (WebCore::IconFetcher::createIcon):
716         (WebCore::IconFetcher::loadEntry):
717         (WebCore::IconFetcher::loadFailed):
718         (WebCore::IconFetcher::didReceiveResponse):
719         (WebCore::IconFetcher::didReceiveData):
720         (WebCore::IconFetcher::didFinishLoading):
721         (WebCore::IconFetcher::didFail):
722         * loader/icon/IconFetcher.h: Added.
723         (WebCore::IconFetcherClient::~IconFetcherClient):
724
725 2008-05-21  Dan Bernstein  <mitz@apple.com>
726
727         Reviewed by Dave Hyatt.
728
729         - fix https://bugs.webkit.org/show_bug.cgi?id=18352
730           <rdar://problem/5854517> crash loading malicious font
731
732         * platform/graphics/mac/SimpleFontDataMac.mm:
733         (WebCore::SimpleFontData::platformInit): In the case of a custom font,
734         there is no NSFont to base the fallback font on, so get a font based on
735         fallback family name alone.
736
737 2008-05-21  Timothy Hatcher  <timothy@apple.com>
738
739         Adds the files and line numbers to the Profile call tree.
740
741         <rdar://problem/5952924> Inspector needs to show file and line number
742         in the Profile call tree
743
744         Reviewed by Geoff Garen.
745
746         * page/JavaScriptProfileNode.cpp:
747         (WebCore::getFunctionName): Fixes a JSStringRef leak.
748         (WebCore::getURL): Call ProfileNode::url.
749         (WebCore::getLineNumber): Call ProfileNode::lineNumber.
750         (WebCore::ProfileNodeClass): Add the url and lineNumber properties.
751         * page/inspector/ProfileView.js:
752         (WebInspector.ProfileDataGridNode.prototype.createCell): Overload the
753         DataGridNode.createCell and add the file and lineNumber to the
754         cell if the column is the function column.
755         * page/inspector/inspector.css: New styles for the file and line.
756
757 2008-05-21  Timothy Hatcher  <timothy@apple.com>
758
759         Restores logging of console calls to the STDOUT
760         when Interpreter::shouldPrintExceptions() is true.
761
762         <rdar://problem/5636442> REGRESSION: Console.log no longer logs to
763         the system console or terminal
764
765         <rdar://problem/5146079> JavaScript exception logging should print
766         accurate file and line info when called from WebScriptObject
767
768         Reviewed by Adam Roben.
769
770         * bindings/js/JSCustomSQLStatementCallback.cpp:
771         (WebCore::JSCustomSQLStatementCallback::handleEvent): Remove existing
772         printf and check for Interpreter::shouldPrintExceptions() since there is
773         a call to Console::addMessage.
774         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
775         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): Ditto.
776         * bindings/js/JSCustomSQLTransactionCallback.cpp:
777         (WebCore::JSCustomSQLTransactionCallback::handleEvent): Ditto.
778         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
779         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Ditto.
780         * bindings/js/JSCustomVoidCallback.cpp:
781         (WebCore::JSCustomVoidCallback::handleEvent): Ditto.
782         * bindings/js/JSCustomXPathNSResolver.cpp:
783         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Ditto.
784         * bindings/js/JSDOMWindowBase.cpp:
785         (WebCore::JSDOMWindowBase::printErrorMessage): Ditto.
786         * bindings/js/ScheduledAction.cpp:
787         (WebCore::ScheduledAction::execute): Ditto.
788         * bindings/js/kjs_events.cpp:
789         (WebCore::JSAbstractEventListener::handleEvent): Ditto.
790         * loader/FrameLoader.cpp:
791         (WebCore::FrameLoader::shouldAllowNavigation): Ditto.
792         * bindings/objc/WebScriptObject.mm:
793         (WebCore::addExceptionToConsole): Added helper static function that
794         calls Console::addMessage.
795         (-[WebScriptObject callWebScriptMethod:withArguments:]): Call addExceptionToConsole.
796         (-[WebScriptObject evaluateWebScript:]): Ditto.
797         (-[WebScriptObject setValue:forKey:]): Ditto.
798         (-[WebScriptObject valueForKey:]): Ditto.
799         (-[WebScriptObject removeWebScriptKey:]): Ditto.
800         (-[WebScriptObject webScriptValueAtIndex:]): Ditto.
801         (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
802         * page/Console.cpp:
803         (WebCore::Console::addMessage): Print the level, message,
804         URL and line number to STDOUT.
805         (WebCore::printToStandardOut): Helper static function that
806         takes a prefix string, ExecState, an argument List and URL.
807         Prints the prefix and loops through the arguments calling
808         toString on each and printing the string. Finally printing
809         the URL and new line.
810         (WebCore::Console::error): Call printToStandardOut.
811         (WebCore::Console::info): Ditto.
812         (WebCore::Console::log): Ditto.
813         (WebCore::Console::assertCondition): Ditto.
814         (WebCore::Console::warn): Ditto.
815
816 2008-05-20  Timothy Hatcher  <timothy@apple.com>
817
818         Changes to work with the new Profiler API. The Profile is now
819         stored by the InspectorController when Console.profileEnd is called.
820         This solves three issues with the previous design. First, we don't
821         keep profiles around unless the Inspector is enabled. Second, we
822         only show Profiles initiated by the Page in it's Inspector, not every
823         Profile for the whole process. Third, we now show Profiles in the
824         Inspector when they are created.
825
826         <rdar://problem/5951562> New profiles aren't added to the Inspector
827         as they finish
828
829         Reviewed by Kevin McCullough.
830
831         * bindings/js/JSConsoleCustom.cpp:
832         (WebCore::JSConsole::profileEnd): Added. Calls impl()->profileEnd()
833         and passes the ExecState and arguments.
834         * page/Console.cpp:
835         (WebCore::Console::profile):
836         (WebCore::Console::profileEnd): Accept the optional title argument
837         and pass it to Profilier::stopProfiling along with the ExecState.
838         Calls InspectorController::addProfile with the result Profile.
839         * page/Console.h:
840         * page/Console.idl: Made profileEnd Custom so we can get the ExecState.
841         * page/InspectorController.cpp:
842         (WebCore::profiles): Renamed from allProfiles. Uses the controller's
843         profiles vector.
844         (WebCore::InspectorController::addProfile): Appends to m_profiles.
845         Calls addScriptProfile if the window is visible.
846         (WebCore::InspectorController::windowScriptObjectAvailable): Renamed
847         allProfiles to profiles.
848         (WebCore::InspectorController::addScriptProfile): Calls addProfile on
849         the JavaScript side.
850         (WebCore::InspectorController::didCommitLoad): Clears m_profiles.
851         * page/InspectorController.h:
852         * page/inspector/ProfilesPanel.js: Populates the profiles sidebar the first
853         time the panel is shown after a rest.
854         * page/inspector/inspector.js: Added addProfile, calls ProfilesPanel's
855         addProfile function.
856
857 2008-05-21  Alexey Proskuryakov  <ap@webkit.org>
858
859         Reviewed by Darin.
860
861         https://bugs.webkit.org/show_bug.cgi?id=19169
862         <rdar://5952342> REGRESSION: nakarte.ru searches don't work
863
864         Test: http/tests/xmlhttprequest/encode-request-url.html
865
866         * platform/KURL.cpp: (WebCore::KURL::init): Don't allow UTF-8 encoded data to be implicitly
867         converted to String, as it will be encoded again by parse().
868
869 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
870
871         Reviewed by Simon.
872
873         For the Qt port, fix building with Qt for Embedded Linux.
874
875         * WebCore.pro:
876
877 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
878
879         Reviewed by Simon.
880
881         For the Qt port, allow building without NPAPI plugin support.
882
883         * WebCore.pro:
884         * plugins/PluginView.h:
885
886 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
887
888         Reviewed by Tim.
889
890         Added all of my personal manual tests for the profiler.
891
892         * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Added.
893         * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Added.
894         * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Added.
895         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Added.
896         * manual-tests/inspector/profiler-test-apply.html: Added.
897         * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Added.
898         * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Added.
899         * manual-tests/inspector/profiler-test-call.html: Added.
900         * manual-tests/inspector/profiler-test-dead-time.html: Added.
901         * manual-tests/inspector/profiler-test-event-handler.html: Added.
902         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Added.
903         * manual-tests/inspector/profiler-test-inline-event-handler.html: Added.
904         * manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html: Added.
905         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Added.
906         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Added.
907         * manual-tests/inspector/profiler-test-multiple-frames.html: Added.
908         * manual-tests/inspector/profiler-test-multiple-windows.html: Added.
909         * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Added.
910         * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Added.
911         * manual-tests/inspector/profiler-test-no-execution-context.html: Added.
912         * manual-tests/inspector/profiler-test-one-execution-context.html: Added.
913         * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Added.
914         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Added.
915         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Added.
916         * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Added.
917         * manual-tests/inspector/profiler-test-two-execution-contexts.html: Added.
918         * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Added.
919         * manual-tests/inspector/resources: Added.
920         * manual-tests/inspector/resources/other-frame.html: Added.
921         * manual-tests/inspector/resources/other-window.html: Added.
922         * manual-tests/inspector/resources/profiler-test-JS-resources.js: Added.
923
924 2008-05-20  Adam Roben  <aroben@apple.com>
925
926         Use KJS::List::getSlice instead of reimplementing it
927
928         Rubberstamped and suggested by Sam Weinig.
929
930         * bindings/js/JSConsoleCustom.cpp:
931         (WebCore::JSConsole::assertCondition):
932
933 2008-05-20  Kevin Calhoun  <kcalhoun@apple.com>
934
935         Reviewed by Darin.
936
937         Fix <rdar://problem/5929010> Adopt new QTKit methods for <video> implementation
938
939         If the class QTVideoRendererWebKitOnly is present use it to render video,
940         otherwise fall back to existing use of QTMovieView/QTMovieContentView.
941
942         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
943         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
944         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
945         (WebCore::MediaPlayerPrivate::createQTMovie):
946         (WebCore::QTVideoRendererClass):
947         (WebCore::MediaPlayerPrivate::detachQTMovieView):
948         (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
949         (WebCore::MediaPlayerPrivate::destroyQTVideoRenderer):
950         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
951         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
952         (WebCore::MediaPlayerPrivate::load):
953         (WebCore::MediaPlayerPrivate::cancelLoad):
954         (WebCore::MediaPlayerPrivate::setVisible):
955         (WebCore::MediaPlayerPrivate::paint):
956         (-[WebCoreMovieObserver newImageAvailable:]):
957
958 2008-05-19  Adam Roben  <aroben@apple.com>
959
960         Fix Bug 19134: Inspector should support console.assert
961
962         <https://bugs.webkit.org/show_bug.cgi?id=19134>
963
964         Reviewed by Tim Hatcher.
965
966         Test: manual-tests/inspector/console-assert.html
967
968         * bindings/js/JSConsoleCustom.cpp:
969         (WebCore::JSConsole::assertCondition): Added.
970         * bindings/scripts/CodeGeneratorJS.pm: Added parsing of the
971         ImplementationFunction extended attribute, which allows you to
972         override the name of the C++ function used to implement this method.
973         * manual-tests/inspector/console-assert.html: Added.
974         * page/Console.cpp:
975         (WebCore::Console::assertCondition): Added.
976         * page/Console.h:
977         * page/Console.idl: Added assert().
978
979 2008-05-20  Alice Liu  <alice.liu@apple.com>
980
981         Reviewed by Brady.
982
983         fix <rdar://problem/5908580> 10A58: Dictionary Panel hangs in WebCore::Cache::pruneDeadResources()
984
985         * loader/Cache.cpp:
986         (WebCore::Cache::requestUserCSSStyleSheet):
987         Add a call to resourceAccessed() to more closely mirror what is done in requestResource()
988         (WebCore::Cache::insertInLRUList):
989         Assert that any resource in the LRU list has been accessed.  This is early detection of a
990         potential hang later when pruning resources, and also agrees with the early return in 
991         removeFromLRUList().
992
993 2008-05-20  Dan Bernstein  <mitz@apple.com>
994
995         Reviewed by Darin Adler.
996
997         - fix https://bugs.webkit.org/show_bug.cgi?id=17655
998           <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
999
1000         Test: fast/dom/SelectorAPI/viewless-document.html
1001
1002         * css/CSSStyleSelector.cpp:
1003         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated to initialize the
1004         selector checker.
1005         (WebCore::CSSStyleSelector::init): Removed initialization of
1006         m_collectRulesOnly, which is now part of the selector checker.
1007         (WebCore::CSSStyleSelector::matchRules): Updated for renames and data
1008         moved into the selector checker.
1009         (WebCore::CSSStyleSelector::matchRulesForList): Ditto.
1010         (WebCore::CSSStyleSelector::initForStyleResolve): Added a PseudoId
1011         argument, which is used to initialize a data member of the selector
1012         checker. Updated for renames. Removed initialization of m_isXMLDoc
1013         because this bit is now initialized only once in the selector checker's
1014         constructor.
1015         (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added.
1016         (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Changed
1017         into a SelectorChecker method.
1018         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added. Used
1019         by querySelector() and querySelectorAll().
1020         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for data
1021         moved into the selector checker.
1022         (WebCore::CSSStyleSelector::matchUARules): Ditto.
1023         (WebCore::CSSStyleSelector::styleForElement):
1024         (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto. Also removed
1025         code that set the parentStyle variable after the last place it is
1026         accessed, and changed to ensure that m_style is set early in this
1027         function.
1028         (WebCore::CSSStyleSelector::adjustRenderStyle): Updated for data moved
1029         into the selector checker.
1030         (WebCore::CSSStyleSelector::styleRulesForElement): Ditto.
1031         (WebCore::CSSStyleSelector::checkSelector): Ditto. Also changed to pass
1032         the element's style and the parent style to the selector checker, as
1033         well as the dynamic pseudo variable and the selector attributes vector.
1034         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added
1035         arguments for the style of the base element and its parent. When the
1036         elementStyle argument is 0, the style is fetched from the element
1037         and its parent as needed. Also changed to take a reference to the
1038         dynamic pseudo ID and a pointer to the vector of attributes affecting
1039         the match.
1040         (WebCore::CSSStyleSelector::applyProperty): Updated for data moved
1041         into the selector checker.
1042         (WebCore::CSSStyleSelector::checkForGenericFamilyChange): Ditto.
1043         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
1044         (WebCore::CSSStyleSelector::fontSizeForKeyword): Ditto.
1045         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
1046         (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged):
1047         Changed into a SelectorChecker method.
1048         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
1049         Ditto.
1050
1051         * css/CSSStyleSelector.h:
1052         Added a SelectorChecker class and moved data and methods used in
1053         checking selectors into it.
1054         (WebCore::CSSStyleSelector::allVisitedStateChanged): Changed to call the
1055         SelectorChecker method.
1056         (WebCore::CSSStyleSelector::visitedStateChanged): Ditto.
1057         * dom/Node.cpp:
1058         (WebCore::Node::querySelector): Changed to use a SelectorChecker instead
1059         of the document's style selector.
1060         * dom/SelectorNodeList.cpp:
1061         (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
1062
1063 2008-05-20  Timothy Hatcher  <timothy@apple.com>
1064
1065         Implements the Profiles panel and Profile view.
1066
1067         Reviewed by Kevin McCullough.
1068
1069         * English.lproj/localizedStrings.js: Added new strings.
1070         * page/inspector/Images/profileIcon.png: Added.
1071         * page/inspector/Images/profilesIcon.png: Changed. New icon design
1072         that fits in with the other toolbar icons.
1073         * page/inspector/ProfileView.js:
1074         (WebInspector.ProfileView): Remove custom table elements
1075         and create a DataGrid. Sorts the profile by descending total time,
1076         since the profiles aren't sorted by default.
1077         (WebInspector.ProfileView.prototype.refresh): Clears the DataGrid
1078         and recreates all the nodes. The selection is preserved.
1079         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Traverse
1080         all the children and change showTotalTimeAsPercent and showSelfTimeAsPercent
1081         to match the ProfileView values. Then call refresh on the child.
1082         (WebInspector.ProfileView.prototype._sortData): Determine the sort
1083         function to call on the head profile node. Call it and then call
1084         refresh to rebuild the DataGrid.
1085         (WebInspector.ProfileView.prototype._mouseDownInDataGrid): Return early
1086         if the event is not a double-click. When it is a double-click, determine
1087         the column that was targeted and if it was total or self toggle the
1088         show as percent property. Call refreshShowAsPercents.
1089         (WebInspector.ProfileDataGridNode): 
1090         (WebInspector.ProfileDataGridNode.prototype.get data): 
1091         (WebInspector.ProfileDataGridNode.prototype.expand): 
1092         (WebInspector.ProfileDataGridNode.prototype.collapse): 
1093         (WebInspector.ProfileDataGridNode.prototype._populate): 
1094         * page/inspector/ProfilesPanel.js:
1095         (WebInspector.ProfilesPanel): 
1096         (WebInspector.ProfilesPanel.prototype.show): Populate the sidebar
1097         with all profiles. This is a workaround until the Inspector
1098         is told about new profiles.
1099         (WebInspector.ProfilesPanel.prototype.reset): Clear the sidebar and
1100         profile views.
1101         (WebInspector.ProfilesPanel.prototype.handleKeyEvent): Pass the key
1102         event to the sidebar.
1103         (WebInspector.ProfilesPanel.prototype.addProfile): Create a
1104         ProfileSidebarTreeElement object and add it to the sidebar.
1105         (WebInspector.ProfilesPanel.prototype.showProfile): Create a ProfileView
1106         and show it.
1107         (WebInspector.ProfilesPanel.prototype.closeVisibleView): Hide the
1108         visible view.
1109         (WebInspector.ProfilesPanel.prototype._startSidebarDragging): Call
1110         WebInspector.elementDragStart.
1111         (WebInspector.ProfilesPanel.prototype._sidebarDragging): Call _updateSidebarWidth.
1112         (WebInspector.ProfilesPanel.prototype._endSidebarDragging):
1113         Call WebInspector.elementDragEnd.
1114         (WebInspector.ProfilesPanel.prototype._updateSidebarWidth): Update the
1115         sidebar width based on the passed in value.
1116         (WebInspector.ProfileSidebarTreeElement): Subclass WebInspector.SidebarTreeElement.
1117         (WebInspector.ProfileSidebarTreeElement.prototype.onselect): Call ProfilesPanel.showProfile.
1118         (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): Return profile.title.
1119         (WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle): Do nothing.
1120         (WebInspector.ProfileSidebarTreeElement.prototype.get subtitle): Ditto.
1121         (WebInspector.ProfileSidebarTreeElement.prototype.set subtitle): Ditto.
1122         * page/inspector/inspector.css: New styles for the profile sidebar
1123         item and profile data grid columns.
1124         * page/inspector/inspector.js:
1125         * page/inspector/utilities.js:
1126         (Number.secondsToString): Added a higherResolution argument
1127         that returns fractional milliseconds.
1128
1129 2008-05-20  chris fleizach  <cfleizach@apple.com>
1130
1131         Reviewed by Darin Adler, Alice Liu
1132
1133         <rdar://problem/3438014> Might need accessibility solution for context menus in web pages
1134         <rdar://problem/5060458> Elements without AXActions should not return kAXErrorFailure
1135
1136         * page/AccessibilityObject.cpp:
1137         (WebCore::AccessibilityObject::clickPoint):
1138         * page/AccessibilityObject.h:
1139         * page/mac/AccessibilityObjectWrapper.mm:
1140         (-[AccessibilityObjectWrapper accessibilityActionNames]):
1141         (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
1142         (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
1143         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
1144         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
1145
1146 2008-05-20  Timothy Hatcher  <timothy@apple.com>
1147
1148         Expose the ProfileNode functionName sorting functions on
1149         JavaScriptProfileNode.
1150
1151         Reviewed by Kevin McCullough.
1152
1153         * page/JavaScriptProfileNode.cpp:
1154         (WebCore::sortFunctionNameDescending): Call ProfileNode.
1155         (WebCore::sortFunctionNameAscending): Ditto.
1156         (WebCore::ProfileNodeClass): Add static functions.
1157
1158 2008-05-20  Darin Adler  <darin@apple.com>
1159
1160         Reviewed by Mitz.
1161
1162         - a first small step of CSS DOM refactoring -- the eventual goal is to
1163           reduce StyleBase and possibly eliminate it, since it has multiple
1164           purposes and unneccessarily ties many classes together
1165
1166         * css/CSSCursorImageValue.cpp:
1167         (WebCore::isSVGCursorIdentifier): Mark static so it has internal linkage.
1168         (WebCore::resourceReferencedByCursorElement): Ditto.
1169         (WebCore::CSSCursorImageValue::CSSCursorImageValue): Removed unused style
1170         argument.
1171         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Removed code to
1172         check if X and Y changed before changing them -- there's no reason to do
1173         that. Removed code that depended on the internals of CSSImageValue. The
1174         new code uses only protected functions rather than going right at the
1175         fields and uing internal knowledge of the base class.
1176         * css/CSSCursorImageValue.h: Added a create function, made constructor
1177         private, removed unused style argument.
1178
1179         * css/CSSImageValue.cpp:
1180         (WebCore::CSSImageValue::CSSImageValue): Removed unused style argument.
1181         (WebCore::CSSImageValue::cachedImageURL): Added. A protected function for
1182         use by CSSCursorImageValue that gives the URL.
1183         (WebCore::CSSImageValue::clearCachedImage): Added. A protected function for
1184         use by CSSCursorImageValue that clears the CachedImage.
1185         * css/CSSImageValue.h: Added create functions, made constructors protected
1186         and private, removed unused style argument, made data members private, added
1187         some protected functions for use by CSSCursorImageValue.
1188
1189         * css/CSSImportRule.cpp:
1190         (WebCore::CSSImportRule::setCSSStyleSheet): Changed to call checkLoaded on
1191         the parent. This is part of preparation to move the checkLoaded function from
1192         StyleBase to StyleSheet.
1193         (WebCore::CSSImportRule::insertedIntoParent): Changed code to check the URL
1194         of the style sheet to use the href function of the style sheet rather than
1195         the baseURL function. This eliminates an O(n^2) algorithm here and reduces
1196         the use of baseURL, part of preparation to move it from StyleBase
1197         to CSSStyleSheet.
1198
1199         * css/CSSMutableStyleDeclaration.cpp:
1200         (WebCore::CSSMutableStyleDeclaration::setImageProperty): Changed to use create
1201         function instead of a direct call to new for the CSSImageValue classes.
1202         * css/CSSParser.cpp:
1203         (WebCore::CSSParser::parseValue): Ditto.
1204         (WebCore::CSSParser::parseContent): Ditto.
1205         (WebCore::CSSParser::parseFillImage): Ditto.
1206         (WebCore::CSSParser::parseBorderImage): Ditto.
1207
1208         * css/CSSStyleSelector.cpp: Removed unneeded include of CSSImageValue.h.
1209         * rendering/style/RenderStyle.h: Removed unneeded include of
1210         CSSCursorImageValue.h, which was causing us to rebuild the world way too often.
1211
1212         * xml/XSLImportRule.cpp:
1213         (WebCore::XSLImportRule::setXSLStyleSheet): See change to CSSImportRule above.
1214         (WebCore::XSLImportRule::loadSheet): Ditto.
1215
1216 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
1217
1218         Rubber stamped by Adam.
1219
1220         -Minor fix. Should not use a reference since the original may disappear.
1221
1222         * page/Console.cpp:
1223         (WebCore::Console::profile):
1224
1225 2008-05-20  Kevin Ollivier  <kevino@theolliviers.com>
1226
1227         wx build fix. userAgent should return a value.
1228
1229         * plugins/wx/PluginViewWx.cpp:
1230         (WebCore::PluginView::userAgent):
1231
1232 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1233
1234         Expose the ProfileNode sorting functions on JavaScriptProfileNode.
1235
1236         Reviewed by Kevin McCullough.
1237
1238         * page/JavaScriptProfileNode.cpp:
1239         (WebCore::sortTotalTimeDescending): Call ProfileNode.
1240         (WebCore::sortTotalTimeAscending): Ditto.
1241         (WebCore::sortSelfTimeDescending): Ditto.
1242         (WebCore::sortSelfTimeAscending): Ditto.
1243         (WebCore::sortCallsDescending): Ditto.
1244         (WebCore::sortCallsAscending): Ditto.
1245         (WebCore::ProfileNodeClass): Add static functions.
1246
1247 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1248
1249         * page/InspectorController.cpp: Change the include for
1250         JavaScriptProfile.h to sue double quotes instead of backets.
1251
1252 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1253
1254         Adds a DataGrid object that is used for multi-column data
1255         and can contain hierarchical content with disclosure arrows.
1256         A lot of DataGrid was copied from treeoutline.js. This change
1257         makes the database views use the DataGrid. It will later be
1258         used by the ProfileView.
1259
1260         Reviewed by Adam Roben.
1261
1262         * page/inspector/DataGrid.js: Added. Most copied from treeoutline.js
1263         and modified to work with table elements.
1264         * page/inspector/DatabaseQueryView.js:
1265         (WebInspector.DatabaseQueryView.prototype._queryFinished):
1266         Call DatabasesPanel.dataGridForResult and adds the inline style to
1267         the DataGrid element.
1268         * page/inspector/DatabaseTableView.js:
1269         (WebInspector.DatabaseTableView.prototype._queryFinished):
1270         Call DatabasesPanel.dataGridForResult.
1271         * page/inspector/DatabasesPanel.js:
1272         (WebInspector.DatabasesPanel.prototype._tableForResult): Removed.
1273         (WebInspector.DatabasesPanel.prototype.dataGridForResult): Added.
1274         Similar to the previous _tableForResult function, but makes a DataGrid.
1275         * page/inspector/inspector.css: Changes to the data-grid
1276         style rules.
1277         * WebCore.vcproj/WebCore.vcproj: Add DataGrid.js.
1278         * page/inspector/WebKit.qrc: Ditto.
1279         * page/inspector/inspector.html: Ditto.
1280
1281 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
1282
1283         Reviewed by Adam.
1284
1285         -build fix.
1286
1287         * bindings/js/JSConsoleCustom.cpp:
1288         (WebCore::JSConsole::profile):
1289         * page/Console.cpp:
1290         (WebCore::Console::profile):
1291         * page/Console.h:
1292         * page/Console.idl:
1293
1294 2008-05-19  Alp Toker  <alp@nuanti.com>
1295
1296         Reviewed by Maciej.
1297
1298         GTK+/soup fixes:
1299
1300         Remove the fragment part of the URL since the file backend doesn't
1301         deal with it.
1302
1303         Fix a typo in the cleanup function.
1304
1305         * platform/network/soup/ResourceHandleSoup.cpp:
1306         (WebCore::cleanupGioOperation):
1307         (WebCore::ResourceHandle::startGio):
1308
1309 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
1310
1311         Reviewed by Adam.
1312
1313         <rdar://problem/5770054> JavaScript profiler (10928)
1314         - Send the executing context to the profiler so it can attribute time
1315         correctly to parent functions when calling profile() and profileEnd()
1316         while nested.
1317
1318         * page/Console.cpp:
1319         (WebCore::Console::profile):
1320         (WebCore::Console::profileEnd):
1321         * page/Console.h:
1322
1323 2008-05-19  Alp Toker  <alp@nuanti.com>
1324
1325         Reviewed by Anders and Beth.
1326
1327         http://bugs.webkit.org/show_bug.cgi?id=16495
1328         [GTK] Accessibility support with ATK/AT-SPI
1329
1330         Initial ATK/AT-SPI accessibility support for the GTK+ port.
1331
1332         * GNUmakefile.am:
1333         * page/AccessibilityObject.cpp:
1334         (WebCore::AccessibilityObject::AccessibilityObject):
1335         (WebCore::AccessibilityObject::detach):
1336         * page/AccessibilityObject.h:
1337         * page/gtk/AXObjectCacheAtk.cpp: Added.
1338         (WebCore::AXObjectCache::detachWrapper):
1339         (WebCore::AXObjectCache::attachWrapper):
1340         (WebCore::AXObjectCache::postNotification):
1341         (WebCore::AXObjectCache::postNotificationToElement):
1342         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
1343         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Added.
1344         (WebCore::):
1345         (WebCore::AccessibilityObject::wrapper):
1346         (WebCore::AccessibilityObject::setWrapper):
1347         * page/gtk/AccessibilityObjectWrapperAtk.h: Added.
1348
1349 2008-05-19  Anders Carlsson  <andersca@apple.com>
1350
1351         Reviewed by Adam.
1352
1353         <rdar://problem/5946454>
1354         Support navigator.onLine from HTML5.
1355
1356         Add Windows NetworkStateNotifier implementation using the IP Helper API.
1357
1358         * WebCore.vcproj/WebCore.vcproj:
1359         * platform/network/NetworkStateNotifier.h:
1360         (WebCore::updateState):
1361         * platform/network/win/NetworkStateNotifierWin.cpp: Added.
1362         (WebCore::NetworkStateNotifier::updateState):
1363         (WebCore::NetworkStateNotifier::addressChanged):
1364         (WebCore::NetworkStateNotifier::callAddressChanged):
1365         (WebCore::NetworkStateNotifier::addrChangeCallback):
1366         (WebCore::NetworkStateNotifier::registerForAddressChange):
1367         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1368
1369 2008-05-19  Steve Falkenburg  <sfalken@apple.com>
1370
1371         Disable C4273, C4565 for CSSGrammar.cpp, XPathGrammar.cpp to fix build.
1372         
1373         Reviewed by Adam Roben.
1374
1375         * WebCore.vcproj/WebCore.vcproj:
1376
1377 2008-05-19  Adam Roben  <aroben@apple.com>
1378
1379         Fix Bug 19065: Resources with a space in their URL don't get
1380         error/warning bubbles
1381
1382         <https://bugs.webkit.org/show_bug.cgi?id=19065>
1383
1384         Reviewed by Dan Bernstein.
1385
1386         Test: manual-tests/inspector/errors-with-space in-url.html
1387
1388         * manual-tests/inspector/errors-with-space in-url.html: Added.
1389         * page/Console.cpp:
1390         (WebCore::Console::error):
1391         (WebCore::Console::info):
1392         (WebCore::Console::log):
1393         (WebCore::Console::warn):
1394         Pass the raw URL to the Inspector, not the pretty URL, to match the
1395         URL that was used when initially telling the Inspector about this
1396         resource. We continue to pass the pretty URL to the ChromeClient for
1397         backwards compatibility.
1398
1399 2008-05-19  Stephanie Lewis  <slewis@apple.com>
1400
1401         Reviewed by Darin.
1402
1403         more fast teardown performance work, WebCore plumbing
1404
1405         * page/Chrome.cpp:
1406         (WebCore::Chrome::disableSuddenTermination):
1407         (WebCore::Chrome::enableSuddenTermination):
1408         (WebCore::ChromeClient::disableSuddenTermination):
1409         (WebCore::ChromeClient::enableSuddenTermination):
1410         * page/Chrome.h:
1411         * page/ChromeClient.h:
1412         * page/Page.cpp:
1413         (WebCore::Page::changePendingUnloadEventCount):
1414         (WebCore::Page::changePendingBeforeUnloadEventCount):
1415
1416 2008-05-19  Kuchhal  <kuchal@yahoo.com>
1417
1418         Reviewed by Justin.
1419
1420         <rdar://problem/5863412> Crash when Ctrl C is pressed after a series of specific mouse events (18506)
1421
1422         * editing/markup.cpp:
1423         (WebCore::createMarkup): Null check.
1424
1425 2008-05-19  Chris Fleizach  <cfleizach@apple.com>
1426
1427         Reviewed by Beth Dakin.
1428
1429         <rdar://problem/5912195> CrashTracer: [USER] 1 crash in Mail at -[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]
1430
1431         * page/mac/AccessibilityObjectWrapper.mm:
1432         (visiblePositionForTextMarker):
1433
1434 2008-05-19  Ada Chan  <adachan@apple.com>
1435
1436         Added CookieStorageWin.h/cpp, introducing methods to get/set the current CFHTTPCookieStorageRef.
1437         When setting cookies-related attributes in CFURLRequest, make sure we get them from the
1438         current CFHTTPCookieStorageRef.  Also, set the cookie storage in CFURLRequest.
1439
1440         Reviewed by Steve Falkenburg.
1441
1442         * WebCore.vcproj/WebCore.vcproj:
1443         * platform/network/cf/ResourceHandleCFNet.cpp:
1444         (WebCore::makeFinalRequest):
1445         * platform/network/cf/ResourceRequestCFNet.cpp:
1446         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1447         * platform/network/win/CookieJarCFNetWin.cpp:
1448         (WebCore::setCookies):
1449         (WebCore::cookies):
1450         (WebCore::cookiesEnabled):
1451         * platform/network/win/CookieStorageWin.cpp: Added.
1452         (WebCore::currentCookieStorage):
1453         (WebCore::setCurrentCookieStorage):
1454         * platform/network/win/CookieStorageWin.h: Added.
1455
1456 2008-05-19  Alexey Proskuryakov  <ap@webkit.org>
1457
1458         Reviewed by Darin.
1459
1460         http://bugs.webkit.org/show_bug.cgi?id=18308
1461         SVG Encoding error with fill attribute
1462
1463         This is caused by problems with data: URL loading. Besides what is fixed by this patch,
1464         I filed <rdar://problem/5845875> for CFNetwork.
1465
1466         While at it, fixed a related javascript: URL issue.
1467
1468         Tests: fast/loader/data-url-encoding-html.html
1469                fast/loader/data-url-encoding-svg.html
1470                fast/loader/javascript-url-encoding.html
1471
1472         * platform/KURL.cpp:
1473         (WebCore::KURL::parse): Fix a FIXME, use UTF-8 instead of dropping high bytes. This fixes
1474         javascript: URL handling.
1475         (WebCore::encodeRelativeString): Like mailto: URLs, data: ones are all UTF-8. Restructured
1476         the code to not search for "#" if both parts are to be encoded as UTF-8 anyway.
1477
1478 2008-05-19  Alexey Proskuryakov  <ap@webkit.org>
1479
1480         Reviewed by Darin.
1481
1482         https://bugs.webkit.org/show_bug.cgi?id=18421
1483         <rdar://problem/5857369> XMLHttpRequest does not properly encode & and < in outgoing messages
1484
1485         Test: http/tests/xmlhttprequest/serialize-document.html
1486
1487         * bindings/js/JSXMLHttpRequestCustom.cpp:
1488         (WebCore::JSXMLHttpRequest::send): Use createMarkup() instead of Document::toString().
1489
1490         * dom/Attr.cpp:
1491         * dom/Attr.h:
1492         * dom/Document.cpp:
1493         * dom/Document.h:
1494         * dom/DocumentFragment.cpp:
1495         * dom/DocumentFragment.h:
1496         * dom/Element.cpp:
1497         * dom/Element.h:
1498         * dom/Entity.cpp:
1499         * dom/Entity.h:
1500         * dom/EntityReference.cpp:
1501         * dom/EntityReference.h:
1502         * dom/Node.h:
1503         * dom/Text.cpp:
1504         * dom/Text.h:
1505         * html/HTMLElement.cpp:
1506         * html/HTMLElement.h:
1507         Removed most Node::toString() methods, which were massively wrong, and only used for
1508         XMLHttpRequest::send(). The remanining ones are still used in markup.cpp, but should probably
1509         be folded into it for consistency.
1510
1511 2008-05-19  Anders Carlsson  <andersca@apple.com>
1512
1513         Fix Windows build.
1514         
1515         * plugins/win/PluginViewWin.cpp:
1516         (WebCore::PluginView::userAgentStatic):
1517         (WebCore::PluginView::getValueStatic):
1518         (WebCore::PluginView::getValue):
1519
1520 2008-05-19  Chris Fleizach  <cfleizach@apple.com>
1521
1522         Reviewed by Darin Adler.
1523
1524         <rdar://problem/5935694> AX: crash in text marker range
1525
1526         * page/mac/AccessibilityObjectWrapper.mm:
1527         (textMarkerRangeFromMarkers):
1528
1529 2008-05-19  Darin Adler  <darin@apple.com>
1530
1531         - fix WebKit build
1532
1533         * WebCore.xcodeproj/project.pbxproj: Make CSSReflectionDirection.h "private" instead of "project".
1534
1535 2008-05-19  chris fleizach  <cfleizach@apple.com>
1536
1537         Reviewed by Darin Adler
1538
1539         <rdar://problem/5700830> VO: VoiceOver should fall back to title attr if form element is not labeled
1540
1541         * page/AccessibilityRenderObject.cpp:
1542         (WebCore::AccessibilityRenderObject::title):
1543
1544 2008-05-19  Darin Adler  <darin@apple.com>
1545
1546         Reviewed by Mitz.
1547
1548         - tweak CSSReflectValue, possibly fixing the leaks seen on the buildbot
1549
1550         * WebCore.vcproj/WebCore.vcproj: Added CSSReflectionDirection.h. 
1551         * WebCore.xcodeproj/project.pbxproj: Ditto.
1552         * css/CSSReflectionDirection.h: Added.
1553
1554         * css/CSSComputedStyleDeclaration.cpp:
1555         (WebCore::valueForReflection): Changed to use CSSReflectValue::create.
1556         * css/CSSParser.cpp:
1557         (WebCore::CSSParser::parseReflect): Ditto.
1558
1559         * css/CSSReflectValue.h: Added a create function. Got rid of the setter
1560         functions, which had const PassRefPtr& arguments -- those probably caused
1561         the leaks although I'm not exactly sure why. Made the contructor and all
1562         the data members private.
1563
1564         * rendering/style/RenderStyle.h: Changed to include CSSReflectionDirection.h
1565         instead of CSSReflectValue.h so we can tweak CSSReflectValue without
1566         recompiling the world.
1567
1568 2008-05-19  Holger Hans Peter Freyther  <zecke@selfish.org>
1569
1570         Rubber Stamped by Simon.
1571
1572         Enforce the WebKit Coding Style.
1573
1574         * plugins/PluginView.cpp:
1575         (WebCore::PluginView::load):
1576         (WebCore::PluginView::setValue):
1577         * plugins/gtk/PluginViewGtk.cpp:
1578         (WebCore::PluginView::setFocus):
1579         (WebCore::PluginView::show):
1580         (WebCore::PluginView::hide):
1581         (WebCore::PluginView::attachToWindow):
1582         (WebCore::PluginView::detachFromWindow):
1583         (WebCore::PluginView::getValueStatic):
1584         (WebCore::PluginView::getValue):
1585         * plugins/qt/PluginViewQt.cpp:
1586         (WebCore::PluginView::updateWindow):
1587         (WebCore::PluginView::detachFromWindow):
1588         (WebCore::PluginView::handlePostReadFile):
1589         (WebCore::PluginView::getValueStatic):
1590         (WebCore::PluginView::getValue):
1591
1592 2008-05-14  Marc Ordinas i Llopis  <marc.ordinasillopis@collabora.co.uk>
1593
1594         Reviewed by Holger.
1595
1596         https://bugs.webkit.org/show_bug.cgi?id=18882
1597         https://bugs.webkit.org/show_bug.cgi?id=18892
1598         Based also on work by Chris Lord.
1599         
1600         Provides support for NPAPI plugins that pass NULL as their instance
1601         info. There are two kinds:
1602         - Some call NPN_UserAgent and NPN_GetValue before a PluginView has
1603         been created. For those we provide static versions of those functions.
1604         - Others call NPN_* functions with a NULL instance inside NPP_*
1605         calls, for those we've added extra currentPluginView guards.
1606
1607         * plugins/PluginView.cpp: Add additional currentPluginView guards and
1608         some small style changes.
1609         (WebCore::PluginView::start):
1610         (WebCore::PluginView::performRequest):
1611         (WebCore::PluginView::bindingInstance):
1612         (WebCore::PluginView::handlePost):
1613         * plugins/PluginView.h: Added static versions of NPN_UserAgent and
1614         NPN_GetValue.
1615         * plugins/gtk/PluginViewGtk.cpp: Add additional currentPluginView
1616         guards and some small style changes.
1617         (WebCore::PluginView::setNPWindowRect):
1618         (WebCore::PluginView::stop):
1619         (WebCore::PluginView::userAgentStatic): Added to deal with plugins
1620         that query this before having a PluginView.
1621         (WebCore::PluginView::getValueStatic): Added to deal with plugins
1622         that call this before we have created a PluginView.
1623         (WebCore::PluginView::getValue): Moved some code to getValueStatic.
1624         (WebCore::PluginView::init):
1625         * plugins/npapi.cpp: Call PluginView::userAgentStatic
1626         and PluginView::getValueStatic if no PluginView is
1627         present.
1628         (NPN_UserAgent):
1629         (NPN_GetValue):
1630         * plugins/qt/PluginPackageQt.cpp:
1631         (WebCore::PluginPackage::fetchInfo): Corrected split args because ignoring
1632         empty entries crashed.
1633         (WebCore::PluginPackage::load): Resolve all symbols when loading plugins
1634         to protect against XPCOM dependencies.
1635         * plugins/qt/PluginViewQt.cpp: Add additional currentPluginView guards and
1636         some small style changes.
1637         (WebCore::PluginView::updateWindow):
1638         (WebCore::PluginView::setNPWindowRect):
1639         (WebCore::PluginView::stop):
1640         (WebCore::PluginView::userAgentStatic): Added to deal with plugins
1641         that query this before having a PluginView.
1642         (WebCore::PluginView::handlePostReadFile):
1643         (WebCore::PluginView::getValueStatic): Added to deal with plugins
1644         that call this before we have created a PluginView.
1645         (WebCore::PluginView::getValue): Moved some code to getValueStatic.
1646         (WebCore::PluginView::init): m_needsXEmbed init was moved to constructor.
1647
1648 2008-05-19  Alp Toker  <alp@nuanti.com>
1649
1650         GTK+ build fix on Mac. Conditionalize XP_UNIX use.
1651
1652         * plugins/gtk/PluginPackageGtk.cpp:
1653         (WebCore::PluginPackage::fetchInfo):
1654         (WebCore::PluginPackage::load):
1655         * plugins/gtk/PluginViewGtk.cpp:
1656
1657 2008-05-18  Chris Fleizach  <cfleizach@apple.com>
1658
1659         Reviewed by Darin Adler
1660
1661         <rdar://problem/5942076> WebKit can no longer find URL links with VoiceOVer-U command (19100)
1662
1663         * page/AccessibilityObject.h:
1664
1665 2008-05-18  Darin Adler  <darin@apple.com>
1666
1667         Reviewed by Sam.
1668
1669         - fix <rdar://problem/5943569> crash due to stale ownerNode pointer
1670
1671         Test: fast/dom/StyleSheet/ownerNode-lifetime.html
1672
1673         * bindings/js/JSStyleSheetCustom.cpp:
1674         (WebCore::JSStyleSheet::mark): Added code to mark ownerNode. Includes a comment about how
1675         it would be even better to solve this in the DOM rather than just in the JavaScript binding.
1676
1677         * css/StyleSheet.idl: Added CustomMarkFunction attribute.
1678
1679 2008-05-18  Brady Eidson  <beidson@apple.com>
1680
1681         Reviewed by Sam Weinig
1682
1683         Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
1684         Allow `delete storage.itemName` syntax as an alias for `storage.removeItem("itemName")`
1685
1686         Tests: storage/domstorage/localstorage/delete-removal.html
1687                storage/domstorage/sessionstorage/delete-removal.html
1688
1689         * bindings/js/JSStorageCustom.cpp:
1690         (WebCore::JSStorage::deleteProperty): Only do the delete for non-built in properties
1691         * storage/Storage.idl:
1692
1693 2008-05-17  Sam Weinig  <sam@webkit.org>
1694
1695         Reviewed by Mark Rowe.
1696
1697         Re-factor core setRequestHeader logic into setRequestHeaderInternal.
1698
1699         * xml/XMLHttpRequest.cpp:
1700         (WebCore::XMLHttpRequest::sameOriginRequest):
1701         (WebCore::XMLHttpRequest::setRequestHeader):
1702         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
1703         * xml/XMLHttpRequest.h:
1704
1705 2008-05-17  Sam Weinig  <sam@webkit.org>
1706
1707         Reviewed by Mark Rowe.
1708
1709         Differentiate between cancelation errors and generic network error in XHR.
1710
1711         * loader/FrameLoader.cpp:
1712         (WebCore::FrameLoader::requestFromDelegate):
1713         (WebCore::FrameLoader::cancelledError):
1714         * platform/network/ResourceErrorBase.h:
1715         (WebCore::ResourceErrorBase::setIsCancelation):
1716         (WebCore::ResourceErrorBase::isCancelation):
1717         (WebCore::ResourceErrorBase::ResourceErrorBase):
1718         Add state that differentiates between errors created by cancelation and those made
1719         by all other generic network errors as this differentiation is needed by some specs.
1720
1721         * xml/XMLHttpRequest.cpp:
1722         (WebCore::XMLHttpRequest::open):
1723         (WebCore::XMLHttpRequest::loadRequestSynchronously):
1724         (WebCore::XMLHttpRequest::clearResponseEntityBody):
1725         (WebCore::XMLHttpRequest::genericError):
1726         (WebCore::XMLHttpRequest::networkError):
1727         (WebCore::XMLHttpRequest::abortError):
1728         (WebCore::XMLHttpRequest::didFail):
1729         * xml/XMLHttpRequest.h:
1730         * xml/XMLHttpRequestException.h:
1731         (WebCore::XMLHttpRequestException::):
1732         * xml/XMLHttpRequestException.idl:
1733         Add ABORT_ERR. This error cannot be raised with the current WebKit architecture
1734         as it requires the ability to cancel a synchronous XHR, which we cannot currently
1735         do.  It may be possible in the future though.
1736
1737 2008-05-17  Mark Rowe  <mrowe@apple.com>
1738
1739         Reviewed by Sam Weinig.
1740
1741         Including wtf/Platform.h or using any of the macros it defines in headers that may be
1742         included from outside of the WebKit project causes any project using those headers to
1743         fail to build.
1744
1745         * page/mac/WebDashboardRegion.h:
1746
1747 2008-05-17  Sam Weinig  <sam@webkit.org>
1748
1749         Reviewed by Brady Eidson.
1750
1751         Re-factor send() logic a little to make adding cross-site requests easier.
1752
1753         * xml/XMLHttpRequest.cpp:
1754         (WebCore::XMLHttpRequest::send):
1755         (WebCore::XMLHttpRequest::sameOriginRequest):
1756         (WebCore::XMLHttpRequest::loadRequestSynchronously):
1757         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1758         * xml/XMLHttpRequest.h:
1759
1760 2008-05-16  Anders Carlsson  <andersca@apple.com>
1761
1762         Reviewed by Mitz.
1763
1764         Copy appcache headers.
1765         
1766         * WebCore.vcproj/WebCore.vcproj:
1767
1768 2008-05-16  Antti Koivisto  <antti@apple.com>
1769
1770         Reviewed by Anders.
1771         
1772         Fix <rdar://problem/5934400> 
1773         Movie controller does not update on first load of http://www.apple.com/getamac/ads/
1774         
1775         The issue is that we execute scripts while there are still pending stylesheet loads.
1776         If the script depends on a stylesheet having been applied it may fail.
1777         
1778         This will make external script execution block on external stylesheet loads. A full
1779         fix (as discussed with Hyatt) will also need to block inline script execution.
1780
1781         Test: http/tests/local/stylesheet-and-script-load-order-http.html
1782
1783         * html/HTMLTokenizer.cpp:
1784         (WebCore::HTMLTokenizer::notifyFinished):
1785
1786 2008-05-16  chris fleizach  <cfleizach@apple.com>
1787
1788         Reviewed by Jon Honeycutt
1789
1790         <rdar://problem/5582483> Mail compose area needs to allow AXValue to be settable
1791
1792         * page/AccessibilityRenderObject.cpp:
1793         (WebCore::AccessibilityRenderObject::isReadOnly):
1794         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
1795
1796 2008-05-16  Stephanie Lewis  <slewis@apple.com>
1797
1798         Reviewed by Maciej.
1799
1800         track onbeforeunlaod event counts. Pretty much identical to unload event tracking.
1801         Also rename methods from onunload tracking to be more clear.
1802
1803         increment/decrement event counts when onunload and onbeforeunload events are added/removed
1804         * dom/Document.cpp:
1805         (WebCore::Document::removeHTMLWindowEventListener):
1806         (WebCore::Document::addWindowEventListener):
1807         (WebCore::Document::removeWindowEventListener):
1808         (WebCore::Document::addPendingFrameUnloadEventCount):
1809         (WebCore::Document::removePendingFrameUnloadEventCount):
1810         (WebCore::Document::addPendingFrameBeforeUnloadEventCount):
1811         (WebCore::Document::removePendingFrameBeforeUnloadEventCount):
1812         * dom/Document.h:
1813         
1814         clear onunload count after unload events are dispatched
1815         * loader/FrameLoader.cpp:
1816         (WebCore::FrameLoader::stopLoading):
1817
1818         track onunload and onbeforeunload event counts for each frame
1819         * page/EventHandler.cpp:
1820         (WebCore::EventHandler::EventHandler):
1821         (WebCore::EventHandler::addPendingFrameUnloadEventCount):
1822         (WebCore::EventHandler::removePendingFrameUnloadEventCount):
1823         (WebCore::EventHandler::clearPendingFrameUnloadEventCount):
1824         (WebCore::EventHandler::pendingFrameBeforeUnloadEventCount):
1825         (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount):
1826         (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount):
1827         (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
1828         * page/EventHandler.h:
1829         
1830         clear unbeforeunload count after unbeforeunload events are detached
1831         * page/Frame.cpp:
1832         (WebCore::Frame::shouldClose):
1833
1834         track total event count at page level
1835         * page/Page.cpp:
1836         (WebCore::Page::Page):
1837         (WebCore::Page::changePendingUnloadEventCount):
1838         (WebCore::Page::pendingBeforeUnloadEventCount):
1839         (WebCore::Page::changePendingBeforeUnloadEventCount):
1840         * page/Page.h:
1841
1842 2008-05-16  Anders Carlsson  <andersca@apple.com>
1843
1844         Reviewed by Mitz.
1845
1846         <rdar://problem/5787788>
1847         REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.
1848         
1849         Replicate the Mac behavior when a sync load fails.
1850         
1851         * platform/network/cf/ResourceHandleCFNet.cpp:
1852         (WebCore::ResourceHandle::loadResourceSynchronously):
1853
1854 2008-05-16  Anders Carlsson  <andersca@apple.com>
1855
1856         Reviewed by Brady.
1857
1858         Parse and set the headers on the response.
1859
1860         * loader/appcache/ApplicationCacheStorage.cpp:
1861         (WebCore::ApplicationCacheStorage::store):
1862         (WebCore::parseHeader):
1863         (WebCore::parseHeaders):
1864         (WebCore::ApplicationCacheStorage::loadCache):
1865
1866 2008-05-16  Timothy Hatcher  <timothy@apple.com>
1867
1868         Adds the "this" object to the Local scope section of the
1869         Scope Variables pane.
1870
1871         <rdar://problem/5774773> Web Inspector doesn't show the "this"
1872         object in its variables list (10438)
1873
1874         Reviewed by Oliver Hunt.
1875
1876         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1877         (WebCore::JSJavaScriptCallFrame::thisObject): Returns the thisObject
1878         of the JavaScriptCallFrame impl. Returns jsNull if the impl is invalid.
1879         * page/JavaScriptCallFrame.cpp:
1880         (WebCore::JavaScriptCallFrame::thisObject): Return the thisValue from
1881         the ExecState. Return 0 if m_exec is null.
1882         * page/JavaScriptCallFrame.h:
1883         * page/JavaScriptCallFrame.idl: Add thisObject.
1884         * page/inspector/ObjectPropertiesSection.js:
1885         (WebInspector.ObjectPropertiesSection): Adds two new arguments.
1886         The ignoreHasOwnProperty tells the section to show all properties,
1887         including inherited ones. And extraProperties is an object of
1888         additional properties to show.
1889         (WebInspector.ObjectPropertiesSection.prototype): Honor the
1890         extraProperties and ignoreHasOwnProperty properties.
1891         * page/inspector/ScopeChainSidebarPane.js:
1892         (WebInspector.ScopeChainSidebarPane.prototype.update): Add a this
1893         property to an extra object that is passed to the ObjectPropertiesSection.
1894         Also pass true for ignoreHasOwnProperty since we want to show all properties.
1895
1896 2008-05-16  Anders Carlsson  <andersca@apple.com>
1897
1898         Reviewed by Brady.
1899
1900         Add mimeType and textEncodingName to the resource table.
1901         
1902         * loader/appcache/ApplicationCacheStorage.cpp:
1903         (WebCore::ApplicationCacheStorage::openDatabase):
1904         (WebCore::ApplicationCacheStorage::store):
1905         (WebCore::ApplicationCacheStorage::loadCache):
1906
1907 2008-05-16  Kevin McCullough  <kmccullough@apple.com>
1908
1909         Reviewed by Tim.
1910
1911         <rdar://problem/5770054> JavaScript profiler (10928)
1912         Use a Vector instead of a Deque since we don't use the extra capabilities
1913         of the Deque.
1914
1915         * page/JavaScriptProfileNode.cpp:
1916         (WebCore::getChildren):
1917         (WebCore::toJS):
1918
1919 2008-05-16  Anders Carlsson  <andersca@apple.com>
1920
1921         Reviewed by Brady.
1922
1923         Add a version table to the database.
1924
1925         * loader/appcache/ApplicationCacheStorage.cpp:
1926         (WebCore::ApplicationCacheStorage::verifySchemaVersion):
1927         (WebCore::ApplicationCacheStorage::openDatabase):
1928         * loader/appcache/ApplicationCacheStorage.h:
1929
1930 2008-05-16  Timothy Hatcher  <timothy@apple.com>
1931
1932         Adds the ability to evaluate expressions in the local scope
1933         of the selected call frame.
1934
1935         https://bugs.webkit.org/show_bug.cgi?id=19052
1936
1937         Reviewed by Geoff Garen.
1938
1939         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1940         (WebCore::JSJavaScriptCallFrame::evaluate): Pass the exception
1941         from evaluate to the calling ExecState.
1942         * page/JavaScriptCallFrame.cpp:
1943         (WebCore::JavaScriptCallFrame::evaluate): Added an exception out
1944         argument. Simplified the code by calling KJS:eval directly.
1945         * page/JavaScriptCallFrame.h: Change evalutate to take an exception
1946         out argument.
1947         * page/inspector/Console.js: Check if the debugger is paused and
1948         call evaluateInSelectedCallFrame on the Scripts panel.
1949         * page/inspector/ScriptsPanel.js: Added a paused getter and
1950         evaluateInSelectedCallFrame which does the evaluation and updates
1951         the scope variables pane afterwards.
1952
1953 2008-05-16  Timothy Hatcher  <timothy@apple.com>
1954
1955         Fixed the bug where the Inspector node highlight would not show
1956         in the correct place for nodes in frames.
1957
1958         <rdar://problem/5712834> Elements in iframes are highlighted incorrectly (14408)
1959
1960         Reviewed by John Sullivan.
1961
1962         * page/InspectorController.cpp:
1963         (WebCore::convertFromFrameToMainFrame): Helper function to convert
1964         IntRect coordinates from one frame to the main frame.
1965         (WebCore::InspectorController::drawNodeHighlight): Call the
1966         convertFromFrameToMainFrame helper for all the rects we get from
1967         the node since they are in the owner frame's coordinate space.
1968
1969 2008-05-16  Julien Chaffraix  <jchaffraix@webkit.org>
1970
1971         Reviewed by Eric.
1972
1973         Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated
1974
1975         Make video tags use a header guard so that make_names.pl for factory generation.
1976
1977         - Add video tag guard in HTMLTagNames.in & give an extraDefines parameter to make_names.pl
1978         when generating HTMLNames.
1979
1980         - Modify the different build systems to accomodate the new parameter.
1981
1982         - Small make_names.pl clean up (mainly code generated coding style issue).
1983
1984         * DerivedSources.make: Add HTML_FLAGS and pass it to make_names.pl
1985         if it is defined (similar to SVG) 
1986
1987         * GNUmakefile.am: Add HTML_FEATURES & HTML_FLAGS and pass it to
1988         make_names.pl if HTML_FLAGS is defined.
1989
1990         * WebCore.pro: Pass $${DEFINES} to make_names.pl.
1991
1992         * dom/make_names.pl: 
1993         * html/HTMLElement.cpp:
1994         (WebCore::inlineTagList): Add ENABLE(VIDEO) guard.
1995         * html/HTMLTagNames.in: Ditto.
1996
1997 2008-05-16  Anders Carlsson  <andersca@apple.com>
1998
1999         Reviewed by Mitz.
2000
2001         Fire progress events.
2002         
2003         * loader/appcache/ApplicationCacheGroup.cpp:
2004         (WebCore::ApplicationCacheGroup::startLoadingEntry):
2005
2006 2008-05-16  Anders Carlsson  <andersca@apple.com>
2007
2008         Reviewed by John.
2009
2010         Handle the case where the main resource load is cancelled while the cache attempt is in progress.
2011         
2012         * loader/DocumentLoader.cpp:
2013         (WebCore::DocumentLoader::mainReceivedError):
2014         Tell the group that the main resource failed to load.
2015         
2016         * loader/appcache/ApplicationCacheGroup.cpp:
2017         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
2018         Call cacheUpdateFailed.
2019         
2020         (WebCore::ApplicationCacheGroup::cacheUpdateFailed):
2021         Stop loading if the update failed.
2022         
2023         * loader/appcache/ApplicationCacheGroup.h:
2024
2025 2008-05-16  Chris Fleizach  <cfleizach@apple.com>
2026
2027         Reviewed by Alice Liu
2028
2029         <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
2030
2031         * WebCore.base.exp:
2032         * editing/VisiblePosition.cpp:
2033         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
2034         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
2035         * page/AXObjectCache.cpp:
2036         * page/AXObjectCache.h:
2037         (WebCore::AXObjectCache::enableEnhancedUserInterfaceAccessibility):
2038         (WebCore::AXObjectCache::accessibilityEnabled):
2039         (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled):
2040         * page/AccessibilityRenderObject.cpp:
2041         (WebCore::AccessibilityRenderObject::visiblePositionRange):
2042         (WebCore::AccessibilityRenderObject::doSetAXSelectedTextMarkerRange):
2043         (WebCore::AccessibilityRenderObject::addChildren):
2044         (WebCore::AccessibilityRenderObject::actionVerb):
2045         * page/EventHandler.cpp:
2046         (WebCore::EventHandler::handleKeyboardSelectionMovement):
2047         (WebCore::EventHandler::defaultKeyboardEventHandler):
2048         * page/EventHandler.h:
2049
2050 2008-05-15  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2051
2052         Reviewed by Simon.
2053
2054         Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files
2055         from gtk-port.
2056
2057         * WebCore.pro:
2058
2059 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
2060
2061         Fix the Gtk build.
2062
2063         * GNUmakefile.am: Added rendering/style to the include paths.
2064
2065 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
2066
2067         Fix the Qt build.
2068
2069         * WebCore.pro: Added rendering/style to the include paths
2070         * page/AXObjectCache.cpp:
2071         (WebCore::AXObjectCache::handleActiveDescendantChanged): Don't compile
2072         this method unless a17n is enabled.
2073
2074 2008-05-15  Rob Buis  <buis@kde.org>
2075
2076         Reviewed by Dave Hyatt.
2077
2078         https://bugs.webkit.org/show_bug.cgi?id=17433
2079         getComputedStyle() -> clip returns empty string
2080
2081         Make getComputedStyle return a shape value for clip
2082         if it is set.
2083
2084         Tests: fast/css/getPropertyValue-clip.html
2085
2086         * css/CSSComputedStyleDeclaration.cpp:
2087         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2088
2089 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
2090
2091         wx build fix. Add rendering/style to includes dir.
2092
2093         * webcore-base.bkl:
2094
2095 2008-05-15  Alice Liu  <alice.liu@apple.com>
2096
2097         Reviewed by Beth Dakin.
2098
2099         Fixed <rdar://problem/5882283> Implement ARIA aria-activedescendant
2100         Also added support for aria roles listbox and option, and aria-selected, 
2101         and aria-multiselectable for listboxes
2102
2103         * dom/Element.cpp:
2104         (WebCore::Element::attributeChanged):
2105         * dom/Element.h:
2106         * dom/StyledElement.cpp:
2107         (WebCore::StyledElement::attributeChanged):
2108         * html/HTMLAttributeNames.in:
2109         * page/AXObjectCache.cpp:
2110         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2111         * page/AXObjectCache.h:
2112         (WebCore::AXObjectCache::accessibilityEnabled):
2113         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2114         * page/AccessibilityListBox.cpp:
2115         (WebCore::AccessibilityListBox::selectedChildren):
2116         (WebCore::AccessibilityListBox::visibleChildren):
2117         * page/AccessibilityListBox.h:
2118         * page/AccessibilityListBoxOption.h:
2119         (WebCore::AccessibilityListBoxOption::selectedChildren):
2120         (WebCore::AccessibilityListBoxOption::visibleChildren):
2121         * page/AccessibilityObject.cpp:
2122         * page/AccessibilityObject.h:
2123         (WebCore::AccessibilityObject::isListBox):
2124         (WebCore::AccessibilityObject::shouldFocusActiveDescendant):
2125         (WebCore::AccessibilityObject::activeDescendant):
2126         (WebCore::AccessibilityObject::handleActiveDescendantChanged):
2127         * page/AccessibilityRenderObject.cpp:
2128         (WebCore::AccessibilityRenderObject::title):
2129         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
2130         (WebCore::AccessibilityRenderObject::focusedUIElement):
2131         (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
2132         (WebCore::AccessibilityRenderObject::activeDescendant):
2133         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2134         (WebCore::RoleEntry::):
2135         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
2136         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
2137         (WebCore::AccessibilityRenderObject::selectedChildren):
2138         (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
2139         (WebCore::AccessibilityRenderObject::visibleChildren):
2140         * page/AccessibilityRenderObject.h:
2141         (WebCore::AccessibilityRenderObject::isDetached):
2142         * page/mac/AccessibilityObjectWrapper.mm:
2143         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2144
2145 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2146
2147         Adds an error and warning count indicator at the bottom right in the
2148         Inspector's status bar.
2149
2150         https://bugs.webkit.org/show_bug.cgi?id=18650
2151
2152         Initial implementation by Adam Roben.
2153         Reviewed by Sam Weinig.
2154
2155         Test: manual-tests/inspector/error-warning-count.html
2156
2157         * English.lproj/localizedStrings.js: Added new strings.
2158         * manual-tests/inspector/error-warning-count.html: Added.
2159         * page/inspector/Console.js:
2160         (WebInspector.Console.prototype.show): Don't do anything if visible.
2161         (WebInspector.Console.prototype.hide): Don't do anything if hidden.
2162         Temporally set properties and classes to mimic the post-animation
2163         values so panels like Elements in their updateStatusBarItems call will
2164         size things to fit the final location. 
2165         * page/inspector/ElementsPanel.js:
2166         (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes):
2167         Account for the #error-warning-count width when sizing breadcrumbs. 
2168         * page/inspector/Resource.js:
2169         (WebInspector.Resource.prototype.set errors): Update the global error count.
2170         (WebInspector.Resource.prototype.set warnings): Update the global warning count.
2171         * page/inspector/inspector.css: Make .hidden's display property
2172         !important to ensure things really hide, and added styling for the new
2173         #error-warning-count element.
2174         * page/inspector/inspector.html: Added an #error-warning-count div
2175         in the #anchored-status-bar-items div.
2176         * page/inspector/inspector.js:
2177         (WebInspector.get errors): Added.
2178         (WebInspector.set errors): Added. Calls _updateErrorAndWarningCounts.
2179         (WebInspector.get warnings): Added.
2180         (WebInspector.set warnings): Added. Calls _updateErrorAndWarningCounts.
2181         (WebInspector._updateErrorAndWarningCounts): Added. Update the
2182         #error-warning-count div with the current error/warning count.
2183         (WebInspector.loaded): Add a click event listener to the
2184         #error-warning-count element that will show the Console. Call
2185         _updateErrorAndWarningCounts to display the initial error/warning counts.
2186
2187 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2188
2189         Fixes a bug in the view source parsing of text within <script>,
2190         <style>, <xmp>, <textarea> and other special tags. The text was
2191         being parsed as HTML and would be syntax highlighted if a "<"
2192         was encountered.
2193
2194         <rdar://problem/5790805> Inspector's source view missing some words,
2195         doubles others in JS source in <script> tag (17752)
2196
2197         Reviewed by Dave Hyatt.
2198
2199         Added test: fast/frames/viewsource-plain-text-tags.html
2200
2201         * html/HTMLTokenizer.cpp:
2202         (WebCore::HTMLTokenizer::scriptHandler): Set scriptCodeSize and
2203         scriptCodeResync to zero before an early return in view source mode.
2204         This was causing text from a previous script tag to show up in
2205         then next style tag.
2206         (WebCore::HTMLTokenizer::parseTag): Enter an if block in view source
2207         mode even if n is null. The n is property guarded in other places
2208         and not used by view source mode. Removes a redundant null check on n.
2209         Add a new null check of n before setting scriptSrcCharset. Other code
2210         in HTMLTokenizer is already guarded for this code path. 
2211
2212 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2213
2214         Changes the Web Inspector node highlight to be less aggressive
2215         and only highlight when hovering over the selected node in the DOM
2216         tree or breadcrumbs. You can highlight on hover for any node if
2217         you hold down the Alt/Option key while hovering.
2218
2219         Reviewed by Kevin McCullough.
2220
2221         * page/inspector/ElementsPanel.js:
2222         * page/inspector/inspector.js:
2223
2224 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2225
2226         Fix windows build
2227
2228         * loader/FrameLoader.cpp:
2229         (WebCore::FrameLoader::stopLoading):
2230
2231 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2232
2233         Reviewed by Anders.
2234         
2235         export a symbol needed for fast teardown
2236
2237         * WebCore.base.exp:
2238
2239 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2240
2241         Reviewed by Anders.
2242
2243         Keep track on pending unload event counts
2244
2245         No change in behavior so no new tests, but I am dumping the 
2246         unload event count to track the new variable.
2247
2248         * WebCore.base.exp:
2249
2250         increment/decrement the count when an event is added/removed
2251         * dom/Document.cpp:
2252         (WebCore::Document::removeHTMLWindowEventListener):
2253         (WebCore::Document::addWindowEventListener):
2254         (WebCore::Document::removeWindowEventListener):
2255         (WebCore::Document::setPendingFrameUnloadEventCount):
2256         * dom/Document.h:
2257
2258         set the count to 0 for each frame after the unload event has been dispatched
2259         * loader/FrameLoader.cpp:
2260         (WebCore::FrameLoader::stopLoading):
2261
2262         keep track of the number of pending unload events for the eventHandler's frame
2263         * page/EventHandler.cpp:
2264         (WebCore::EventHandler::EventHandler):
2265        (WebCore::EventHandler::pendingFrameUnloadEventCount):
2266         (WebCore::EventHandler::setPendingFrameUnloadEventCount):
2267         * page/EventHandler.h:
2268
2269         keep track of the total number of pending unload events for all of the frames
2270         * page/Page.cpp:
2271         (WebCore::Page::Page):
2272         (WebCore::Page::pendingUnloadEventCount):
2273         (WebCore::Page::setPendingUnloadEventCount):
2274         * page/Page.h:
2275
2276 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2277
2278         Fix build.
2279
2280         * WebCore.vcproj/WebCore.vcproj:
2281
2282 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2283
2284         Fix build.
2285
2286         * WebCore.vcproj/WebCore.vcproj:
2287
2288 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2289
2290         Fix build.
2291
2292         * WebCore.vcproj/WebCore.vcproj:
2293
2294 2008-05-15  David Kilzer  <ddkilzer@apple.com>
2295
2296         Bug 19085: font-family: initial sets font-family differently than font: initial
2297
2298         <https://bugs.webkit.org/show_bug.cgi?id=19085>
2299         <rdar://problem/5939391>
2300
2301         Reviewed by David Hyatt.
2302
2303         Test: fast/css/font-family-initial.html
2304
2305         * css/CSSStyleSelector.cpp:
2306         (WebCore::CSSStyleSelector::applyProperty): Don't set family if first
2307         family of initial font description is empty.
2308
2309 2008-05-15  David Hyatt  <hyatt@apple.com>
2310
2311         Move RenderStyle into a new subdirectory, rendering/style/, in preparation for breaking it up into
2312         a bunch of smaller files.
2313
2314         Reviewed by Dan Bernstein
2315
2316         * GNUmakefile.am:
2317         * WebCore.pro:
2318         * WebCore.vcproj/WebCore.vcproj:
2319         * WebCore.xcodeproj/project.pbxproj:
2320         * WebCoreSources.bkl:
2321         * rendering/RenderStyle.cpp: Removed.
2322         * rendering/RenderStyle.h: Removed.
2323         * rendering/style: Added.
2324         * rendering/style/RenderStyle.cpp: Copied from rendering/RenderStyle.cpp.
2325         * rendering/style/RenderStyle.h: Copied from rendering/RenderStyle.h.
2326
2327 2008-05-15  David Kilzer  <ddkilzer@apple.com>
2328
2329         Fix leaks when stopping a page from loading
2330
2331         Patch suggested by Antti.  Reviewed by Antti.
2332
2333         * loader/DocLoader.cpp:
2334         (WebCore::DocLoader::clearPreloads): If a resource is in m_preloads but
2335         never made it to the cache, delete it to prevent it from leaking.
2336
2337 2008-05-15  Julien Chaffraix  <jchaffraix@webkit.org>
2338
2339         Reviewed by Darin.
2340
2341         https://bugs.webkit.org/show_bug.cgi?id=13942
2342         ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/
2343
2344         In HTML, when an attribute was null (for example when we parse '="somevalue"'
2345         (attribute forgotten or there is a space between the attribute and the '=')),
2346         the fallback was to assign the value to the attribute. However if the value was
2347         a url or did contain a '/', we would trigger the assertion.
2348
2349         To avoid that, we check the value before assigning it now and do not assign it
2350         if it means adding a '/'.
2351
2352         Test: fast/parser/assertion-empty-attribute.html
2353
2354         * html/HTMLTokenizer.cpp:
2355         (WebCore::HTMLTokenizer::parseTag): Add check for '/' in value before
2356         assigning it to an attribute when the attribute is null.
2357
2358 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
2359
2360         wx build fix for recent breakages. Add EventLoopWx.cpp, update the Bakefiles,
2361         and add stubs for new Plugins functions. Also move plugin functions outside of
2362         TemporaryLinkStubs.cpp so that they are more noticeable.
2363
2364         * WebCoreSources.bkl:
2365         * platform/wx/EventLoopWx.cpp: Added.
2366         (WebCore::EventLoop::cycle):
2367         * platform/wx/TemporaryLinkStubs.cpp:
2368         * plugins/wx: Added.
2369         * plugins/wx/PluginDataWx.cpp: Added.
2370         (WebCore::PluginData::initPlugins):
2371         (WebCore::PluginData::refresh):
2372         * plugins/wx/PluginDatabaseWx.cpp: Added.
2373         (WebCore::PluginDatabase::getPluginPathsInDirectories):
2374         (WebCore::PluginDatabase::defaultPluginDirectories):
2375         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2376         * plugins/wx/PluginPackageWx.cpp: Added.
2377         (WebCore::PluginPackage::determineQuirks):
2378         (WebCore::PluginPackage::fetchInfo):
2379         (WebCore::PluginPackage::load):
2380         (WebCore::PluginPackage::hash):
2381         (WebCore::PluginPackage::equal):
2382         (WebCore::PluginPackage::compareFileVersion):
2383         * plugins/wx/PluginViewWx.cpp: Added.
2384         (WebCore::PluginView::updateWindow):
2385         (WebCore::PluginView::setFocus):
2386         (WebCore::PluginView::show):
2387         (WebCore::PluginView::hide):
2388         (WebCore::PluginView::paint):
2389         (WebCore::PluginView::handleKeyboardEvent):
2390         (WebCore::PluginView::handleMouseEvent):
2391         (WebCore::PluginView::setParent):
2392         (WebCore::PluginView::setNPWindowRect):
2393         (WebCore::PluginView::attachToWindow):
2394         (WebCore::PluginView::detachFromWindow):
2395         (WebCore::PluginView::stop):
2396         (WebCore::PluginView::userAgent):
2397         (WebCore::PluginView::handlePostReadFile):
2398         (WebCore::PluginView::getValue):
2399         (WebCore::PluginView::invalidateRect):
2400         (WebCore::PluginView::invalidateRegion):
2401         (WebCore::PluginView::forceRedraw):
2402         (WebCore::PluginView::~PluginView):
2403         (WebCore::PluginView::init):
2404         * webcore-wx.bkl:
2405
2406 2008-05-15  Adam Treat  <treat@kde.org>
2407
2408         Reviewed by Simon.
2409
2410         Don't try to setCompositionMode for devices that do not support PorterDuff
2411
2412         * platform/graphics/qt/GraphicsContextQt.cpp:
2413         (WebCore::TransparencyLayer::TransparencyLayer):
2414         (WebCore::GraphicsContext::strokeRect):
2415         (WebCore::GraphicsContext::clip):
2416
2417 2008-05-15  Adele Peterson  <adele@apple.com>
2418
2419         Reviewed and landed by Alexey.
2420
2421         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
2422
2423         * WebCore.base.exp: Exported TextIterator methods.
2424
2425 2008-05-15  Simon Hausmann  <hausmann@webkit.org>
2426
2427         Fix the Qt build by adding NetworkStateNotifier.cpp to the build.
2428
2429         * WebCore.pro:
2430
2431 2008-05-14  Dan Bernstein  <mitz@apple.com>
2432
2433         Reviewed by Mark Rowe.
2434
2435         - fix <rdar://problem/5907633> Memory corruption after closing a document that uses box-reflect
2436
2437         Test: fast/reflections/teardown-crash.html
2438
2439         * rendering/RenderLayer.cpp:
2440         (WebCore::RenderLayer::~RenderLayer): Changed to not call removeLayers()
2441         on the reflection if the document is being destroyed, because in that
2442         case the layer tree is not being maintained.
2443
2444 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2445
2446         Reviewed by Tim.
2447
2448         <rdar://problem/5770054> JavaScript profiler (10928)
2449         - Expose the new Profiler functions to the WebInspector.
2450
2451         * page/JavaScriptProfileNode.cpp:
2452         (WebCore::getTotalPercent):
2453         (WebCore::getSelfPercent):
2454         (WebCore::ProfileNodeClass):
2455
2456 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2457
2458         Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
2459         code that contains an eval. This change makes stepping into eval
2460         code work as expected.
2461
2462         http://bugs.webkit.org/show_bug.cgi?id=19038
2463
2464         Reviewed by Kevin McCullough.
2465
2466         Tested with: manual-tests/inspector/returnEvent-crash.html
2467
2468         * manual-tests/inspector/returnEvent-crash.html: Added.
2469         * page/JavaScriptDebugServer.cpp:
2470         (WebCore::JavaScriptDebugServer::sourceParsed): Adds #ifdefed
2471         debugging code to prevent the sourceID and URL.
2472         (WebCore::updateCurrentCallFrame): Added. A helper function that
2473         is called from all 4 of the debugger hooks below. This function will
2474         update and/or create JavaScriptCallFrames to match the exec state,
2475         sourceID and lineNumber passed into it. Contains #ifdefed debugging
2476         code that was helpful while fixing this bug.
2477         (WebCore::JavaScriptDebugServer::callEvent): Call updateCurrentCallFrame
2478         before pauseIfNeeded.
2479         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
2480         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
2481         (WebCore::JavaScriptDebugServer::exception): Ditto.
2482
2483 2008-05-14  Alp Toker  <alp@nuanti.com>
2484
2485         GTK+ build fix for r33457. Add NetworkStateNotifier.cpp to the build.
2486
2487         * GNUmakefile.am:
2488
2489 2008-05-14  Alp Toker  <alp@nuanti.com>
2490
2491         GTK+ build fix. Include value.h from kjs, not JavaScriptCore.
2492
2493         * page/JavaScriptProfile.cpp:
2494         * page/JavaScriptProfileNode.cpp:
2495
2496 2008-05-14  Adam Roben  <aroben@apple.com>
2497
2498         Windows release build fix
2499
2500         * WebCore.vcproj/WebCore.vcproj: Make sure the warnings we disable on
2501         XPathGrammar.cpp are disabled for all configurations, not just
2502         Debug_Internal.
2503
2504 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2505
2506         Reviewed by Sam.
2507
2508         <rdar://problem/5770054> JavaScript profiler (10928)
2509         - Rename FunctionCallProfile to ProfileNode
2510
2511         * ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
2512         * ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
2513         * GNUmakefile.am:
2514         * WebCore.pro:
2515         * WebCore.vcproj/WebCore.vcproj:
2516         * WebCore.xcodeproj/project.pbxproj:
2517         * WebCoreSources.bkl:
2518         * page/JavaScriptFunctionCallProfile.cpp: Removed.
2519         * page/JavaScriptFunctionCallProfile.h: Removed.
2520         * page/JavaScriptProfile.cpp:
2521         * page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp.
2522         (WebCore::ProfileNodeCache):
2523         (WebCore::getFunctionName):
2524         (WebCore::getTotalTime):
2525         (WebCore::getSelfTime):
2526         (WebCore::getNumberOfCalls):
2527         (WebCore::getChildren):
2528         (WebCore::finalize):
2529         (WebCore::ProfileNodeClass):
2530         (WebCore::toJS):
2531         * page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
2532
2533 2008-05-13  Beth Dakin  <bdakin@apple.com>
2534
2535         Reviewed by Brady.
2536
2537         This patch adds support for the ARIA progressbar role and the 
2538         following ARIA states (ie HTML attributes): aria-checked, aria-
2539         level, aria-pressed, aria-valuenow, aria-valuemin, and aria-
2540         valuemax.
2541
2542         * html/HTMLAttributeNames.in:
2543         * page/AccessibilityObject.h:
2544         (WebCore::AccessibilityObject::isProgressIndicator):
2545         (WebCore::AccessibilityObject::valueForRange):
2546         (WebCore::AccessibilityObject::maxValueForRange):
2547         (WebCore::AccessibilityObject::minValueForRange):
2548         * page/AccessibilityRenderObject.cpp:
2549         (WebCore::AccessibilityRenderObject::isProgressIndicator):
2550         (WebCore::AccessibilityRenderObject::isPressed): Check the aria-
2551         pressed attribute if this is an ARIA button.
2552         (WebCore::AccessibilityRenderObject::headingLevel): Check the aria-
2553         level attribute if this is an ARIA heading.
2554         (WebCore::AccessibilityRenderObject::intValue): Check the aria-
2555         checked attribute if this is an ARIA radio button or checkbox.
2556         (WebCore::AccessibilityRenderObject::valueForRange):
2557         (WebCore::AccessibilityRenderObject::maxValueForRange):
2558         (WebCore::AccessibilityRenderObject::minValueForRange):
2559         (WebCore::RoleEntry::):
2560         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
2561         * page/AccessibilityRenderObject.h:
2562         * page/mac/AccessibilityObjectWrapper.mm:
2563         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2564         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2565
2566 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2567
2568         Reviewed by John.
2569
2570         -<rdar://problem/5770054> JavaScript profiler (10928)
2571         Use the FunctionCallProfile's new total and self time functions.
2572
2573         * page/JavaScriptFunctionCallProfile.cpp:
2574         (WebCore::getTotalTime):
2575         (WebCore::getSelfTime):
2576
2577 2008-05-14  Anders Carlsson  <andersca@apple.com>
2578
2579         Reviewed by Adam.
2580
2581         Don't try to store the resource data if it's empty.
2582         
2583         * loader/appcache/ApplicationCacheStorage.cpp:
2584         (WebCore::ApplicationCacheStorage::store):
2585
2586 2008-05-14  Adam Roben  <aroben@apple.com>
2587
2588         Windows build fix
2589
2590         * platform/network/NetworkStateNotifier.cpp: Added a missing #include.
2591         * platform/network/NetworkStateNotifier.h:
2592         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Removed 'void'
2593         return type from the constructor, and fixed the spelling of a member
2594         variable.
2595
2596 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2597
2598         Reviewed by Adam.
2599
2600         <rdar://problem/5770054> JavaScript profiler (10928)
2601         - Add support for interacting with the JavaScriptCore profiler.
2602
2603         * ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
2604         * ForwardingHeaders/profiler/Profile.h: Added.
2605         * GNUmakefile.am: Add the new files to all the projects.
2606         * WebCore.pro:
2607         * WebCore.vcproj/WebCore.vcproj:
2608         * WebCore.xcodeproj/project.pbxproj:
2609         * WebCoreSources.bkl:
2610         * page/InspectorController.cpp: Add the ability to retrieve all of the
2611         profiles in JavaScript from the InspectorController.
2612         (WebCore::allProfiles):
2613         (WebCore::InspectorController::windowScriptObjectAvailable):
2614         * page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC
2615         FunctionCallProfile.
2616         (WebCore::functionCallProfileCache): This cache makes sure we don't
2617         needlessly create duplicate wrappers around the same
2618         FunctionCallProfile*.
2619         (WebCore::getFunctionName): Callback to return the name of the function.
2620         (WebCore::getTotalTime): Callback to return the total time spent in the
2621         function.
2622         (WebCore::getSelfTime): Callback to return the time spent in self (total
2623         - time in children) in the function.
2624         (WebCore::getNumberOfCalls): Callback to return the number of times this
2625         function was called.
2626         (WebCore::getChildren): Callback to return the children of this function
2627         where the children are the functions this function called.
2628         (WebCore::finalize): Cleanup.
2629         (WebCore::functionCallProfileClass): Define the JSClassRef for this
2630         object.
2631         (WebCore::toJS): Create a conversion function to make a usable JSValue
2632         to wrap the FunctionCallProfile in JSC.
2633         * page/JavaScriptFunctionCallProfile.h: Added.
2634         * page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile.
2635         (WebCore::profileCache): This cache makes sure we don't needlessly
2636         create duplicate wrappers aroudn the same Profile*.
2637         (WebCore::getHeadCallback): Callback to return the head of the graph of
2638         the functions profiled durring this profile's run.
2639         (WebCore::finalize):
2640         (WebCore::profileClass): Define the JSClassRef for this object.
2641         (WebCore::toJS): Create a conversion function to make a usable JSValue
2642         to wrap the Profile from JSC.
2643         * page/JavaScriptProfile.h: Added.
2644
2645 2008-05-14  David Hyatt  <hyatt@apple.com>
2646
2647         Fix for bug https://bugs.webkit.org/show_bug.cgi?id=16130.
2648
2649         Opacity, transforms, reflections and masks should not honor z-index unless the element is also
2650         positioned.  Always reset to auto if the element is not positioned (and then the following code will
2651         adjust auto to 0 as needed).
2652
2653         Reviewed by Dan Bernstein
2654
2655         * css/CSSStyleSelector.cpp:
2656         (WebCore::CSSStyleSelector::adjustRenderStyle):
2657
2658 2008-05-14  Anders Carlsson  <andersca@apple.com>
2659
2660         Reviewed by Brady.
2661
2662         <rdar://problem/5931742> Support navigator.onLine from HTML5
2663         
2664         * WebCore.vcproj/WebCore.vcproj:
2665         * WebCore.xcodeproj/project.pbxproj:
2666         Add NetworkStateNotifier files.
2667         
2668         * dom/EventNames.h:
2669         Add offline and online events.
2670         
2671         * page/Navigator.cpp:
2672         (WebCore::Navigator::onLine):
2673         * page/Navigator.h:
2674         * page/Navigator.idl:
2675         Add navigator.onLine.
2676         
2677         * page/Page.cpp:
2678         (WebCore::networkStateChanged):
2679         Dispatch offline/online events to all frames.
2680         
2681         (WebCore::Page::Page):
2682         Set state change callback.
2683         
2684         * platform/network/NetworkStateNotifier.cpp: Added.
2685         * platform/network/NetworkStateNotifier.h: Added.
2686
2687         * platform/network/mac/NetworkStateNotifierMac.cpp: Added.
2688         Mac network state notifier.
2689
2690 2008-05-14  Adam Roben  <aroben@apple.com>
2691
2692         Fix Bug 18888: REGRESSION (r32731): console.log always prints
2693         "undefined"
2694
2695         <https://bugs.webkit.org/show_bug.cgi?id=18888>
2696
2697         Reviewed by Tim Hatcher.
2698
2699         Tested by pre-existing
2700         manual-tests/inspector/console-log-formatting.html.
2701
2702         * page/inspector/Console.js:
2703         (WebInspector.ConsoleMessage.prototype._format): Changed to explicitly
2704         wrap Console._format instead of using bind to do it. Using bind was
2705         causing us to pass plainText in as the first parameter instead of as
2706         the second.
2707
2708 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2709
2710         Fixes the bug where stepping out of a function would show the wrong
2711         call stack (would look like it stepped out twice.)
2712
2713         Reviewed by Adam Roben.
2714
2715         * page/JavaScriptDebugServer.cpp:
2716         (WebCore::JavaScriptDebugServer::returnEvent):
2717         Call pauseIfNeeded before setting m_currentCallFrame to the caller.
2718
2719 2008-05-14  Stephanie Lewis  <slewis@apple.com>
2720    
2721         Fix 64bit build
2722
2723         * plugins/PluginView.h:
2724
2725 2008-05-14  David Kilzer  <ddkilzer@apple.com>
2726
2727         REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)
2728
2729         <https://bugs.webkit.org/show_bug.cgi?id=18976>
2730         <rdar://problem/5924793>
2731
2732         Reviewed by Darin.
2733
2734         Tests: fast/dom/dom-parse-serialize-expected.txt:
2735                fast/xsl/xslt-processor-expected.txt:
2736                fast/xsl/xslt-text-expected.txt:
2737
2738         Commit r26474 removed escaping of '>' characters to '&gt;' in serialized
2739         HTML content, which broke one jQuery test.  This change restores that
2740         serialization behavior to both attributes and content for consistency.
2741
2742         * editing/markup.cpp:
2743         (WebCore::appendAttributeValue): Escape '>' as '&gt;'.
2744         (WebCore::escapeContentText): Ditto.
2745         (WebCore::appendEscapedContent): Ditto.  This is the bug fix for the jQuery test.
2746
2747 2008-05-14  Adam Roben  <aroben@apple.com>
2748
2749         Fix Bug 19051: REGRESSION (r33447): Assertion in
2750         JSDebugServer::removeListener closing tab with Inspector open
2751
2752         <https://bugs.webkit.org/show_bug.cgi?id=19051>
2753
2754         m_inspectedPage is now cleared when the Page is destroyed, which never
2755         used to happen. Some of InspectorController's code was not prepared
2756         for this.
2757
2758         Reviewed by Dave Hyatt.
2759
2760         * page/InspectorController.cpp:
2761         (WebCore::InspectorController::~InspectorController): Removed a call
2762         to stopDebugging and added an assertion. Debugging should have already
2763         been stopped by this point.
2764         (WebCore::InspectorController::inspectedPageDestroyed): Moved here
2765         from the header file. Added a call to stopDebugging.
2766         (WebCore::InspectorController::enabled): Return false if our inspected
2767         Page has already been destroyed, since we can't really do much at this
2768         point anyway.
2769         (WebCore::InspectorController::didCommitLoad):
2770         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
2771         (WebCore::InspectorController::identifierForInitialRequest):
2772         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
2773         (WebCore::InspectorController::stopDebugging):
2774         (WebCore::InspectorController::drawNodeHighlight):
2775         Assert that m_inspectedPage hasn't been cleared.
2776         * page/InspectorController.h:
2777
2778 2008-05-14  Justin Garcia  <justin.garcia@apple.com>
2779
2780         Reviewed by Darin.
2781
2782         <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition
2783
2784         * editing/Editor.cpp:
2785         (WebCore::Editor::confirmComposition): Remove the previous composition
2786         when we insert the new one, not with a separate, slower, delete operation.
2787         (WebCore::Editor::setComposition): Ditto.
2788         * editing/InsertTextCommand.cpp:
2789         (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected
2790         text with a low level operation that doesn't perform a layout and insert
2791         the new text in a way that won't trigger a layout from the removal.
2792         (WebCore::InsertTextCommand::input): Call the optimized replace.
2793         * editing/InsertTextCommand.h:
2794         * editing/htmlediting.cpp:
2795         (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid 
2796         the expense of getAttribute in the common case.
2797         * page/Frame.cpp:
2798         (WebCore::Frame::selectionLayoutChanged): Selection::start() and end()
2799         will already be at VisiblePosition deepEquivalents. Selection::validate()
2800         ensures this.
2801
2802 2008-05-14  Adam Roben  <aroben@apple.com>
2803
2804         Make the Inspector able to handle being reloaded
2805
2806         When Reload was selected from the context menu in the Inspector, the
2807         Inspector window would close and never be openable again. Now it
2808         closes, then reopens when the page finishes loading.
2809
2810         Reviewed by Tim Hatcher.
2811
2812         * page/InspectorController.cpp:
2813         (WebCore::InspectorController::close): Removed code that cleared out
2814         m_page. This is now handled by pageDestroyed.
2815         * page/InspectorController.h:
2816         (WebCore::InspectorController::inspectedPageDestroyed): Added.
2817         * page/Page.cpp:
2818         (WebCore::Page::~Page): Fixed a bug and added a call to the new
2819         inspectedPageDestroyed. If we have a parent InspectorController, that
2820         means that we are the Page in the Inspector's window (i.e., we are the
2821         Inspector's UI), so when we are destroyed we should call
2822         InspectorController::pageDestroyed. We also need to call
2823         inspectedPageDestroyed on our own InspectorController so that it won't
2824         try to call into us.
2825
2826 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2827
2828         Add pause on exception support to the Inspector debugger
2829         with a toggle buttons to enable or disable it.
2830
2831         Reviewed by Adam Roben.
2832
2833         * page/InspectorController.cpp:
2834         (WebCore::pauseOnExceptions): Call the InspectorController.
2835         (WebCore::setPauseOnExceptions): Ditto.
2836         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new
2837         setPauseOnExceptions and pauseOnExceptions functions to the JS class.
2838         (WebCore::InspectorController::pauseOnExceptions): Call JavaScriptDebugServer.
2839         (WebCore::InspectorController::setPauseOnExceptions): Ditto.
2840         * page/InspectorController.h:
2841         * page/JavaScriptDebugServer.cpp:
2842         (WebCore::JavaScriptDebugServer::setPauseOnExceptions): Set m_pauseOnExceptions.
2843         (WebCore::JavaScriptDebugServer::exception): Check m_pauseOnExceptions
2844         and set m_pauseOnNextStatement to true before calling pauseIfNeeded.
2845         * page/JavaScriptDebugServer.h:
2846         * page/inspector/Images/pauseOnExceptionButtons.png: Added.
2847         * page/inspector/ScriptsPanel.js: Adds a status bar button that calls
2848         the new InspectorController functions.
2849         * page/inspector/inspector.css: New styles.
2850
2851 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2852
2853         Rename the Scope Chain pane to Scope Variables. Name the global
2854         object Global. Name objects before the locals "With Block".
2855         Name colsure scopes "Closure". Name any element or document
2856         after Local, "Event Target" and "Event Document", respectfully.
2857
2858         Reviewed by Adam Roben.
2859
2860         * English.lproj/localizedStrings.js: Add new strings.
2861         * page/inspector/ObjectPropertiesSection.js:
2862         (WebInspector.ObjectPropertiesSection): Add a new argument that is used
2863         for the empty placeholder text.
2864         (WebInspector.ObjectPropertiesSection.prototype.onpopulate): Use the
2865         empty placeholder text.
2866         * page/inspector/ScopeChainSidebarPane.js:
2867         (WebInspector.ScopeChainSidebarPane): Rename Scope Chain to Scope Variables.
2868         (WebInspector.ScopeChainSidebarPane.prototype.update): Use the object name as
2869         the subtitle. Use "Global" for the global object title. Use "With Block" for
2870         the title of objects before the locals. Use "No Variables" for the empty
2871         placeholder text for locals.
2872
2873 2008-05-14  Michael A. Puls II  <shadow2531@gmail.com>
2874
2875         Reviewed by Alexey.
2876
2877         Fix for https://bugs.webkit.org/show_bug.cgi?id=16923 
2878         Attr nodes with a value of "" should not have any childNodes
2879         
2880         In Opera, Firefox and IE, when an attribute node has a value
2881         of "", the attribute node doesn't have any childNodes. This
2882         is true in WebKit also, but not when you assign "" to the
2883         Attr's value when the existing value is non-empty.
2884         
2885         Test: fast/dom/attribute-empty-value-no-children.html
2886
2887         * dom/Attr.cpp: (WebCore::Attr::setValue): Use createTextChild(), which only appends
2888         a child text node if the value being assigned is not empty.
2889
2890 2008-05-14  Julien Chaffraix  <jchaffraix@webkit.org>
2891
2892         Reviewed by Eric.
2893
2894         GCC 4.3 build fix.
2895         Removes some compiler warnings.
2896
2897         * dom/Document.h:
2898         (WebCore::FormElementKey::hashTableDeletedValue): GCC complained about the const keyword
2899         so remove it as it is only used inside FormElementKey.
2900
2901         * html/HTMLSelectElement.cpp:
2902         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Correct coding style (removes
2903         a warning too).
2904
2905         * loader/appcache/ApplicationCacheResource.cpp: Include stdio.h for gcc4.3 build.
2906
2907         * plugins/PluginPackage.cpp:
2908         (WebCore::PluginPackage::PluginPackage): Changed initialization order in the constructor.
2909         * plugins/PluginView.cpp:
2910         (WebCore::PluginView::PluginView): Ditto.
2911         * plugins/PluginView.h:
2912         * xml/AccessControlList.cpp: Include stdio.h
2913         * xml/AccessItem.cpp: Ditto.
2914         * xml/AccessItemRule.cpp: Ditto.
2915
2916 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2917
2918         Reviewed by Simon.
2919
2920         Qt build fix. Add JSJavaScriptCallFrameCustom.cpp to the build
2921         and implemented EventLoopQt.
2922
2923         * WebCore.pro:
2924         * platform/qt/EventLoopQt.cpp: Added.
2925
2926 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2927
2928         Reviewed by Simon.
2929
2930         Qt build fix. Add JavaScriptCallFrame.{idl,cpp} to the build.
2931
2932         * WebCore.pro:
2933
2934 2008-05-13  Dan Bernstein  <mitz@apple.com>
2935
2936         Reviewed by John Sullivan.
2937
2938         - Windows part of <rdar://problem/5725912> improve render quality of transformed text
2939
2940         * platform/graphics/win/FontCGWin.cpp:
2941         (WebCore::Font::drawGlyphs): Added call to
2942         wkSetCGContextFontRenderingStyle().
2943
2944 2008-05-13  Alp Toker  <alp@nuanti.com>
2945
2946         GTK+ build fix. Implement EventLoopGtk.cpp.
2947
2948         * GNUmakefile.am:
2949         * platform/gtk/EventLoopGtk.cpp: Added.
2950         (WebCore::EventLoop::cycle):
2951
2952 2008-05-13  Alp Toker  <alp@nuanti.com>
2953
2954         GTK+ build fix. Fix IDL filename typo and add JavaScriptCallFrame.cpp
2955         to the build.
2956
2957         * GNUmakefile.am:
2958
2959 2008-05-13  Matt Lilek  <webkit@mattlilek.com>
2960
2961         Not reviewed, partial Gtk build fix.
2962
2963         * GNUmakefile.am:
2964
2965 2008-05-13  Timothy Hatcher  <timothy@apple.com>
2966
2967         Fixes a crash when stepping out in the Inspector's debugger.
2968
2969         http://bugs.webkit.org/show_bug.cgi?id=19037
2970
2971         Reviewed by Dan Bernstein.
2972
2973         * page/InspectorController.cpp:
2974         (WebCore::currentCallFrame): Adds a null check of currentCallFrame,
2975         since it can be null. Also returns JSNull to better signify this.
2976         * page/inspector/ScriptsPanel.js: Updates the debugger interface
2977         when stepping so the currentCallFrame isn't accessed when not paused.
2978         Adds a _clearInterface function to remove duplicate code.
2979
2980 2008-05-13  chris fleizach  <cfleizach@apple.com>
2981
2982         Reviewed by Beth Dakin
2983
2984         <rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
2985
2986         * page/AccessibilityRenderObject.cpp:
2987         (WebCore::AccessibilityRenderObject::title):
2988
2989 2008-05-13  Timothy Hatcher  <timothy@apple.com>
2990
2991         Adds an overlay window that covers the scripts panel and
2992         informs the user that they need to attach the debugger.
2993         Provides an "Attach Debugger" button below the info text.
2994
2995         Reviewed by Dan Bernstein.
2996
2997         * English.lproj/localizedStrings.js: New strings.
2998         * page/inspector/ScriptsPanel.js:
2999         (WebInspector.ScriptsPanel): Create the overlay elements and
3000         append to the main panel element.
3001         * page/inspector/inspector.css: New styles for the over lay elements.
3002
3003 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3004
3005         Fixes the assertion and crash that would happen when inspecting a element from a frame.
3006         This change makes JSInspectedObjectWrapper pass unwrapped objects around for global objects
3007         that share the same page group identifier. Also returns jsUndefined() instead of 0 to prevent
3008         crashing in release builds if the page groups don't match.
3009
3010         Passes all the tests in: manual-tests/inspector-wrappers
3011
3012         Reviewed by Adam Roben.
3013
3014         * bindings/js/JSInspectedObjectWrapper.cpp:
3015         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Return jsUndefined() instead of 0.
3016         Call allowsUnwrappedAccessFrom instead of unwrappedExecStateMatches.
3017         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3018         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Renamed from unwrappedExecStateMatches.
3019         Return true if the pageGroupIdentifier of both wrappers match.
3020         (WebCore::JSQuarantinedObjectWrapper::callAsFunction): Return jsUndefined() instead of 0.
3021         * bindings/js/JSQuarantinedObjectWrapper.h: Renamed unwrappedExecStateMatches to allowsUnwrappedAccessFrom.
3022
3023 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3024
3025         Fixes the hang that could happen when option-clicking to expand
3026         a disclosure triangle in the Properties pane. This change limits
3027         the recursion depth when expanding the tree elements.
3028
3029         <rdar://problem/5847681> Safari hangs when option-clicking a
3030         disclosure triangle in the Inspector's Properties pane
3031
3032         Reviewed by John Sullivan.
3033
3034         * page/inspector/treeoutline.js:
3035         (TreeElement.prototype.expandRecursively): Pass an empty info object to
3036         traverseNextTreeElement to get the depthChange value. This is used to
3037         compute a current depth. If the depth exceeds the maxDepth argument, the
3038         item isn't expanded and children wont be populated when traverseNextTreeElement
3039         is called until the depth goes below the maxDepth.
3040         (TreeElement.prototype.traverseNextTreeElement): Added a new info
3041         argument that can be optionally used to return extra info like depth change.
3042
3043 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3044
3045         Adds info text to panes and sections in the Inspector's sidebars
3046         that would normally be empty. These help the user know why there
3047         is nothing in these sections.
3048
3049         Reviewed by John Sullivan.
3050
3051         * English.lproj/localizedStrings.js: Add strings.
3052         * page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
3053         * page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
3054         * page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
3055         * page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
3056         * page/inspector/inspector.css: Adds style rules for the info elements.
3057
3058 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3059
3060         Implements the rest of the Scripts panel to get the debugger
3061         mostly working. "Basic debugging seems to work."
3062
3063         Reviewed by Geoff Garen.
3064
3065         * English.lproj/localizedStrings.js: Adds new strings.
3066         * page/inspector/Resource.js:
3067         (WebInspector.Resource.prototype.get scripts): Returns _scripts and 
3068         creates it lazily.
3069         (WebInspector.Resource.prototype.addScript): Add the script object to the
3070         front of the _scripts array.
3071         (WebInspector.Resource.prototype.removeAllScripts): Removed all the scripts
3072         and removes the resource back-reference.
3073         (WebInspector.Resource.prototype.removeScript): Removes the script and
3074         breaks the resource back-reference.
3075         * page/inspector/ResourceView.js:
3076         (WebInspector.ResourceView): Adds a reminder comment.
3077         (WebInspector.ResourceView.prototype.get headersVisible): Returns _headersVisible. 
3078         (WebInspector.ResourceView.prototype.set headersVisible): Stubs out
3079         a setter that currently just sets _headersVisible. Has a comment that
3080         points out this needs implemented when network headers are added.
3081         * page/inspector/ResourcesPanel.js:
3082         (WebInspector.ResourcesPanel.prototype.show): Sets the headersVisible property of
3083         the visible view to true and shows it again, in case it was being shown in Scripts.
3084         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
3085         Copies the headersVisible property from the old view to the new view.
3086         (WebInspector.ResourcesPanel.prototype.showResource): Sets the headersVisible
3087         property to true before showing.
3088         * page/inspector/ScriptView.js:
3089         (WebInspector.ScriptView): Passes in _addBreakpoint for the add breakpoint delegate.
3090         (WebInspector.ScriptView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
3091         for the current Script.sourceID and line.
3092         * page/inspector/ScriptsPanel.js:
3093         (WebInspector.ScriptsPanel): 
3094         (WebInspector.ScriptsPanel.prototype.show): Sets the headersVisible property of
3095         the visible view to false and shows it again, in case it was being shown in Resources.
3096         (WebInspector.ScriptsPanel.prototype.addScript): Makes a new Script object and
3097         adds it to a Resource if one is found. Registers any breakpoint that match
3098         the new Script's source URL, and sets the sourceID of the breakpoints.
3099         (WebInspector.ScriptsPanel.prototype.addBreakpoint): Adds the breakpoint to the
3100         BreakpointsSidebarPane. Also adds it to _breakpointsURLMap so it can be found
3101         later in addScript by URL. Finally adds the breakpoint to the SourceFrame that
3102         represents the resources or script.
3103         (WebInspector.ScriptsPanel.prototype.removeBreakpoint): Removes the breakpoint from
3104         the BreakpointsSidebarPane, _breakpointsURLMap and SourceFrame.
3105         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Update the debugger
3106         state variables, the buttons and the CallStackSidebarPane.
3107         (WebInspector.ScriptsPanel.prototype.reset): Clears and resets debugger
3108         and interface state.
3109         (WebInspector.ScriptsPanel.prototype.get visibleView): Returns _visibleView.
3110         (WebInspector.ScriptsPanel.prototype.set visibleView): Sets _visibleView and
3111         calls hide on the old view and show on the new view.
3112         (WebInspector.ScriptsPanel.prototype.showScript): Calls _showScriptOrResource.
3113         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
3114         (WebInspector.ScriptsPanel.prototype.scriptViewForScript): Lazily creates a
3115         ScriptView for the Script and returns it. 
3116         (WebInspector.ScriptsPanel.prototype.sourceFrameForScript): Returns the SourceFrame
3117         for the Script.
3118         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): Returns the
3119         SourceFrame based on the type of object passed in.
3120         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Shows the view based on
3121         the type of object passed in. If the object is a resource and there are breakpoints
3122         defined for that Resource URL, then populate the SourceFrame with the breakpoints.
3123         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Adds a script to the 
3124         files menu. If the Script is part of a resource, that resource is added.
3125         (WebInspector.ScriptsPanel.prototype._removeScriptFromFilesMenu): Remove a script from
3126         the files menu. If that script is part of a resource and it is the last script of that
3127         resource, then remove the whole resource.
3128         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine): Clears the execution
3129         line from the SourceFrame that is showing it.
3130         (WebInspector.ScriptsPanel.prototype._callFrameSelected): Event listener for when the
3131         call frame changes in the CallStackSidebarPane. Triggers updates to the ScopeChainSidebarPane
3132         and the visible view.
3133         (WebInspector.ScriptsPanel.prototype._changeVisibleFile): Event listener for the change state
3134         of the files select element.
3135         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Update more of the 
3136         buttons to reflect the current debugger state. Updates the status text too.
3137         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Reset the UI and state when
3138         the debugger is attached/detached.
3139         (WebInspector.ScriptsPanel.prototype._togglePause): Call InspectorController.resumeDebugger or
3140         InspectorController.pauseInDebugger depending on the paused state.
3141         (WebInspector.ScriptsPanel.prototype._stepOverClicked): Call InspectorController.stepOverStatementInDebugger.
3142         (WebInspector.ScriptsPanel.prototype._stepIntoClicked): Call InspectorController.stepIntoStatementInDebugger.
3143         (WebInspector.ScriptsPanel.prototype._stepOutClicked): InspectorController.stepOutOfFunctionInDebugger.
3144         * page/inspector/SourceView.js:
3145         (WebInspector.SourceView): Passes in _addBreakpoint for the add breakpoint delegate.
3146         (WebInspector.SourceView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
3147         for the nearest Script's sourceID and passed in line.
3148         * page/inspector/inspector.css: New style rules for the UI changes.
3149         * page/inspector/inspector.js:
3150         (WebInspector.loaded): Add the ScriptsPanel to the panels list.
3151         (WebInspector.parsedScriptSource): Call ScriptsPanel.addScript.
3152         (WebInspector.failedToParseScriptSource): Ditto.
3153         (WebInspector.pausedScript): Call ScriptsPanel.debuggerPaused.
3154
3155 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3156
3157         Adds implementations of the Scope Chain and Call Stack sidebar panes.
3158         These panes use the JSJavaScriptCallFrame object that will be passed
3159         to the update functions.
3160
3161         Reviewed by Kevin McCullough.
3162
3163         * English.lproj/localizedStrings.js: Adds new strings.
3164         * WebCore.vcproj/WebCore.vcproj: Adds new files.
3165         * page/inspector/CallStackSidebarPane.js:
3166         (WebInspector.CallStackSidebarPane.prototype.update): Walk the 
3167         caller chain of the call frame and make placards for each.
3168         (WebInspector.CallStackSidebarPane.prototype.get selectedCallFrame):
3169         Return _selectedCallFrame. 
3170         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
3171         Set _selectedCallFrame and dispatch the "call frame selected" event.
3172         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
3173         Set the selectedCallFrame based on the clicked placard.
3174         * page/inspector/Placard.js: Added. A user interface object that can
3175         be used to show a title and a subtitle block with a selected state.
3176         * page/inspector/ScopeChainSidebarPane.js: Added.
3177         (WebInspector.ScopeChainSidebarPane): Call the base object and set the title.
3178         (WebInspector.ScopeChainSidebarPane.prototype.update): Iterate over the
3179         call frame's scope chain and make ObjectPropertiesSections for each.
3180         * page/inspector/SidebarPane.js:
3181         (WebInspector.SidebarPane.prototype): Inherit from WebInspector.Object.
3182         * page/inspector/WebKit.qrc: Add new files.
3183         * page/inspector/inspector.css: Add placard styles.
3184         * page/inspector/inspector.html: Add new files.
3185
3186 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3187
3188         Fixes the bug where SourceViews would be blank if shown before
3189         the Resource finished loading.
3190
3191         <rdar://problem/5807420> Safari's Web Inspector won't display the
3192         contents of some CSS and JS files
3193
3194         Reviewed by Kevin McCullough.
3195
3196         * page/inspector/Resource.js:
3197         (WebInspector.Resource.prototype.set finished): Dispatch the finished event
3198         (WebInspector.Resource.prototype): Inherit from WebInspector.Object.prototype.
3199         * page/inspector/SourceView.js:
3200         (WebInspector.SourceView): Register for the finished event on the resource.
3201         When the event fires, setup the source frame and deregister the event.
3202
3203 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3204
3205         Factored most of SourceView out into SourceFrame so it can be shared
3206         by the new ScriptView. Added the ScriptView class to be used for
3207         scripts that arn't Resources (like eval code.) Added a simple Script
3208         object that hold the data from the debugger parsedSource hooks. A
3209         ScriptView holds a Script object, and uses it for source data.
3210
3211         Added breakpoint and execution line support to the SourceFrame
3212         where they are visually represented in the source.
3213
3214         Reviewed by Kevin McCullough.
3215
3216         * page/inspector/inspector.js:
3217         (WebInspector.performSearch): Change the caller of sourceFrameForResource
3218         to use the SourceFrame result's element property.
3219         * page/inspector/ResourcesPanel.js: Use the new SourceFrame.
3220         * page/inspector/Script.js: Added.
3221         * page/inspector/ScriptView.js: Added.
3222         * page/inspector/SourceFrame.js: Added.
3223         * page/inspector/SourceView.js: Use the new SourceFrame.
3224         * WebCore.vcproj/WebCore.vcproj: Add new files.
3225         * page/inspector/WebKit.qrc: Ditto.
3226         * page/inspector/inspector.html: Ditto.
3227
3228 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3229
3230         Adds a Breakpoint object and basic add/remove functions on
3231         BreakpointsSidebarPane that call the InspectorController to
3232         add/remove the breakpoint.
3233
3234         Reviewed by Kevin McCullough.
3235
3236         * page/inspector/Breakpoint.js:
3237         (WebInspector.Breakpoint): 
3238         (WebInspector.Breakpoint.prototype.get enabled): Return _enabled.
3239         (WebInspector.Breakpoint.prototype.set enabled): Set _enabled and
3240         dispatch the enabled/disabled event to listeners.
3241         * page/inspector/BreakpointsSidebarPane.js:
3242         (WebInspector.BreakpointsSidebarPane): Add a breakpoints array.
3243         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
3244         Adds the breakpoint to the breakpoints array. Registers for the disabled
3245         and enabled event types. Call InspectorController.addBreakpoint if attached.
3246         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
3247         Removes the breakpoint from the breakpoints array. Deregisters for the disabled
3248         and enabled event types. Call InspectorController.removeBreakpoint if attached.
3249         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
3250         Call InspectorController.addBreakpoint or InspectorController.removeBreakpoint
3251         depending on the enabled state of the breakpoint.
3252         * WebCore.vcproj/WebCore.vcproj: Add new files.
3253         * page/inspector/WebKit.qrc: Ditto.
3254         * page/inspector/inspector.html: Ditto.
3255
3256 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3257
3258         Make addSourceToFrame not dependent on InspectorResource so it
3259         can be used to add source of a passed in string and mime-type to
3260         a frame. Added addResourceSourceToFrame for use by SourceView.
3261
3262         Also fixes an assertion because of an incorrect static_cast of identifiers
3263         to unsigned long long, when they can be unsigned.
3264
3265         Reviewed by Geoff Garen.
3266
3267         * page/InspectorController.cpp:
3268         (WebCore::addSourceToFrame): Helper function used by addSourceToFrame
3269         and addResourceSourceToFrame.
3270         (WebCore::addSourceToFrame): Generalized to take a source and mime-type string.
3271         (WebCore::addResourceSourceToFrame): Renamed from addSourceToFrame.
3272         (WebCore::getResourceDocumentNode): Fixes the static_cast to be long long.
3273         (WebCore::InspectorController::windowScriptObjectAvailable): Adds
3274         addResourceSourceToFrame to the JavaScript class.
3275         * page/inspector/SourceView.js: Use the new addResourceSourceToFrame.
3276
3277 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3278
3279         Add debugger related functions to the InspectorController and
3280         expose them to the JavaScript side of InspectorController.
3281
3282         Reviewed by Geoff Garen.
3283
3284         * page/InspectorController.cpp:
3285         (WebCore::jsStringRef): Added helper to convert a UString to a JSStringRef.
3286         (WebCore::currentCallFrame): Call InspectorController::currentCallFrame.
3287         (WebCore::pauseInDebugger): Call InspectorController::pauseInDebugger.
3288         (WebCore::resumeDebugger): Call InspectorController::resumeDebugger.
3289         (WebCore::stepOverStatementInDebugger): Call InspectorController::stepOverStatementInDebugger.
3290         (WebCore::stepIntoStatementInDebugger): Call InspectorController::stepIntoStatementInDebugger.
3291         (WebCore::stepOutOfFunctionInDebugger): Call InspectorController::stepOutOfFunctionInDebugger.
3292         (WebCore::addBreakpoint): Call InspectorController::addBreakpoint.
3293         (WebCore::removeBreakpoint): Call InspectorController::removeBreakpoint.
3294         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new functions to the
3295         InspectorController JavaScript class.
3296         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage): Clear breakpoints.
3297         (WebCore::InspectorController::currentCallFrame): Return the currentCallFrame from the
3298         JavaScriptDebugServer.
3299         (WebCore::InspectorController::pauseInDebugger): Call JavaScriptDebugServer's pauseOnNextStatement.
3300         (WebCore::InspectorController::resumeDebugger): Call JavaScriptDebugServer's resume.
3301         (WebCore::InspectorController::stepOverStatementInDebugger):  Call JavaScriptDebugServer's stepOverStatement.
3302         (WebCore::InspectorController::stepIntoStatementInDebugger): Call JavaScriptDebugServer's stepIntoStatement.
3303         (WebCore::InspectorController::stepOutOfFunctionInDebugger): Call JavaScriptDebugServer's stepOutOfFunction.
3304         (WebCore::InspectorController::addBreakpoint): Call JavaScriptDebugServer's addBreakpoint.
3305         (WebCore::InspectorController::removeBreakpoint): Call JavaScriptDebugServer's removeBreakpoint.
3306         (WebCore::InspectorController::didParseSource): Call into the Inspector's JavaScript.
3307         (WebCore::InspectorController::failedToParseSource): Ditto.
3308         (WebCore::InspectorController::didPause): Ditto.
3309         * page/InspectorController.h: Add new functions.
3310
3311 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3312
3313         Implements more debugger APIs on JavaScriptDebugServer and reduces
3314         the number of callbacks to JavaScriptDebugListeners. These changes
3315         will better facilitate debugger optimizations when SquirrelFish merges.
3316
3317         Reviewed by Kevin McCullough.
3318
3319         * page/InspectorController.cpp:
3320         (WebCore::InspectorController::didParseSource): Removed the ExecState.
3321         (WebCore::InspectorController::failedToParseSource): Ditto.
3322         (WebCore::InspectorController::didPause): Added.
3323         * page/InspectorController.h: Changed the JavaScriptDebugListener functions.
3324         * page/JavaScriptDebugListener.h: Removed some callbacks and added didPause.
3325         * page/JavaScriptDebugServer.cpp:
3326         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Initialize new data members.
3327         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all values of m_breakpoints.
3328         (WebCore::JavaScriptDebugServer::removeListener): Call resume if the last listener was removed.
3329         (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Returns true if there are any
3330         global listeners or a listener for the page.
3331         (WebCore::JavaScriptDebugServer::addBreakpoint): Adds and entry to m_breakpoints.
3332         (WebCore::JavaScriptDebugServer::removeBreakpoint): Removes a entry in m_breakpoints.
3333         (WebCore::JavaScriptDebugServer::hasBreakpoint):  Checks if there is a breakpoint for the
3334         sourceID and line.
3335         (WebCore::JavaScriptDebugServer::clearBreakpoints): Removed all breakpoints.
3336         (WebCore::JavaScriptDebugServer::pauseOnNextStatement): Sets m_pauseOnNextStatement to true.
3337         (WebCore::JavaScriptDebugServer::resume): Sets m_paused to false.
3338         (WebCore::JavaScriptDebugServer::stepIntoStatement): Calls resume and sets
3339         m_pauseOnNextStatement to true.
3340         (WebCore::JavaScriptDebugServer::stepOverStatement): Calls resume and sets m_pauseOnExecState to
3341         the current call frame's ExecState.
3342         (WebCore::JavaScriptDebugServer::stepOutOfFunction): Calls resume and sets m_pauseOnExecState to
3343         the current call frame's caller ExecState.
3344         (WebCore::JavaScriptDebugServer::currentCallFrame): Returns m_currentCallFrame if paused.
3345         (WebCore::dispatchDidParseSource): Removed the ExecState argument.
3346         (WebCore::dispatchFailedToParseSource): Ditto.
3347         (WebCore::JavaScriptDebugServer::sourceParsed): Doesn't pass the ExecState to dispatchDidParseSource
3348         or dispatchFailedToParseSource.
3349         (WebCore::dispatchFunctionToListeners):
3350         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Removes all the arguments passed
3351         to the callback.
3352         (WebCore::JavaScriptDebugServer::setJavaScriptPaused): Various overloaded functions
3353         to pause parts of WebCore to prevent JavaScript execution while paused.
3354         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Decides if the debugger should pause based
3355         on the passed in ExecState, source ID and line number. This checks for breakpoints, stepping, etc.
3356         Calls didPause on all the listeners and spins a EventLoop until resume is called.
3357         (WebCore::JavaScriptDebugServer::callEvent): Call pauseIfNeeded.
3358         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
3359         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
3360         (WebCore::JavaScriptDebugServer::exception): Ditto.
3361         * page/JavaScriptDebugServer.h: Added new functions.
3362
3363 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3364
3365         Change View.show to call detach if the parentNode dosen't
3366         match before appending to the passed in parent element.
3367         This also prevents appending to the same parent element
3368         multiple times.
3369
3370         Reviewed by John Sullivan.
3371
3372         * page/inspector/FontView.js:
3373         (WebInspector.FontView.prototype.show): Pass the parent element to View.show.
3374         * page/inspector/ResourceView.js: Optimize the attach method to no append if
3375         there is a parentNode already.
3376         * page/inspector/SourceView.js: Ditto.
3377         * page/inspector/View.js: Call detach before appending if the parentNode
3378         doesn't match the passed in element.
3379
3380 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3381
3382         Optimize the panel attach method to no append if there is a
3383         parentNode already.
3384
3385         Reviewed by Adam Roben.
3386
3387         * page/inspector/Panel.js:
3388         (WebInspector.Panel.prototype.attach): Don't append to main-panels
3389         if the panel element already has a parentNode.
3390
3391 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3392
3393         Add Widget::isPluginView so the JavaScriptDebugServer can identify
3394         plugins that need to be paused during debugging. This will be used
3395         in a upcoming commit.
3396
3397         Reviewed by Kevin McCullough.
3398
3399         * platform/Widget.h: Add isPluginView. Return false.
3400         * plugins/PluginView.h: Add isPluginView. Return true.
3401
3402 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3403
3404         Adds an event loop abstraction to platform. This abstraction will be
3405         used by the JavaScriptDebugServer to implement pausing.
3406
3407         Reviewed by Kevin McCullough.
3408
3409         * platform/EventLoop.h: Added.
3410         (WebCore::EventLoop::EventLoop):
3411         (WebCore::EventLoop::ended): Return m_ended.
3412         * platform/mac/EventLoopMac.mm: Added.
3413         (WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.
3414         * platform/win/EventLoopWin.cpp: Added.
3415         (WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.
3416         * WebCore.xcodeproj/project.pbxproj: Add new files.
3417         * WebCore.vcproj/WebCore.vcproj: Ditto.
3418
3419 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3420
3421         Breaks out ObjectPropertiesSection from PropertiesSidebarPane
3422         so it can be used by the Scripts panel's Scope Chain pane.
3423
3424         Rubber-stamped by Adam Roben.
3425
3426         * page/inspector/ObjectPropertiesSection.js: Added.
3427         * page/inspector/PropertiesSidebarPane.js: Moved ObjectPropertiesSection
3428         to ObjectPropertiesSection.js.
3429         * WebCore.vcproj/WebCore.vcproj: Add the new file.
3430         * page/inspector/WebKit.qrc: Ditto.
3431         * page/inspector/inspector.html: Ditto.
3432
3433 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3434
3435         Add a helper function to the Inspector's Array prototype
3436         that will remove any identical values/objects from the array.
3437
3438         Reviewed by Kevin McCullough.
3439
3440         * page/inspector/utilities.js:
3441         (Array.prototype.remove): Iterate over the array and strict
3442         compare to the passed in value. If they match, splice that index
3443         out of the array. If onlyFirst is true, return after the first splice.
3444
3445 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3446
3447         Adds a JavaScriptCallFrame object and JavaScript binding with an IDL.
3448         This object will expose the stack to the Inspector's debugger.
3449
3450         Reviewed by Adam Roben.
3451
3452         * DerivedSources.make: Add JavaScriptCallFrame.
3453         * bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.
3454         (WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
3455         (WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.
3456         * page/JavaScriptCallFrame.cpp: Added.
3457         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
3458         (WebCore::JavaScriptCallFrame::caller): Returns m_caller.
3459         (WebCore::JavaScriptCallFrame::functionName): Returns the function
3460         name from the ExecState if this is not global code or anonymous.
3461         (WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
3462         in the scope of the call frame.
3463         * page/JavaScriptCallFrame.h: Added.
3464         (WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
3465         (WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
3466         stale ExecState from being accessed after the lifetime of the ExecState.
3467         (WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
3468         (WebCore::JavaScriptCallFrame::execState): Returns m_exec.
3469         (WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
3470         (WebCore::JavaScriptCallFrame::line): Returns m_line.
3471         (WebCore::JavaScriptCallFrame::setLine): Sets m_line.
3472         (WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().
3473         * page/JavaScriptCallFrame.idl: Added.
3474         * WebCore.xcodeproj/project.pbxproj: Add new files.
3475         * WebCore.vcproj/WebCore.vcproj: Ditto.
3476
3477 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3478
3479         Add a new WebInspector.Object base class that will be used for
3480         a few objects in the Web Inspector to support listeners on any
3481         object. This will help add more abstraction to the Inspector.
3482
3483         Reviewed by Adam Roben.
3484
3485         * page/inspector/Object.js: Added.
3486         (WebInspector.Object): Does nothing.
3487         (WebInspector.Object.prototype.addEventListener): Adds the listener to
3488         the _listeners map by type. Supports a this object argument, for easy
3489         addition of listeners without the need for bind.
3490         (WebInspector.Object.prototype.removeEventListener): Remove the listener
3491         from the _listeners map. If the listener is null and the thisObject was
3492         passed, remove any listener for that thisObject.
3493         (WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
3494         for a type to all listeners for that type. Mimics some of the DOMEvent
3495         methods and properties for the event object passed to the listeners.
3496         * WebCore.vcproj/WebCore.vcproj: Add new files.
3497         * page/inspector/WebKit.qrc: Ditto.
3498         * page/inspector/inspector.html: Ditto.
3499
3500 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3501
3502         Update the view source CSS to better match the new Inspector mock-ups.
3503
3504         Reviewed by Kevin McCullough.
3505
3506         * css/view-source.css:
3507
3508 2008-05-13  John Sullivan  <sullivan@apple.com>
3509
3510         Reviewed by Dan Bernstein and Kevin Decker
3511         
3512         - fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind
3513
3514         Test: fast/forms/select-type-ahead-list-box-no-selection.html
3515
3516         * html/HTMLSelectElement.cpp:
3517         (WebCore::HTMLSelectElement::typeAheadFind):
3518         When there's no initially-selected element, we were accessing index -1. Check for this
3519         case and start at 0.
3520
3521 2008-05-13  Sam Weinig  <sam@webkit.org>
3522
3523         Reviewed by Dan Bernstein.
3524
3525         Small cleanup to XMLHttpRequest in preparation for Access Control changes.
3526
3527         * xml/XMLHttpRequest.cpp: