Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2
3         Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
4         code that contains an eval. This change makes stepping into eval
5         code work as expected.
6
7         http://bugs.webkit.org/show_bug.cgi?id=19038
8
9         Reviewed by Kevin McCullough.
10
11         Tested with: manual-tests/inspector/returnEvent-crash.html
12
13         * manual-tests/inspector/returnEvent-crash.html: Added.
14         * page/JavaScriptDebugServer.cpp:
15         (WebCore::JavaScriptDebugServer::sourceParsed): Adds #ifdefed
16         debugging code to prevent the sourceID and URL.
17         (WebCore::updateCurrentCallFrame): Added. A helper function that
18         is called from all 4 of the debugger hooks below. This function will
19         update and/or create JavaScriptCallFrames to match the exec state,
20         sourceID and lineNumber passed into it. Contains #ifdefed debugging
21         code that was helpful while fixing this bug.
22         (WebCore::JavaScriptDebugServer::callEvent): Call updateCurrentCallFrame
23         before pauseIfNeeded.
24         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
25         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
26         (WebCore::JavaScriptDebugServer::exception): Ditto.
27
28 2008-05-14  Alp Toker  <alp@nuanti.com>
29
30         GTK+ build fix for r33457. Add NetworkStateNotifier.cpp to the build.
31
32         * GNUmakefile.am:
33
34 2008-05-14  Alp Toker  <alp@nuanti.com>
35
36         GTK+ build fix. Include value.h from kjs, not JavaScriptCore.
37
38         * page/JavaScriptProfile.cpp:
39         * page/JavaScriptProfileNode.cpp:
40
41 2008-05-14  Adam Roben  <aroben@apple.com>
42
43         Windows release build fix
44
45         * WebCore.vcproj/WebCore.vcproj: Make sure the warnings we disable on
46         XPathGrammar.cpp are disabled for all configurations, not just
47         Debug_Internal.
48
49 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
50
51         Reviewed by Sam.
52
53         <rdar://problem/5770054> JavaScript profiler (10928)
54         - Rename FunctionCallProfile to ProfileNode
55
56         * ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
57         * ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
58         * GNUmakefile.am:
59         * WebCore.pro:
60         * WebCore.vcproj/WebCore.vcproj:
61         * WebCore.xcodeproj/project.pbxproj:
62         * WebCoreSources.bkl:
63         * page/JavaScriptFunctionCallProfile.cpp: Removed.
64         * page/JavaScriptFunctionCallProfile.h: Removed.
65         * page/JavaScriptProfile.cpp:
66         * page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp.
67         (WebCore::ProfileNodeCache):
68         (WebCore::getFunctionName):
69         (WebCore::getTotalTime):
70         (WebCore::getSelfTime):
71         (WebCore::getNumberOfCalls):
72         (WebCore::getChildren):
73         (WebCore::finalize):
74         (WebCore::ProfileNodeClass):
75         (WebCore::toJS):
76         * page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
77
78 2008-05-13  Beth Dakin  <bdakin@apple.com>
79
80         Reviewed by Brady.
81
82         This patch adds support for the ARIA progressbar role and the 
83         following ARIA states (ie HTML attributes): aria-checked, aria-
84         level, aria-pressed, aria-valuenow, aria-valuemin, and aria-
85         valuemax.
86
87         * html/HTMLAttributeNames.in:
88         * page/AccessibilityObject.h:
89         (WebCore::AccessibilityObject::isProgressIndicator):
90         (WebCore::AccessibilityObject::valueForRange):
91         (WebCore::AccessibilityObject::maxValueForRange):
92         (WebCore::AccessibilityObject::minValueForRange):
93         * page/AccessibilityRenderObject.cpp:
94         (WebCore::AccessibilityRenderObject::isProgressIndicator):
95         (WebCore::AccessibilityRenderObject::isPressed): Check the aria-
96         pressed attribute if this is an ARIA button.
97         (WebCore::AccessibilityRenderObject::headingLevel): Check the aria-
98         level attribute if this is an ARIA heading.
99         (WebCore::AccessibilityRenderObject::intValue): Check the aria-
100         checked attribute if this is an ARIA radio button or checkbox.
101         (WebCore::AccessibilityRenderObject::valueForRange):
102         (WebCore::AccessibilityRenderObject::maxValueForRange):
103         (WebCore::AccessibilityRenderObject::minValueForRange):
104         (WebCore::RoleEntry::):
105         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
106         * page/AccessibilityRenderObject.h:
107         * page/mac/AccessibilityObjectWrapper.mm:
108         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
109         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
110
111 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
112
113         Reviewed by John.
114
115         -<rdar://problem/5770054> JavaScript profiler (10928)
116         Use the FunctionCallProfile's new total and self time functions.
117
118         * page/JavaScriptFunctionCallProfile.cpp:
119         (WebCore::getTotalTime):
120         (WebCore::getSelfTime):
121
122 2008-05-14  Anders Carlsson  <andersca@apple.com>
123
124         Reviewed by Adam.
125
126         Don't try to store the resource data if it's empty.
127         
128         * loader/appcache/ApplicationCacheStorage.cpp:
129         (WebCore::ApplicationCacheStorage::store):
130
131 2008-05-14  Adam Roben  <aroben@apple.com>
132
133         Windows build fix
134
135         * platform/network/NetworkStateNotifier.cpp: Added a missing #include.
136         * platform/network/NetworkStateNotifier.h:
137         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Removed 'void'
138         return type from the constructor, and fixed the spelling of a member
139         variable.
140
141 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
142
143         Reviewed by Adam.
144
145         <rdar://problem/5770054> JavaScript profiler (10928)
146         - Add support for interacting with the JavaScriptCore profiler.
147
148         * ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
149         * ForwardingHeaders/profiler/Profile.h: Added.
150         * GNUmakefile.am: Add the new files to all the projects.
151         * WebCore.pro:
152         * WebCore.vcproj/WebCore.vcproj:
153         * WebCore.xcodeproj/project.pbxproj:
154         * WebCoreSources.bkl:
155         * page/InspectorController.cpp: Add the ability to retrieve all of the
156         profiles in JavaScript from the InspectorController.
157         (WebCore::allProfiles):
158         (WebCore::InspectorController::windowScriptObjectAvailable):
159         * page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC
160         FunctionCallProfile.
161         (WebCore::functionCallProfileCache): This cache makes sure we don't
162         needlessly create duplicate wrappers around the same
163         FunctionCallProfile*.
164         (WebCore::getFunctionName): Callback to return the name of the function.
165         (WebCore::getTotalTime): Callback to return the total time spent in the
166         function.
167         (WebCore::getSelfTime): Callback to return the time spent in self (total
168         - time in children) in the function.
169         (WebCore::getNumberOfCalls): Callback to return the number of times this
170         function was called.
171         (WebCore::getChildren): Callback to return the children of this function
172         where the children are the functions this function called.
173         (WebCore::finalize): Cleanup.
174         (WebCore::functionCallProfileClass): Define the JSClassRef for this
175         object.
176         (WebCore::toJS): Create a conversion function to make a usable JSValue
177         to wrap the FunctionCallProfile in JSC.
178         * page/JavaScriptFunctionCallProfile.h: Added.
179         * page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile.
180         (WebCore::profileCache): This cache makes sure we don't needlessly
181         create duplicate wrappers aroudn the same Profile*.
182         (WebCore::getHeadCallback): Callback to return the head of the graph of
183         the functions profiled durring this profile's run.
184         (WebCore::finalize):
185         (WebCore::profileClass): Define the JSClassRef for this object.
186         (WebCore::toJS): Create a conversion function to make a usable JSValue
187         to wrap the Profile from JSC.
188         * page/JavaScriptProfile.h: Added.
189
190 2008-05-14  David Hyatt  <hyatt@apple.com>
191
192         Fix for bug https://bugs.webkit.org/show_bug.cgi?id=16130.
193
194         Opacity, transforms, reflections and masks should not honor z-index unless the element is also
195         positioned.  Always reset to auto if the element is not positioned (and then the following code will
196         adjust auto to 0 as needed).
197
198         Reviewed by Dan Bernstein
199
200         * css/CSSStyleSelector.cpp:
201         (WebCore::CSSStyleSelector::adjustRenderStyle):
202
203 2008-05-14  Anders Carlsson  <andersca@apple.com>
204
205         Reviewed by Brady.
206
207         <rdar://problem/5931742> Support navigator.onLine from HTML5
208         
209         * WebCore.vcproj/WebCore.vcproj:
210         * WebCore.xcodeproj/project.pbxproj:
211         Add NetworkStateNotifier files.
212         
213         * dom/EventNames.h:
214         Add offline and online events.
215         
216         * page/Navigator.cpp:
217         (WebCore::Navigator::onLine):
218         * page/Navigator.h:
219         * page/Navigator.idl:
220         Add navigator.onLine.
221         
222         * page/Page.cpp:
223         (WebCore::networkStateChanged):
224         Dispatch offline/online events to all frames.
225         
226         (WebCore::Page::Page):
227         Set state change callback.
228         
229         * platform/network/NetworkStateNotifier.cpp: Added.
230         * platform/network/NetworkStateNotifier.h: Added.
231
232         * platform/network/mac/NetworkStateNotifierMac.cpp: Added.
233         Mac network state notifier.
234
235 2008-05-14  Adam Roben  <aroben@apple.com>
236
237         Fix Bug 18888: REGRESSION (r32731): console.log always prints
238         "undefined"
239
240         <https://bugs.webkit.org/show_bug.cgi?id=18888>
241
242         Reviewed by Tim Hatcher.
243
244         Tested by pre-existing
245         manual-tests/inspector/console-log-formatting.html.
246
247         * page/inspector/Console.js:
248         (WebInspector.ConsoleMessage.prototype._format): Changed to explicitly
249         wrap Console._format instead of using bind to do it. Using bind was
250         causing us to pass plainText in as the first parameter instead of as
251         the second.
252
253 2008-05-14  Timothy Hatcher  <timothy@apple.com>
254
255         Fixes the bug where stepping out of a function would show the wrong
256         call stack (would look like it stepped out twice.)
257
258         Reviewed by Adam Roben.
259
260         * page/JavaScriptDebugServer.cpp:
261         (WebCore::JavaScriptDebugServer::returnEvent):
262         Call pauseIfNeeded before setting m_currentCallFrame to the caller.
263
264 2008-05-14  Stephanie Lewis  <slewis@apple.com>
265    
266         Fix 64bit build
267
268         * plugins/PluginView.h:
269
270 2008-05-14  David Kilzer  <ddkilzer@apple.com>
271
272         REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)
273
274         <https://bugs.webkit.org/show_bug.cgi?id=18976>
275         <rdar://problem/5924793>
276
277         Reviewed by Darin.
278
279         Tests: fast/dom/dom-parse-serialize-expected.txt:
280                fast/xsl/xslt-processor-expected.txt:
281                fast/xsl/xslt-text-expected.txt:
282
283         Commit r26474 removed escaping of '>' characters to '&gt;' in serialized
284         HTML content, which broke one jQuery test.  This change restores that
285         serialization behavior to both attributes and content for consistency.
286
287         * editing/markup.cpp:
288         (WebCore::appendAttributeValue): Escape '>' as '&gt;'.
289         (WebCore::escapeContentText): Ditto.
290         (WebCore::appendEscapedContent): Ditto.  This is the bug fix for the jQuery test.
291
292 2008-05-14  Adam Roben  <aroben@apple.com>
293
294         Fix Bug 19051: REGRESSION (r33447): Assertion in
295         JSDebugServer::removeListener closing tab with Inspector open
296
297         <https://bugs.webkit.org/show_bug.cgi?id=19051>
298
299         m_inspectedPage is now cleared when the Page is destroyed, which never
300         used to happen. Some of InspectorController's code was not prepared
301         for this.
302
303         Reviewed by Dave Hyatt.
304
305         * page/InspectorController.cpp:
306         (WebCore::InspectorController::~InspectorController): Removed a call
307         to stopDebugging and added an assertion. Debugging should have already
308         been stopped by this point.
309         (WebCore::InspectorController::inspectedPageDestroyed): Moved here
310         from the header file. Added a call to stopDebugging.
311         (WebCore::InspectorController::enabled): Return false if our inspected
312         Page has already been destroyed, since we can't really do much at this
313         point anyway.
314         (WebCore::InspectorController::didCommitLoad):
315         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
316         (WebCore::InspectorController::identifierForInitialRequest):
317         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
318         (WebCore::InspectorController::stopDebugging):
319         (WebCore::InspectorController::drawNodeHighlight):
320         Assert that m_inspectedPage hasn't been cleared.
321         * page/InspectorController.h:
322
323 2008-05-14  Justin Garcia  <justin.garcia@apple.com>
324
325         Reviewed by Darin.
326
327         <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition
328
329         * editing/Editor.cpp:
330         (WebCore::Editor::confirmComposition): Remove the previous composition
331         when we insert the new one, not with a separate, slower, delete operation.
332         (WebCore::Editor::setComposition): Ditto.
333         * editing/InsertTextCommand.cpp:
334         (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected
335         text with a low level operation that doesn't perform a layout and insert
336         the new text in a way that won't trigger a layout from the removal.
337         (WebCore::InsertTextCommand::input): Call the optimized replace.
338         * editing/InsertTextCommand.h:
339         * editing/htmlediting.cpp:
340         (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid 
341         the expense of getAttribute in the common case.
342         * page/Frame.cpp:
343         (WebCore::Frame::selectionLayoutChanged): Selection::start() and end()
344         will already be at VisiblePosition deepEquivalents. Selection::validate()
345         ensures this.
346
347 2008-05-14  Adam Roben  <aroben@apple.com>
348
349         Make the Inspector able to handle being reloaded
350
351         When Reload was selected from the context menu in the Inspector, the
352         Inspector window would close and never be openable again. Now it
353         closes, then reopens when the page finishes loading.
354
355         Reviewed by Tim Hatcher.
356
357         * page/InspectorController.cpp:
358         (WebCore::InspectorController::close): Removed code that cleared out
359         m_page. This is now handled by pageDestroyed.
360         * page/InspectorController.h:
361         (WebCore::InspectorController::inspectedPageDestroyed): Added.
362         * page/Page.cpp:
363         (WebCore::Page::~Page): Fixed a bug and added a call to the new
364         inspectedPageDestroyed. If we have a parent InspectorController, that
365         means that we are the Page in the Inspector's window (i.e., we are the
366         Inspector's UI), so when we are destroyed we should call
367         InspectorController::pageDestroyed. We also need to call
368         inspectedPageDestroyed on our own InspectorController so that it won't
369         try to call into us.
370
371 2008-05-14  Timothy Hatcher  <timothy@apple.com>
372
373         Add pause on exception support to the Inspector debugger
374         with a toggle buttons to enable or disable it.
375
376         Reviewed by Adam Roben.
377
378         * page/InspectorController.cpp:
379         (WebCore::pauseOnExceptions): Call the InspectorController.
380         (WebCore::setPauseOnExceptions): Ditto.
381         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new
382         setPauseOnExceptions and pauseOnExceptions functions to the JS class.
383         (WebCore::InspectorController::pauseOnExceptions): Call JavaScriptDebugServer.
384         (WebCore::InspectorController::setPauseOnExceptions): Ditto.
385         * page/InspectorController.h:
386         * page/JavaScriptDebugServer.cpp:
387         (WebCore::JavaScriptDebugServer::setPauseOnExceptions): Set m_pauseOnExceptions.
388         (WebCore::JavaScriptDebugServer::exception): Check m_pauseOnExceptions
389         and set m_pauseOnNextStatement to true before calling pauseIfNeeded.
390         * page/JavaScriptDebugServer.h:
391         * page/inspector/Images/pauseOnExceptionButtons.png: Added.
392         * page/inspector/ScriptsPanel.js: Adds a status bar button that calls
393         the new InspectorController functions.
394         * page/inspector/inspector.css: New styles.
395
396 2008-05-14  Timothy Hatcher  <timothy@apple.com>
397
398         Rename the Scope Chain pane to Scope Variables. Name the global
399         object Global. Name objects before the locals "With Block".
400         Name colsure scopes "Closure". Name any element or document
401         after Local, "Event Target" and "Event Document", respectfully.
402
403         Reviewed by Adam Roben.
404
405         * English.lproj/localizedStrings.js: Add new strings.
406         * page/inspector/ObjectPropertiesSection.js:
407         (WebInspector.ObjectPropertiesSection): Add a new argument that is used
408         for the empty placeholder text.
409         (WebInspector.ObjectPropertiesSection.prototype.onpopulate): Use the
410         empty placeholder text.
411         * page/inspector/ScopeChainSidebarPane.js:
412         (WebInspector.ScopeChainSidebarPane): Rename Scope Chain to Scope Variables.
413         (WebInspector.ScopeChainSidebarPane.prototype.update): Use the object name as
414         the subtitle. Use "Global" for the global object title. Use "With Block" for
415         the title of objects before the locals. Use "No Variables" for the empty
416         placeholder text for locals.
417
418 2008-05-14  Michael A. Puls II  <shadow2531@gmail.com>
419
420         Reviewed by Alexey.
421
422         Fix for https://bugs.webkit.org/show_bug.cgi?id=16923 
423         Attr nodes with a value of "" should not have any childNodes
424         
425         In Opera, Firefox and IE, when an attribute node has a value
426         of "", the attribute node doesn't have any childNodes. This
427         is true in WebKit also, but not when you assign "" to the
428         Attr's value when the existing value is non-empty.
429         
430         Test: fast/dom/attribute-empty-value-no-children.html
431
432         * dom/Attr.cpp: (WebCore::Attr::setValue): Use createTextChild(), which only appends
433         a child text node if the value being assigned is not empty.
434
435 2008-05-14  Julien Chaffraix  <jchaffraix@webkit.org>
436
437         Reviewed by Eric.
438
439         GCC 4.3 build fix.
440         Removes some compiler warnings.
441
442         * dom/Document.h:
443         (WebCore::FormElementKey::hashTableDeletedValue): GCC complained about the const keyword
444         so remove it as it is only used inside FormElementKey.
445
446         * html/HTMLSelectElement.cpp:
447         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Correct coding style (removes
448         a warning too).
449
450         * loader/appcache/ApplicationCacheResource.cpp: Include stdio.h for gcc4.3 build.
451
452         * plugins/PluginPackage.cpp:
453         (WebCore::PluginPackage::PluginPackage): Changed initialization order in the constructor.
454         * plugins/PluginView.cpp:
455         (WebCore::PluginView::PluginView): Ditto.
456         * plugins/PluginView.h:
457         * xml/AccessControlList.cpp: Include stdio.h
458         * xml/AccessItem.cpp: Ditto.
459         * xml/AccessItemRule.cpp: Ditto.
460
461 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
462
463         Reviewed by Simon.
464
465         Qt build fix. Add JSJavaScriptCallFrameCustom.cpp to the build
466         and implemented EventLoopQt.
467
468         * WebCore.pro:
469         * platform/qt/EventLoopQt.cpp: Added.
470
471 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
472
473         Reviewed by Simon.
474
475         Qt build fix. Add JavaScriptCallFrame.{idl,cpp} to the build.
476
477         * WebCore.pro:
478
479 2008-05-13  Dan Bernstein  <mitz@apple.com>
480
481         Reviewed by John Sullivan.
482
483         - Windows part of <rdar://problem/5725912> improve render quality of transformed text
484
485         * platform/graphics/win/FontCGWin.cpp:
486         (WebCore::Font::drawGlyphs): Added call to
487         wkSetCGContextFontRenderingStyle().
488
489 2008-05-13  Alp Toker  <alp@nuanti.com>
490
491         GTK+ build fix. Implement EventLoopGtk.cpp.
492
493         * GNUmakefile.am:
494         * platform/gtk/EventLoopGtk.cpp: Added.
495         (WebCore::EventLoop::cycle):
496
497 2008-05-13  Alp Toker  <alp@nuanti.com>
498
499         GTK+ build fix. Fix IDL filename typo and add JavaScriptCallFrame.cpp
500         to the build.
501
502         * GNUmakefile.am:
503
504 2008-05-13  Matt Lilek  <webkit@mattlilek.com>
505
506         Not reviewed, partial Gtk build fix.
507
508         * GNUmakefile.am:
509
510 2008-05-13  Timothy Hatcher  <timothy@apple.com>
511
512         Fixes a crash when stepping out in the Inspector's debugger.
513
514         http://bugs.webkit.org/show_bug.cgi?id=19037
515
516         Reviewed by Dan Bernstein.
517
518         * page/InspectorController.cpp:
519         (WebCore::currentCallFrame): Adds a null check of currentCallFrame,
520         since it can be null. Also returns JSNull to better signify this.
521         * page/inspector/ScriptsPanel.js: Updates the debugger interface
522         when stepping so the currentCallFrame isn't accessed when not paused.
523         Adds a _clearInterface function to remove duplicate code.
524
525 2008-05-13  chris fleizach  <cfleizach@apple.com>
526
527         Reviewed by Beth Dakin
528
529         <rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
530
531         * page/AccessibilityRenderObject.cpp:
532         (WebCore::AccessibilityRenderObject::title):
533
534 2008-05-13  Timothy Hatcher  <timothy@apple.com>
535
536         Adds an overlay window that covers the scripts panel and
537         informs the user that they need to attach the debugger.
538         Provides an "Attach Debugger" button below the info text.
539
540         Reviewed by Dan Bernstein.
541
542         * English.lproj/localizedStrings.js: New strings.
543         * page/inspector/ScriptsPanel.js:
544         (WebInspector.ScriptsPanel): Create the overlay elements and
545         append to the main panel element.
546         * page/inspector/inspector.css: New styles for the over lay elements.
547
548 2008-05-13  Timothy Hatcher  <timothy@apple.com>
549
550         Fixes the assertion and crash that would happen when inspecting a element from a frame.
551         This change makes JSInspectedObjectWrapper pass unwrapped objects around for global objects
552         that share the same page group identifier. Also returns jsUndefined() instead of 0 to prevent
553         crashing in release builds if the page groups don't match.
554
555         Passes all the tests in: manual-tests/inspector-wrappers
556
557         Reviewed by Adam Roben.
558
559         * bindings/js/JSInspectedObjectWrapper.cpp:
560         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Return jsUndefined() instead of 0.
561         Call allowsUnwrappedAccessFrom instead of unwrappedExecStateMatches.
562         * bindings/js/JSQuarantinedObjectWrapper.cpp:
563         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Renamed from unwrappedExecStateMatches.
564         Return true if the pageGroupIdentifier of both wrappers match.
565         (WebCore::JSQuarantinedObjectWrapper::callAsFunction): Return jsUndefined() instead of 0.
566         * bindings/js/JSQuarantinedObjectWrapper.h: Renamed unwrappedExecStateMatches to allowsUnwrappedAccessFrom.
567
568 2008-05-13  Timothy Hatcher  <timothy@apple.com>
569
570         Fixes the hang that could happen when option-clicking to expand
571         a disclosure triangle in the Properties pane. This change limits
572         the recursion depth when expanding the tree elements.
573
574         <rdar://problem/5847681> Safari hangs when option-clicking a
575         disclosure triangle in the Inspector's Properties pane
576
577         Reviewed by John Sullivan.
578
579         * page/inspector/treeoutline.js:
580         (TreeElement.prototype.expandRecursively): Pass an empty info object to
581         traverseNextTreeElement to get the depthChange value. This is used to
582         compute a current depth. If the depth exceeds the maxDepth argument, the
583         item isn't expanded and children wont be populated when traverseNextTreeElement
584         is called until the depth goes below the maxDepth.
585         (TreeElement.prototype.traverseNextTreeElement): Added a new info
586         argument that can be optionally used to return extra info like depth change.
587
588 2008-05-13  Timothy Hatcher  <timothy@apple.com>
589
590         Adds info text to panes and sections in the Inspector's sidebars
591         that would normally be empty. These help the user know why there
592         is nothing in these sections.
593
594         Reviewed by John Sullivan.
595
596         * English.lproj/localizedStrings.js: Add strings.
597         * page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
598         * page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
599         * page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
600         * page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
601         * page/inspector/inspector.css: Adds style rules for the info elements.
602
603 2008-05-13  Timothy Hatcher  <timothy@apple.com>
604
605         Implements the rest of the Scripts panel to get the debugger
606         mostly working. "Basic debugging seems to work."
607
608         Reviewed by Geoff Garen.
609
610         * English.lproj/localizedStrings.js: Adds new strings.
611         * page/inspector/Resource.js:
612         (WebInspector.Resource.prototype.get scripts): Returns _scripts and 
613         creates it lazily.
614         (WebInspector.Resource.prototype.addScript): Add the script object to the
615         front of the _scripts array.
616         (WebInspector.Resource.prototype.removeAllScripts): Removed all the scripts
617         and removes the resource back-reference.
618         (WebInspector.Resource.prototype.removeScript): Removes the script and
619         breaks the resource back-reference.
620         * page/inspector/ResourceView.js:
621         (WebInspector.ResourceView): Adds a reminder comment.
622         (WebInspector.ResourceView.prototype.get headersVisible): Returns _headersVisible. 
623         (WebInspector.ResourceView.prototype.set headersVisible): Stubs out
624         a setter that currently just sets _headersVisible. Has a comment that
625         points out this needs implemented when network headers are added.
626         * page/inspector/ResourcesPanel.js:
627         (WebInspector.ResourcesPanel.prototype.show): Sets the headersVisible property of
628         the visible view to true and shows it again, in case it was being shown in Scripts.
629         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
630         Copies the headersVisible property from the old view to the new view.
631         (WebInspector.ResourcesPanel.prototype.showResource): Sets the headersVisible
632         property to true before showing.
633         * page/inspector/ScriptView.js:
634         (WebInspector.ScriptView): Passes in _addBreakpoint for the add breakpoint delegate.
635         (WebInspector.ScriptView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
636         for the current Script.sourceID and line.
637         * page/inspector/ScriptsPanel.js:
638         (WebInspector.ScriptsPanel): 
639         (WebInspector.ScriptsPanel.prototype.show): Sets the headersVisible property of
640         the visible view to false and shows it again, in case it was being shown in Resources.
641         (WebInspector.ScriptsPanel.prototype.addScript): Makes a new Script object and
642         adds it to a Resource if one is found. Registers any breakpoint that match
643         the new Script's source URL, and sets the sourceID of the breakpoints.
644         (WebInspector.ScriptsPanel.prototype.addBreakpoint): Adds the breakpoint to the
645         BreakpointsSidebarPane. Also adds it to _breakpointsURLMap so it can be found
646         later in addScript by URL. Finally adds the breakpoint to the SourceFrame that
647         represents the resources or script.
648         (WebInspector.ScriptsPanel.prototype.removeBreakpoint): Removes the breakpoint from
649         the BreakpointsSidebarPane, _breakpointsURLMap and SourceFrame.
650         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Update the debugger
651         state variables, the buttons and the CallStackSidebarPane.
652         (WebInspector.ScriptsPanel.prototype.reset): Clears and resets debugger
653         and interface state.
654         (WebInspector.ScriptsPanel.prototype.get visibleView): Returns _visibleView.
655         (WebInspector.ScriptsPanel.prototype.set visibleView): Sets _visibleView and
656         calls hide on the old view and show on the new view.
657         (WebInspector.ScriptsPanel.prototype.showScript): Calls _showScriptOrResource.
658         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
659         (WebInspector.ScriptsPanel.prototype.scriptViewForScript): Lazily creates a
660         ScriptView for the Script and returns it. 
661         (WebInspector.ScriptsPanel.prototype.sourceFrameForScript): Returns the SourceFrame
662         for the Script.
663         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): Returns the
664         SourceFrame based on the type of object passed in.
665         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Shows the view based on
666         the type of object passed in. If the object is a resource and there are breakpoints
667         defined for that Resource URL, then populate the SourceFrame with the breakpoints.
668         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Adds a script to the 
669         files menu. If the Script is part of a resource, that resource is added.
670         (WebInspector.ScriptsPanel.prototype._removeScriptFromFilesMenu): Remove a script from
671         the files menu. If that script is part of a resource and it is the last script of that
672         resource, then remove the whole resource.
673         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine): Clears the execution
674         line from the SourceFrame that is showing it.
675         (WebInspector.ScriptsPanel.prototype._callFrameSelected): Event listener for when the
676         call frame changes in the CallStackSidebarPane. Triggers updates to the ScopeChainSidebarPane
677         and the visible view.
678         (WebInspector.ScriptsPanel.prototype._changeVisibleFile): Event listener for the change state
679         of the files select element.
680         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Update more of the 
681         buttons to reflect the current debugger state. Updates the status text too.
682         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Reset the UI and state when
683         the debugger is attached/detached.
684         (WebInspector.ScriptsPanel.prototype._togglePause): Call InspectorController.resumeDebugger or
685         InspectorController.pauseInDebugger depending on the paused state.
686         (WebInspector.ScriptsPanel.prototype._stepOverClicked): Call InspectorController.stepOverStatementInDebugger.
687         (WebInspector.ScriptsPanel.prototype._stepIntoClicked): Call InspectorController.stepIntoStatementInDebugger.
688         (WebInspector.ScriptsPanel.prototype._stepOutClicked): InspectorController.stepOutOfFunctionInDebugger.
689         * page/inspector/SourceView.js:
690         (WebInspector.SourceView): Passes in _addBreakpoint for the add breakpoint delegate.
691         (WebInspector.SourceView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
692         for the nearest Script's sourceID and passed in line.
693         * page/inspector/inspector.css: New style rules for the UI changes.
694         * page/inspector/inspector.js:
695         (WebInspector.loaded): Add the ScriptsPanel to the panels list.
696         (WebInspector.parsedScriptSource): Call ScriptsPanel.addScript.
697         (WebInspector.failedToParseScriptSource): Ditto.
698         (WebInspector.pausedScript): Call ScriptsPanel.debuggerPaused.
699
700 2008-05-13  Timothy Hatcher  <timothy@apple.com>
701
702         Adds implementations of the Scope Chain and Call Stack sidebar panes.
703         These panes use the JSJavaScriptCallFrame object that will be passed
704         to the update functions.
705
706         Reviewed by Kevin McCullough.
707
708         * English.lproj/localizedStrings.js: Adds new strings.
709         * WebCore.vcproj/WebCore.vcproj: Adds new files.
710         * page/inspector/CallStackSidebarPane.js:
711         (WebInspector.CallStackSidebarPane.prototype.update): Walk the 
712         caller chain of the call frame and make placards for each.
713         (WebInspector.CallStackSidebarPane.prototype.get selectedCallFrame):
714         Return _selectedCallFrame. 
715         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
716         Set _selectedCallFrame and dispatch the "call frame selected" event.
717         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
718         Set the selectedCallFrame based on the clicked placard.
719         * page/inspector/Placard.js: Added. A user interface object that can
720         be used to show a title and a subtitle block with a selected state.
721         * page/inspector/ScopeChainSidebarPane.js: Added.
722         (WebInspector.ScopeChainSidebarPane): Call the base object and set the title.
723         (WebInspector.ScopeChainSidebarPane.prototype.update): Iterate over the
724         call frame's scope chain and make ObjectPropertiesSections for each.
725         * page/inspector/SidebarPane.js:
726         (WebInspector.SidebarPane.prototype): Inherit from WebInspector.Object.
727         * page/inspector/WebKit.qrc: Add new files.
728         * page/inspector/inspector.css: Add placard styles.
729         * page/inspector/inspector.html: Add new files.
730
731 2008-05-13  Timothy Hatcher  <timothy@apple.com>
732
733         Fixes the bug where SourceViews would be blank if shown before
734         the Resource finished loading.
735
736         <rdar://problem/5807420> Safari's Web Inspector won't display the
737         contents of some CSS and JS files
738
739         Reviewed by Kevin McCullough.
740
741         * page/inspector/Resource.js:
742         (WebInspector.Resource.prototype.set finished): Dispatch the finished event
743         (WebInspector.Resource.prototype): Inherit from WebInspector.Object.prototype.
744         * page/inspector/SourceView.js:
745         (WebInspector.SourceView): Register for the finished event on the resource.
746         When the event fires, setup the source frame and deregister the event.
747
748 2008-05-13  Timothy Hatcher  <timothy@apple.com>
749
750         Factored most of SourceView out into SourceFrame so it can be shared
751         by the new ScriptView. Added the ScriptView class to be used for
752         scripts that arn't Resources (like eval code.) Added a simple Script
753         object that hold the data from the debugger parsedSource hooks. A
754         ScriptView holds a Script object, and uses it for source data.
755
756         Added breakpoint and execution line support to the SourceFrame
757         where they are visually represented in the source.
758
759         Reviewed by Kevin McCullough.
760
761         * page/inspector/inspector.js:
762         (WebInspector.performSearch): Change the caller of sourceFrameForResource
763         to use the SourceFrame result's element property.
764         * page/inspector/ResourcesPanel.js: Use the new SourceFrame.
765         * page/inspector/Script.js: Added.
766         * page/inspector/ScriptView.js: Added.
767         * page/inspector/SourceFrame.js: Added.
768         * page/inspector/SourceView.js: Use the new SourceFrame.
769         * WebCore.vcproj/WebCore.vcproj: Add new files.
770         * page/inspector/WebKit.qrc: Ditto.
771         * page/inspector/inspector.html: Ditto.
772
773 2008-05-13  Timothy Hatcher  <timothy@apple.com>
774
775         Adds a Breakpoint object and basic add/remove functions on
776         BreakpointsSidebarPane that call the InspectorController to
777         add/remove the breakpoint.
778
779         Reviewed by Kevin McCullough.
780
781         * page/inspector/Breakpoint.js:
782         (WebInspector.Breakpoint): 
783         (WebInspector.Breakpoint.prototype.get enabled): Return _enabled.
784         (WebInspector.Breakpoint.prototype.set enabled): Set _enabled and
785         dispatch the enabled/disabled event to listeners.
786         * page/inspector/BreakpointsSidebarPane.js:
787         (WebInspector.BreakpointsSidebarPane): Add a breakpoints array.
788         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
789         Adds the breakpoint to the breakpoints array. Registers for the disabled
790         and enabled event types. Call InspectorController.addBreakpoint if attached.
791         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
792         Removes the breakpoint from the breakpoints array. Deregisters for the disabled
793         and enabled event types. Call InspectorController.removeBreakpoint if attached.
794         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
795         Call InspectorController.addBreakpoint or InspectorController.removeBreakpoint
796         depending on the enabled state of the breakpoint.
797         * WebCore.vcproj/WebCore.vcproj: Add new files.
798         * page/inspector/WebKit.qrc: Ditto.
799         * page/inspector/inspector.html: Ditto.
800
801 2008-05-13  Timothy Hatcher  <timothy@apple.com>
802
803         Make addSourceToFrame not dependent on InspectorResource so it
804         can be used to add source of a passed in string and mime-type to
805         a frame. Added addResourceSourceToFrame for use by SourceView.
806
807         Also fixes an assertion because of an incorrect static_cast of identifiers
808         to unsigned long long, when they can be unsigned.
809
810         Reviewed by Geoff Garen.
811
812         * page/InspectorController.cpp:
813         (WebCore::addSourceToFrame): Helper function used by addSourceToFrame
814         and addResourceSourceToFrame.
815         (WebCore::addSourceToFrame): Generalized to take a source and mime-type string.
816         (WebCore::addResourceSourceToFrame): Renamed from addSourceToFrame.
817         (WebCore::getResourceDocumentNode): Fixes the static_cast to be long long.
818         (WebCore::InspectorController::windowScriptObjectAvailable): Adds
819         addResourceSourceToFrame to the JavaScript class.
820         * page/inspector/SourceView.js: Use the new addResourceSourceToFrame.
821
822 2008-05-13  Timothy Hatcher  <timothy@apple.com>
823
824         Add debugger related functions to the InspectorController and
825         expose them to the JavaScript side of InspectorController.
826
827         Reviewed by Geoff Garen.
828
829         * page/InspectorController.cpp:
830         (WebCore::jsStringRef): Added helper to convert a UString to a JSStringRef.
831         (WebCore::currentCallFrame): Call InspectorController::currentCallFrame.
832         (WebCore::pauseInDebugger): Call InspectorController::pauseInDebugger.
833         (WebCore::resumeDebugger): Call InspectorController::resumeDebugger.
834         (WebCore::stepOverStatementInDebugger): Call InspectorController::stepOverStatementInDebugger.
835         (WebCore::stepIntoStatementInDebugger): Call InspectorController::stepIntoStatementInDebugger.
836         (WebCore::stepOutOfFunctionInDebugger): Call InspectorController::stepOutOfFunctionInDebugger.
837         (WebCore::addBreakpoint): Call InspectorController::addBreakpoint.
838         (WebCore::removeBreakpoint): Call InspectorController::removeBreakpoint.
839         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new functions to the
840         InspectorController JavaScript class.
841         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage): Clear breakpoints.
842         (WebCore::InspectorController::currentCallFrame): Return the currentCallFrame from the
843         JavaScriptDebugServer.
844         (WebCore::InspectorController::pauseInDebugger): Call JavaScriptDebugServer's pauseOnNextStatement.
845         (WebCore::InspectorController::resumeDebugger): Call JavaScriptDebugServer's resume.
846         (WebCore::InspectorController::stepOverStatementInDebugger):  Call JavaScriptDebugServer's stepOverStatement.
847         (WebCore::InspectorController::stepIntoStatementInDebugger): Call JavaScriptDebugServer's stepIntoStatement.
848         (WebCore::InspectorController::stepOutOfFunctionInDebugger): Call JavaScriptDebugServer's stepOutOfFunction.
849         (WebCore::InspectorController::addBreakpoint): Call JavaScriptDebugServer's addBreakpoint.
850         (WebCore::InspectorController::removeBreakpoint): Call JavaScriptDebugServer's removeBreakpoint.
851         (WebCore::InspectorController::didParseSource): Call into the Inspector's JavaScript.
852         (WebCore::InspectorController::failedToParseSource): Ditto.
853         (WebCore::InspectorController::didPause): Ditto.
854         * page/InspectorController.h: Add new functions.
855
856 2008-05-13  Timothy Hatcher  <timothy@apple.com>
857
858         Implements more debugger APIs on JavaScriptDebugServer and reduces
859         the number of callbacks to JavaScriptDebugListeners. These changes
860         will better facilitate debugger optimizations when SquirrelFish merges.
861
862         Reviewed by Kevin McCullough.
863
864         * page/InspectorController.cpp:
865         (WebCore::InspectorController::didParseSource): Removed the ExecState.
866         (WebCore::InspectorController::failedToParseSource): Ditto.
867         (WebCore::InspectorController::didPause): Added.
868         * page/InspectorController.h: Changed the JavaScriptDebugListener functions.
869         * page/JavaScriptDebugListener.h: Removed some callbacks and added didPause.
870         * page/JavaScriptDebugServer.cpp:
871         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Initialize new data members.
872         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all values of m_breakpoints.
873         (WebCore::JavaScriptDebugServer::removeListener): Call resume if the last listener was removed.
874         (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Returns true if there are any
875         global listeners or a listener for the page.
876         (WebCore::JavaScriptDebugServer::addBreakpoint): Adds and entry to m_breakpoints.
877         (WebCore::JavaScriptDebugServer::removeBreakpoint): Removes a entry in m_breakpoints.
878         (WebCore::JavaScriptDebugServer::hasBreakpoint):  Checks if there is a breakpoint for the
879         sourceID and line.
880         (WebCore::JavaScriptDebugServer::clearBreakpoints): Removed all breakpoints.
881         (WebCore::JavaScriptDebugServer::pauseOnNextStatement): Sets m_pauseOnNextStatement to true.
882         (WebCore::JavaScriptDebugServer::resume): Sets m_paused to false.
883         (WebCore::JavaScriptDebugServer::stepIntoStatement): Calls resume and sets
884         m_pauseOnNextStatement to true.
885         (WebCore::JavaScriptDebugServer::stepOverStatement): Calls resume and sets m_pauseOnExecState to
886         the current call frame's ExecState.
887         (WebCore::JavaScriptDebugServer::stepOutOfFunction): Calls resume and sets m_pauseOnExecState to
888         the current call frame's caller ExecState.
889         (WebCore::JavaScriptDebugServer::currentCallFrame): Returns m_currentCallFrame if paused.
890         (WebCore::dispatchDidParseSource): Removed the ExecState argument.
891         (WebCore::dispatchFailedToParseSource): Ditto.
892         (WebCore::JavaScriptDebugServer::sourceParsed): Doesn't pass the ExecState to dispatchDidParseSource
893         or dispatchFailedToParseSource.
894         (WebCore::dispatchFunctionToListeners):
895         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Removes all the arguments passed
896         to the callback.
897         (WebCore::JavaScriptDebugServer::setJavaScriptPaused): Various overloaded functions
898         to pause parts of WebCore to prevent JavaScript execution while paused.
899         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Decides if the debugger should pause based
900         on the passed in ExecState, source ID and line number. This checks for breakpoints, stepping, etc.
901         Calls didPause on all the listeners and spins a EventLoop until resume is called.
902         (WebCore::JavaScriptDebugServer::callEvent): Call pauseIfNeeded.
903         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
904         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
905         (WebCore::JavaScriptDebugServer::exception): Ditto.
906         * page/JavaScriptDebugServer.h: Added new functions.
907
908 2008-05-13  Timothy Hatcher  <timothy@apple.com>
909
910         Change View.show to call detach if the parentNode dosen't
911         match before appending to the passed in parent element.
912         This also prevents appending to the same parent element
913         multiple times.
914
915         Reviewed by John Sullivan.
916
917         * page/inspector/FontView.js:
918         (WebInspector.FontView.prototype.show): Pass the parent element to View.show.
919         * page/inspector/ResourceView.js: Optimize the attach method to no append if
920         there is a parentNode already.
921         * page/inspector/SourceView.js: Ditto.
922         * page/inspector/View.js: Call detach before appending if the parentNode
923         doesn't match the passed in element.
924
925 2008-05-13  Timothy Hatcher  <timothy@apple.com>
926
927         Optimize the panel attach method to no append if there is a
928         parentNode already.
929
930         Reviewed by Adam Roben.
931
932         * page/inspector/Panel.js:
933         (WebInspector.Panel.prototype.attach): Don't append to main-panels
934         if the panel element already has a parentNode.
935
936 2008-05-13  Timothy Hatcher  <timothy@apple.com>
937
938         Add Widget::isPluginView so the JavaScriptDebugServer can identify
939         plugins that need to be paused during debugging. This will be used
940         in a upcoming commit.
941
942         Reviewed by Kevin McCullough.
943
944         * platform/Widget.h: Add isPluginView. Return false.
945         * plugins/PluginView.h: Add isPluginView. Return true.
946
947 2008-05-13  Timothy Hatcher  <timothy@apple.com>
948
949         Adds an event loop abstraction to platform. This abstraction will be
950         used by the JavaScriptDebugServer to implement pausing.
951
952         Reviewed by Kevin McCullough.
953
954         * platform/EventLoop.h: Added.
955         (WebCore::EventLoop::EventLoop):
956         (WebCore::EventLoop::ended): Return m_ended.
957         * platform/mac/EventLoopMac.mm: Added.
958         (WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.
959         * platform/win/EventLoopWin.cpp: Added.
960         (WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.
961         * WebCore.xcodeproj/project.pbxproj: Add new files.
962         * WebCore.vcproj/WebCore.vcproj: Ditto.
963
964 2008-05-13  Timothy Hatcher  <timothy@apple.com>
965
966         Breaks out ObjectPropertiesSection from PropertiesSidebarPane
967         so it can be used by the Scripts panel's Scope Chain pane.
968
969         Rubber-stamped by Adam Roben.
970
971         * page/inspector/ObjectPropertiesSection.js: Added.
972         * page/inspector/PropertiesSidebarPane.js: Moved ObjectPropertiesSection
973         to ObjectPropertiesSection.js.
974         * WebCore.vcproj/WebCore.vcproj: Add the new file.
975         * page/inspector/WebKit.qrc: Ditto.
976         * page/inspector/inspector.html: Ditto.
977
978 2008-05-13  Timothy Hatcher  <timothy@apple.com>
979
980         Add a helper function to the Inspector's Array prototype
981         that will remove any identical values/objects from the array.
982
983         Reviewed by Kevin McCullough.
984
985         * page/inspector/utilities.js:
986         (Array.prototype.remove): Iterate over the array and strict
987         compare to the passed in value. If they match, splice that index
988         out of the array. If onlyFirst is true, return after the first splice.
989
990 2008-05-13  Timothy Hatcher  <timothy@apple.com>
991
992         Adds a JavaScriptCallFrame object and JavaScript binding with an IDL.
993         This object will expose the stack to the Inspector's debugger.
994
995         Reviewed by Adam Roben.
996
997         * DerivedSources.make: Add JavaScriptCallFrame.
998         * bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.
999         (WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
1000         (WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.
1001         * page/JavaScriptCallFrame.cpp: Added.
1002         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
1003         (WebCore::JavaScriptCallFrame::caller): Returns m_caller.
1004         (WebCore::JavaScriptCallFrame::functionName): Returns the function
1005         name from the ExecState if this is not global code or anonymous.
1006         (WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
1007         in the scope of the call frame.
1008         * page/JavaScriptCallFrame.h: Added.
1009         (WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
1010         (WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
1011         stale ExecState from being accessed after the lifetime of the ExecState.
1012         (WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
1013         (WebCore::JavaScriptCallFrame::execState): Returns m_exec.
1014         (WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
1015         (WebCore::JavaScriptCallFrame::line): Returns m_line.
1016         (WebCore::JavaScriptCallFrame::setLine): Sets m_line.
1017         (WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().
1018         * page/JavaScriptCallFrame.idl: Added.
1019         * WebCore.xcodeproj/project.pbxproj: Add new files.
1020         * WebCore.vcproj/WebCore.vcproj: Ditto.
1021
1022 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1023
1024         Add a new WebInspector.Object base class that will be used for
1025         a few objects in the Web Inspector to support listeners on any
1026         object. This will help add more abstraction to the Inspector.
1027
1028         Reviewed by Adam Roben.
1029
1030         * page/inspector/Object.js: Added.
1031         (WebInspector.Object): Does nothing.
1032         (WebInspector.Object.prototype.addEventListener): Adds the listener to
1033         the _listeners map by type. Supports a this object argument, for easy
1034         addition of listeners without the need for bind.
1035         (WebInspector.Object.prototype.removeEventListener): Remove the listener
1036         from the _listeners map. If the listener is null and the thisObject was
1037         passed, remove any listener for that thisObject.
1038         (WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
1039         for a type to all listeners for that type. Mimics some of the DOMEvent
1040         methods and properties for the event object passed to the listeners.
1041         * WebCore.vcproj/WebCore.vcproj: Add new files.
1042         * page/inspector/WebKit.qrc: Ditto.
1043         * page/inspector/inspector.html: Ditto.
1044
1045 2008-05-13  Timothy Hatcher  <timothy@apple.com>
1046
1047         Update the view source CSS to better match the new Inspector mock-ups.
1048
1049         Reviewed by Kevin McCullough.
1050
1051         * css/view-source.css:
1052
1053 2008-05-13  John Sullivan  <sullivan@apple.com>
1054
1055         Reviewed by Dan Bernstein and Kevin Decker
1056         
1057         - fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind
1058
1059         Test: fast/forms/select-type-ahead-list-box-no-selection.html
1060
1061         * html/HTMLSelectElement.cpp:
1062         (WebCore::HTMLSelectElement::typeAheadFind):
1063         When there's no initially-selected element, we were accessing index -1. Check for this
1064         case and start at 0.
1065
1066 2008-05-13  Sam Weinig  <sam@webkit.org>
1067
1068         Reviewed by Dan Bernstein.
1069
1070         Small cleanup to XMLHttpRequest in preparation for Access Control changes.
1071
1072         * xml/XMLHttpRequest.cpp:
1073         (WebCore::XMLHttpRequest::XMLHttpRequest):
1074         (WebCore::XMLHttpRequest::~XMLHttpRequest):
1075         (WebCore::XMLHttpRequest::open):
1076         (WebCore::XMLHttpRequest::send):
1077         (WebCore::XMLHttpRequest::internalAbort):
1078         (WebCore::XMLHttpRequest::processSyncLoadResults):
1079         (WebCore::XMLHttpRequest::didFinishLoading):
1080         (WebCore::XMLHttpRequest::didReceiveResponse):
1081         (WebCore::XMLHttpRequest::didReceiveData):
1082         * xml/XMLHttpRequest.h:
1083
1084 2008-05-13  chris fleizach  <cfleizach@apple.com>
1085
1086         Beth Dakin
1087
1088         <rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.
1089
1090         * page/AccessibilityRenderObject.cpp:
1091         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1092
1093 2008-05-13  chris fleizach  <cfleizach@apple.com>
1094
1095         Beth Dakin
1096
1097         <rdar://problem/5908446> AX: webkit needs to return blockquote information for all AX objects, not just in AXTextMarker info
1098
1099         * page/mac/AccessibilityObjectWrapper.mm:
1100         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1101         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1102
1103 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1104
1105         Reviewed by John Sullivan.
1106
1107         <rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
1108         (ISO 8859-11) disappear.
1109
1110         <rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874
1111
1112         Test: fast/encoding/char-decoding.html
1113
1114         * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames):
1115         Register ISO-8859-11, which doesn't have a standard IANA name, despite following
1116         the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.
1117
1118 2008-05-13  chris fleizach  <cfleizach@apple.com>
1119
1120         Reviewed by Beth Dakin
1121
1122         <rdar://problem/5471973> Some AXLinks are not getting AXTitles though there is title text
1123
1124         * page/AccessibilityRenderObject.cpp:
1125         (WebCore::AccessibilityRenderObject::title):
1126
1127 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1128
1129         Reviewed by Eric Seidel.
1130
1131         https://bugs.webkit.org/show_bug.cgi?id=18681
1132         <rdar://problem/5888130> WebKit should not remove BOM characters from content.
1133
1134         We were only trying to match Firefox, and it doesn't do this any more.
1135
1136         Tests: fast/encoding/bom-in-content.html
1137                fast/encoding/bom-in-content-utf16.html
1138
1139         * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
1140         at the start of input stream.
1141
1142         * platform/text/TextCodec.cpp:
1143         * platform/text/TextCodec.h:
1144         * platform/text/TextCodecICU.cpp:
1145         (WebCore::TextCodecICU::decode):
1146         * platform/text/TextCodecUTF16.cpp:
1147         (WebCore::TextCodecUTF16::decode):
1148         * platform/text/mac/TextCodecMac.cpp:
1149         (WebCore::TextCodecMac::decode):
1150         Don't remove the BOM.
1151
1152 2008-05-13  Anders Carlsson  <andersca@apple.com>
1153
1154         Reviewed by Darin.
1155
1156         Don't crash when a document loader is destroyed while an initial caching attempt
1157         is in progress.
1158
1159         * loader/appcache/ApplicationCacheGroup.cpp:
1160         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
1161         Stop loading.
1162         
1163         (WebCore::ApplicationCacheGroup::stopLoading):
1164         New method that stops a cache update.
1165         
1166         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
1167         Delete ourselves here.
1168         
1169         * loader/appcache/ApplicationCacheGroup.h:
1170
1171 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
1172
1173         Reviewed by Darin.
1174
1175         <rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254
1176
1177         Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.
1178
1179         Test: fast/encoding/char-decoding.html
1180
1181         * platform/text/TextCodecICU.cpp:
1182         (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
1183         unconditionally. Previously, we registered windows-949-2000 as a special case that lacked 
1184         an IANA standard name, and got away with not registering GBK because it happened
1185         to be reported by ICU normally earlier than any encoding upgraded to it.
1186
1187 2008-05-13  Tor Arne Vestbø  <tavestbo@trolltech.com>
1188
1189         Reviewed by Simon
1190
1191         Fix QtWebKit build on Qt embedded.
1192
1193         * WebCore.pro:
1194         * platform/FileSystem.h:
1195         * platform/qt/FileSystemQt.cpp:
1196
1197 2008-05-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1198
1199         Reviewed by Simon.
1200
1201         For Gtk/X11 and Qt/X11, use a more extensive plug-ins scan directories set
1202
1203         * plugins/PluginDatabase.cpp:
1204         (WebCore::addMozillaPluginDirectories):
1205         (WebCore::PluginDatabase::isPreferredPluginDirectory):
1206
1207 2008-05-12  Adam Roben  <aroben@apple.com>
1208
1209         Turn on warnings as errors in WebCore.vcproj
1210
1211         Rubberstamped by Anders Carlsson.
1212
1213         * WebCore.vcproj/WebCore.vcproj: Also let VS reformat the file as it
1214         saw fit. The important part is the removal of the WarnAsError="false"
1215         lines.
1216
1217 2008-05-12  Adam Roben  <aroben@apple.com>
1218
1219         Fix a MSVC warning in PluginViewWin
1220
1221         Reviewed by Anders Carlsson.
1222
1223         Test: http/tests/plugins/post-url-file.html
1224
1225         * plugins/win/PluginViewWin.cpp:
1226         (WebCore::PluginView::handlePostReadFile): Added a missing return
1227         statement.
1228
1229 2008-05-12  Adam Roben  <aroben@apple.com>
1230
1231         Fix a MSVC warning in GetEOTHeader
1232
1233         Reviewed by Dan Bernstein.
1234
1235         * platform/graphics/win/GetEOTHeader.cpp:
1236         (WebCore::getEOTHeader): MSVC complains that having a 0-sized array in
1237         a struct is a non-standard extension. I've replaced the 0-sized arrays
1238         with arrays of 1 element, and replaced sizeof(structType) with
1239         offsetof(structType, arrayMember).
1240
1241 2008-05-09  Adam Roben  <aroben@apple.com>
1242
1243         Fix a MSVC warning in TextCodecICU
1244
1245         Reviewed by John Sullivan and Dan Bernstein.
1246
1247         * platform/text/TextCodecICU.cpp:
1248         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
1249         UCNV_SUB_STOP_ON_ILLEGAL is a string literal, so using == with it
1250         doesn't really do what we want. Use strcmp instead. It's OK to pass an
1251         unknown value to strcmp here since 1) UCNV_SUB_STOP_ON_ILLEGAL is only
1252         a single character long so we're not going to ready more than 2 bytes
1253         from oldContext, and 2) we're inside an ASSERT which will cause a
1254         crash anyway if it fails.
1255
1256 2008-05-09  Adam Roben  <aroben@apple.com>
1257
1258         Fix a MSVC warning in CSSComputedStyleDeclaration
1259
1260         Reviewed by Geoff Garen.
1261
1262         * css/CSSComputedStyleDeclaration.cpp:
1263         (WebCore::valueForRepeatRule): Removed some unreachable code.
1264
1265 2008-05-09  Adam Roben  <aroben@apple.com>
1266
1267         Fix a MSVC warning in InlineTextBox
1268
1269         Reviewed by Dan Bernstein.
1270
1271         * rendering/InlineTextBox.cpp:
1272         (WebCore::InlineTextBox::paint): Initialize some variables that MSVC
1273         isn't smart enough to figure out will always be initialized in the
1274         cases where they are used.
1275
1276 2008-05-09  Adam Roben  <aroben@apple.com>
1277
1278         Fix a MSVC warning in Position
1279
1280         Reviewed by Darin Adler.
1281
1282         * dom/Position.cpp:
1283         (WebCore::Position::getInlineBoxAndOffset): Use parentheses to make
1284         the precedence of our expressions explicit.
1285
1286 2008-05-09  Adam Roben  <aroben@apple.com>
1287
1288         Fix a MSVC warning in String
1289
1290         Reviewed by Geoff Garen.
1291
1292         * platform/text/String.cpp:
1293         (WebCore::toIntegralType): Disable a bogus warning about using unary -
1294         on an unsigned value. MSVC isn't smart enough to figure out that
1295         isNegative will always be false when value is unsigned.
1296
1297 2008-05-09  Adam Roben  <aroben@apple.com>
1298
1299         Fix a MSVC warning in XMLHttpRequest
1300
1301         Reviewed by Geoff Garen.
1302
1303         * xml/XMLHttpRequest.cpp:
1304         (WebCore::XMLHttpRequest::XMLHttpRequest): Added static_cast<unsigned
1305         long>.
1306
1307 2008-05-12  Anders Carlsson  <andersca@apple.com>
1308
1309         Reviewed by Adam.
1310
1311         Handle the case when a resource with the same URL as the manifest is listed in the manifest.
1312
1313         * loader/appcache/ApplicationCacheGroup.cpp:
1314         (WebCore::ApplicationCacheGroup::addEntry):
1315
1316 2008-05-12  Sam Weinig  <sam@webkit.org>
1317
1318         Reviewed by Dan Bernstein.
1319
1320         Add parsing of AccessControlHeader and AccessItemRule.
1321
1322         * xml/AccessControlList.cpp:
1323         (WebCore::AccessControlList::parseAccessControlHeader): When multiple http headers are sent
1324         in the response, the engine will concatenate them with commas separating the rules.  This simply
1325         reverses that process by splitting on the commas.
1326         (WebCore::AccessControlList::show):
1327         * xml/AccessControlList.h:
1328         * xml/AccessItem.cpp:
1329         (WebCore::AccessItem::AccessItem):
1330         (WebCore::AccessItem::show):
1331         * xml/AccessItem.h:
1332         (WebCore::AccessItem::isValid):
1333         * xml/AccessItemRule.cpp:
1334         (WebCore::skipLWS):
1335         (WebCore::AccessItemRule::parseAccessItemRule): Parse the rule according to the BNF provided by
1336         the Access Control spec.
1337         (WebCore::AccessItemRule::parsePatternList):
1338         (WebCore::AccessItemRule::invalidate):
1339         (WebCore::AccessItemRule::show):
1340         * xml/AccessItemRule.h:
1341
1342 2008-05-12  David Kilzer  <ddkilzer@apple.com>
1343
1344         Fix logic error in DocLoader::clearPreloads()
1345
1346         Reviewed by Antti.
1347
1348         * loader/DocLoader.cpp:
1349         (WebCore::DocLoader::clearPreloads): Be sure to decrease the preload count for
1350         the cached resource before trying to remove it from the cache.  A non-zero
1351         preload count can prevent the resource from being removed from the cache.
1352
1353 2008-05-12  Anders Carlsson  <andersca@apple.com>
1354
1355         Reviewed by Adam.
1356
1357         Handle empty manifest files without crashing.
1358         
1359         * loader/appcache/ApplicationCacheGroup.cpp:
1360         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1361
1362 2008-05-12  Alp Toker  <alp@nuanti.com>
1363
1364         GTK+ build fix for breakage in r33056. Include limits.h for INT_MAX.
1365
1366         * platform/graphics/FontCache.h:
1367
1368 2008-05-12  Anders Carlsson  <andersca@apple.com>
1369
1370         Reviewed by Adam.
1371
1372         Add user agent to requests when loading/updating the cache.
1373     
1374         * loader/FrameLoader.h:
1375         * loader/appcache/ApplicationCacheGroup.cpp:
1376         (WebCore::ApplicationCacheGroup::update):
1377         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1378
1379 2008-05-12  Anders Carlsson  <andersca@apple.com>
1380
1381         Reviewed by Adam.
1382
1383         Make it possible to perform synchronous loads from the application cache.
1384         
1385         * loader/DocumentLoader.cpp:
1386         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
1387         Factor out code from scheduleApplicationCacheLoad in its own method.
1388         
1389         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1390         Call shouldLoadResourceFromApplicationCache here instead.
1391         
1392         * loader/DocumentLoader.h:
1393         
1394         * loader/FrameLoader.cpp:
1395         (WebCore::FrameLoader::loadResourceSynchronously):
1396         Call shouldLoadResourceFromApplicationCache.
1397
1398 2008-05-12  Dan Bernstein  <mitz@apple.com>
1399
1400         Reviewed by Ada Chan and Sam Weinig.
1401
1402         - WebCore changes for https://bugs.webkit.org/show_bug.cgi?id=17097
1403           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
1404
1405         Added a way for clients to let the cache know that they no longer need
1406         font data, which lets the cache release it. Changed clients to track
1407         most of the font data they get from the cache so that they can later
1408         release it. Some instances of font data -- namely, those used for system
1409         font fallback -- are still not tracked and will therefore remain in the
1410         cache indefinitely.
1411
1412         * WebCore.base.exp: Added exports for WebCoreStatistics in WebKit.
1413
1414         * platform/graphics/Font.cpp:
1415         (WebCore::Font::Font): Changed to use FontFallbackList::create().
1416         (WebCore::Font::update): Ditto.
1417
1418         * platform/graphics/FontCache.cpp:
1419         (WebCore::FontCache::getCachedFontData): Added code to track the number
1420         of times a SimpleFontData instance has been requested from the cache,
1421         remove requested instances from the inactive list, and purge inactive
1422         font data if the inactive list has grown above its maximum allowed size.
1423         (WebCore::FontCache::releaseFontData): Added. Called by clients to let
1424         the cache know that they no longer need the font data. Adds the font
1425         data to the inactive list if the last client has released it.
1426         (WebCore::FontCache::purgeInactiveFontData): Added. Removes inactive
1427         font data from the cache (and the inactive list).
1428         (WebCore::FontCache::fontDataCount): Added to provide statistics.
1429         (WebCore::FontCache::inactiveFontDataCount): Ditto.
1430
1431         * platform/graphics/FontCache.h:
1432
1433         * platform/graphics/FontData.h:
1434         (WebCore::FontData::FontData): Added a member variable to store the
1435         highest glyph page tree level in which there is a node for this FontData.
1436         This is used to limit the depth of the search when pruning glyph page
1437         trees.
1438         (WebCore::FontData::setMaxGlyphPageTreeLevel): Added this accessor.
1439         (WebCore::FontData::maxGlyphPageTreeLevel): Ditto.
1440
1441         * platform/graphics/FontFallbackList.cpp:
1442         (WebCore::FontFallbackList::FontFallbackList): Changed to start with a
1443         refcount of 1.
1444         (WebCore::FontFallbackList::invalidate): Added a call to
1445         releaseFontData().
1446         (WebCore::FontFallbackList::releaseFontData): Added. Lets the font cache
1447         know that we no longer need the FontData in our font list.
1448         (WebCore::FontFallbackList::fontDataAt): Changed to record in the font
1449         list whether the font data is a custom font data or not.
1450         (WebCore::FontFallbackList::setPlatformFont): Ditto.
1451
1452         * platform/graphics/FontFallbackList.h:
1453         (WebCore::FontFallbackList::create): Added and made the constructor
1454         private.
1455         (WebCore::FontFallbackList::~FontFallbackList): Added a call to
1456         releaseFontData().
1457
1458         * platform/graphics/GlyphPageTreeNode.cpp:
1459         (WebCore::GlyphPageTreeNode::treeGlyphPageCount): Added to provide
1460         statistics.
1461         (WebCore::GlyphPageTreeNode::pageCount): Ditto.
1462
1463         (WebCore::GlyphPageTreeNode::pruneTreeFontData): Added.
1464         (WebCore::GlyphPageTreeNode::getChild): Added code to update the font
1465         data's maximum glyph page tree level.
1466         (WebCore::GlyphPageTreeNode::pruneFontData): Added.
1467
1468         * platform/graphics/GlyphPageTreeNode.h:
1469
1470         * platform/graphics/SimpleFontData.cpp:
1471         (WebCore::SimpleFontData::~SimpleFontData): Added code to let the font
1472         cache know that we no longer need the small caps font data and to prune
1473         the glyph page trees.
1474
1475 2008-05-12  Anders Carlsson  <andersca@apple.com>
1476
1477         Reviewed by Alexey.
1478
1479         Add ApplicationCacheStorage::empty() method which will empty
1480         the application cache database.
1481         
1482         * WebCore.base.exp:
1483         * loader/appcache/ApplicationCache.cpp:
1484         (WebCore::ApplicationCache::clearStorageID):
1485         * loader/appcache/ApplicationCache.h:
1486         * loader/appcache/ApplicationCacheGroup.cpp:
1487         (WebCore::ApplicationCacheGroup::clearStorageID):
1488         * loader/appcache/ApplicationCacheGroup.h:
1489         * loader/appcache/ApplicationCacheResource.h:
1490         (WebCore::ApplicationCacheResource::clearStorageID):
1491         * loader/appcache/ApplicationCacheStorage.cpp:
1492         (WebCore::ApplicationCacheStorage::empty):
1493         * loader/appcache/ApplicationCacheStorage.h:
1494
1495 2008-05-12  Anders Carlsson  <andersca@apple.com>
1496
1497         Reviewed by John.
1498
1499         Don't throw an exception if the string passed in is an invalid URL.
1500         
1501         * loader/appcache/DOMApplicationCache.cpp:
1502         (WebCore::DOMApplicationCache::remove):
1503
1504 2008-05-12  Anders Carlsson  <andersca@apple.com>
1505
1506         Reviewed by Mitz.
1507
1508         Add the variable enums for getting the input vtables.
1509         
1510         * bridge/npapi.h:
1511
1512 2008-05-12  Adam Roben  <aroben@apple.com>
1513
1514         Windows build fix
1515
1516         * WebCorePrefix.cpp: Touched this so that it will rebuild now that
1517         ENABLE_CROSS_DOCUMENT_MESSAGING has been removed.
1518
1519 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
1520
1521         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
1522         SquirrelFish merging.
1523
1524         * bindings/js/GCController.cpp:
1525         (WebCore::collect):
1526         (WebCore::GCController::gcTimerFired):
1527         (WebCore::GCController::garbageCollectNow):
1528         * bindings/js/JSAudioConstructor.cpp:
1529         (WebCore::JSAudioConstructor::JSAudioConstructor):
1530         * bindings/js/JSCSSRuleCustom.cpp:
1531         (WebCore::toJS):
1532         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1533         (WebCore::JSCSSStyleDeclaration::nameGetter):
1534         * bindings/js/JSCSSValueCustom.cpp:
1535         (WebCore::toJS):
1536         * bindings/js/JSCanvasPixelArrayCustom.cpp:
1537         (WebCore::JSCanvasPixelArray::indexGetter):
1538         (WebCore::toJS):
1539         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1540         (WebCore::toJS):
1541         * bindings/js/JSClipboardCustom.cpp:
1542         (WebCore::JSClipboard::types):
1543         (WebCore::JSClipboard::getData):
1544         * bindings/js/JSCustomXPathNSResolver.cpp:
1545         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1546         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1547         (WebCore::JSDOMApplicationCache::addEventListener):
1548         (WebCore::JSDOMApplicationCache::removeEventListener):
1549         (WebCore::JSDOMApplicationCache::setOnchecking):
1550         (WebCore::JSDOMApplicationCache::setOnerror):
1551         (WebCore::JSDOMApplicationCache::setOnnoupdate):
1552         (WebCore::JSDOMApplicationCache::setOndownloading):
1553         (WebCore::JSDOMApplicationCache::setOnprogress):
1554         (WebCore::JSDOMApplicationCache::setOnupdateready):
1555         (WebCore::JSDOMApplicationCache::setOncached):
1556         * bindings/js/JSDOMWindowBase.cpp:
1557         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1558         (WebCore::JSDOMWindowBase::getValueProperty):
1559         (WebCore::JSDOMWindowBase::setListener):
1560         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
1561         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
1562         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
1563         (WebCore::windowProtoFuncAToB):
1564         (WebCore::windowProtoFuncBToA):
1565         (WebCore::windowProtoFuncSetTimeout):
1566         (WebCore::windowProtoFuncSetInterval):
1567         (WebCore::windowProtoFuncAddEventListener):
1568         * bindings/js/JSDOMWindowBase.h:
1569         * bindings/js/JSDOMWindowShell.cpp:
1570         * bindings/js/JSDOMWindowShell.h:
1571         * bindings/js/JSDocumentCustom.cpp:
1572         (WebCore::toJS):
1573         * bindings/js/JSEventCustom.cpp:
1574         (WebCore::toJS):
1575         * bindings/js/JSEventTargetBase.cpp:
1576         (WebCore::jsEventTargetAddEventListener):
1577         * bindings/js/JSEventTargetBase.h:
1578         (WebCore::JSEventTargetPrototype::self):
1579         * bindings/js/JSEventTargetNode.cpp:
1580         (WebCore::JSEventTargetNode::setListener):
1581         * bindings/js/JSHTMLCollectionCustom.cpp:
1582         (WebCore::getNamedItems):
1583         (WebCore::toJS):
1584         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1585         (WebCore::createJSHTMLWrapper):
1586         * bindings/js/JSHTMLFormElementCustom.cpp:
1587         (WebCore::JSHTMLFormElement::nameGetter):
1588         * bindings/js/JSHTMLInputElementBase.cpp:
1589         (WebCore::JSHTMLInputElementBase::getValueProperty):
1590         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1591         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
1592         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1593         (WebCore::JSHTMLOptionsCollection::length):
1594         * bindings/js/JSInspectedObjectWrapper.cpp:
1595         (WebCore::JSInspectedObjectWrapper::wrap):
1596         * bindings/js/JSInspectorCallbackWrapper.cpp:
1597         (WebCore::JSInspectorCallbackWrapper::wrap):
1598         * bindings/js/JSLocationCustom.cpp:
1599         (WebCore::JSLocation::toString):
1600         * bindings/js/JSNamedNodesCollection.cpp:
1601         (WebCore::JSNamedNodesCollection::lengthGetter):
1602         * bindings/js/JSNavigatorCustom.cpp:
1603         (WebCore::JSNavigator::appVersion):
1604         * bindings/js/JSNodeCustom.cpp:
1605         (WebCore::toJS):
1606         * bindings/js/JSNodeFilterCustom.cpp:
1607         (WebCore::JSNodeFilter::acceptNode):
1608         * bindings/js/JSRGBColor.cpp:
1609         (WebCore::getJSRGBColor):
1610         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1611         (WebCore::JSSQLResultSetRowList::item):
1612         * bindings/js/JSSVGElementWrapperFactory.cpp:
1613         (WebCore::createJSSVGWrapper):
1614         * bindings/js/JSSVGLazyEventListener.cpp:
1615         (WebCore::JSSVGLazyEventListener::eventParameterName):
1616         * bindings/js/JSStorageCustom.cpp:
1617         (WebCore::JSStorage::nameGetter):
1618         * bindings/js/JSStyleSheetCustom.cpp:
1619         (WebCore::toJS):
1620         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1621         (WebCore::JSXMLHttpRequestConstructor::construct):
1622         * bindings/js/JSXMLHttpRequestCustom.cpp:
1623         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
1624         (WebCore::JSXMLHttpRequest::setOnload):
1625         (WebCore::JSXMLHttpRequest::setOnprogress):
1626         (WebCore::JSXMLHttpRequest::getResponseHeader):
1627         (WebCore::JSXMLHttpRequest::addEventListener):
1628         (WebCore::JSXMLHttpRequest::removeEventListener):
1629         * bindings/js/JSXSLTProcessorConstructor.cpp:
1630         (WebCore::JSXSLTProcessorConstructor::construct):
1631         * bindings/js/JSXSLTProcessorCustom.cpp:
1632         (WebCore::JSXSLTProcessor::getParameter):
1633         * bindings/js/kjs_binding.cpp:
1634         (WebCore::jsStringOrNull):
1635         (WebCore::jsOwnedStringOrNull):
1636         (WebCore::jsStringOrUndefined):
1637         (WebCore::jsStringOrFalse):
1638         (WebCore::nonCachingStaticFunctionGetter):
1639         (WebCore::objectToStringFunctionGetter):
1640         * bindings/js/kjs_binding.h:
1641         (WebCore::DOMObject::DOMObject):
1642         (WebCore::cacheDOMObject):
1643         (WebCore::cacheSVGDOMObject):
1644         * bindings/js/kjs_events.cpp:
1645         (WebCore::JSLazyEventListener::eventParameterName):
1646         (WebCore::JSLazyEventListener::parseCode):
1647         * bindings/js/kjs_html.cpp:
1648         (WebCore::getRuntimeObject):
1649         * bindings/scripts/CodeGeneratorJS.pm:
1650         * bridge/c/c_instance.cpp:
1651         (KJS::Bindings::CInstance::defaultValue):
1652         (KJS::Bindings::CInstance::stringValue):
1653         (KJS::Bindings::CInstance::numberValue):
1654         (KJS::Bindings::CInstance::valueOf):
1655         * bridge/c/c_instance.h:
1656         * bridge/c/c_utility.cpp:
1657         (KJS::Bindings::convertNPVariantToValue):
1658         * bridge/jni/jni_instance.cpp:
1659         (JavaInstance::stringValue):
1660         (JavaInstance::numberValue):
1661         (JavaInstance::invokeMethod):
1662         (JavaInstance::defaultValue):
1663         (JavaInstance::valueOf):
1664         * bridge/jni/jni_instance.h:
1665         * bridge/jni/jni_jsobject.h:
1666         * bridge/jni/jni_jsobject.mm:
1667         (JavaJSObject::call):
1668         (JavaJSObject::setMember):
1669         (JavaJSObject::setSlot):
1670         (JavaJSObject::convertJObjectToValue):
1671         (JavaJSObject::getListFromJArray):
1672         * bridge/jni/jni_objc.mm:
1673         (KJS::Bindings::dispatchJNICall):
1674         * bridge/jni/jni_runtime.cpp:
1675         (JavaArray::convertJObjectToArray):
1676         (JavaField::dispatchValueFromInstance):
1677         (JavaField::valueFromInstance):
1678         (JavaField::dispatchSetValueToInstance):
1679         (JavaArray::valueAt):
1680         * bridge/jni/jni_utility.h:
1681         * bridge/objc/objc_class.mm:
1682         (KJS::Bindings::ObjcClass::fallbackObject):
1683         * bridge/objc/objc_instance.h:
1684         * bridge/objc/objc_instance.mm:
1685         (ObjcInstance::defaultValue):
1686         (ObjcInstance::stringValue):
1687         (ObjcInstance::numberValue):
1688         (ObjcInstance::valueOf):
1689         * bridge/objc/objc_utility.h:
1690         * bridge/objc/objc_utility.mm:
1691         (KJS::Bindings::convertNSStringToString):
1692         (KJS::Bindings::convertObjcValueToValue):
1693         * bridge/qt/qt_class.cpp:
1694         (KJS::Bindings::QtClass::fallbackObject):
1695         * bridge/qt/qt_instance.cpp:
1696         (KJS::Bindings::QtRuntimeObjectImp::construct):
1697         (KJS::Bindings::QtInstance::getRuntimeObject):
1698         (KJS::Bindings::QtInstance::invokeDefaultMethod):
1699         (KJS::Bindings::QtInstance::defaultValue):
1700         (KJS::Bindings::QtInstance::stringValue):
1701         (KJS::Bindings::QtInstance::numberValue):
1702         (KJS::Bindings::QtInstance::valueOf):
1703         * bridge/qt/qt_instance.h:
1704         * bridge/qt/qt_runtime.cpp:
1705         (KJS::Bindings::convertValueToQVariant):
1706         (KJS::Bindings::convertQVariantToValue):
1707         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter):
1708         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter):
1709         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter):
1710         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter):
1711         (KJS::Bindings::QtConnectionObject::execute):
1712         * bridge/runtime.cpp:
1713         (KJS::Bindings::Instance::createRuntimeObject):
1714         * bridge/runtime.h:
1715         (KJS::Bindings::Instance::valueOf):
1716         * bridge/runtime_array.cpp:
1717         (RuntimeArray::lengthGetter):
1718         * bridge/runtime_method.cpp:
1719         (RuntimeMethod::lengthGetter):
1720         * bridge/runtime_object.cpp:
1721         (RuntimeObjectImp::RuntimeObjectImp):
1722         (RuntimeObjectImp::methodGetter):
1723         (RuntimeObjectImp::defaultValue):
1724         * xml/XMLHttpRequest.cpp:
1725         (WebCore::XMLHttpRequest::dropProtection):
1726
1727 2008-05-11  Robin Dunn  <robin@alldunn.com>
1728
1729         Reviewed by Kevin Ollivier.
1730
1731         Since wx popup menus dismiss themselves when an item is selected we need to
1732         call hidePopup so webkit's internal state is correct.
1733         
1734         https://bugs.webkit.org/show_bug.cgi?id=19000
1735
1736         * platform/wx/PopupMenuWx.cpp:
1737         (WebCore::PopupMenu::OnMenuItemSelected):
1738         (WebCore::PopupMenu::hide):
1739
1740 2008-05-11  Sam Weinig  <sam@webkit.org>
1741
1742         Reviewed by Mark Rowe.
1743
1744         Move some generic parsing functions into a new ParserUtilities header so that
1745         they can be used for non-SVG builds too.
1746
1747         * WebCore.vcproj/WebCore.vcproj:
1748         * WebCore.xcodeproj/project.pbxproj:
1749         * platform/text/ParserUtilities.h: Added.
1750         (WebCore::skipString):
1751         * svg/SVGParserUtilities.h:
1752         (WebCore::isWhitespace):
1753         (WebCore::skipOptionalSpaces):
1754         (WebCore::skipOptionalSpacesOrDelimiter):
1755
1756 2008-05-11  Sam Weinig  <sam@webkit.org>
1757
1758         Reviewed by Dan Bernstein.
1759
1760         Add scaffolding for the implementation of Access Control for Cross-site Requests. 
1761
1762         * GNUmakefile.am:
1763         * WebCore.pro:
1764         * WebCore.vcproj/WebCore.vcproj:
1765         * WebCore.xcodeproj/project.pbxproj:
1766         * WebCoreSources.bkl:
1767         * xml/AccessControlList.cpp: Added.
1768         (WebCore::AccessControlList::AccessControlList):
1769         (WebCore::AccessControlList::~AccessControlList):
1770         (WebCore::AccessControlList::parseAccessControlHeader):
1771         (WebCore::AccessControlList::checkOrigin):
1772         * xml/AccessControlList.h: Added.
1773         * xml/AccessItem.cpp: Added.
1774         (WebCore::AccessItem::AccessItem):
1775         (WebCore::AccessItem::parseAccessItem):
1776         (WebCore::AccessItem::matches):
1777         * xml/AccessItem.h: Added.
1778         * xml/AccessItemRule.cpp: Added.
1779         (WebCore::AccessItemRule::AccessItemRule):
1780         (WebCore::AccessItemRule::parseAccessItemRule):
1781         * xml/AccessItemRule.h: Added.
1782
1783 2008-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
1784
1785         Debug build fix.
1786
1787         * loader/appcache/ApplicationCache.cpp: Include stdio.h
1788         as we are using printf in ApplicationCache::dump().
1789
1790 2008-05-10  Dan Bernstein  <mitz@apple.com>
1791
1792         Reviewed by Jessica Kahn.
1793
1794         - add a copy assignment operator to FontPlatformData on Mac to properly
1795           retain the m_font data member.
1796
1797         * platform/graphics/mac/FontPlatformData.h:
1798         * platform/graphics/mac/FontPlatformDataMac.mm:
1799         (WebCore::FontPlatformData::FontPlatformData):
1800         (WebCore::~FontPlatformData):
1801         (WebCore::FontPlatformData::operator=):
1802         (WebCore::FontPlatformData::setFont):
1803
1804 2008-05-10  Adele Peterson  <adele@apple.com>
1805
1806         Reviewed by Tim Hatcher.
1807
1808         Fix crash for WebKit clients that don't set a group name for the WebView/Page.
1809
1810         * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): Instead of adding the Page directly to the group,
1811           call the addPage method, since it does extra work initializing m_localStorage.
1812
1813 2008-05-09  Sam Weinig  <sam@webkit.org>
1814
1815         Reviewed by Mark Rowe.
1816
1817         Fix for https://bugs.webkit.org/show_bug.cgi?id=18958
1818         NULL pointer dereference in NamedAttrMap::setNamedItem
1819
1820         Test: fast/dom/NamedNodeMap-setNamedItem-crash.html
1821
1822         * dom/NamedAttrMap.cpp:
1823         (WebCore::NamedAttrMap::setNamedItem): Null check the argument.
1824
1825 2008-05-09  Kevin McCullough  <kmccullough@apple.com>
1826
1827         Build fix.
1828
1829         * page/Console.cpp:
1830         (WebCore::Console::profile):
1831
1832 2008-05-09  Sam Weinig  <sam@webkit.org>
1833
1834         Rubber-stamped by Mark Rowe.
1835
1836         Remove the ENABLE_CROSS_DOCUMENT_MESSAGING #ifdefs.
1837
1838         * Configurations/WebCore.xcconfig:
1839         * WebCore.vcproj/WebCore.vcproj:
1840         * WebCore.vcproj/build-generated-files.sh:
1841         * bindings/js/JSDOMWindowCustom.cpp:
1842         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1843         (WebCore::JSDOMWindow::postMessage):
1844         * bindings/js/JSEventCustom.cpp:
1845         (WebCore::toJS):
1846         * bindings/objc/DOMEvents.mm:
1847         (+[DOMEvent _wrapEvent:WebCore::]):
1848         * dom/Document.cpp:
1849         (WebCore::Document::createEvent):
1850         * dom/Event.cpp:
1851         (WebCore::Event::isMessageEvent):
1852         * dom/Event.h:
1853         * dom/MessageEvent.cpp:
1854         * dom/MessageEvent.h:
1855         * dom/MessageEvent.idl:
1856         * page/DOMWindow.cpp:
1857         (WebCore::DOMWindow::postMessageTimerFired):
1858         * page/DOMWindow.h:
1859         * page/DOMWindow.idl:
1860
1861 2008-05-09  Adam Barth  <abarth-webkit@adambarth.com>
1862
1863         Reviewed by Sam Weinig.
1864
1865         https://bugs.webkit.org/show_bug.cgi?id=18771
1866
1867         Make postMessage generate an event on the window instead of the
1868         document.
1869
1870         Test: http/tests/messaging/cross-domain-message-event-dispatch.html
1871
1872         * dom/EventTargetNode.cpp:
1873         (WebCore::EventTargetNode::dispatchWindowEvent):
1874         * dom/EventTargetNode.h:
1875         * page/DOMWindow.cpp:
1876         (WebCore::DOMWindow::postMessageTimerFired):
1877
1878 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
1879
1880         Reviewed by Simon.
1881
1882         Replaced all instances of qDebug() with LOG(Media, ...)
1883         in MediaPlayerPrivatePhonon.
1884
1885         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1886         (WebCore::MediaPlayerPrivate::updateStates):
1887
1888 2008-05-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
1889
1890         Reviewed by Simon
1891
1892         Fix the Qt/Mac build.
1893
1894         * platform/qt/FileSystemQt.cpp:
1895
1896 2008-05-08  Sam Weinig  <sam@webkit.org>
1897
1898         Reviewed by Anders Carlsson.
1899
1900         Rename the XMLHttpRequestState enum values to match the spec.
1901
1902         * xml/XMLHttpRequest.cpp:
1903         (WebCore::XMLHttpRequest::responseXML):
1904         (WebCore::XMLHttpRequest::XMLHttpRequest):
1905         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1906         (WebCore::XMLHttpRequest::open):
1907         (WebCore::XMLHttpRequest::send):
1908         (WebCore::XMLHttpRequest::abort):
1909         (WebCore::XMLHttpRequest::setRequestHeader):
1910         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1911         (WebCore::XMLHttpRequest::getResponseHeader):
1912         (WebCore::XMLHttpRequest::status):
1913         (WebCore::XMLHttpRequest::statusText):
1914         (WebCore::XMLHttpRequest::processSyncLoadResults):
1915         (WebCore::XMLHttpRequest::didFinishLoading):
1916         (WebCore::XMLHttpRequest::didReceiveData):
1917         * xml/XMLHttpRequest.h:
1918         (WebCore::):
1919
1920 2008-05-08  Dan Bernstein  <mitz@apple.com>
1921
1922         Reviewed by Mark Rowe.
1923
1924         - fix https://bugs.webkit.org/show_bug.cgi?id=18818
1925           <rdar://problem/5901544> REGRESSION (3.1.1-TOT): Character order (float:left ordered after the first letter)
1926
1927         Test: fast/css/first-letter-float-after-float.html
1928
1929         * rendering/RenderBlock.cpp:
1930         (WebCore::RenderBlock::updateFirstLetter): Changed to add the first
1931         letter container right before the rest of the text it is taken from,
1932         instead of at the beginning of the block.
1933
1934 2008-05-08  Chris Fleizach  <cfleizach@apple.com>
1935
1936         Reviewed by Darin Adler.
1937
1938         <rdar://problem/5921046> AX: list box options have wrong AXPosition
1939
1940         * page/AccessibilityObject.cpp:
1941         (WebCore::AccessibilityObject::documentFrameView):
1942         * page/AccessibilityObject.h:
1943
1944 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
1945
1946         Reviewed by Eric.
1947
1948         Bug 18916: make_names.pl --factory needs to support custom c++ guard
1949
1950         Add --guardFactoryWith to handle the cpp guard around generated factories.
1951
1952         * DerivedSources.make: Set the guardFactoryWith variable for SVG factory.
1953         * GNUmakefile.am: Ditto.
1954         * WebCore.pro: Ditto.
1955         * dom/make_names.pl: Add guardFactoryWith option.
1956
1957 2008-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
1958
1959         Reviewed by Adam Roben.
1960
1961         wx & Gtk build fix.
1962
1963         Should also fix the cURL backend for the Windows port.
1964
1965         * WebCore.vcproj/WebCore.vcproj: Add FormDataStreamCurl information.
1966         * platform/network/curl/FormDataStreamCurl.h: Include stdio.h which
1967         fixes the build on some machine.
1968
1969         * webcore-wx.bkl: Add FormDataStreamCurl.cpp.
1970
1971 2008-05-08  Timothy Hatcher  <timothy@apple.com>
1972
1973         Fixes the bug where the Web Inspector could not
1974         find any localization strings.
1975
1976         Reviewed by Mark Rowe.
1977
1978         * WebCore.xcodeproj/project.pbxproj: Add the localizedStrings.js
1979         file to the WebCore Copy Resources phase. Also removes an idl from
1980         the Copy Resources phase.
1981
1982 2008-05-08  Dan Bernstein  <mitz@apple.com>
1983
1984         Reviewed by Adam Roben.
1985
1986         - fix <rdar://problem/5697957> "No recent searches" label in a narrow search field's history popup is truncated
1987
1988         * platform/win/PopupMenuWin.cpp:
1989         (WebCore::PopupMenu::calculatePositionAndSize): Changed to use a bold
1990         font for measuring labels.
1991
1992 2008-05-08  Dan Bernstein  <mitz@apple.com>
1993
1994         Reviewed by Geoffrey Garen.
1995
1996         - cross-platform fix for http://bugs.webkit.org/show_bug.cgi?id=17590 
1997           ASSERTION FAILED: subject in jsRegExpExecute()
1998
1999         * page/Frame.cpp:
2000         (WebCore::Frame::matchLabelsAgainstElement):
2001
2002 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
2003
2004         Reviewed by Simon.
2005
2006         Simple ImageBuffer::image implementation.
2007
2008         In contrast to cg and cairo we do not use a special BitmapImage because
2009         the ownership of the FrameData inside the BitmapImage is a bit backward
2010         (actually owned by the ImageDecoderQt...). Further work is needed for image
2011         and pixmap handling in the qt port...
2012
2013         * WebCore.pro:
2014         * platform/graphics/ImageBuffer.h:
2015         * platform/graphics/qt/ImageBufferQt.cpp:
2016         (WebCore::ImageBuffer::image):
2017         * platform/graphics/qt/ImageQt.cpp:
2018         * platform/graphics/qt/StillImageQt.cpp: Added.
2019         (WebCore::StillImage::StillImage):
2020         (WebCore::StillImage::size):
2021         (WebCore::StillImage::getPixmap):
2022         (WebCore::StillImage::draw):
2023         * platform/graphics/qt/StillImageQt.h: Added.
2024
2025 2008-05-08  Holger Hans Peter Freyther  <zecke@selfish.org>
2026
2027         Reviewed by Simon.
2028
2029         Update the WebKit.qrc of the inspector to be functional again
2030
2031         * page/inspector/WebKit.qrc:
2032
2033 2008-05-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
2034
2035         Reviewed by Simon
2036
2037         Fix the Qt/Mac build.
2038
2039         * platform/FileSystem.h:
2040
2041 2008-05-08  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2042
2043         Reviewed by Simon.
2044
2045         Use native Windows library handling (instead of QLibrary) 
2046         for Qt/Win32's PlatformModule.
2047
2048         * platform/FileSystem.h:
2049         (WebCore::PlatformModuleVersion::PlatformModuleVersion):
2050         * platform/qt/FileSystemQt.cpp:
2051         (WebCore::unloadModule):
2052
2053 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
2054
2055         Reviewed and found by Holger.
2056
2057         Include .css in the list of extensions for text/css. Fixes
2058         fast/loader/local-css-allowed-in-strict-mode.html.
2059
2060         * platform/qt/MIMETypeRegistryQt.cpp:
2061
2062 2008-05-08  Simon Hausmann  <hausmann@webkit.org>
2063
2064         Fix the Qt and Wx build when compiling without offline app support.
2065
2066         * loader/FrameLoader.cpp:
2067         (WebCore::FrameLoader::canCachePage):
2068
2069 2008-05-07  Sam Weinig  <sam@webkit.org>
2070
2071         Reviewed by Adele Peterson
2072
2073         Update MessageEvent to match the latest version of the HTML5 spec,
2074         adding the lastEventId attribute.
2075
2076         * dom/MessageEvent.cpp:
2077         (WebCore::MessageEvent::MessageEvent):
2078         (WebCore::MessageEvent::initMessageEvent):
2079         * dom/MessageEvent.h:
2080         (WebCore::MessageEvent::lastEventId):
2081         * dom/MessageEvent.idl:
2082         * page/DOMWindow.cpp:
2083         (WebCore::DOMWindow::postMessage):
2084
2085 2008-05-07  Stephanie Lewis <slewis@apple.com>
2086
2087         Reviewed by Maciej.
2088
2089         remove non-functioning code.  If onunload should be fired from these nodes then
2090         a WindowEventListener needs to be set.  However, Firefox and IE also do not
2091         fire onunload events for these cases.
2092
2093         Test: fast/events/onunload-not-on-body.html 
2094         
2095         * html/HTMLFrameElementBase.cpp:
2096         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2097         * html/HTMLObjectElement.cpp
2098         (WebCore::HTMLObjectElement::parseMappedAttribute):
2099
2100 2008-05-07  Dan Bernstein  <mitz@apple.com>
2101
2102         Reviewed by John Sullivan.
2103
2104         - fix https://bugs.webkit.org/show_bug.cgi?id=18909
2105           <rdar://problem/5914165> REGRESSION (r31872-r31878): Viewed photos not closing completely at indycar.com
2106
2107         Test: fast/dynamic/positioned-movement-with-positioned-children.html
2108
2109         * rendering/RenderBlock.cpp:
2110         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Cover the case of
2111         a positioned object that has only moved and has only positioned children
2112         that have changed.
2113         * rendering/RenderObject.h:
2114         (WebCore::RenderObject::needsPositionedMovementLayout): Added this
2115         accessor.
2116
2117 2008-05-07  Anders Carlsson  <andersca@apple.com>
2118
2119         Reviewed by John.
2120
2121         When no document loaders are associated with an application cache group,
2122         release the reference to the newest cache group. This prevents reference cycles.
2123         
2124         * loader/appcache/ApplicationCacheGroup.cpp:
2125         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
2126         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
2127         (WebCore::ApplicationCacheGroup::cacheDestroyed):
2128         * loader/appcache/ApplicationCacheGroup.h:
2129         
2130         * loader/appcache/ApplicationCacheStorage.cpp:
2131         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2132         Return early if the datbase wasn't open.
2133         
2134         (WebCore::ApplicationCacheStorage::loadCache):
2135         Add error.
2136
2137 2008-05-07  Anders Carlsson  <andersca@apple.com>
2138
2139         Reviewed by Adam.
2140
2141         Don't put pages with an application cache in the BF cache.
2142         
2143         * loader/FrameLoader.cpp:
2144         (WebCore::FrameLoader::canCachePage):
2145
2146 2008-05-07  Justin Garcia  <justin.garcia@apple.com>
2147
2148         Reviewed by John Sullivan.
2149
2150         <rdar://problem/5666354> Crashes in Mail at WebCore::RemoveNodeCommand::doApply
2151         
2152         When a single tab or series of tabs was copied, we weren't putting them into a 
2153         tab span.  On Paste, we would be given a text node with a single tab or series
2154         of tabs in it, and we would crash when inserting it at the start of a block
2155         (where that kind of text becomes completely unrendered).
2156
2157         * editing/ReplaceSelectionCommand.cpp:
2158         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Clean
2159         up correctly and early return if we removed everything that was inserted.
2160         * editing/markup.cpp:
2161         (WebCore::createMarkup):  Include the tab span when the only thing copied
2162         was a tab or a series of tabs.
2163
2164 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
2165
2166         Reviewed by Adam Roben.
2167
2168         wx & Gtk build fix.
2169
2170         * platform/network/curl/FormDataStreamCurl.cpp: Added stdint.h include. We need to define
2171         __STDC_LIMIT_MACROS to have SIZE_MAX exported.
2172         * platform/network/curl/FormDataStreamCurl.h: Removed cstdint include (replaced by stdint.h)
2173         as it is not present on the build bots.
2174         * plugins/gtk/PluginDatabaseGtk.cpp: Added missing #endif.
2175
2176 2008-05-07  David Kilzer  <ddkilzer@apple.com>
2177
2178         Bug 18900: Password field has focus but can't type text (i.rememberthemilk.com)
2179         <https://bugs.webkit.org/show_bug.cgi?id=18900>
2180         <rdar://problem/5912383>
2181
2182         Original patch by Aaron Golden and Tim Omernick.  Reviewed by Adele.
2183
2184         Test: fast/forms/textfield-to-password-on-focus.html
2185
2186         * html/HTMLInputElement.cpp:
2187         (WebCore::HTMLInputElement::setInputType): If the current node has
2188         focus, call updateFocusAppearance() to make sure its state is correct
2189         after changing its type.
2190
2191 2008-05-07  Chris Fleizach  <cfleizach@apple.com>
2192
2193         Reviewed by Alice Liu
2194
2195         <rdar://problem/4867889> REGRESSION: "Choose File.." buttons are exposed as AXGroup instead of AXButton
2196
2197         * page/AccessibilityObject.h:
2198         (WebCore::AccessibilityObject::isFileUploadButton):
2199         * page/AccessibilityRenderObject.cpp:
2200         (WebCore::AccessibilityRenderObject::isFileUploadButton):
2201         (WebCore::AccessibilityRenderObject::actionElement):
2202         (WebCore::AccessibilityRenderObject::textUnderElement):
2203         (WebCore::AccessibilityRenderObject::stringValue):
2204         (WebCore::AccessibilityRenderObject::roleValue):
2205         * page/AccessibilityRenderObject.h:
2206         * rendering/RenderFileUploadControl.cpp:
2207         (WebCore::RenderFileUploadControl::buttonValue):
2208         (WebCore::RenderFileUploadControl::fileTextValue):
2209         * rendering/RenderFileUploadControl.h:
2210
2211 2008-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
2212
2213         Reviewed by Eric.
2214
2215         Bug 17971: [Curl] FormData processing should be moved to its own class
2216
2217         Move FormData treatment into FormDataStream. The aim is to have FormDataStream behave like a stream that cURL
2218         could manipulate.
2219
2220         First step into having complete file uploading facility in cURL.
2221
2222         No test case as it is only code refactoring.
2223
2224         * GNUmakefile.am: Add FormDataStreamCurl.cpp
2225         * platform/network/ResourceHandleInternal.h: Move code to FormStreamDataCurl.h
2226         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2227         * platform/network/curl/FormDataStreamCurl.cpp: Added.
2228         (WebCore::FormDataStream::~FormDataStream):
2229         (WebCore::FormDataStream::read):
2230         * platform/network/curl/FormDataStreamCurl.h: Added.
2231         (WebCore::FormDataStream::FormDataStream):
2232         * platform/network/curl/ResourceHandleCurl.cpp:
2233         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2234         * platform/network/curl/ResourceHandleManager.cpp:
2235         (WebCore::readCallback): Move code to FormDataStreamCurl.cpp
2236
2237 2008-05-07  Adam Treat  <treat@kde.org>
2238
2239         Reviewed by Simon.
2240
2241         https://bugs.webkit.org/show_bug.cgi?id=18898
2242
2243         Fixed wrong transform being used for creating the pixmap for a new
2244         transparency layer. This fixes the popup menus on dell.com.
2245
2246         * platform/graphics/qt/GraphicsContextQt.cpp:
2247         (WebCore::GraphicsContext::beginTransparencyLayer):
2248
2249 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2250
2251         Reviewed by Simon.
2252
2253         Share the plug-in directories between Gtk and Qt/X11 port.
2254
2255         * platform/qt/FileSystemQt.cpp:
2256         (WebCore::homeDirectoryPath): Implement it for Qt.
2257         * plugins/PluginDatabase.cpp:
2258         (WebCore::addMozillaPluginDirectories): Shared code.
2259         (WebCore::PluginDatabase::defaultPluginDirectories):
2260         (WebCore::PluginDatabase::isPreferredPluginDirectory): Shared code.
2261         * plugins/gtk/PluginDatabaseGtk.cpp:
2262         (WebCore::PluginDatabase::isPreferredPluginDirectory): Refactored.
2263         * plugins/qt/PluginDatabaseQt.cpp: Refactored.
2264
2265 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2266
2267         Reviewed by Simon
2268
2269         Fix build issues on Mac and refeactor the .pro file a bit.
2270
2271         * WebCore.pro:
2272         * platform/qt/TemporaryLinkStubs.cpp:
2273         (PluginPackage::fetchInfo):
2274
2275 2008-05-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
2276
2277         Reviewed by Simon
2278
2279         Draw scrollview corners (between scrollbars) using the Qt style.
2280
2281         https://bugs.webkit.org/show_bug.cgi?id=18894
2282
2283         * platform/qt/ScrollViewQt.cpp:
2284         (WebCore::drawScrollbarCorner):
2285         (WebCore::ScrollView::paint):
2286
2287 2008-05-07  Simon Hausmann  <hausmann@webkit.org>
2288
2289         Fix the Qt build, added AccessibilityListBox and ListBoxOption.cpp to
2290         the build.
2291
2292         * WebCore.pro:
2293
2294 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2295
2296         Rubber-stamped by Holger.
2297
2298         Fix building without storage support.
2299
2300         * page/PageGroup.cpp:
2301         (WebCore::PageGroup::closeLocalStorage): proper #if
2302
2303 2008-05-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2304
2305         Rubber-stamped by Oliver Hunt.
2306
2307         Fix building without accessibility.
2308
2309         * page/AXObjectCache.cpp:
2310         (WebCore::AXObjectCache::selectedChildrenChanged): proper #if
2311
2312 2008-05-06  Dan Bernstein  <mitz@apple.com>
2313
2314         Reviewed by Darin Adler.
2315
2316         - fix <rdar://problem/5914544> Crash in layoutInlineChildren()
2317
2318         Test: fast/block/float/float-on-zero-height-line.html
2319
2320         * rendering/RenderBlock.cpp:
2321         (WebCore::RenderBlock::markLinesDirtyInVerticalRange):
2322
2323 2008-05-06  Alice Liu  <alice.liu@apple.com>
2324
2325         Reviewed by Adele Peterson and John Sullivan.
2326
2327         changes needed to build on Windows after r32911 and r32927
2328
2329         * WebCore.vcproj/WebCore.vcproj:
2330         * page/AXObjectCache.cpp:
2331         (WebCore::AXObjectCache::selectedChildrenChanged):
2332         * page/AccessibilityObject.h:
2333         (WebCore::AccessibilityObject::document):
2334         (WebCore::AccessibilityObject::topDocumentFrameView):
2335         (WebCore::AccessibilityObject::documentFrameView):
2336         * page/AccessibilityRenderObject.cpp:
2337         (WebCore::AccessibilityRenderObject::document):
2338         (WebCore::AccessibilityRenderObject::topDocumentFrameView):
2339         (WebCore::AccessibilityRenderObject::documentFrameView):
2340         * page/AccessibilityRenderObject.h:
2341         * page/mac/AXObjectCacheMac.mm:
2342         * page/mac/AccessibilityObjectWrapper.mm:
2343         (-[AccessibilityObjectWrapper position]):
2344         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2345
2346 2008-05-06  Brady Eidson  <beidson@apple.com>
2347
2348         Reviewed by Sam Weinig
2349
2350         Fix a few bugs with the final sync'ing of LocalStorageAreas when the thread is shut down.
2351         1 - A sync task actually needs to be scheduled for each LocalStorageArea when the shut down occurs.
2352         2 - Pending sync timers all need to be cancelled.
2353
2354         * storage/LocalStorage.cpp:
2355         (WebCore::LocalStorage::storageArea):
2356         (WebCore::LocalStorage::close): Tell each LocalStorageArea to schedule it's final sync before scheduling
2357           thread termination.
2358         * storage/LocalStorage.h:  Change the map to be of LocalStorageAreas instead of StorageAreas
2359
2360         * storage/LocalStorageArea.cpp:
2361         (WebCore::LocalStorageArea::LocalStorageArea):
2362         (WebCore::LocalStorageArea::~LocalStorageArea): ASSERT the timer has been cancelled, but make SURE it is
2363           in release builds.
2364         (WebCore::LocalStorageArea::scheduleFinalSync): Cancel the sync timer, schedule the final sync, and set the
2365           "final sync scheduled" flag
2366         (WebCore::LocalStorageArea::scheduleItemForSync): ASSERT that the final sync hasn't already been scheduled
2367         (WebCore::LocalStorageArea::scheduleClear): Ditto
2368         * storage/LocalStorageArea.h:
2369
2370 2008-05-06  Kevin Ollivier  <kevino@theolliviers.com>
2371
2372         wx build fix. Adding files added in  r32925 to the bakefiles.
2373
2374         * WebCoreSources.bkl:
2375
2376 2008-05-06  Alp Toker  <alp@nuanti.com>
2377
2378         GTK+ build fix. Add empty stub to keep non-accessible ports building.
2379
2380         * page/AXObjectCache.h:
2381         (WebCore::AXObjectCache::selectedChildrenChanged):
2382
2383 2008-05-06  Beth Dakin  <bdakin@apple.com>
2384
2385         Reviewed by Darin.
2386
2387         Fix for <rdar://problem/5907916> Implement 'aria-labeledby' and 
2388         'aria-describedby' attributes.
2389
2390         * html/HTMLAttributeNames.in: Added new attributes. Added both the 
2391         British spelling (since that is what is specified in the spec), and 
2392         the American spelling (since the bug filer and I are two Americans 
2393         who keep spelling it the American way by accident). 
2394         * page/AccessibilityObject.cpp: Added empty wrappers. These 
2395         functions can't do anything meaningful without a renderer.
2396         (WebCore::AccessibilityObject::ariaAccessiblityName):
2397         (WebCore::AccessibilityObject::ariaLabeledByAttribute):
2398         (WebCore::AccessibilityObject::ariaDescribedByAttribute):
2399         * page/AccessibilityObject.h:
2400
2401         Here is where the real work is done.
2402         * page/AccessibilityRenderObject.h:
2403         * page/AccessibilityRenderObject.cpp:
2404         (WebCore::accessibleNameForNode): Takes a node and finds its 
2405         contribution to the accessible name, as defined by the Mozilla ARIA 
2406         Implementer's Guide. 
2407         (WebCore::AccessibilityRenderObject::ariaAccessiblityName): Takes a 
2408         string of space-separated IDs, fetches the corresponding element 
2409         for each ID, and concatenates an accessible name based on the 
2410         elements.
2411         (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): 
2412         Retrieve the labeledby attribute and send its contents to 
2413         ariaAccessibilityName().
2414         (WebCore::AccessibilityRenderObject::title): Return the ARIA 
2415         labeledby value if one exists.
2416         (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute): 
2417         Retrieve the describedby attribute and send its contents to 
2418         ariaAccessibilityName().
2419         (WebCore::AccessibilityRenderObject::accessibilityDescription): 
2420         Return the ARIA describedby attribute if one exists. 
2421
2422         These are two bugs I spotted. 
2423         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Don't 
2424         ignore anything with an ARIA role.
2425         (WebCore::AccessibilityRenderObject::roleValue): Button tags maps 
2426         to ButtonRole.
2427
2428 2008-05-06  Anders Carlsson  <andersca@apple.com>
2429
2430         Reviewed by Brady.
2431
2432         Support reading back app caches from the database.
2433     
2434         * loader/appcache/ApplicationCache.cpp:
2435         (WebCore::ApplicationCache::ApplicationCache):
2436         Initialize m_storageID to 0.
2437         
2438         * loader/appcache/ApplicationCacheGroup.cpp:
2439         (WebCore::ApplicationCacheGroup::cacheDestroyed):
2440         If the cache being destroyed is not the newest cache, it should no longer be 
2441         stored in the database. Remove it.
2442         
2443         (WebCore::ApplicationCacheGroup::setNewestCache):
2444         Don't store the cache here.
2445         
2446         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2447         Store it here instead.
2448         
2449         * loader/appcache/ApplicationCacheStorage.cpp:
2450         (WebCore::ApplicationCacheStorage::loadCacheGroup):
2451         New method that loads a cache group with a given manifest URL (or returns 0 if the load fails).
2452         
2453         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
2454         Search for the group in the database.
2455         
2456         (WebCore::ApplicationCacheStorage::loadManifestHostHashes):
2457         New method that loads the host hashes from the database.
2458         
2459         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2460         Search in the database for a cache that contains the resource.
2461         
2462         (WebCore::ApplicationCacheStorage::loadCache):
2463         New method that loads a cache with a given ID.
2464         
2465         (WebCore::ApplicationCacheStorage::remove):
2466         New method that removes a cache.
2467         
2468         * loader/appcache/ApplicationCacheStorage.h:
2469         Add definitions.
2470
2471 2008-05-06  Alp Toker  <alp@nuanti.com>
2472
2473         Partial GTK+ build fix. Add files from r32925 to the build and replace
2474         'nil' return with 0.
2475
2476         * GNUmakefile.am:
2477         * page/AccessibilityListBoxOption.cpp:
2478         (WebCore::AccessibilityListBoxOption::parentObject):
2479
2480 2008-05-06  Brady Eidson  <beidson@apple.com>
2481
2482         Reviewed by Anders
2483
2484         Make LocalStorage persistent using a SQLite database.
2485
2486         There's a few things going on here.  Whenever an item is changed, we add it to a set of
2487         "items to be sync'ed."  Instead of immediately scheduling the sync'ing on the background
2488         thread, we set a "sync timer" instead.  This is to shield against a series of rapid changes
2489         to avoid thread churn.
2490
2491         When the sync timer fires, we move the "items to be sync'ed" set to a background thread set
2492         and schedule the sync task which is where the items are actually committed to disk.
2493
2494         Current design for reading items back in from disk is to be as aggressive as possible.
2495         When a page first accesses it's LocalStorage area, we begin to import all items in from disk so
2496         they are immediately available.  A future enhancement will be to being this pre-fetching the
2497         moment we start loading a page when we know that page has LocalStorage.
2498
2499         * storage/LocalStorageArea.cpp:
2500         (WebCore::LocalStorageArea::LocalStorageArea):
2501         (WebCore::LocalStorageArea::length): Return the length, or wait for the import to complete then return it.
2502         (WebCore::LocalStorageArea::key): Return the key, or wait for the import to complete then return it.
2503         (WebCore::LocalStorageArea::getItem): Return the item, or wait for the import to complete then return it.
2504         (WebCore::LocalStorageArea::setItem): Set the item, or hold the import lock and set it.  The second case is
2505           because if the item is set while the import is still in progress, the new value should override whatever
2506           the imported value is.
2507         (WebCore::LocalStorageArea::removeItem): Remove the item, or hold the import lock and remove it.  See the 
2508           explanation for setItem()
2509         (WebCore::LocalStorageArea::contains): Return whether or not the item is contained.  Do the same dance with
2510           the import flag, import lock, and import condition that the above methods do.
2511
2512         (WebCore::LocalStorageArea::itemChanged): Schedule the item for sync'ing
2513         (WebCore::LocalStorageArea::itemRemoved): Schedule the removal of the item for sync'ing
2514         (WebCore::LocalStorageArea::areaCleared): Schedule the clear for sync'ing, and clear all previously 
2515           scheduled items.
2516
2517         (WebCore::LocalStorageArea::scheduleItemForSync): Add an item to the sync set.
2518         (WebCore::LocalStorageArea::scheduleClear): Set a bool flag denoting "All items removed."  If any
2519           items are later set before the actual removal takes place, they will be written *after* the removal.
2520         (WebCore::LocalStorageArea::syncTimerFired): Move the current sync-set to the background thread sync set, then 
2521           schedule a sync task.  Also transfer the "items cleared" flag to the "background thread items cleared" flag
2522         (WebCore::LocalStorageArea::performImport): Import all items from disk, then signal the import complete.
2523         (WebCore::LocalStorageArea::markImported): Set the imported flag and signal the import complete
2524         (WebCore::LocalStorageArea::performSync): If the clear flag is set then drop all items.  Then update or delete 
2525           each item waiting to be sync'ed
2526         * storage/LocalStorageArea.h:
2527
2528 2008-05-06  Brady Eidson  <beidson@apple.com>
2529
2530         Rubberstamped by Mitz Pettel RTL
2531
2532         * storage/LocalStorage.cpp:
2533         (WebCore::LocalStorage::fullDatabaseFilename): Filename extensions for localstorage = all lowercase
2534
2535 2008-05-06  Brady Eidson  <beidson@apple.com>
2536
2537         Reviewed by Darin, Sam Weinig, and Anders
2538
2539         Preparation for upcoming work making LocalStorage persistent.
2540
2541         The final step before code that actually does storage and retrieval of LocalStorage items.
2542
2543         The LocalStorage set is responsible for controlling the path and filenames that individual
2544         LocalStorageAreas will use for their persistent store.  This adds the ability to return that
2545         filename.
2546
2547         Also, add the scheduling methods that LocalStorageArea will use for importing and syncing 
2548         it's persistent items.
2549
2550         * storage/LocalStorage.cpp:
2551         (WebCore::LocalStorage::storageArea):  Add some comments re: the future direction of this
2552           method once we actually do quota tracking.
2553         (WebCore::LocalStorage::fullDatabaseFilename):
2554         (WebCore::LocalStorage::scheduleImport):
2555         (WebCore::LocalStorage::scheduleSync):
2556         * storage/LocalStorage.h:
2557
2558 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
2559
2560         Reviewed by Beth Dakin.
2561
2562         rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
2563
2564         * WebCore.xcodeproj/project.pbxproj:
2565         * html/HTMLOptGroupElement.cpp:
2566         (WebCore::HTMLOptGroupElement::ownerSelectElement):
2567         (WebCore::HTMLOptGroupElement::accessKeyAction):
2568         * html/HTMLOptGroupElement.h:
2569         * html/HTMLOptionElement.cpp:
2570         (WebCore::HTMLOptionElement::accessKeyAction):
2571         (WebCore::HTMLOptionElement::index):
2572         (WebCore::HTMLOptionElement::setSelected):
2573         (WebCore::HTMLOptionElement::childrenChanged):
2574         (WebCore::HTMLOptionElement::ownerSelectElement):
2575         (WebCore::HTMLOptionElement::insertedIntoDocument):
2576         * html/HTMLOptionElement.h:
2577         * html/HTMLSelectElement.cpp:
2578         (WebCore::HTMLSelectElement::childrenChanged):
2579         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
2580         * html/HTMLSelectElement.h:
2581         * page/AXObjectCache.cpp:
2582         (WebCore::AXObjectCache::get):
2583         * page/AccessibilityListBox.cpp: Added.
2584         (WebCore::AccessibilityListBox::AccessibilityListBox):
2585         (WebCore::AccessibilityListBox::~AccessibilityListBox):
2586         (WebCore::AccessibilityListBox::create):
2587         (WebCore::AccessibilityListBox::addChildren):
2588         (WebCore::AccessibilityListBox::selectedChildren):
2589         (WebCore::AccessibilityListBox::visibleChildren):
2590         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
2591         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
2592         * page/AccessibilityListBox.h: Added.
2593         (WebCore::AccessibilityListBox::accessibilityShouldUseUniqueId):
2594         (WebCore::AccessibilityListBox::isListBox):
2595         (WebCore::AccessibilityListBox::canSetFocusAttribute):
2596         (WebCore::AccessibilityListBox::roleValue):
2597         (WebCore::AccessibilityListBox::accessibilityIsIgnored):
2598         * page/AccessibilityListBoxOption.cpp: Added.
2599         (WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
2600         (WebCore::AccessibilityListBoxOption::~AccessibilityListBoxOption):
2601         (WebCore::AccessibilityListBoxOption::create):
2602         (WebCore::AccessibilityListBoxOption::isEnabled):
2603         (WebCore::AccessibilityListBoxOption::isSelected):
2604         (WebCore::AccessibilityListBoxOption::elementRect):
2605         (WebCore::AccessibilityListBoxOption::title):
2606         (WebCore::AccessibilityListBoxOption::size):
2607         (WebCore::AccessibilityListBoxOption::actionElement):
2608         (WebCore::AccessibilityListBoxOption::parentObject):
2609         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2610         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
2611         * page/AccessibilityListBoxOption.h: Added.
2612         (WebCore::AccessibilityListBoxOption::setHTMLElement):
2613         (WebCore::AccessibilityListBoxOption::roleValue):
2614         (WebCore::AccessibilityListBoxOption::accessibilityIsIgnored):
2615         (WebCore::AccessibilityListBoxOption::isListBoxOption):
2616         * page/AccessibilityObject.h:
2617         (WebCore::AccessibilityObject::isListBox):
2618         * page/AccessibilityRenderObject.cpp:
2619         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
2620         * page/mac/AccessibilityObjectWrapper.mm:
2621         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2622         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2623         * rendering/RenderListBox.cpp:
2624         (WebCore::RenderListBox::selectionChanged):
2625         * rendering/RenderListBox.h:
2626
2627 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
2628
2629         Reviewed by Beth Dakin.
2630
2631          <rdar://problem/5455287> AXWebArea should include AXURL
2632
2633         * page/AccessibilityRenderObject.cpp:
2634         (WebCore::AccessibilityRenderObject::url):
2635         * page/mac/AccessibilityObjectWrapper.mm:
2636         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2637
2638 2008-05-06  Alice Liu  <alice.liu@apple.com>
2639
2640         Rubber-stamped by Beth
2641         
2642         stab-in-the-dark attempt at fixing non-mac builds.
2643
2644         * GNUmakefile.am:
2645         * WebCore.pro:
2646         * WebCore.vcproj/WebCore.vcproj:
2647         * WebCoreSources.bkl:
2648
2649 2008-05-06  Anders Carlsson  <andersca@apple.com>
2650
2651         Reviewed by Adam.
2652
2653         Only use the toplevel application cache when loading subframes.
2654
2655         * loader/MainResourceLoader.cpp:
2656         (WebCore::MainResourceLoader::load):
2657
2658 2008-05-06  Adam Barth  <abarth-webkit@adambarth.com>
2659
2660         Reviewed by Sam Weinig.
2661
2662         https://bugs.webkit.org/show_bug.cgi?id=18725
2663         Implement asynchronous postMessage.
2664         MessageEvent no longer bubbles as per r1237 in the HTML 5 working draft.
2665
2666         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
2667
2668         Test: http/tests/security/postMessage/delivery-order.html
2669
2670         * dom/MessageEvent.cpp:
2671         (WebCore::MessageEvent::MessageEvent):
2672         * page/DOMWindow.cpp:
2673         (WebCore::PostMessageTimer::PostMessageTimer):
2674         (WebCore::PostMessageTimer::event):
2675         (WebCore::PostMessageTimer::targetOrigin):
2676         (WebCore::PostMessageTimer::fired):
2677         (WebCore::DOMWindow::postMessage):
2678         (WebCore::DOMWindow::postMessageTimerFired):
2679         * page/DOMWindow.h:
2680         * page/DOMWindow.idl:
2681         
2682 2008-05-06  Anders Carlsson  <andersca@apple.com>
2683
2684         Reviewed by Brady.
2685
2686         Store cache to the database.
2687
2688         * loader/appcache/ApplicationCache.cpp:
2689         (WebCore::ApplicationCache::addResource):
2690         If the cache has been saved to disk, save the resource as well.
2691         
2692         * loader/appcache/ApplicationCache.h:
2693         (WebCore::ApplicationCache::onlineWhitelist):
2694         New method which returns the online whitelist.
2695
2696         (WebCore::ApplicationCache::setStorageId):
2697         (WebCore::ApplicationCache::storageId):
2698         Setter/getter for the application cache storage ID.
2699
2700         * loader/appcache/ApplicationCacheGroup.cpp:
2701         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2702         Save the cache/group to disk.
2703         
2704         * loader/appcache/ApplicationCacheGroup.h:
2705         (WebCore::ApplicationCacheGroup::setStorageID):
2706         (WebCore::ApplicationCacheGroup::storageID):
2707         Setter/getter for the application cache group storage ID.
2708         
2709         * loader/appcache/ApplicationCacheResource.cpp:
2710         (WebCore::ApplicationCacheResource::addType):
2711         We can't add a new type if the resource has been saved to disk.
2712         
2713         * loader/appcache/ApplicationCacheResource.h:
2714         (WebCore::ApplicationCacheResource::setStorageID):
2715         (WebCore::ApplicationCacheResource::storageID):
2716         Setter/getter for the application cache resource storage ID.
2717
2718         * loader/appcache/ApplicationCacheStorage.cpp:
2719         * loader/appcache/ApplicationCacheStorage.cpp:
2720         (WebCore::ApplicationCacheStorage::executeSQLCommand):
2721         New method for executing SQL and logging any errors.
2722         
2723         (WebCore::ApplicationCacheStorage::openDatabase):
2724         Create new tables.
2725         
2726         (WebCore::ApplicationCacheStorage::executeStatement):
2727         New method for executing an SQL statement and logging any errors.
2728         
2729         (WebCore::ApplicationCacheStorage::store):
2730         New methods for storing a cache group, cache and cache resource to the store.
2731
2732         (WebCore::ApplicationCacheStorage::storeNewestCache):
2733         New method which stores the newest cache and updates the newest cache field in the cache group.
2734         
2735         * loader/appcache/ApplicationCacheStorage.h:
2736         Add new methods.
2737         
2738         * platform/sql/SQLiteStatement.h:
2739         (WebCore::SQLiteStatement::query):
2740         Getter for the SQL query.
2741
2742 2008-05-06  Brady Eidson  <beidson@apple.com>
2743
2744         Reviewed by Darin Adler
2745
2746         Preparation for upcoming work making LocalStorage persistent.
2747
2748         Writing persistent values for LocalStorage will take place on a background thread.
2749         Here is that background thread, as well as most of the hooks that will be utilized to
2750         make the whole song and dance work.
2751
2752         The thread itself is very simple and MessageQueue based.  LocalStorageTasks are what 
2753         mark the work that needs to be done and come in 5 flavors:  Import and Sync a LocalStorage set,
2754         Import and Sync a LocalStorageArea, and terminate the thread.
2755
2756         This patch accomplished 2 things:
2757         
2758         1 - Each PageGroup has its own LocalStorage set.  Upon its creation its LocalStorageThread is 
2759             created and started.
2760
2761         2 - At application shutdown, each thread is synchronously terminated.
2762
2763         What happens between steps 1 and 2 will come later.
2764
2765         * GNUmakefile.am:
2766         * WebCore.pro:
2767         * WebCore.vcproj/WebCore.vcproj:
2768         * WebCore.xcodeproj/project.pbxproj:
2769         * WebCoreSources.bkl:
2770
2771         * storage/LocalStorage.cpp: Add some threading ASSERTs to make it clear which thread each
2772           method is meant to be called from.
2773         (WebCore::LocalStorage::LocalStorage):
2774         (WebCore::LocalStorage::storageArea):
2775         (WebCore::LocalStorage::performImport): Placeholder for importing known origins and quotas
2776         (WebCore::LocalStorage::performSync): Placeholder for writing out updated origins and quotas
2777         (WebCore::LocalStorage::close): Synchronously terminate the thread.
2778         * storage/LocalStorage.h:
2779
2780         * storage/LocalStorageArea.cpp: Add some threading ASSERTs to make it clear which thread each
2781           method is meant to be called from.
2782         (WebCore::LocalStorageArea::itemChanged):
2783         (WebCore::LocalStorageArea::itemRemoved):
2784         (WebCore::LocalStorageArea::areaCleared):
2785         (WebCore::LocalStorageArea::dispatchStorageEvent):
2786         (WebCore::LocalStorageArea::performImport): Placeholder for importing all items for this 
2787           LocalStorageArea to prime the page before the items are needed
2788         (WebCore::LocalStorageArea::performSync): Placeholder for writing out dirty items to disk
2789         * storage/LocalStorageArea.h:
2790
2791         * storage/LocalStorageTask.cpp: Added.
2792         (WebCore::LocalStorageTask::LocalStorageTask):
2793         (WebCore::LocalStorageTask::performTask):
2794         * storage/LocalStorageTask.h: Added.
2795         (WebCore::LocalStorageTask::):
2796         (WebCore::LocalStorageTask::createImport):
2797         (WebCore::LocalStorageTask::createSync):
2798         (WebCore::LocalStorageTask::createTerminate):
2799
2800         * storage/LocalStorageThread.cpp: Added.
2801         (WebCore::LocalStorageThread::create):
2802         (WebCore::LocalStorageThread::LocalStorageThread):
2803         (WebCore::LocalStorageThread::start):
2804         (WebCore::LocalStorageThread::localStorageThreadStart):
2805         (WebCore::LocalStorageThread::localStorageThread):
2806         (WebCore::LocalStorageThread::scheduleImport):
2807         (WebCore::LocalStorageThread::scheduleSync):
2808         (WebCore::LocalStorageThread::terminate): 
2809         (WebCore::LocalStorageThread::performTerminate):
2810         * storage/LocalStorageThread.h: Added.
2811
2812 2008-05-06  Anders Carlsson  <andersca@apple.com>
2813
2814         Reviewed by Darin.
2815
2816         Add NPN_PopUpContextMenu.
2817         
2818         * bridge/npapi.h:
2819         * plugins/npfunctions.h:
2820
2821 2008-05-06  Alp Toker  <alp@nuanti.com>
2822
2823         GTK+ build fix. Add file from r32911 to the build.
2824
2825         * GNUmakefile.am:
2826
2827 2008-05-06  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
2828
2829         Reviewed by Alp Toker.
2830
2831         http://bugs.webkit.org/show_bug.cgi?id=18906
2832         [GTK] Fix varargs terminator in g_build_filename()
2833
2834         * plugins/gtk/PluginDatabaseGtk.cpp:
2835         (WebCore::PluginDatabase::isPreferredPluginDirectory): Fix varargs
2836         terminator.
2837
2838 2008-05-06  Kevin McCullough  <kmccullough@apple.com>
2839
2840         - Forgot to update localized Strings from previous checkin.
2841
2842         * English.lproj/localizedStrings.js:
2843
2844 2008-05-06  Chris Fleizach  <cfleizach@apple.com>
2845
2846         Reviewed by Beth Dakin
2847
2848         <rdar://problem/5408464> REGRESSION: Unable to use Voiceover on combo boxes (disneyjobs.com)
2849         <rdar://problem/5895634> AX: AccessibilityObjectWrapper is being leaked all over the place
2850         <rdar://problem/5893907> CrashTracer: [REGRESSION] 44 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityObject::clearChildren + 9
2851         
2852         Initial prep work to support accessibility objects that do not have renderers. 
2853
2854         * WebCore.xcodeproj/project.pbxproj:
2855         * page/AXObjectCache.cpp:
2856         (WebCore::AXObjectCache::~AXObjectCache):
2857         (WebCore::AXObjectCache::get):
2858         (WebCore::AXObjectCache::remove):
2859         (WebCore::AXObjectCache::getAXID):
2860         (WebCore::AXObjectCache::removeAXID):
2861         (WebCore::AXObjectCache::childrenChanged):
2862         * page/AXObjectCache.h:
2863         (WebCore::AXObjectCache::isIDinUse):
2864         * page/AccessibilityObject.cpp:
2865         (WebCore::AccessibilityObject::AccessibilityObject):
2866         (WebCore::AccessibilityObject::create):
2867         (WebCore::AccessibilityObject::detach):
2868         (WebCore::AccessibilityObject::firstChild):
2869         (WebCore::AccessibilityObject::lastChild):
2870         (WebCore::AccessibilityObject::previousSibling):
2871         (WebCore::AccessibilityObject::nextSibling):
2872         (WebCore::AccessibilityObject::parentObject):
2873         (WebCore::AccessibilityObject::layoutCount):
2874         (WebCore::AccessibilityObject::text):
2875         (WebCore::AccessibilityObject::helpText):
2876         (WebCore::AccessibilityObject::textUnderElement):
2877         (WebCore::AccessibilityObject::isARIAInput):
2878         (WebCore::AccessibilityObject::isARIAControl):
2879         (WebCore::AccessibilityObject::intValue):
2880         (WebCore::AccessibilityObject::stringValue):
2881         (WebCore::AccessibilityObject::title):
2882         (WebCore::AccessibilityObject::accessibilityDescription):
2883         (WebCore::AccessibilityObject::boundingBoxRect):
2884         (WebCore::AccessibilityObject::elementRect):
2885         (WebCore::AccessibilityObject::size):
2886         (WebCore::AccessibilityObject::linkedUIElement):
2887         (WebCore::AccessibilityObject::textLength):
2888         (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
2889         (WebCore::AccessibilityObject::selectedText):
2890         (WebCore::AccessibilityObject::accessKey):
2891         (WebCore::AccessibilityObject::selection):
2892         (WebCore::AccessibilityObject::selectedTextRange):
2893         (WebCore::AccessibilityObject::setSelectedTextRange):
2894         (WebCore::AccessibilityObject::url):
2895         (WebCore::AccessibilityObject::setFocused):
2896         (WebCore::AccessibilityObject::setValue):
2897         (WebCore::AccessibilityObject::axObjectCache):
2898         (WebCore::AccessibilityObject::getDocumentLinks):
2899         (WebCore::AccessibilityObject::widget):
2900         (WebCore::AccessibilityObject::widgetForAttachmentView):
2901         (WebCore::AccessibilityObject::anchorElement):
2902         (WebCore::AccessibilityObject::actionElement):
2903         (WebCore::AccessibilityObject::visiblePositionRange):
2904         (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine):
2905         (WebCore::AccessibilityObject::visiblePositionForIndex):
2906         (WebCore::AccessibilityObject::indexForVisiblePosition):
2907         (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
2908         (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange):
2909         (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
2910         (WebCore::AccessibilityObject::textMarkerForIndex):
2911         (WebCore::AccessibilityObject::rangeForTextMarkerRange):
2912         (WebCore::AccessibilityObject::indexForTextMarker):
2913         (WebCore::AccessibilityObject::doAXRangeForLine):
2914         (WebCore::AccessibilityObject::doAXRangeForPosition):
2915         (WebCore::AccessibilityObject::doAXRangeForIndex):
2916         (WebCore::AccessibilityObject::doAXStyleRangeForIndex):
2917         (WebCore::AccessibilityObject::doAXStringForRange):
2918         (WebCore::AccessibilityObject::doAXBoundsForRange):
2919         (WebCore::AccessibilityObject::doAccessibilityHitTest):
2920         (WebCore::AccessibilityObject::focusedUIElement):
2921         (WebCore::AccessibilityObject::observableObject):
2922         (WebCore::AccessibilityObject::roleValue):
2923         (WebCore::AccessibilityObject::ariaRoleAttribute):
2924         (WebCore::AccessibilityObject::childrenChanged):
2925         (WebCore::AccessibilityObject::addChildren):
2926         (WebCore::AccessibilityObject::removeAXObjectID):
2927         * page/AccessibilityObject.h:
2928         (WebCore::):
2929         (WebCore::PlainTextRange::PlainTextRange):
2930         (WebCore::PlainTextRange::isNull):
2931         (WebCore::AccessibilityObject::isAccessibilityRenderObject):
2932         (WebCore::AccessibilityObject::isAnchor):
2933         (WebCore::AccessibilityObject::isAttachment):
2934         (WebCore::AccessibilityObject::isHeading):
2935         (WebCore::AccessibilityObject::isLink):
2936         (WebCore::AccessibilityObject::isImage):
2937         (WebCore::AccessibilityObject::isNativeImage):
2938         (WebCore::AccessibilityObject::isImageButton):
2939         (WebCore::AccessibilityObject::isPasswordField):
2940         (WebCore::AccessibilityObject::isTextControl):
2941         (WebCore::AccessibilityObject::isNativeTextControl):
2942         (WebCore::AccessibilityObject::isWebArea):
2943         (WebCore::AccessibilityObject::isCheckboxOrRadio):
2944         (WebCore::AccessibilityObject::isChecked):
2945         (WebCore::AccessibilityObject::isEnabled):
2946         (WebCore::AccessibilityObject::isSelected):
2947         (WebCore::AccessibilityObject::isFocused):
2948         (WebCore::AccessibilityObject::isHovered):
2949         (WebCore::AccessibilityObject::isIndeterminate):
2950         (WebCore::AccessibilityObject::isLoaded):
2951         (WebCore::AccessibilityObject::isMultiSelect):
2952         (WebCore::AccessibilityObject::isOffScreen):
2953         (WebCore::AccessibilityObject::isPressed):
2954         (WebCore::AccessibilityObject::isReadOnly):
2955         (WebCore::AccessibilityObject::isVisited):
2956         (WebCore::AccessibilityObject::canSetFocusAttribute):
2957         (WebCore::AccessibilityObject::canSetTextRangeAttributes):
2958         (WebCore::AccessibilityObject::canSetValueAttribute):
2959         (WebCore::AccessibilityObject::hasIntValue):
2960         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
2961         (WebCore::AccessibilityObject::accessibilityIsIgnored):
2962         (WebCore::AccessibilityObject::children):
2963         (WebCore::AccessibilityObject::hasChildren):
2964         (WebCore::AccessibilityObject::setWrapper):
2965         (WebCore::AccessibilityObject::isDetached):
2966         * page/AccessibilityRenderObject.cpp: Added.
2967         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2968         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
2969         (WebCore::AccessibilityRenderObject::create):
2970         (WebCore::AccessibilityRenderObject::detach):
2971         (WebCore::AccessibilityRenderObject::firstChild):
2972         (WebCore::AccessibilityRenderObject::lastChild):
2973         (WebCore::AccessibilityRenderObject::previousSibling):
2974         (WebCore::AccessibilityRenderObject::nextSibling):
2975         (WebCore::AccessibilityRenderObject::parentObject):
2976         (WebCore::AccessibilityRenderObject::isWebArea):
2977         (WebCore::AccessibilityRenderObject::isImageButton):
2978         (WebCore::AccessibilityRenderObject::isAnchor):
2979         (WebCore::AccessibilityRenderObject::isNativeTextControl):
2980         (WebCore::AccessibilityRenderObject::isTextControl):
2981         (WebCore::AccessibilityRenderObject::isNativeImage):
2982         (WebCore::AccessibilityRenderObject::isImage):
2983         (WebCore::AccessibilityRenderObject::isAttachment):
2984         (WebCore::AccessibilityRenderObject::isPasswordField):
2985         (WebCore::AccessibilityRenderObject::isCheckboxOrRadio):
2986         (WebCore::AccessibilityRenderObject::isPressed):
2987         (WebCore::AccessibilityRenderObject::isIndeterminate):
2988         (WebCore::AccessibilityRenderObject::isChecked):
2989         (WebCore::AccessibilityRenderObject::isHovered):
2990         (WebCore::AccessibilityRenderObject::isMultiSelect):
2991         (WebCore::AccessibilityRenderObject::isReadOnly):
2992         (WebCore::AccessibilityRenderObject::isOffScreen):
2993         (WebCore::AccessibilityRenderObject::headingLevel):
2994         (WebCore::AccessibilityRenderObject::isHeading):
2995         (WebCore::AccessibilityRenderObject::isLink):
2996         (WebCore::AccessibilityRenderObject::anchorElement):
2997         (WebCore::AccessibilityRenderObject::actionElement):
2998         (WebCore::AccessibilityRenderObject::mouseButtonListener):
2999         (WebCore::AccessibilityRenderObject::helpText):
3000         (WebCore::AccessibilityRenderObject::textUnderElement):
3001         (WebCore::AccessibilityRenderObject::hasIntValue):
3002         (WebCore::AccessibilityRenderObject::intValue):
3003         (WebCore::AccessibilityRenderObject::stringValue):
3004         (WebCore::labelForElement):
3005         (WebCore::AccessibilityRenderObject::title):
3006         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3007         (WebCore::AccessibilityRenderObject::boundingBoxRect):
3008         (WebCore::AccessibilityRenderObject::elementRect):
3009         (WebCore::AccessibilityRenderObject::size):
3010         (WebCore::AccessibilityRenderObject::linkedUIElement):
3011         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
3012         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3013         (WebCore::AccessibilityRenderObject::isLoaded):
3014         (WebCore::AccessibilityRenderObject::layoutCount):
3015         (WebCore::AccessibilityRenderObject::text):
3016         (WebCore::AccessibilityRenderObject::textLength):
3017         (WebCore::AccessibilityRenderObject::ariaSelectedTextDOMRange):
3018         (WebCore::AccessibilityRenderObject::selectedText):
3019         (WebCore::AccessibilityRenderObject::accessKey):
3020         (WebCore::AccessibilityRenderObject::selection):
3021         (WebCore::AccessibilityRenderObject::selectedTextRange):
3022         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3023         (WebCore::AccessibilityRenderObject::url):
3024         (WebCore::AccessibilityRenderObject::isVisited):
3025         (WebCore::AccessibilityRenderObject::isSelected):
3026         (WebCore::AccessibilityRenderObject::isFocused):
3027         (WebCore::AccessibilityRenderObject::setFocused):
3028         (WebCore::AccessibilityRenderObject::setValue):
3029         (WebCore::AccessibilityRenderObject::isEnabled):
3030         (WebCore::AccessibilityRenderObject::topRenderer):
3031         (WebCore::AccessibilityRenderObject::widget):
3032         (WebCore::AccessibilityRenderObject::axObjectCache):
3033         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3034         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
3035         (WebCore::AccessibilityRenderObject::frameViewIfRenderView):
3036         (WebCore::AccessibilityRenderObject::visiblePositionRange):
3037         (WebCore::AccessibilityRenderObject::doAXTextMarkerRangeForLine):
3038         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3039         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3040         (WebCore::AccessibilityRenderObject::doAXBoundsForTextMarkerRange):
3041         (WebCore::AccessibilityRenderObject::doSetAXSelectedTextMarkerRange):
3042         (WebCore::AccessibilityRenderObject::doAXTextMarkerForPosition):
3043         (WebCore::AccessibilityRenderObject::textMarkerForIndex):
3044         (WebCore::AccessibilityRenderObject::indexForTextMarker):
3045         (WebCore::AccessibilityRenderObject::doAXRangeForLine):
3046         (WebCore::AccessibilityRenderObject::doAXRangeForIndex):
3047         (WebCore::AccessibilityRenderObject::doAXStringForRange):
3048         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
3049         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
3050         (WebCore::AccessibilityRenderObject::focusedUIElement):
3051         (WebCore::AccessibilityRenderObject::observableObject):
3052         (WebCore::createARIARoleMap):
3053         (WebCore::RoleEntry::):
3054         (WebCore::ariaRoleToWebCoreRole):
3055         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
3056         (WebCore::AccessibilityRenderObject::roleValue):
3057         (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
3058         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
3059         (WebCore::AccessibilityRenderObject::canSetTextRangeAttributes):
3060         (WebCore::AccessibilityRenderObject::childrenChanged):
3061         (WebCore::AccessibilityRenderObject::children):
3062         (WebCore::AccessibilityRenderObject::addChildren):
3063         (WebCore::AccessibilityRenderObject::removeAXObjectID):
3064         (WebCore::AccessibilityRenderObject::actionVerb):
3065         * page/AccessibilityRenderObject.h: Added.
3066         (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject):
3067         (WebCore::AccessibilityRenderObject::areaElement):
3068         (WebCore::AccessibilityRenderObject::setRenderer):
3069         (WebCore::AccessibilityRenderObject::renderer):
3070         (WebCore::AccessibilityRenderObject::setRenderObject):
3071         (WebCore::AccessibilityRenderObject::isDetached):
3072         * page/mac/AXObjectCacheMac.mm:
3073         (WebCore::AXObjectCache::detachWrapper):
3074         (WebCore::AXObjectCache::selectedChildrenChanged):
3075         (WebCore::AXObjectCache::postNotification):
3076         * page/mac/AccessibilityObjectWrapper.mm:
3077         (textMarkerForVisiblePosition):
3078         (CreateCGColorIfDifferent):
3079         (AXAttributeStringSetHeadingLevel):
3080         (AXLinkElementForNode):
3081         (AXAttributeStringSetElement):
3082         (AXAttributedStringAppendText):
3083         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3084         (-[AccessibilityObjectWrapper documentFrameView:]):
3085         (-[AccessibilityObjectWrapper position]):
3086         (RoleEntry::):
3087         (-[AccessibilityObjectWrapper roleDescription]):
3088         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
3089         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
3090         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3091         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3092         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
3093         (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
3094         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3095
3096 2008-05-06  Jonathan Haas  <myrdred@gmail.com>
3097
3098         Reviewed by Rob Buis.
3099
3100         https://bugs.webkit.org/show_bug.cgi?id=18859\
3101         Prevented SVGRootInlineBox from static_casting a
3102         node to a class it doesn't inherit
3103         
3104         * rendering/SVGRootInlineBox.cpp:
3105         (WebCore::SVGRootInlineBox::buildTextChunks):
3106
3107 2008-05-06  Brady Eidson  <beidson@apple.com>
3108
3109         Reviewed by Darin Adler
3110
3111         Preparation for upcoming work making LocalStorage persistent.
3112
3113         When the application terminates, all pending local storage writes need to be
3114         sync'ed out to disk.
3115         This works n combination with platform specific code in WebKit that calls it.
3116
3117         * WebCore.base.exp:
3118
3119         * page/PageGroup.cpp:
3120         (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
3121         * page/PageGroup.h:
3122
3123         * storage/LocalStorage.cpp:
3124         (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
3125           local storage thread in the future.
3126         * storage/LocalStorage.h:
3127
3128 2008-05-06  Brady Eidson  <beidson@apple.com>
3129
3130         Rubberstamped by David Kilzer
3131
3132         * WebCore.base.exp:  Sort this mess!
3133
3134 2008-05-05  Mark Rowe  <mrowe@apple.com>
3135
3136         Reviewed by Dan Bernstein.
3137
3138         Fix 60 crashes seen on the buildbots that were misreported as hangs.
3139
3140         * dom/Document.cpp:
3141         (WebCore::Document::detachNodeIterator): Null-check page() before dereferencing it.
3142         (WebCore::Document::nodeWillBeRemoved): Ditto.
3143         (WebCore::Document::textInserted): Ditto.
3144         (WebCore::Document::textNodesMerged): Ditto.
3145         (WebCore::Document::textRemoved): Ditto.
3146
3147 2008-05-05  Brady Eidson  <beidson@apple.com>
3148
3149         Reviewed by Mitz Pettel RTL
3150
3151         Preparation for upcoming work making LocalStorage persistent.
3152
3153         The other half of the StorageMap::importItem() addition.
3154
3155         * storage/StorageArea.cpp:
3156         (WebCore::StorageArea::importItem):
3157         * storage/StorageArea.h:
3158
3159 2008-05-05  Brady Eidson  <beidson@apple.com>
3160
3161         Reviewed by Mitz Pettel RTL
3162
3163         Preparation for upcoming work making LocalStorage persistent.
3164
3165         - Create the LocalStorage object for a PageGroup the moment the first Page is added to it
3166           The Settings of the first Page define what persistent path the LocalStorage will use
3167         - Add a Frame argument for the LocalStorageArea request - this will allow a client object
3168           to be queried before the LocalStorageArea is established
3169
3170         * page/DOMWindow.cpp:
3171         (WebCore::DOMWindow::localStorage):
3172
3173         * page/PageGroup.cpp:
3174         (WebCore::PageGroup::addPage):
3175         (WebCore::PageGroup::localStorage):
3176
3177         * storage/LocalStorage.cpp:
3178         (WebCore::LocalStorage::LocalStorage): Take the path as a constructor argument.  Deep copy
3179           the path as it will be used from another thread.
3180         (WebCore::LocalStorage::storageArea):
3181         * storage/LocalStorage.h:
3182         (WebCore::LocalStorage::create):
3183
3184 2008-05-05  Brady Eidson  <beidson@apple.com>
3185
3186         Reviewed by Mitz Pettel RTL
3187
3188         Preparation for upcoming work making LocalStorage persistent.
3189
3190         StorageMaps normally have copy-on-write semantics to help support SessionStorage.
3191         For LocalStorage, we never want this behavior.  When we forcefully import items into 
3192         a StorageMap from the LocalStorage background thread, this new import method will be used.
3193
3194         * storage/StorageMap.cpp:
3195         (WebCore::StorageMap::importItem): Add a deep-copy of the item to the map without worrying
3196           about copy-on-write.
3197         * storage/StorageMap.h:
3198
3199 2008-05-05  Kevin McCullough  <kmccullough@apple.com>
3200
3201         Reviewed by Tim.
3202
3203         -<rdar://problem/5770054> JavaScript profiler (10928)
3204         -Begininings of a UI for the Profiler in the WebInspector.
3205
3206         * English.lproj/InspectorLocalizedStrings.js: Add new strings to be
3207         localized.
3208         * page/inspector/DatabasesPanel.js: Changed the name of the Databae's
3209         results table to be more generic as it is now also used by the profiler.
3210         * page/inspector/Images/glossySelected.png: Added.
3211         * page/inspector/Images/profilesIcon.png: Added.
3212         * page/inspector/Images/treeUpTriangleBlack.png: Added.
3213         * page/inspector/Images/treeUpTriangleWhite.png: Added.
3214         * page/inspector/ProfileView.js: Added. Sets up the header of the table.
3215         * page/inspector/ProfilesPanel.js: Added.
3216         * page/inspector/ProfilesPanel.js: Added. Sets up the containers of the
3217         profiler's content.
3218         * page/inspector/inspector.css: Change database-result-table to be more
3219         generic as well as add the styles needed by the profiler.
3220         * page/inspector/inspector.html: Add profiler support.
3221
3222 2008-05-05  Brady Eidson  <beidson@apple.com>
3223
3224         Change by Darin, reviewed by Brady
3225
3226         Small efficiency improvement Darin just spotted
3227
3228         * storage/StorageMap.cpp:
3229         (WebCore::StorageMap::setItem):
3230
3231 2008-05-05  Antti Koivisto  <antti@apple.com>
3232
3233         Reviewed by Anders.
3234
3235         Fix https://bugs.webkit.org/show_bug.cgi?id=18899
3236         Bug 18899: REGRESSION (r32871): Non-Safari crash in WTF::HashTable on startup
3237
3238         * loader/loader.cpp:
3239         (WebCore::Loader::Loader):
3240
3241 2008-05-05  Brady Eidson  <beidson@apple.com>
3242
3243         Reviewed by Sam Weinig
3244
3245         Fix a bug in StorageMap iterator tracking where the iterator was not successfully
3246         invalidated at an appropriate time.
3247
3248         * storage/StorageMap.cpp:
3249         (WebCore::StorageMap::setItem): ALWAYS invalidate it here
3250
3251 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
3252
3253         Reviewed by Darin.
3254
3255         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
3256         
3257         Disable Range mutation on document modifications in Tiger and Leopard Mail,
3258         since they do their own mutation which interferes with ours.
3259
3260         * WebCore.base.exp:
3261         * dom/Document.cpp:
3262         (WebCore::Document::nodeChildrenChanged):
3263         (WebCore::Document::nodeWillBeRemoved):
3264         (WebCore::Document::textInserted):
3265         (WebCore::Document::textRemoved):
3266         (WebCore::Document::textNodesMerged):
3267         (WebCore::Document::textNodeSplit):
3268         * page/Settings.cpp:
3269         (WebCore::Settings::Settings):
3270         (WebCore::Settings::disableRangeMutationForOldAppleMail):
3271         * page/Settings.h:
3272         (WebCore::Settings::rangeMutationDisabledForOldAppleMail):
3273
3274 2008-05-05  Sam Weinig  <sam@webkit.org>
3275
3276         Reviewed by Tim Hatcher.
3277
3278         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
3279
3280         * English.lproj/InspectorLocalizedStrings.js: Removed.
3281         * English.lproj/localizedStrings.js: Added.
3282         * WebCore.vcproj/WebCore.vcproj:
3283         * WebCore.xcodeproj/project.pbxproj:
3284         * page/inspector/inspector.js:
3285
3286 2008-05-05  Steve Falkenburg  <sfalken@apple.com>
3287
3288         Add support for default button appearance.
3289         Add WebCore setting for app chrome mode.
3290         
3291         Reviewed by Dave Hyatt.
3292
3293         * css/CSSPrimitiveValueMappings.h:
3294         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3295         * css/CSSValueKeywords.in: Added default-button value keyword.
3296         * page/Settings.cpp:
3297         (WebCore::Settings::Settings):
3298         (WebCore::Settings::setApplicationChromeMode):
3299         * page/Settings.h:
3300         (WebCore::Settings::inApplicationChromeMode):
3301         * rendering/RenderButton.cpp:
3302         (WebCore::RenderButton::RenderButton):
3303         (WebCore::RenderButton::setStyle):
3304         (WebCore::RenderButton::timerFired):
3305         * rendering/RenderButton.h:
3306         * rendering/RenderStyle.h:
3307         (WebCore::):
3308         * rendering/RenderTheme.cpp:
3309         (WebCore::RenderTheme::adjustStyle):
3310         (WebCore::RenderTheme::paint):
3311         (WebCore::RenderTheme::paintBorderOnly):
3312         (WebCore::RenderTheme::paintDecorations):
3313         (WebCore::RenderTheme::isControlStyled):
3314         (WebCore::RenderTheme::isDefault):
3315         * rendering/RenderTheme.h:
3316         (WebCore::):
3317         * rendering/RenderThemeSafari.cpp:
3318         (WebCore::RenderThemeSafari::determineState):
3319         (WebCore::RenderThemeSafari::adjustRepaintRect):
3320         (WebCore::RenderThemeSafari::adjustButtonStyle):
3321         * rendering/RenderThemeWin.cpp:
3322         (WebCore::RenderThemeWin::supportsFocus):
3323
3324 2008-05-05  Alexey Proskuryakov  <ap@webkit.org>
3325
3326         Reviewed by Darin.
3327
3328         https://bugs.webkit.org/show_bug.cgi?id=11947
3329         nbsps should be converted to entities in innerHTML
3330
3331         https://bugs.webkit.org/show_bug.cgi?id=18769
3332         replacing &nbsp; with spaces using regexp creates inconsistent result
3333
3334         Tests: fast/dom/innerHTML-nbsp.html
3335                fast/dom/innerHTML-escaping-attribute.html
3336
3337         * editing/markup.cpp:
3338         (WebCore::appendAttributeValue):
3339         (WebCore::escapeContentText):
3340         (WebCore::appendEscapedContent):
3341         Added U+00a0/nbsp to the list of characters to escape.
3342
3343 2008-05-05  David Hyatt  <hyatt@apple.com>
3344
3345         Fix for https://bugs.webkit.org/show_bug.cgi?id=18821.  Fix some bugs in both get/PutImageData of <canvas>.
3346
3347         Reviewed by Eric
3348
3349         New tests added in fast/canvas/
3350
3351         * platform/graphics/cg/ImageBufferCG.cpp:
3352         (WebCore::ImageBuffer::getImageData):
3353         (WebCore::ImageBuffer::putImageData):
3354
3355 2008-05-05  Dan Bernstein  <mitz@apple.com>
3356
3357         Reviewed by Dave Hyatt.
3358
3359         - fix https://bugs.webkit.org/show_bug.cgi?id=18809
3360           Forms with block level generated content and absolutely positioned labels break inline layout (fixed on reflow)
3361
3362         Test: fast/block/basic/adding-near-anonymous-block.html
3363
3364         * rendering/RenderBlock.cpp:
3365         (WebCore::RenderBlock::addChildToFlow): When adding a floating or
3366         positioned object, if it follows an anonymous block, put it
3367         inside the anonymous block. When adding an inline, check if it comes
3368         after an anonymous block and put it in the anonymous block.
3369
3370 2008-05-05  Antti Koivisto  <antti@apple.com>
3371
3372         Reviewed by Darin.
3373
3374         Speculative fix for <rdar://problem/5906790> 
3375         Crash in Loader::servePendingRequests() due to hash table being modified during iteration
3376         
3377         I don't know how to reproduce this. It would require the load to fail (or succeed)
3378         synchronously, something that should not usually happen.
3379
3380         * loader/loader.cpp:
3381         (WebCore::Loader::Loader):
3382         (WebCore::Loader::load):
3383         (WebCore::Loader::servePendingRequests):
3384         (WebCore::Loader::cancelRequests):
3385         (WebCore::Loader::Host::Host):
3386         * loader/loader.h:
3387         (WebCore::Loader::Host::name):
3388
3389 2008-05-05  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3390
3391         Reviewed by Simon.
3392
3393         Disable SVG As Image support in the Qt port again, as it
3394         requires more work. Right now the chrome client is
3395         assumed to be a ChromeClientQt, which the SVG Image support
3396         changes.
3397
3398         * WebCore.pro:
3399
3400 2008-05-02  Antti Koivisto  <antti@apple.com>
3401
3402         Reviewed by Mitz.
3403
3404         Fix <rdar://problem/5840475>
3405         CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::RenderBlock::insertPositionedObject
3406         
3407         Non-block objects can have transforms so containingBlock() could end up returning null. 
3408         RenderObject::container() needs to match.
3409
3410         Test: fast/transforms/container-transform-crash.html
3411
3412         * rendering/RenderObject.cpp:
3413         (WebCore::RenderObject::containingBlock):
3414         (WebCore::RenderObject::container):
3415
3416 2008-05-04  Sam Weinig  <sam@webkit.org>
3417
3418         Roll out r32851.  It broke tiger builds.
3419
3420         * bindings/objc/DOMUtility.mm:
3421         (KJS::createDOMWrapper):
3422         (WebCore::createDOMWrapper):
3423
3424 2008-05-04  Dan Bernstein  <mitz@apple.com>
3425
3426         Reviewed by Sam Weinig.
3427
3428         - fix https://bugs.webkit.org/show_bug.cgi?id=18879
3429           <rdar://problem/5909481> Reproducible crash when removing a gradient
3430
3431         Test: fast/gradients/crash-on-remove.html
3432
3433         * css/CSSImageGeneratorValue.cpp:
3434         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
3435         (WebCore::CSSImageGeneratorValue::addClient): Added a call to ref() the
3436         value.
3437         (WebCore::CSSImageGeneratorValue::removeClient): Added code to deref()
3438         the value.
3439
3440 2008-05-03  Sam Weinig  <sam@webkit.org>
3441
3442         Reviewed by Mark Rowe.
3443
3444         Move createDOMWrapper(JSObject* object) out of the KJS namespace and into
3445         the WebCore namespace now that the required compilers don't freak out about
3446         this anymore.
3447
3448         * bindings/objc/DOMUtility.mm:
3449         (WebCore::createDOMWrapper):
3450
3451 2008-05-03  Rob Buis  <buis@kde.org>
3452
3453         Reviewed by Sam.
3454
3455         https://bugs.webkit.org/show_bug.cgi?id=18652
3456         onchange events don't seem to fire for input[type=range] controls.
3457
3458         Fire changeEvent when clicking the slider outside the current
3459         thumb position.
3460
3461         * rendering/RenderSlider.cpp:
3462         (WebCore::RenderSlider::setValueForPosition):
3463
3464 2008-05-03  Sam Weinig  <sam@webkit.org>
3465
3466         Reviewed by Mark Rowe.
3467
3468         Remove unused enums from JSDOMWindowBase.
3469
3470         * bindings/js/JSDOMWindowBase.h:
3471         (WebCore::JSDOMWindowBase::):
3472
3473 2008-05-03  Sam Weinig  <sam@webkit.org>
3474
3475         Real build fix.
3476
3477         * WebCore.xcodeproj/project.pbxproj:
3478
3479 2008-05-03  Sam Weinig  <sam@webkit.org>
3480
3481         Build fix.
3482
3483         * bindings/js/kjs_events.cpp:
3484         (WebCore::JSAbstractEventListener::handleEvent):
3485
3486 2008-05-03  Sam Weinig  <sam@webkit.org>
3487
3488         Rubber-stamped by Geoffrey Garen.
3489
3490         Rename JSDOMWindowWrapper to JSDOMWindowShell.
3491
3492 2008-05-01  Rob Buis  <buis@kde.org>
3493
3494         Reviewed by Eric.
3495
3496         https://bugs.webkit.org/show_bug.cgi?id=18568
3497         background: currentColor fails
3498
3499         Implement currentColor from CSS3 color module.
3500
3501         Tests: fast/css/background-currentcolor.html
3502
3503         * css/CSSParser.cpp:
3504         (WebCore::CSSParser::parseValue):
3505         (WebCore::CSSParser::parseBackgroundColor):
3506         * css/CSSStyleSelector.cpp:
3507         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3508         * css/CSSValueKeywords.in:
3509         * css/SVGCSSValueKeywords.in:
3510
3511 2008-05-02  Anders Carlsson  <andersca@apple.com>
3512
3513         Reviewed by Mark.
3514
3515         Turns out calling locationInWindow on keyboard events will not throw an exception,
3516         but the point returned is completely bogus, so remove coordinates from the keyboard event struct.
3517         
3518         * bridge/npapi.h:
3519         (_NPCocoaEvent::):
3520
3521 2008-05-02  Benjamin Otte  <otte@gnome.org>
3522
3523         Reviewed by Alp Toker.
3524
3525         http://bugs.webkit.org/show_bug.cgi?id=18856
3526         [GTK] variable initialization missing
3527
3528         Not initializing the m_needsXEmbed variable could have very funny
3529         results. Most often those results would be crashes.
3530
3531         * plugins/PluginView.cpp:
3532         (WebCore::PluginView::PluginView):
3533
3534 2008-05-02  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3535
3536         Reviewed by Eric.
3537
3538         https://bugs.webkit.org/show_bug.cgi?id=18811
3539         Enable dashboard and offline web apps in autotools
3540
3541         * GNUmakefile.am:
3542
3543 2008-05-02  Anders Carlsson  <andersca@apple.com>
3544
3545         Reviewed by Sam.
3546
3547         Name the event union so it will work in plain C.
3548
3549         * bridge/npapi.h:
3550         (_NPCocoaEvent::):
3551
3552 2008-05-02  Dan Bernstein  <mitz@apple.com>
3553
3554         Reviewed by John Sullivan.
3555
3556         - render text shadows with zero offset, as the shadow can be seen behind
3557           the text if the text is translucent
3558
3559         Test: fast/text/shadow-no-blur.html
3560
3561         * platform/graphics/mac/FontMac.mm:
3562         (WebCore::Font::drawComplexText): Removed the isEmpty() condition on the