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