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