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