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