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