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