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