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