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