31da6ee194a8cbdce1407d2fb878108df4fd3c0a
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2
3         Tweak the Web Insector toolbar look to be smaller when attached to
4         the inspected page.
5
6         Reviewed by Adam Roben.
7
8         * page/inspector/inspector.css:
9
10 2008-05-23  Simon Hausmann  <hausmann@webkit.org>
11
12         Fix compilation without accessibility by providing an empty stub for
13         AXObjectCache::handleAriaRoleChanged.
14
15         * page/AXObjectCache.h:
16
17 2008-05-23  Alice Liu  <alice.liu@apple.com>
18
19         Reviewed by Mark Rowe.
20
21         Remove call to function whose body was commented out. Returning the
22         children for a menu button by the normal calculation works just as well. 
23
24         * page/AccessibilityRenderObject.cpp:
25         (WebCore::AccessibilityRenderObject::addChildren):
26         * page/AccessibilityRenderObject.h:
27
28 2008-05-22  Timothy Hatcher  <timothy@apple.com>
29
30         Fixes the bug where resource would show up multiple times in the
31         Inspector. This happened when a resource was used multiple times or
32         when the preloader was scanning ahead to fetch resources.
33
34         <rdar://problem/5689373> Cached resources re-appear in Web Inspector
35         for each access (18223)
36
37         Reviewed by Adam Roben.
38
39         * page/InspectorController.cpp:
40         (WebCore::InspectorController::addResource): Add the URL to m_knownResources.
41         (WebCore::InspectorController::removeResource): Remove the URL from m_knownResources
42         (WebCore::InspectorController::didLoadResourceFromMemoryCache): If the URL
43         is in m_knownResources, then early return.
44         * page/InspectorController.h: Added m_knownResources.
45
46 2008-05-22  Alice Liu  <alice.liu@apple.com>
47
48         Reviewed by Adele, Dan Bernstein.
49
50         Fixed <rdar://problem/5943104> Need to implement ARIA role="menu" and related roles
51         <rdar://problem/5943132> Need to implement ARIA role="menuitem"
52         <rdar://problem/5943173> Need to implement ARIA role="menubar" 
53
54         These changes added a handler for determining the ARIA role when the
55         attribute changes.  Before we were querying for the attribute over and
56         over every time we queried for the role.
57         * dom/Element.cpp:
58         (WebCore::Element::attributeChanged):
59         * page/AXObjectCache.cpp:
60         (WebCore::AXObjectCache::handleAriaRoleChanged):
61         * page/AXObjectCache.h:
62
63         The rest of these changes implement menu, menuitem, and menubar. the last 2 of those
64         have to, for now, be represented as a Group and MenuButton instead, because AppKit 
65         won't recognize menubar and menubaritems within apps. 
66         * page/AccessibilityObject.h:
67         (WebCore::AccessibilityObject::isMenuRelated):
68         (WebCore::AccessibilityObject::isMenu):
69         (WebCore::AccessibilityObject::isMenuBar):
70         (WebCore::AccessibilityObject::isMenuButton):
71         (WebCore::AccessibilityObject::isMenuItem):
72         * page/AccessibilityRenderObject.cpp:
73         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
74         (WebCore::AccessibilityRenderObject::parentObject):
75         (WebCore::AccessibilityRenderObject::isMenuRelated):
76         (WebCore::AccessibilityRenderObject::isMenu):
77         (WebCore::AccessibilityRenderObject::isMenuBar):
78         (WebCore::AccessibilityRenderObject::isMenuButton):
79         (WebCore::AccessibilityRenderObject::isMenuItem):
80         (WebCore::siblingWithAriaRole):
81         (WebCore::AccessibilityRenderObject::menuElementForMenuButton):
82         (WebCore::AccessibilityRenderObject::menuForMenuButton):
83         (WebCore::AccessibilityRenderObject::menuItemElementForMenu):
84         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
85         (WebCore::AccessibilityRenderObject::title):
86         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
87         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
88         (WebCore::RoleEntry::):
89         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
90         (WebCore::AccessibilityRenderObject::setAriaRole):
91         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
92         (WebCore::AccessibilityRenderObject::addChildren):
93         (WebCore::AccessibilityRenderObject::ariaMenuButtonChildren):
94         * page/AccessibilityRenderObject.h:
95         * page/mac/AccessibilityObjectWrapper.mm:
96         (-[AccessibilityObjectWrapper accessibilityActionNames]):
97         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
98         (-[AccessibilityObjectWrapper roleDescription]):
99         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
100         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
101
102 2008-05-22  Adam Roben  <aroben@apple.com>
103
104         Make top-level resources show their full URLs again instead of just
105         "/"
106
107         Reviewed by Tim Hatcher.
108
109         * page/inspector/Resource.js:
110         (WebInspector.Resource.prototype.displayName): If the title has gotten
111         down to just "/", which will happen for, e.g., http://webkit.org/,
112         just show the entire URL.
113
114 2008-05-22  Timothy Hatcher  <timothy@apple.com>
115
116         Shorten URLs shown in the Web Inspector to the file name. This makes
117         finding files in the Console or the Scripts panel easier.
118
119         Reviewed by Adam Roben.
120
121         * page/inspector/Console.js:
122         (WebInspector.ConsoleMessage.prototype.get shortURL): Removed dead code.
123         (WebInspector.ConsoleMessage.prototype.toMessageElement): Call WebInspector.displayNameForURL
124         for the URL before making the link element.
125         * page/inspector/ProfileView.js:
126         (WebInspector.ProfileDataGridNode.prototype.createCell): Use WebInspector.displayNameForURL.
127         * page/inspector/Resource.js:
128         (WebInspector.Resource.prototype.get displayName): Use trimURL to
129         trim the URL with the main resource's domain.
130         * page/inspector/ScriptsPanel.js:
131         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use WebInspector.displayNameForURL.
132         * page/inspector/StylesSidebarPane.js:
133         (WebInspector.StylePropertiesSection): Ditto.
134         * page/inspector/inspector.js:
135         (WebInspector.displayNameForURL): Added.
136         (WebInspector.resourceForURL): Check for a direct match in resourceURLMap first.
137
138 2008-05-22  Adam Roben  <aroben@apple.com>
139
140         Fix Bug 19204: Inspector should highlight source lines when following
141         links to them
142
143         <https://bugs.webkit.org/show_bug.cgi?id=19204>
144
145         Reviewed by Tim Hatcher.
146
147         Test: manual-tests/inspector/highlight-source-line.html
148
149         * manual-tests/inspector/highlight-source-line.html: Added.
150         * page/inspector/ResourcesPanel.js:
151         (WebInspector.ResourcesPanel.prototype.showResource): Call
152         highlightLine on the view if that function exists.
153         * page/inspector/SourceFrame.js:
154         (WebInspector.SourceFrame.prototype.highlightLine): Added. Adds the
155         webkit-highlighted-line class to the relevant line, then removes it
156         after a short delay.
157         (WebInspector.SourceFrame.prototype._loaded): Added styles for the
158         highlighted line(s).
159         * page/inspector/SourceView.js:
160         (WebInspector.SourceView.prototype.highlightLine): Added. Calls
161         through to the SourceFrame.
162
163 2008-05-22  Rob Buis  <buis@kde.org>
164
165         Reviewed by Eric.
166
167         https://bugs.webkit.org/show_bug.cgi?id=12053
168         SVGPathSeg*(Abs|Rel) classses should be combined to reduce code size
169
170         Reduce code size through shared base classes.
171
172         * svg/SVGPathSeg.h:
173         (WebCore::SVGPathSegSingleCoord::SVGPathSegSingleCoord):
174         (WebCore::SVGPathSegSingleCoord::setX):
175         (WebCore::SVGPathSegSingleCoord::x):
176         (WebCore::SVGPathSegSingleCoord::setY):
177         (WebCore::SVGPathSegSingleCoord::y):
178         (WebCore::SVGPathSegSingleCoord::toString):
179         * svg/SVGPathSegArc.cpp:
180         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
181         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
182         * svg/SVGPathSegArc.h:
183         (WebCore::SVGPathSegArc::SVGPathSegArc):
184         (WebCore::SVGPathSegArc::toString):
185         (WebCore::SVGPathSegArc::setX):
186         (WebCore::SVGPathSegArc::x):
187         (WebCore::SVGPathSegArc::setY):
188         (WebCore::SVGPathSegArc::y):
189         (WebCore::SVGPathSegArc::setR1):
190         (WebCore::SVGPathSegArc::r1):
191         (WebCore::SVGPathSegArc::setR2):
192         (WebCore::SVGPathSegArc::r2):
193         (WebCore::SVGPathSegArc::setAngle):
194         (WebCore::SVGPathSegArc::angle):
195         (WebCore::SVGPathSegArc::setLargeArcFlag):
196         (WebCore::SVGPathSegArc::largeArcFlag):
197         (WebCore::SVGPathSegArc::setSweepFlag):
198         (WebCore::SVGPathSegArc::sweepFlag):
199         (WebCore::SVGPathSegArcAbs::create):
200         (WebCore::SVGPathSegArcAbs::pathSegType):
201         (WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
202         (WebCore::SVGPathSegArcRel::create):
203         (WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
204         * svg/SVGPathSegCurvetoCubic.cpp:
205         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
206         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
207         * svg/SVGPathSegCurvetoCubic.h:
208         (WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
209         (WebCore::SVGPathSegCurvetoCubic::toString):
210         (WebCore::SVGPathSegCurvetoCubic::setX):
211         (WebCore::SVGPathSegCurvetoCubic::x):
212         (WebCore::SVGPathSegCurvetoCubic::setY):
213         (WebCore::SVGPathSegCurvetoCubic::y):
214         (WebCore::SVGPathSegCurvetoCubic::setX1):
215         (WebCore::SVGPathSegCurvetoCubic::x1):
216         (WebCore::SVGPathSegCurvetoCubic::setY1):
217         (WebCore::SVGPathSegCurvetoCubic::y1):
218         (WebCore::SVGPathSegCurvetoCubic::setX2):
219         (WebCore::SVGPathSegCurvetoCubic::x2):
220         (WebCore::SVGPathSegCurvetoCubic::setY2):
221         (WebCore::SVGPathSegCurvetoCubic::y2):
222         (WebCore::SVGPathSegCurvetoCubicAbs::create):
223         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
224         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
225         (WebCore::SVGPathSegCurvetoCubicRel::create):
226         (WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
227         * svg/SVGPathSegCurvetoCubicSmooth.cpp:
228         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
229         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
230         * svg/SVGPathSegCurvetoCubicSmooth.h:
231         (WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
232         (WebCore::SVGPathSegCurvetoCubicSmooth::toString):
233         (WebCore::SVGPathSegCurvetoCubicSmooth::setX):
234         (WebCore::SVGPathSegCurvetoCubicSmooth::x):
235         (WebCore::SVGPathSegCurvetoCubicSmooth::setY):
236         (WebCore::SVGPathSegCurvetoCubicSmooth::y):
237         (WebCore::SVGPathSegCurvetoCubicSmooth::setX2):
238         (WebCore::SVGPathSegCurvetoCubicSmooth::x2):
239         (WebCore::SVGPathSegCurvetoCubicSmooth::setY2):
240         (WebCore::SVGPathSegCurvetoCubicSmooth::y2):
241         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
242         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
243         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
244         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
245         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
246         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
247         * svg/SVGPathSegCurvetoQuadratic.cpp:
248         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
249         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
250         * svg/SVGPathSegCurvetoQuadratic.h:
251         (WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
252         (WebCore::SVGPathSegCurvetoQuadratic::toString):
253         (WebCore::SVGPathSegCurvetoQuadratic::setX):
254         (WebCore::SVGPathSegCurvetoQuadratic::x):
255         (WebCore::SVGPathSegCurvetoQuadratic::setY):
256         (WebCore::SVGPathSegCurvetoQuadratic::y):
257         (WebCore::SVGPathSegCurvetoQuadratic::setX1):
258         (WebCore::SVGPathSegCurvetoQuadratic::x1):
259         (WebCore::SVGPathSegCurvetoQuadratic::setY1):
260         (WebCore::SVGPathSegCurvetoQuadratic::y1):
261         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
262         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
263         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
264         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
265         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
266         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
267         * svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
268         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
269         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
270         * svg/SVGPathSegCurvetoQuadraticSmooth.h:
271         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
272         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
273         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
274         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
275         * svg/SVGPathSegLineto.cpp:
276         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
277         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
278         * svg/SVGPathSegLineto.h:
279         (WebCore::SVGPathSegLinetoAbs::create):
280         (WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
281         (WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
282         * svg/SVGPathSegLinetoHorizontal.cpp:
283         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
284         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
285         * svg/SVGPathSegLinetoHorizontal.h:
286         (WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
287         (WebCore::SVGPathSegLinetoHorizontal::toString):
288         (WebCore::SVGPathSegLinetoHorizontal::setX):
289         (WebCore::SVGPathSegLinetoHorizontal::x):
290         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
291         (WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
292         (WebCore::SVGPathSegLinetoHorizontalRel::create):
293         (WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
294         * svg/SVGPathSegLinetoVertical.cpp:
295         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
296         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
297         * svg/SVGPathSegLinetoVertical.h:
298         (WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
299         (WebCore::SVGPathSegLinetoVertical::toString):
300         (WebCore::SVGPathSegLinetoVertical::setY):
301         (WebCore::SVGPathSegLinetoVertical::y):
302         (WebCore::SVGPathSegLinetoVerticalAbs::create):
303         (WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
304         (WebCore::SVGPathSegLinetoVerticalRel::create):
305         (WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
306         * svg/SVGPathSegMoveto.cpp:
307         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
308         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
309         * svg/SVGPathSegMoveto.h:
310         (WebCore::SVGPathSegMovetoAbs::create):
311         (WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
312         (WebCore::SVGPathSegMovetoRel::create):
313         (WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
314
315 2008-05-22  Alp Toker  <alp@nuanti.com>
316
317         GTK+/DirectFB build fix attempt.
318
319         * plugins/PluginDatabase.cpp:
320         (WebCore::PluginDatabase::isPreferredPluginDirectory):
321         * plugins/gtk/PluginDatabaseGtk.cpp:
322         (WebCore::PluginDatabase::isPreferredPluginDirectory):
323
324 2008-05-22  Timothy Hatcher  <timothy@apple.com>
325
326         Adds Focus, Exclude and Restore buttons to the Profile view
327         Status bar. Also adds a Record button to create new profiles.
328
329         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
330         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.
331
332         Reviewed by Adam Roben.
333
334         * English.lproj/localizedStrings.js: Added new strings.
335         * page/JavaScriptProfile.cpp:
336         (WebCore::restoreAll): Call Profile::restoreAll.
337         (WebCore::ProfileClass): Added restoreAll to the static functions.
338         * page/inspector/Images/excludeButtons.png: Added.
339         * page/inspector/Images/focusButtons.png: Added.
340         * page/inspector/Images/recordButtons.png: Added.
341         * page/inspector/Images/reloadButtons.png: Added.
342         * page/inspector/ProfileView.js:
343         (WebInspector.ProfileView): Create the buttons elements.
344         (WebInspector.ProfileView.prototype.get statusBarItems): Return the three
345         status bar buttons.
346         (WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
347         for ProfileNodes that are visible.
348         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
349         refresh on the children, now that they have access to the ProfileView's properties.
350         (WebInspector.ProfileView.prototype._focusClicked): Call focus
351         on the profile, refresh the ProfileView and show the reset button.
352         (WebInspector.ProfileView.prototype._excludeClicked): Call exclude
353         on the profile, refresh the ProfileView and show the reset button.
354         (WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
355         on the profile, refresh the ProfileView and hide the reset button.
356         (WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the 
357         focus and exclude buttons.
358         (WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
359         focus and exclude buttons.
360         (WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the 
361         showPercentAs* arguments.
362         * page/inspector/ProfilesPanel.js: Add a record status bar button and
363         th ability to have per-view status bar buttons.
364         * page/inspector/inspector.css: New styles.
365
366 2008-05-22  Mark Rowe  <mrowe@apple.com>
367
368         Reviewed by Tim Hatcher.
369
370         <rdar://problem/5956612> ibtool crashes during build
371
372         SCDynamicStoreCreate will return null if it cannot create a dynamic store object.  We need
373         to check for failure rather than continuing with a null store as this results in us
374         passing a null CFRunLoopSourceRef to CFRunLoopAddSource, which promptly crashes.
375
376         * platform/network/mac/NetworkStateNotifierMac.cpp:
377         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Null check SCDynamicStoreCreate and
378         SCDynamicStoreCreateRunLoopSource as it is possible for them to fail.
379
380 2008-05-22  Adam Roben  <aroben@apple.com>
381
382         Add a test for calling a NodeList as a function while profiling
383
384         Reviewed by Kevin McCullough.
385
386         * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Added.
387
388 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
389
390         Rubber stamped by Adam.
391
392         -Added new profiler tests.
393
394         * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Added.
395         * manual-tests/inspector/profiler-test-constructor.html: Added.
396         * manual-tests/inspector/profiler-test-document-dot-write.html: Added.
397         * manual-tests/inspector/profiler-test-simple-no-level-change.html: Added.
398         * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Added.
399         * manual-tests/inspector/profiler-test-window-dot-eval.html: Added.
400
401 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
402
403         Reviewed by Tim.
404
405         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a
406         profile node.
407         -Expose the 'exclude' function to the WebInspector.
408         -Also fix a bug with 'focus' and expose whether or not a node is visible
409
410         * page/JavaScriptProfile.cpp: Renamed profileClass to have a capital P.
411         (WebCore::getTitleCallback):
412         (WebCore::getHeadCallback):
413         (WebCore::focus): Now correctly compares against a ProfileNodeClass
414         instead of ProfileClass.
415         (WebCore::exclude): Expose 'exclude' function to the WebInspector.
416         (WebCore::ProfileClass):
417         (WebCore::toJS):
418         * page/JavaScriptProfileNode.cpp: Declare the ProfileNodeClass in the
419         header so that ProfileClass can use it.
420         (WebCore::getVisible): Expose a node's visiblity to the WebInspector.
421         (WebCore::ProfileNodeClass):
422         * page/JavaScriptProfileNode.h:
423
424 2008-05-22  Sam Weinig  <sam@webkit.org>
425
426         Reviewed by Anders Carlsson.
427
428         <rdar://problem/5838772> Support cross-site XMLHttpRequest
429
430         - Implement support for cross-site non-GET requests using the HTTP header
431           Access-control mechanism.
432
433         Tests: http/tests/xmlhttprequest/access-control-basic-allow-async.html
434                http/tests/xmlhttprequest/access-control-basic-not-get-allow-async.html
435                http/tests/xmlhttprequest/access-control-basic-not-get-allow.html
436
437         * xml/XMLHttpRequest.cpp:
438         (WebCore::XMLHttpRequest::XMLHttpRequest):
439         (WebCore::XMLHttpRequest::send):
440         Don't continue send if inside the method check preflight (only happens for async).
441         
442         (WebCore::XMLHttpRequest::crossSiteAccessRequest):
443         Add support for non-GET requests, starting off a method check preflight.
444
445         (WebCore::XMLHttpRequest::handleAsynchronousMethodCheckResult):
446         Handler for finishing up after an asynchronous method check has completed.
447
448         (WebCore::XMLHttpRequest::didFinishLoading):
449         (WebCore::XMLHttpRequest::didFinishLoadingMethodCheck):
450         (WebCore::XMLHttpRequest::didReceiveResponse):
451         (WebCore::XMLHttpRequest::didReceiveResponseMethodCheck):
452         (WebCore::XMLHttpRequest::didReceiveData):
453         Do a limited set of access control when in the method check preflight.
454         * xml/XMLHttpRequest.h:
455
456 2008-05-22  Timothy Hatcher  <timothy@apple.com>
457
458         Make sure we don't call findTreeElement with the same representedObject
459         again, to prevent infinite recursion. Added many comments to this
460         code so it can be understood later.
461
462         https://bugs.webkit.org/show_bug.cgi?id=19164
463
464         Reviewed by Adam Roben.
465
466         * page/inspector/treeoutline.js:
467
468 2008-05-22  Timothy Hatcher  <timothy@apple.com>
469
470         Re-word the "Attach Debugger" overlay to never say "Attach". The new
471         wording is "Start Debugging". This makes the overlay consistent with
472         other wording used for starting the debugger. Also fixes the tooltips
473         for the Pause on Exceptions button.
474
475         Reviewed by Adam Roben and Dan Bernstein.
476
477         * English.lproj/localizedStrings.js: Adds new strings.
478         * page/inspector/ScriptsPanel.js: Changes the wording. Flips the
479         tooltips for the Pause on Exceptions buttons so the tooltip says
480         what will happen when the button is pressed.
481
482 2008-05-22  Timothy Hatcher  <timothy@apple.com>
483
484         Remove some non-functional elements from the Scripts panel
485         so they don't confuse users why they aren't working.
486
487         Reviewed by Adam Roben.
488
489         * page/inspector/ScriptsPanel.js: Removes the back/forward buttons
490         and the function menu.
491         * page/inspector/inspector.css: Make the files menu wider since there
492         is more room now.
493
494 2008-05-22  Timothy Hatcher  <timothy@apple.com>
495
496         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
497
498         Reviewed by Adam Roben.
499
500         * English.lproj/localizedStrings.js:
501         * WebCore.base.exp:
502         * page/InspectorController.cpp:
503         (WebCore::InspectorController::InspectorController):
504         (WebCore::InspectorController::inspect):
505         (WebCore::InspectorController::setWindowVisible):
506         (WebCore::InspectorController::showPanel):
507         (WebCore::InspectorController::startUserInitiatedProfiling):
508         (WebCore::InspectorController::stopUserInitiatedProfiling):
509         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
510         (WebCore::InspectorController::stopDebugging):
511         * page/InspectorController.h:
512         (WebCore::InspectorController::):
513         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
514         * page/inspector/ProfilesPanel.js:
515         * page/inspector/ScriptsPanel.js:
516         * page/inspector/inspector.js:
517
518 2008-05-22  Josh Aas  <joshmoz@gmail.com>
519
520         Reviewed by Anders.
521
522         <rdar://problem/5956429> 
523         https://bugs.webkit.org/show_bug.cgi?id=19192
524         remove NPNVpluginEventModel, fix example plugin
525         
526         Remove NPNVpluginEventModel enum variable.
527         
528         * bridge/npapi.h:
529
530 2008-05-22  Stephanie Lewis  <slewis@apple.com>
531
532         Reviewed by Dan.
533
534         Fix <rdar://problem/5952405>.  The unbeforeunload count cannot be cleared when it is dispatched because it is possible to be called again.  Clear it after the unload event is dispatched.
535
536         Test: fast/events/onunload-clears-onbeforeunload.html
537
538         * loader/FrameLoader.cpp:
539         (WebCore::FrameLoader::stopLoading):
540         * page/Frame.cpp:
541         (WebCore::Frame::shouldClose):
542
543 2008-05-22  Simon Hausmann  <hausmann@webkit.org>
544
545         Reviewed by Oliver.
546
547         Qt build fix.
548
549         * bindings/js/StringSourceProvider.h: Remove text at end of
550         preprocessor statement.
551         * bridge/qt/qt_instance.cpp:
552         (KJS::Bindings::QtRuntimeObjectImp::getConstructData): Replaced
553         implementsConstruct() with getConstructData().
554         (KJS::Bindings::QtInstance::getCallData): Replaced implementsCall with
555         getCallData().
556         (KJS::Bindings::QtInstance::invokeDefaultMethod): Use getCallData()
557         instead of implementsCall().
558         * bridge/qt/qt_instance.h:
559
560 2008-05-22  Adam Roben  <aroben@apple.com>
561
562         Massively speed up date-format-tofte with the debugger attached
563
564         On a debug Windows build (I know, hardly a good testcase) this patch
565         makes this test run 57.25x as fast.
566
567         Reviewed by Mark Rowe.
568
569         * page/inspector/ScriptsPanel.js:
570         (WebInspector.ScriptsPanel.prototype.reset): Clear the
571         _scriptsForURLsInFilesSelect object.
572         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Instead
573         of looping over all the options in the select to find the option we
574         want, get the script object from _scriptsForURLsInFilesSelect and get
575         the option element from the script object.
576         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use
577         _scriptsForURLsInFilesSelect to cache the script objects. Store the
578         option element for each script on the script object so we can quickly
579         retrieve it later.
580
581 2008-05-22  Adam Roben  <aroben@apple.com>
582
583         Remove some dead code from ScriptsPanel.js
584
585         Reviewed by Mark Rowe.
586
587         * page/inspector/ScriptsPanel.js:
588
589 2008-05-21  Adam Roben  <aroben@apple.com>
590
591         Fix Bug 19178: Inspector should support sorting resources by latency
592
593         <https://bugs.webkit.org/show_bug.cgi?id=19178>
594
595         I replaced "Sort by Time" with the following sorting options:
596           - Sort by Start Time
597           - Sort by Response Time
598           - Sort by End Time
599           - Sort by Duration
600           - Sort by Latency
601
602         You can no longer sort by Size when looking at the Time graph, and you
603         can't use any of the time-based sorting functions when looking at the
604         Size graph.
605
606         Reviewed by Tim Hatcher.
607
608         * page/inspector/Resource.js:
609         (WebInspector.Resource.prototype.get duration): Added.
610         (WebInspector.Resource.prototype.get latency): Added.
611         (WebInspector.Resource.CompareByStartTime): Added.
612         (WebInspector.Resource.CompareByResponseReceivedTime): Added.
613         (WebInspector.Resource.CompareByEndTime): Added.
614         (WebInspector.Resource.CompareByDuration): Added.
615         (WebInspector.Resource.CompareByLatency): Added.
616         * page/inspector/ResourcesPanel.js:
617         (WebInspector.ResourcesPanel):
618           - Each graph sidebar item now holds a list of sorting options
619           - Graph sidebar items no longer have a calculator property. This is
620             stored on the sorting options instead, to allow each kind of
621             sorting to have a different calculator.
622           - The sortingSelectElement starts out empty, and is populated in
623             _graphSelected
624           - The sortingFunction starts out uninitialized and is set as a
625             side-effect of _graphSelected.
626         (WebInspector.ResourcesPanel.prototype.set calculator): Don't do
627         anything if the calculator hasn't changed.
628         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
629         _lastSelectedGraphTreeElement property instead of getting the graph
630         element from the calculator.
631         (WebInspector.ResourcesPanel.prototype._graphSelected):
632           - Store the tree element in the _lastSelectedGraphTreeElement
633             property
634           - Popuplate sortingSelectElement with the sortingOptions and select
635             the option that was last selected
636         (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
637         our calculator from the sorting option.
638         (WebInspector.ResourceTimeCalculator): Renamed from
639         ResourceTransferTimeCalculator. Now takes a parameter to specify
640         whether the bars should all start at zero.
641         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages):
642         Take this.startAtZero into account.
643         (WebInspector.ResourceTimeCalculator.prototype.updateBoundries):
644         Abstracted the lower/upper bounds of a resource into methods.
645         (WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
646         (WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
647         (WebInspector.ResourceTransferTimeCalculator): Added. This is now a
648         subclass of ResourceTimeCalculator
649         (WebInspector.ResourceTransferDurationCalculator): Added.
650         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
651         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
652         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
653         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
654         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
655         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingSize):
656         Changed to call CompareBySize.
657
658 2008-05-21  Adam Roben  <aroben@apple.com>
659
660         Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are
661         wrong/missing
662
663         <https://bugs.webkit.org/show_bug.cgi?id=19173>
664
665         Reviewed by Tim Hatcher.
666
667         * manual-tests/inspector/debugger-status-bar-buttons-state.html:
668         Added.
669         * page/inspector/ScriptsPanel.js:
670         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call
671         _clearInterface (which updates the buttons' tool tips) after
672         attaching/detaching the debugger so that the buttons will reflect the
673         new state.
674         (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
675         Set the title of the pauseOnExceptionsButton, not the debuggingButton.
676
677 2008-05-20  Adam Roben  <aroben@apple.com>
678
679         Fix Bug 19153: Inspector should support console.debug
680
681         <https://bugs.webkit.org/show_bug.cgi?id=19153>
682         <rdar://problem/5950856>
683
684         Reviewed by Tim Hatcher.
685
686         Test: manual-tests/inspector/console-log-formatting.html
687
688         * bindings/js/JSConsoleCustom.cpp:
689         (WebCore::JSConsole::debug): Added.
690         * manual-tests/inspector/console-log-formatting.html: Changed to test
691         console.debug as well.
692         * page/Console.cpp:
693         (WebCore::Console::debug): Added. Just calls through to log().
694         * page/Console.h:
695         * page/Console.idl: Added debug() declaration.
696
697 2008-05-21  Kevin McCullough  <kmccullough@apple.com>
698
699         Reviewed by Adam.
700
701         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
702         profile node.
703         - Expose the Profile's 'focus' ability to WebCore and the WebInspector.
704
705         * page/JavaScriptProfile.cpp:
706         (WebCore::focus):
707         (WebCore::profileClass):
708
709 2008-05-21  Timothy Hatcher  <timothy@apple.com>
710
711         Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
712         since the parts the remain aren't useful.
713
714         * page/JavaScriptDebugServer.cpp:
715         (WebCore::JavaScriptDebugServer::sourceParsed):
716
717 2008-05-21  Beth Dakin  <bdakin@apple.com>
718
719         Reviewed by Anders.
720
721         Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash 
722         beneath ResourceHandle::setDefersLoading while running fast/loader/
723         simultaneous-reloads-assert.html (null CFURLConnection)
724
725         * platform/network/cf/ResourceHandleCFNet.cpp:
726         (WebCore::ResourceHandle::setDefersLoading): Added simple null-
727         check.
728
729 2008-05-21  Timothy Hatcher  <timothy@apple.com>
730
731         Adds the Request and Response headers to the Resource view.
732
733         <rdar://problem/5940782> REGRESSION: Resource Request and Response
734         headers aren't shown (18451)
735
736         Reviewed by Adam Roben.
737
738         * English.lproj/localizedStrings.js: Added new strings.
739         * css/view-source.css: Add comments to make sure a couple of
740         style rules stay in sync with inspector.css.
741         * page/inspector/Resource.js:
742         (WebInspector.Resource.prototype.set url): Dispatch an event when
743         this property changes.
744         (WebInspector.Resource.prototype.set requestHeaders): Ditto.
745         (WebInspector.Resource.prototype.set responseHeaders): Ditto.
746         * page/inspector/ResourceView.js:
747         (WebInspector.ResourceView): Add new elements for the headers
748         and a headers TreeOutline. Add event listeners for resource
749         property changes. Calls the three new refresh functions.
750         (WebInspector.ResourceView.prototype.set headersVisible): Implemented.
751         Toggles the headers-visible class name.
752         (WebInspector.ResourceView.prototype._refreshURL): Update the URL
753         tree element.
754         (WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
755         (WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
756         (WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
757         headers fromm the tree element. Loop throuh the headers and create new
758         tree elements and append them.
759         * page/inspector/ResourcesPanel.js:
760         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
761         on the visible view if it is implemented.
762         * page/inspector/SourceFrame.js:
763         (WebInspector.SourceFrame.prototype.get autoSizesToFitContentHeight):
764         (WebInspector.SourceFrame.prototype.set autoSizesToFitContentHeight):
765         (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
766         (WebInspector.SourceFrame.prototype._loaded): 
767         (WebInspector.SourceFrame.prototype._windowResized): 
768         * page/inspector/SourceView.js:
769         (WebInspector.SourceView): Move the SourceFrame creation so it is
770         available when headersVisible is set. Add a gutter element to fill
771         the vertical space no covered by the SourceFrame now.
772         (WebInspector.SourceView.prototype.set headersVisible): Set the
773         SourceFrame.autoSizesToFitContentHeight when this property changes.
774         (WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
775         when autoSizesToFitContentHeight is true. This happens when resizing the 
776         Resources sidebar.
777         * page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
778         and a comment to keep in sync with view-source.css. Adds other styles
779         for the headers area of resource-view.
780
781 2008-05-21  Sam Weinig  <sam@webkit.org>
782
783         Reviewed by Anders Carlsson.
784
785         <rdar://problem/5838772> Support cross-site XMLHttpRequest
786
787         - Implement support for cross-site GET requests using the HTTP header
788           Access-control mechanism.
789
790         Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html
791                http/tests/xmlhttprequest/access-control-basic-allow.html
792                http/tests/xmlhttprequest/access-control-basic-denied.html
793                http/tests/xmlhttprequest/access-control-basic-exclude.html
794
795         * xml/AccessControlList.cpp:
796         (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
797         * xml/AccessControlList.h:
798
799         * xml/AccessItem.cpp:
800         (WebCore::AccessItem::AccessItem):
801         (WebCore::AccessItem::matches):
802         * xml/AccessItem.h:
803         Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using
804         the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset
805         of the AccessItem match algorithm to be used, until the complete parsing of
806         the wildcards and optional pieces is complete. 
807
808         * xml/AccessItemRule.cpp:
809         (WebCore::matchesAny):
810         (WebCore::AccessItemRule::allowListMatchesAny):
811         (WebCore::AccessItemRule::excludeListMatchesAny):
812         * xml/AccessItemRule.h:
813         More of the implementation of the list check algorithm.  Check if any of the items
814         in the rule match the control origin.
815
816         * xml/XMLHttpRequest.cpp:
817         (WebCore::XMLHttpRequest::XMLHttpRequest):
818         (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore.
819         (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests.
820         (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for
821         cross-domain requests.  
822         (WebCore::XMLHttpRequest::loadRequestSynchronously):
823         (WebCore::XMLHttpRequest::processSyncLoadResults):
824         This can now throw an exception if a cross-domain request is denied by the access control
825         (WebCore::XMLHttpRequest::didFinishLoading):
826         Add support for cross-domain GET request.  ASSERT temporarily that the method is GET, since we
827         should have bailed out much earlier for non-GET methods.
828         (WebCore::XMLHttpRequest::willSendRequest):
829         (WebCore::XMLHttpRequest::didReceiveResponse):
830         Do the HTTP header access-control check as soon as the headers arrive.
831         * xml/XMLHttpRequest.h:
832
833 2008-05-21  Alp Toker  <alp@nuanti.com>
834
835         Rubber-stamped by Maciej.
836
837         Replace non-standard #pragma marks with comments to avoid compiler
838         warnings.
839
840         * page/InspectorController.cpp:
841
842 === End merge of squirrelfish ===
843
844 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
845
846         Reviewed by Tim Hatcher.
847
848         Merged with trunk WebCore's new debugger.
849
850         * page/InspectorController.cpp:
851         (WebCore::currentCallFrame): Updated to use the DebuggerCallFrame API.
852         (WebCore::InspectorController::pauseInDebugger): Updated for name change
853         explained below.
854         (WebCore::InspectorController::resumeDebugger): ditto
855         (WebCore::InspectorController::didParseSource): Fixed a bug that would
856         produce garbled text in some cases: Don't treat JS source as null-
857         terminated UTF8; it's UTF16.
858
859         * page/JavaScriptCallFrame.cpp:
860         * page/JavaScriptCallFrame.h: Changed this class to do all of its processing
861         through a JavaScriptCore DebuggerCallFrame. We have to copy the DebuggerCallFrame
862         because it's a temporary.
863         (WebCore::JavaScriptCallFrame::update): Added an API for updating a call
864         frame during execution: this is how we handle "with" and "eval".
865
866         * page/JavaScriptDebugServer.cpp: Separated "m_paused" from
867         "m_doneProcessingDebuggerEvents", because they have different semantics:
868         "m_paused" is the flag the debug server uses to indicate that new debugger
869         callbacks should be ignored, because they come from the debugger's own
870         JS code; "m_doneProcessingDebuggerEvents" is the flag the debugger UI
871         uses to indicate that it's done processing events, and would like execution
872         to continue. When these flags were one, the debugger would erroneously
873         process callbacks that ocurred while unwinding from its own JS code.
874
875         (WebCore::toPage): Removed some unnecessary NULL checking. Added some
876         missing NULL checking.
877         
878         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Changed pause tracking
879         to track a JavaScriptCallFrame instead of an ExecState, since ExecState
880         is no longer a unique identifier for a call frame.
881
882         I removed the updateCurrentCallFrame scheme, and replaced it with
883         individual tracking inside these callbacks:
884         
885         (WebCore::JavaScriptDebugServer::callEvent):
886         (WebCore::JavaScriptDebugServer::atStatement):
887         (WebCore::JavaScriptDebugServer::returnEvent):
888         (WebCore::JavaScriptDebugServer::exception):
889         
890         The updateCurrentCallFrame scheme was just too incompatible with the
891         squirrelfish execution model. Everything still works as before, except
892         for eval, which no longer shows up as an independent call frame. We'll
893         need to augment our debugger callbacks to bring back support for that.
894
895         * page/inspector/ScopeChainSidebarPane.js: Updated to use the activation
896         class's new name.
897
898 2008-05-21  Maciej Stachowiak  <mjs@apple.com>
899
900         Reviewed by Oliver.
901
902         - write directly to the slot we used to check for override properties, when possible
903         2.6% speedup on in-browser SunSpider
904
905         * bindings/js/JSDOMWindowCustom.h:
906         (WebCore::JSDOMWindow::customPut):
907
908 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
909
910         Reviewed by Oliver.
911
912         - inline JSDOMWindow security checks
913         0.9% speedup to SunSpider in-browser
914
915         * bindings/js/JSDOMWindowBase.cpp:
916         * bindings/js/JSDOMWindowCustom.h:
917         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
918         (WebCore::JSDOMWindowBase::allowsAccessFrom):
919         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
920         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
921         * bindings/js/kjs_binding.cpp:
922
923 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
924
925         Reviewed by Adam.
926
927         - use ALWAYS_INLINE on customGetOwnPropertySlot since it wasn't inlining
928         2% speedup to SunSpider in-browser
929
930         * bindings/js/JSDOMWindowCustom.h:
931         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
932
933 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
934
935         Reviewed by Adam.
936
937         - inline JSDOMWindow's customPut and customGetOwnPropertySlot methods
938         1.2% speedup to SunSpider in-browser
939         
940         The approach here is to make the code generator include a
941         JS{classname}Custom.h header in the autogenerated implementation,
942         which we can use to provide inline versions.
943
944         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
945         * bindings/js/JSCSSStyleDeclarationCustom.h: Added.
946         * bindings/js/JSDOMWindowCustom.cpp:
947         * bindings/js/JSDOMWindowCustom.h:
948         (WebCore::asJSDOMWindow):
949         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
950         (WebCore::JSDOMWindow::customPut):
951         * bindings/js/JSHTMLAppletElementCustom.cpp:
952         * bindings/js/JSHTMLAppletElementCustom.h: Added.
953         * bindings/js/JSHTMLEmbedElementCustom.cpp:
954         * bindings/js/JSHTMLEmbedElementCustom.h: Added.
955         * bindings/js/JSHTMLObjectElementCustom.cpp:
956         * bindings/js/JSHTMLObjectElementCustom.h: Added.
957         * bindings/js/JSHistoryCustom.cpp:
958         * bindings/js/JSHistoryCustom.h: Added.
959         * bindings/js/JSLocationCustom.cpp:
960         * bindings/js/JSLocationCustom.h: Added.
961         * bindings/js/JSStorageCustom.cpp:
962         * bindings/js/JSStorageCustom.h: Added.
963         * bindings/scripts/CodeGeneratorJS.pm:
964
965 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
966
967         Reviewed by Anders.
968
969         - inline asDOMWindow (using a new JSDOMWindowCustom.h header) since it is just a cast
970         1% speedup to SunSpider in-browser
971
972         * WebCore.vcproj/WebCore.vcproj:
973         * WebCore.xcodeproj/project.pbxproj:
974         * bindings/js/JSCustomVoidCallback.cpp:
975         * bindings/js/JSCustomXPathNSResolver.cpp:
976         * bindings/js/JSDOMApplicationCacheCustom.cpp:
977         * bindings/js/JSDOMWindowBase.cpp:
978         * bindings/js/JSDOMWindowBase.h:
979         * bindings/js/JSDOMWindowCustom.cpp:
980         * bindings/js/JSDOMWindowCustom.h: Added.
981         (WebCore::asJSDOMWindow):
982         * bindings/js/JSDatabaseCustom.cpp:
983         * bindings/js/JSDocumentCustom.cpp:
984         * bindings/js/JSLocationCustom.cpp:
985         * bindings/js/JSSQLTransactionCustom.cpp:
986         * bindings/js/JSXMLHttpRequestCustom.cpp:
987         * page/JavaScriptDebugServer.cpp:
988
989 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
990
991         Reviewed by Oliver.
992
993         - obtain current inner window of outer window in a more efficient way
994         1.6% speedup to SunSpider in-browser
995
996         * bindings/js/JSDOMWindowBase.cpp:
997         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
998
999 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
1000
1001         Reviewed by Adam.
1002
1003         - make impl() method for JSWindow inline
1004         0.6% speedup to SunSpider in-browser
1005
1006         * WebCore.base.exp: Remove now-inline symbol
1007         * bindings/scripts/CodeGeneratorJS.pm: Make the codegen script inline impl()
1008         even for classes with a parent class.
1009
1010 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
1011
1012         Reviewed by Oliver Hunt.
1013
1014         Updated for API changes in KJS::Debugger.
1015
1016 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
1017
1018         Reviewed by Oliver Hunt.
1019
1020         Updated for API changes in KJS::Debugger.
1021
1022         * page/JavaScriptDebugServer.cpp:
1023         (WebCore::JavaScriptDebugServer::callEvent):
1024         (WebCore::JavaScriptDebugServer::atStatement):
1025         (WebCore::JavaScriptDebugServer::returnEvent):
1026         (WebCore::JavaScriptDebugServer::exception):
1027         * page/JavaScriptDebugServer.h:
1028
1029 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
1030
1031         Reviewed by Oliver Hunt.
1032         
1033         Updated JavaScriptDebugServer API to accept a SourceProvider instead
1034         of a UString, to avoid copying.
1035
1036         * page/JavaScriptDebugServer.cpp:
1037         (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function
1038         not to return a value.
1039
1040 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
1041
1042         Build fix.
1043         
1044         - add missing forwarding header
1045
1046         * ForwardingHeaders/kjs/SourceProvider.h: Added.
1047
1048 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
1049
1050         Reviewed by Oliver.
1051
1052         - JavaScriptGlue part of fix for: "SQUIRRELFISH: function toString broken after calling"
1053         https://bugs.webkit.org/show_bug.cgi?id=18869
1054
1055         * bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String.
1056         (WebCore::StringSourceProvider::create):
1057         (WebCore::StringSourceProvider::getRange):
1058         (WebCore::StringSourceProvider::data):
1059         (WebCore::StringSourceProvider::length):
1060         (WebCore::StringSourceProvider::StringSourceProvider):
1061         * bindings/js/kjs_proxy.cpp:
1062         (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to
1063         evaluate() instead of UChar* / length.
1064         * html/HTMLScriptElement.cpp:
1065         (WebCore::HTMLScriptElement::text): Modified to return the
1066         original string as-is when the script element contains only a
1067         single text node, to avoid excess memory use.
1068         
1069         * WebCore.vcproj/WebCore.vcproj: Add new file to build.
1070         * WebCore.xcodeproj/project.pbxproj: ditto
1071
1072 2008-05-09  Oliver Hunt  <oliver@apple.com>
1073
1074         Reviewed by Geoff.
1075
1076         Build fixes for SquirrelFish on windows.
1077
1078         * bindings/js/JSNavigatorCustom.cpp:
1079
1080 2008-05-08  Geoffrey Garen  <ggaren@apple.com>
1081
1082         Reviewed by Oliver Hunt.
1083
1084         Fixed platform/mac/plugins/bindings-test-objc.html.
1085         
1086         I've restored -[WebScriptObject setException] and
1087         +[WebScriptObject throwException].
1088         
1089         Instead of mucking around in the JavaScript engine's execution state,
1090         throwing an exception sets a global exception string, along with the
1091         environment in which to throw it. An ObjC callback checks the global
1092         exception string and, if it's non-nil and the environment matches the
1093         current exceution environment, throws the global exception string as a
1094         JS exception.
1095
1096         I also removed the old currentGlobalObject infrastructure: it's no longer
1097         used.
1098
1099 2008-05-06  Oliver Hunt  <oliver@apple.com>
1100
1101         Reviewed by Maciej.
1102
1103         Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
1104         Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>
1105
1106         This fixes function binding logic for the ObjC and NPRuntime by
1107         replacing incorrect implementations of implementsCall (which is
1108         no longer virtual) with implementations of getCallData.
1109
1110         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1111         (WebCore::JSQuarantinedObjectWrapper::getCallData):
1112         * bindings/js/JSQuarantinedObjectWrapper.h:
1113         * bridge/c/c_instance.cpp:
1114         * bridge/c/c_instance.h:
1115         * bridge/objc/objc_instance.h:
1116         * bridge/objc/objc_instance.mm:
1117         * bridge/objc/objc_runtime.h:
1118         * bridge/objc/objc_runtime.mm:
1119         (ObjcFallbackObjectImp::getCallData):
1120         * bridge/runtime.h:
1121         * bridge/runtime_object.cpp:
1122         (RuntimeObjectImp::getCallData):
1123         * bridge/runtime_object.h:
1124
1125 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
1126
1127         Build fix: supply a parameter that used to be implicit to
1128         Interpreter::evaluate.
1129
1130 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
1131
1132         Build fix: #ifdef'd out some code that doesn't work anymore.
1133
1134         * bindings/objc/WebScriptObject.mm:
1135         (+[WebScriptObject throwException:]):
1136         (-[WebScriptObject setException:]):
1137
1138 2008-04-14  Gabor Loki  <loki@inf.u-szeged.hu>
1139
1140         Reviewed by Geoffrey Garen.
1141
1142         Bug 18489: Squirrelfish doesn't build on linux
1143         <https://bugs.webkit.org/show_bug.cgi?id=18489>
1144
1145         * WebCore.pro: Add JavaScriptCore/VM into include path
1146
1147 2008-04-10  Sam Weinig  <sam@webkit.org>
1148
1149         Reviewed by Geoffrey Garen.
1150
1151         Adjusted WebCore JS functions to the new "getConstructData" calling convention.
1152
1153 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
1154
1155         Reviewed by Oliver Hunt.
1156         
1157         Adjusted WebCore JS functions to the new "getCallData" calling convention.
1158
1159 === Start merge of squirrelfish ===
1160
1161 2008-05-21  Anders Carlsson  <andersca@apple.com>
1162
1163         Reviewed by Mitz.
1164
1165         Add IconFetcher implementation.
1166
1167         * WebCore.base.exp:
1168         * WebCore.xcodeproj/project.pbxproj:
1169         * html/HTMLLinkElement.h:
1170         (WebCore::HTMLLinkElement::isIcon):
1171         * loader/icon/IconFetcher.cpp: Added.
1172         (WebCore::IconLinkEntry::):
1173         (WebCore::IconLinkEntry::IconLinkEntry):
1174         (WebCore::IconLinkEntry::type):
1175         (WebCore::IconLinkEntry::url):
1176         (WebCore::IconLinkEntry::buffer):
1177         (WebCore::parseIconLink):
1178         (WebCore::IconFetcher::create):
1179         (WebCore::IconFetcher::IconFetcher):
1180         (WebCore::IconFetcher::~IconFetcher):
1181         (WebCore::IconFetcher::cancel):
1182         (WebCore::IconFetcher::createIcon):
1183         (WebCore::IconFetcher::loadEntry):
1184         (WebCore::IconFetcher::loadFailed):
1185         (WebCore::IconFetcher::didReceiveResponse):
1186         (WebCore::IconFetcher::didReceiveData):
1187         (WebCore::IconFetcher::didFinishLoading):
1188         (WebCore::IconFetcher::didFail):
1189         * loader/icon/IconFetcher.h: Added.
1190         (WebCore::IconFetcherClient::~IconFetcherClient):
1191
1192 2008-05-21  Dan Bernstein  <mitz@apple.com>
1193
1194         Reviewed by Dave Hyatt.
1195
1196         - fix https://bugs.webkit.org/show_bug.cgi?id=18352
1197           <rdar://problem/5854517> crash loading malicious font
1198
1199         * platform/graphics/mac/SimpleFontDataMac.mm:
1200         (WebCore::SimpleFontData::platformInit): In the case of a custom font,
1201         there is no NSFont to base the fallback font on, so get a font based on
1202         fallback family name alone.
1203
1204 2008-05-21  Timothy Hatcher  <timothy@apple.com>
1205
1206         Adds the files and line numbers to the Profile call tree.
1207
1208         <rdar://problem/5952924> Inspector needs to show file and line number
1209         in the Profile call tree
1210
1211         Reviewed by Geoff Garen.
1212
1213         * page/JavaScriptProfileNode.cpp:
1214         (WebCore::getFunctionName): Fixes a JSStringRef leak.
1215         (WebCore::getURL): Call ProfileNode::url.
1216         (WebCore::getLineNumber): Call ProfileNode::lineNumber.
1217         (WebCore::ProfileNodeClass): Add the url and lineNumber properties.
1218         * page/inspector/ProfileView.js:
1219         (WebInspector.ProfileDataGridNode.prototype.createCell): Overload the
1220         DataGridNode.createCell and add the file and lineNumber to the
1221         cell if the column is the function column.
1222         * page/inspector/inspector.css: New styles for the file and line.
1223
1224 2008-05-21  Timothy Hatcher  <timothy@apple.com>
1225
1226         Restores logging of console calls to the STDOUT
1227         when Interpreter::shouldPrintExceptions() is true.
1228
1229         <rdar://problem/5636442> REGRESSION: Console.log no longer logs to
1230         the system console or terminal
1231
1232         <rdar://problem/5146079> JavaScript exception logging should print
1233         accurate file and line info when called from WebScriptObject
1234
1235         Reviewed by Adam Roben.
1236
1237         * bindings/js/JSCustomSQLStatementCallback.cpp:
1238         (WebCore::JSCustomSQLStatementCallback::handleEvent): Remove existing
1239         printf and check for Interpreter::shouldPrintExceptions() since there is
1240         a call to Console::addMessage.
1241         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1242         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): Ditto.
1243         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1244         (WebCore::JSCustomSQLTransactionCallback::handleEvent): Ditto.
1245         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1246         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Ditto.
1247         * bindings/js/JSCustomVoidCallback.cpp:
1248         (WebCore::JSCustomVoidCallback::handleEvent): Ditto.
1249         * bindings/js/JSCustomXPathNSResolver.cpp:
1250         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Ditto.
1251         * bindings/js/JSDOMWindowBase.cpp:
1252         (WebCore::JSDOMWindowBase::printErrorMessage): Ditto.
1253         * bindings/js/ScheduledAction.cpp:
1254         (WebCore::ScheduledAction::execute): Ditto.
1255         * bindings/js/kjs_events.cpp:
1256         (WebCore::JSAbstractEventListener::handleEvent): Ditto.
1257         * loader/FrameLoader.cpp:
1258         (WebCore::FrameLoader::shouldAllowNavigation): Ditto.
1259         * bindings/objc/WebScriptObject.mm:
1260         (WebCore::addExceptionToConsole): Added helper static function that
1261         calls Console::addMessage.
1262         (-[WebScriptObject callWebScriptMethod:withArguments:]): Call addExceptionToConsole.
1263         (-[WebScriptObject evaluateWebScript:]): Ditto.
1264         (-[WebScriptObject setValue:forKey:]): Ditto.
1265         (-[WebScriptObject valueForKey:]): Ditto.
1266         (-[WebScriptObject removeWebScriptKey:]): Ditto.
1267         (-[WebScriptObject webScriptValueAtIndex:]): Ditto.
1268         (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
1269         * page/Console.cpp:
1270         (WebCore::Console::addMessage): Print the level, message,
1271         URL and line number to STDOUT.
1272         (WebCore::printToStandardOut): Helper static function that
1273         takes a prefix string, ExecState, an argument List and URL.
1274         Prints the prefix and loops through the arguments calling
1275         toString on each and printing the string. Finally printing
1276         the URL and new line.
1277         (WebCore::Console::error): Call printToStandardOut.
1278         (WebCore::Console::info): Ditto.
1279         (WebCore::Console::log): Ditto.
1280         (WebCore::Console::assertCondition): Ditto.
1281         (WebCore::Console::warn): Ditto.
1282
1283 2008-05-20  Timothy Hatcher  <timothy@apple.com>
1284
1285         Changes to work with the new Profiler API. The Profile is now
1286         stored by the InspectorController when Console.profileEnd is called.
1287         This solves three issues with the previous design. First, we don't
1288         keep profiles around unless the Inspector is enabled. Second, we
1289         only show Profiles initiated by the Page in it's Inspector, not every
1290         Profile for the whole process. Third, we now show Profiles in the
1291         Inspector when they are created.
1292
1293         <rdar://problem/5951562> New profiles aren't added to the Inspector
1294         as they finish
1295
1296         Reviewed by Kevin McCullough.
1297
1298         * bindings/js/JSConsoleCustom.cpp:
1299         (WebCore::JSConsole::profileEnd): Added. Calls impl()->profileEnd()
1300         and passes the ExecState and arguments.
1301         * page/Console.cpp:
1302         (WebCore::Console::profile):
1303         (WebCore::Console::profileEnd): Accept the optional title argument
1304         and pass it to Profilier::stopProfiling along with the ExecState.
1305         Calls InspectorController::addProfile with the result Profile.
1306         * page/Console.h:
1307         * page/Console.idl: Made profileEnd Custom so we can get the ExecState.
1308         * page/InspectorController.cpp:
1309         (WebCore::profiles): Renamed from allProfiles. Uses the controller's
1310         profiles vector.
1311         (WebCore::InspectorController::addProfile): Appends to m_profiles.
1312         Calls addScriptProfile if the window is visible.
1313         (WebCore::InspectorController::windowScriptObjectAvailable): Renamed
1314         allProfiles to profiles.
1315         (WebCore::InspectorController::addScriptProfile): Calls addProfile on
1316         the JavaScript side.
1317         (WebCore::InspectorController::didCommitLoad): Clears m_profiles.
1318         * page/InspectorController.h:
1319         * page/inspector/ProfilesPanel.js: Populates the profiles sidebar the first
1320         time the panel is shown after a rest.
1321         * page/inspector/inspector.js: Added addProfile, calls ProfilesPanel's
1322         addProfile function.
1323
1324 2008-05-21  Alexey Proskuryakov  <ap@webkit.org>
1325
1326         Reviewed by Darin.
1327
1328         https://bugs.webkit.org/show_bug.cgi?id=19169
1329         <rdar://5952342> REGRESSION: nakarte.ru searches don't work
1330
1331         Test: http/tests/xmlhttprequest/encode-request-url.html
1332
1333         * platform/KURL.cpp: (WebCore::KURL::init): Don't allow UTF-8 encoded data to be implicitly
1334         converted to String, as it will be encoded again by parse().
1335
1336 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1337
1338         Reviewed by Simon.
1339
1340         For the Qt port, fix building with Qt for Embedded Linux.
1341
1342         * WebCore.pro:
1343
1344 2008-05-21  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1345
1346         Reviewed by Simon.
1347
1348         For the Qt port, allow building without NPAPI plugin support.
1349
1350         * WebCore.pro:
1351         * plugins/PluginView.h:
1352
1353 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
1354
1355         Reviewed by Tim.
1356
1357         Added all of my personal manual tests for the profiler.
1358
1359         * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Added.
1360         * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Added.
1361         * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Added.
1362         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Added.
1363         * manual-tests/inspector/profiler-test-apply.html: Added.
1364         * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Added.
1365         * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Added.
1366         * manual-tests/inspector/profiler-test-call.html: Added.
1367         * manual-tests/inspector/profiler-test-dead-time.html: Added.
1368         * manual-tests/inspector/profiler-test-event-handler.html: Added.
1369         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Added.
1370         * manual-tests/inspector/profiler-test-inline-event-handler.html: Added.
1371         * manual-tests/inspector/profiler-test-many-calls-in-the-same-scope.html: Added.
1372         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Added.
1373         * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Added.
1374         * manual-tests/inspector/profiler-test-multiple-frames.html: Added.
1375         * manual-tests/inspector/profiler-test-multiple-windows.html: Added.
1376         * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Added.
1377         * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Added.
1378         * manual-tests/inspector/profiler-test-no-execution-context.html: Added.
1379         * manual-tests/inspector/profiler-test-one-execution-context.html: Added.
1380         * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Added.
1381         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Added.
1382         * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Added.
1383         * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Added.
1384         * manual-tests/inspector/profiler-test-two-execution-contexts.html: Added.
1385         * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Added.
1386         * manual-tests/inspector/resources: Added.
1387         * manual-tests/inspector/resources/other-frame.html: Added.
1388         * manual-tests/inspector/resources/other-window.html: Added.
1389         * manual-tests/inspector/resources/profiler-test-JS-resources.js: Added.
1390
1391 2008-05-20  Adam Roben  <aroben@apple.com>
1392
1393         Use KJS::List::getSlice instead of reimplementing it
1394
1395         Rubberstamped and suggested by Sam Weinig.
1396
1397         * bindings/js/JSConsoleCustom.cpp:
1398         (WebCore::JSConsole::assertCondition):
1399
1400 2008-05-20  Kevin Calhoun  <kcalhoun@apple.com>
1401
1402         Reviewed by Darin.
1403
1404         Fix <rdar://problem/5929010> Adopt new QTKit methods for <video> implementation
1405
1406         If the class QTVideoRendererWebKitOnly is present use it to render video,
1407         otherwise fall back to existing use of QTMovieView/QTMovieContentView.
1408
1409         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1410         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1411         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1412         (WebCore::MediaPlayerPrivate::createQTMovie):
1413         (WebCore::QTVideoRendererClass):
1414         (WebCore::MediaPlayerPrivate::detachQTMovieView):
1415         (WebCore::MediaPlayerPrivate::createQTVideoRenderer):
1416         (WebCore::MediaPlayerPrivate::destroyQTVideoRenderer):
1417         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
1418         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
1419         (WebCore::MediaPlayerPrivate::load):
1420         (WebCore::MediaPlayerPrivate::cancelLoad):
1421         (WebCore::MediaPlayerPrivate::setVisible):
1422         (WebCore::MediaPlayerPrivate::paint):
1423         (-[WebCoreMovieObserver newImageAvailable:]):
1424
1425 2008-05-19  Adam Roben  <aroben@apple.com>
1426
1427         Fix Bug 19134: Inspector should support console.assert
1428
1429         <https://bugs.webkit.org/show_bug.cgi?id=19134>
1430
1431         Reviewed by Tim Hatcher.
1432
1433         Test: manual-tests/inspector/console-assert.html
1434
1435         * bindings/js/JSConsoleCustom.cpp:
1436         (WebCore::JSConsole::assertCondition): Added.
1437         * bindings/scripts/CodeGeneratorJS.pm: Added parsing of the
1438         ImplementationFunction extended attribute, which allows you to
1439         override the name of the C++ function used to implement this method.
1440         * manual-tests/inspector/console-assert.html: Added.
1441         * page/Console.cpp:
1442         (WebCore::Console::assertCondition): Added.
1443         * page/Console.h:
1444         * page/Console.idl: Added assert().
1445
1446 2008-05-20  Alice Liu  <alice.liu@apple.com>
1447
1448         Reviewed by Brady.
1449
1450         fix <rdar://problem/5908580> 10A58: Dictionary Panel hangs in WebCore::Cache::pruneDeadResources()
1451
1452         * loader/Cache.cpp:
1453         (WebCore::Cache::requestUserCSSStyleSheet):
1454         Add a call to resourceAccessed() to more closely mirror what is done in requestResource()
1455         (WebCore::Cache::insertInLRUList):
1456         Assert that any resource in the LRU list has been accessed.  This is early detection of a
1457         potential hang later when pruning resources, and also agrees with the early return in 
1458         removeFromLRUList().
1459
1460 2008-05-20  Dan Bernstein  <mitz@apple.com>
1461
1462         Reviewed by Darin Adler.
1463
1464         - fix https://bugs.webkit.org/show_bug.cgi?id=17655
1465           <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
1466
1467         Test: fast/dom/SelectorAPI/viewless-document.html
1468
1469         * css/CSSStyleSelector.cpp:
1470         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated to initialize the
1471         selector checker.
1472         (WebCore::CSSStyleSelector::init): Removed initialization of
1473         m_collectRulesOnly, which is now part of the selector checker.
1474         (WebCore::CSSStyleSelector::matchRules): Updated for renames and data
1475         moved into the selector checker.
1476         (WebCore::CSSStyleSelector::matchRulesForList): Ditto.
1477         (WebCore::CSSStyleSelector::initForStyleResolve): Added a PseudoId
1478         argument, which is used to initialize a data member of the selector
1479         checker. Updated for renames. Removed initialization of m_isXMLDoc
1480         because this bit is now initialized only once in the selector checker's
1481         constructor.
1482         (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added.
1483         (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Changed
1484         into a SelectorChecker method.
1485         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added. Used
1486         by querySelector() and querySelectorAll().
1487         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for data
1488         moved into the selector checker.
1489         (WebCore::CSSStyleSelector::matchUARules): Ditto.
1490         (WebCore::CSSStyleSelector::styleForElement):
1491         (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto. Also removed
1492         code that set the parentStyle variable after the last place it is
1493         accessed, and changed to ensure that m_style is set early in this
1494         function.
1495         (WebCore::CSSStyleSelector::adjustRenderStyle): Updated for data moved
1496         into the selector checker.
1497         (WebCore::CSSStyleSelector::styleRulesForElement): Ditto.
1498         (WebCore::CSSStyleSelector::checkSelector): Ditto. Also changed to pass
1499         the element's style and the parent style to the selector checker, as
1500         well as the dynamic pseudo variable and the selector attributes vector.
1501         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added
1502         arguments for the style of the base element and its parent. When the
1503         elementStyle argument is 0, the style is fetched from the element
1504         and its parent as needed. Also changed to take a reference to the
1505         dynamic pseudo ID and a pointer to the vector of attributes affecting
1506         the match.
1507         (WebCore::CSSStyleSelector::applyProperty): Updated for data moved
1508         into the selector checker.
1509         (WebCore::CSSStyleSelector::checkForGenericFamilyChange): Ditto.
1510         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
1511         (WebCore::CSSStyleSelector::fontSizeForKeyword): Ditto.
1512         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
1513         (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged):
1514         Changed into a SelectorChecker method.
1515         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
1516         Ditto.
1517
1518         * css/CSSStyleSelector.h:
1519         Added a SelectorChecker class and moved data and methods used in
1520         checking selectors into it.
1521         (WebCore::CSSStyleSelector::allVisitedStateChanged): Changed to call the
1522         SelectorChecker method.
1523         (WebCore::CSSStyleSelector::visitedStateChanged): Ditto.
1524         * dom/Node.cpp:
1525         (WebCore::Node::querySelector): Changed to use a SelectorChecker instead
1526         of the document's style selector.
1527         * dom/SelectorNodeList.cpp:
1528         (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
1529
1530 2008-05-20  Timothy Hatcher  <timothy@apple.com>
1531
1532         Implements the Profiles panel and Profile view.
1533
1534         Reviewed by Kevin McCullough.
1535
1536         * English.lproj/localizedStrings.js: Added new strings.
1537         * page/inspector/Images/profileIcon.png: Added.
1538         * page/inspector/Images/profilesIcon.png: Changed. New icon design
1539         that fits in with the other toolbar icons.
1540         * page/inspector/ProfileView.js:
1541         (WebInspector.ProfileView): Remove custom table elements
1542         and create a DataGrid. Sorts the profile by descending total time,
1543         since the profiles aren't sorted by default.
1544         (WebInspector.ProfileView.prototype.refresh): Clears the DataGrid
1545         and recreates all the nodes. The selection is preserved.
1546         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Traverse
1547         all the children and change showTotalTimeAsPercent and showSelfTimeAsPercent
1548         to match the ProfileView values. Then call refresh on the child.
1549         (WebInspector.ProfileView.prototype._sortData): Determine the sort
1550         function to call on the head profile node. Call it and then call
1551         refresh to rebuild the DataGrid.
1552         (WebInspector.ProfileView.prototype._mouseDownInDataGrid): Return early
1553         if the event is not a double-click. When it is a double-click, determine
1554         the column that was targeted and if it was total or self toggle the
1555         show as percent property. Call refreshShowAsPercents.
1556         (WebInspector.ProfileDataGridNode): 
1557         (WebInspector.ProfileDataGridNode.prototype.get data): 
1558         (WebInspector.ProfileDataGridNode.prototype.expand): 
1559         (WebInspector.ProfileDataGridNode.prototype.collapse): 
1560         (WebInspector.ProfileDataGridNode.prototype._populate): 
1561         * page/inspector/ProfilesPanel.js:
1562         (WebInspector.ProfilesPanel): 
1563         (WebInspector.ProfilesPanel.prototype.show): Populate the sidebar
1564         with all profiles. This is a workaround until the Inspector
1565         is told about new profiles.
1566         (WebInspector.ProfilesPanel.prototype.reset): Clear the sidebar and
1567         profile views.
1568         (WebInspector.ProfilesPanel.prototype.handleKeyEvent): Pass the key
1569         event to the sidebar.
1570         (WebInspector.ProfilesPanel.prototype.addProfile): Create a
1571         ProfileSidebarTreeElement object and add it to the sidebar.
1572         (WebInspector.ProfilesPanel.prototype.showProfile): Create a ProfileView
1573         and show it.
1574         (WebInspector.ProfilesPanel.prototype.closeVisibleView): Hide the
1575         visible view.
1576         (WebInspector.ProfilesPanel.prototype._startSidebarDragging): Call
1577         WebInspector.elementDragStart.
1578         (WebInspector.ProfilesPanel.prototype._sidebarDragging): Call _updateSidebarWidth.
1579         (WebInspector.ProfilesPanel.prototype._endSidebarDragging):
1580         Call WebInspector.elementDragEnd.
1581         (WebInspector.ProfilesPanel.prototype._updateSidebarWidth): Update the
1582         sidebar width based on the passed in value.
1583         (WebInspector.ProfileSidebarTreeElement): Subclass WebInspector.SidebarTreeElement.
1584         (WebInspector.ProfileSidebarTreeElement.prototype.onselect): Call ProfilesPanel.showProfile.
1585         (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): Return profile.title.
1586         (WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle): Do nothing.
1587         (WebInspector.ProfileSidebarTreeElement.prototype.get subtitle): Ditto.
1588         (WebInspector.ProfileSidebarTreeElement.prototype.set subtitle): Ditto.
1589         * page/inspector/inspector.css: New styles for the profile sidebar
1590         item and profile data grid columns.
1591         * page/inspector/inspector.js:
1592         * page/inspector/utilities.js:
1593         (Number.secondsToString): Added a higherResolution argument
1594         that returns fractional milliseconds.
1595
1596 2008-05-20  chris fleizach  <cfleizach@apple.com>
1597
1598         Reviewed by Darin Adler, Alice Liu
1599
1600         <rdar://problem/3438014> Might need accessibility solution for context menus in web pages
1601         <rdar://problem/5060458> Elements without AXActions should not return kAXErrorFailure
1602
1603         * page/AccessibilityObject.cpp:
1604         (WebCore::AccessibilityObject::clickPoint):
1605         * page/AccessibilityObject.h:
1606         * page/mac/AccessibilityObjectWrapper.mm:
1607         (-[AccessibilityObjectWrapper accessibilityActionNames]):
1608         (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
1609         (-[AccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
1610         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
1611         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
1612
1613 2008-05-20  Timothy Hatcher  <timothy@apple.com>
1614
1615         Expose the ProfileNode functionName sorting functions on
1616         JavaScriptProfileNode.
1617
1618         Reviewed by Kevin McCullough.
1619
1620         * page/JavaScriptProfileNode.cpp:
1621         (WebCore::sortFunctionNameDescending): Call ProfileNode.
1622         (WebCore::sortFunctionNameAscending): Ditto.
1623         (WebCore::ProfileNodeClass): Add static functions.
1624
1625 2008-05-20  Darin Adler  <darin@apple.com>
1626
1627         Reviewed by Mitz.
1628
1629         - a first small step of CSS DOM refactoring -- the eventual goal is to
1630           reduce StyleBase and possibly eliminate it, since it has multiple
1631           purposes and unneccessarily ties many classes together
1632
1633         * css/CSSCursorImageValue.cpp:
1634         (WebCore::isSVGCursorIdentifier): Mark static so it has internal linkage.
1635         (WebCore::resourceReferencedByCursorElement): Ditto.
1636         (WebCore::CSSCursorImageValue::CSSCursorImageValue): Removed unused style
1637         argument.
1638         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Removed code to
1639         check if X and Y changed before changing them -- there's no reason to do
1640         that. Removed code that depended on the internals of CSSImageValue. The
1641         new code uses only protected functions rather than going right at the
1642         fields and uing internal knowledge of the base class.
1643         * css/CSSCursorImageValue.h: Added a create function, made constructor
1644         private, removed unused style argument.
1645
1646         * css/CSSImageValue.cpp:
1647         (WebCore::CSSImageValue::CSSImageValue): Removed unused style argument.
1648         (WebCore::CSSImageValue::cachedImageURL): Added. A protected function for
1649         use by CSSCursorImageValue that gives the URL.
1650         (WebCore::CSSImageValue::clearCachedImage): Added. A protected function for
1651         use by CSSCursorImageValue that clears the CachedImage.
1652         * css/CSSImageValue.h: Added create functions, made constructors protected
1653         and private, removed unused style argument, made data members private, added
1654         some protected functions for use by CSSCursorImageValue.
1655
1656         * css/CSSImportRule.cpp:
1657         (WebCore::CSSImportRule::setCSSStyleSheet): Changed to call checkLoaded on
1658         the parent. This is part of preparation to move the checkLoaded function from
1659         StyleBase to StyleSheet.
1660         (WebCore::CSSImportRule::insertedIntoParent): Changed code to check the URL
1661         of the style sheet to use the href function of the style sheet rather than
1662         the baseURL function. This eliminates an O(n^2) algorithm here and reduces
1663         the use of baseURL, part of preparation to move it from StyleBase
1664         to CSSStyleSheet.
1665
1666         * css/CSSMutableStyleDeclaration.cpp:
1667         (WebCore::CSSMutableStyleDeclaration::setImageProperty): Changed to use create
1668         function instead of a direct call to new for the CSSImageValue classes.
1669         * css/CSSParser.cpp:
1670         (WebCore::CSSParser::parseValue): Ditto.
1671         (WebCore::CSSParser::parseContent): Ditto.
1672         (WebCore::CSSParser::parseFillImage): Ditto.
1673         (WebCore::CSSParser::parseBorderImage): Ditto.
1674
1675         * css/CSSStyleSelector.cpp: Removed unneeded include of CSSImageValue.h.
1676         * rendering/style/RenderStyle.h: Removed unneeded include of
1677         CSSCursorImageValue.h, which was causing us to rebuild the world way too often.
1678
1679         * xml/XSLImportRule.cpp:
1680         (WebCore::XSLImportRule::setXSLStyleSheet): See change to CSSImportRule above.
1681         (WebCore::XSLImportRule::loadSheet): Ditto.
1682
1683 2008-05-20  Kevin McCullough  <kmccullough@apple.com>
1684
1685         Rubber stamped by Adam.
1686
1687         -Minor fix. Should not use a reference since the original may disappear.
1688
1689         * page/Console.cpp:
1690         (WebCore::Console::profile):
1691
1692 2008-05-20  Kevin Ollivier  <kevino@theolliviers.com>
1693
1694         wx build fix. userAgent should return a value.
1695
1696         * plugins/wx/PluginViewWx.cpp:
1697         (WebCore::PluginView::userAgent):
1698
1699 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1700
1701         Expose the ProfileNode sorting functions on JavaScriptProfileNode.
1702
1703         Reviewed by Kevin McCullough.
1704
1705         * page/JavaScriptProfileNode.cpp:
1706         (WebCore::sortTotalTimeDescending): Call ProfileNode.
1707         (WebCore::sortTotalTimeAscending): Ditto.
1708         (WebCore::sortSelfTimeDescending): Ditto.
1709         (WebCore::sortSelfTimeAscending): Ditto.
1710         (WebCore::sortCallsDescending): Ditto.
1711         (WebCore::sortCallsAscending): Ditto.
1712         (WebCore::ProfileNodeClass): Add static functions.
1713
1714 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1715
1716         * page/InspectorController.cpp: Change the include for
1717         JavaScriptProfile.h to sue double quotes instead of backets.
1718
1719 2008-05-19  Timothy Hatcher  <timothy@apple.com>
1720
1721         Adds a DataGrid object that is used for multi-column data
1722         and can contain hierarchical content with disclosure arrows.
1723         A lot of DataGrid was copied from treeoutline.js. This change
1724         makes the database views use the DataGrid. It will later be
1725         used by the ProfileView.
1726
1727         Reviewed by Adam Roben.
1728
1729         * page/inspector/DataGrid.js: Added. Most copied from treeoutline.js
1730         and modified to work with table elements.
1731         * page/inspector/DatabaseQueryView.js:
1732         (WebInspector.DatabaseQueryView.prototype._queryFinished):
1733         Call DatabasesPanel.dataGridForResult and adds the inline style to
1734         the DataGrid element.
1735         * page/inspector/DatabaseTableView.js:
1736         (WebInspector.DatabaseTableView.prototype._queryFinished):
1737         Call DatabasesPanel.dataGridForResult.
1738         * page/inspector/DatabasesPanel.js:
1739         (WebInspector.DatabasesPanel.prototype._tableForResult): Removed.
1740         (WebInspector.DatabasesPanel.prototype.dataGridForResult): Added.
1741         Similar to the previous _tableForResult function, but makes a DataGrid.
1742         * page/inspector/inspector.css: Changes to the data-grid
1743         style rules.
1744         * WebCore.vcproj/WebCore.vcproj: Add DataGrid.js.
1745         * page/inspector/WebKit.qrc: Ditto.
1746         * page/inspector/inspector.html: Ditto.
1747
1748 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
1749
1750         Reviewed by Adam.
1751
1752         -build fix.
1753
1754         * bindings/js/JSConsoleCustom.cpp:
1755         (WebCore::JSConsole::profile):
1756         * page/Console.cpp:
1757         (WebCore::Console::profile):
1758         * page/Console.h:
1759         * page/Console.idl:
1760
1761 2008-05-19  Alp Toker  <alp@nuanti.com>
1762
1763         Reviewed by Maciej.
1764
1765         GTK+/soup fixes:
1766
1767         Remove the fragment part of the URL since the file backend doesn't
1768         deal with it.
1769
1770         Fix a typo in the cleanup function.
1771
1772         * platform/network/soup/ResourceHandleSoup.cpp:
1773         (WebCore::cleanupGioOperation):
1774         (WebCore::ResourceHandle::startGio):
1775
1776 2008-05-19  Kevin McCullough  <kmccullough@apple.com>
1777
1778         Reviewed by Adam.
1779
1780         <rdar://problem/5770054> JavaScript profiler (10928)
1781         - Send the executing context to the profiler so it can attribute time
1782         correctly to parent functions when calling profile() and profileEnd()
1783         while nested.
1784
1785         * page/Console.cpp:
1786         (WebCore::Console::profile):
1787         (WebCore::Console::profileEnd):
1788         * page/Console.h:
1789
1790 2008-05-19  Alp Toker  <alp@nuanti.com>
1791
1792         Reviewed by Anders and Beth.
1793
1794         http://bugs.webkit.org/show_bug.cgi?id=16495
1795         [GTK] Accessibility support with ATK/AT-SPI
1796
1797         Initial ATK/AT-SPI accessibility support for the GTK+ port.
1798
1799         * GNUmakefile.am:
1800         * page/AccessibilityObject.cpp:
1801         (WebCore::AccessibilityObject::AccessibilityObject):
1802         (WebCore::AccessibilityObject::detach):
1803         * page/AccessibilityObject.h:
1804         * page/gtk/AXObjectCacheAtk.cpp: Added.
1805         (WebCore::AXObjectCache::detachWrapper):
1806         (WebCore::AXObjectCache::attachWrapper):
1807         (WebCore::AXObjectCache::postNotification):
1808         (WebCore::AXObjectCache::postNotificationToElement):
1809         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
1810         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Added.
1811         (WebCore::):
1812         (WebCore::AccessibilityObject::wrapper):
1813         (WebCore::AccessibilityObject::setWrapper):
1814         * page/gtk/AccessibilityObjectWrapperAtk.h: Added.
1815
1816 2008-05-19  Anders Carlsson  <andersca@apple.com>
1817
1818         Reviewed by Adam.
1819
1820         <rdar://problem/5946454>
1821         Support navigator.onLine from HTML5.
1822
1823         Add Windows NetworkStateNotifier implementation using the IP Helper API.
1824
1825         * WebCore.vcproj/WebCore.vcproj:
1826         * platform/network/NetworkStateNotifier.h:
1827         (WebCore::updateState):
1828         * platform/network/win/NetworkStateNotifierWin.cpp: Added.
1829         (WebCore::NetworkStateNotifier::updateState):
1830         (WebCore::NetworkStateNotifier::addressChanged):
1831         (WebCore::NetworkStateNotifier::callAddressChanged):
1832         (WebCore::NetworkStateNotifier::addrChangeCallback):
1833         (WebCore::NetworkStateNotifier::registerForAddressChange):
1834         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1835
1836 2008-05-19  Steve Falkenburg  <sfalken@apple.com>
1837
1838         Disable C4273, C4565 for CSSGrammar.cpp, XPathGrammar.cpp to fix build.
1839         
1840         Reviewed by Adam Roben.
1841
1842         * WebCore.vcproj/WebCore.vcproj:
1843
1844 2008-05-19  Adam Roben  <aroben@apple.com>
1845
1846         Fix Bug 19065: Resources with a space in their URL don't get
1847         error/warning bubbles
1848
1849         <https://bugs.webkit.org/show_bug.cgi?id=19065>
1850
1851         Reviewed by Dan Bernstein.
1852
1853         Test: manual-tests/inspector/errors-with-space in-url.html
1854
1855         * manual-tests/inspector/errors-with-space in-url.html: Added.
1856         * page/Console.cpp:
1857         (WebCore::Console::error):
1858         (WebCore::Console::info):
1859         (WebCore::Console::log):
1860         (WebCore::Console::warn):
1861         Pass the raw URL to the Inspector, not the pretty URL, to match the
1862         URL that was used when initially telling the Inspector about this
1863         resource. We continue to pass the pretty URL to the ChromeClient for
1864         backwards compatibility.
1865
1866 2008-05-19  Stephanie Lewis  <slewis@apple.com>
1867
1868         Reviewed by Darin.
1869
1870         more fast teardown performance work, WebCore plumbing
1871
1872         * page/Chrome.cpp:
1873         (WebCore::Chrome::disableSuddenTermination):
1874         (WebCore::Chrome::enableSuddenTermination):
1875         (WebCore::ChromeClient::disableSuddenTermination):
1876         (WebCore::ChromeClient::enableSuddenTermination):
1877         * page/Chrome.h:
1878         * page/ChromeClient.h:
1879         * page/Page.cpp:
1880         (WebCore::Page::changePendingUnloadEventCount):
1881         (WebCore::Page::changePendingBeforeUnloadEventCount):
1882
1883 2008-05-19  Kuchhal  <kuchal@yahoo.com>
1884
1885         Reviewed by Justin.
1886
1887         <rdar://problem/5863412> Crash when Ctrl C is pressed after a series of specific mouse events (18506)
1888
1889         * editing/markup.cpp:
1890         (WebCore::createMarkup): Null check.
1891
1892 2008-05-19  Chris Fleizach  <cfleizach@apple.com>
1893
1894         Reviewed by Beth Dakin.
1895
1896         <rdar://problem/5912195> CrashTracer: [USER] 1 crash in Mail at -[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]
1897
1898         * page/mac/AccessibilityObjectWrapper.mm:
1899         (visiblePositionForTextMarker):
1900
1901 2008-05-19  Ada Chan  <adachan@apple.com>
1902
1903         Added CookieStorageWin.h/cpp, introducing methods to get/set the current CFHTTPCookieStorageRef.
1904         When setting cookies-related attributes in CFURLRequest, make sure we get them from the
1905         current CFHTTPCookieStorageRef.  Also, set the cookie storage in CFURLRequest.
1906
1907         Reviewed by Steve Falkenburg.
1908
1909         * WebCore.vcproj/WebCore.vcproj:
1910         * platform/network/cf/ResourceHandleCFNet.cpp:
1911         (WebCore::makeFinalRequest):
1912         * platform/network/cf/ResourceRequestCFNet.cpp:
1913         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1914         * platform/network/win/CookieJarCFNetWin.cpp:
1915         (WebCore::setCookies):
1916         (WebCore::cookies):
1917         (WebCore::cookiesEnabled):
1918         * platform/network/win/CookieStorageWin.cpp: Added.
1919         (WebCore::currentCookieStorage):
1920         (WebCore::setCurrentCookieStorage):
1921         * platform/network/win/CookieStorageWin.h: Added.
1922
1923 2008-05-19  Alexey Proskuryakov  <ap@webkit.org>
1924
1925         Reviewed by Darin.
1926
1927         http://bugs.webkit.org/show_bug.cgi?id=18308
1928         SVG Encoding error with fill attribute
1929
1930         This is caused by problems with data: URL loading. Besides what is fixed by this patch,
1931         I filed <rdar://problem/5845875> for CFNetwork.
1932
1933         While at it, fixed a related javascript: URL issue.
1934
1935         Tests: fast/loader/data-url-encoding-html.html
1936                fast/loader/data-url-encoding-svg.html
1937                fast/loader/javascript-url-encoding.html
1938
1939         * platform/KURL.cpp:
1940         (WebCore::KURL::parse): Fix a FIXME, use UTF-8 instead of dropping high bytes. This fixes
1941         javascript: URL handling.
1942         (WebCore::encodeRelativeString): Like mailto: URLs, data: ones are all UTF-8. Restructured
1943         the code to not search for "#" if both parts are to be encoded as UTF-8 anyway.
1944
1945 2008-05-19  Alexey Proskuryakov  <ap@webkit.org>
1946
1947         Reviewed by Darin.
1948
1949         https://bugs.webkit.org/show_bug.cgi?id=18421
1950         <rdar://problem/5857369> XMLHttpRequest does not properly encode & and < in outgoing messages
1951
1952         Test: http/tests/xmlhttprequest/serialize-document.html
1953
1954         * bindings/js/JSXMLHttpRequestCustom.cpp:
1955         (WebCore::JSXMLHttpRequest::send): Use createMarkup() instead of Document::toString().
1956
1957         * dom/Attr.cpp:
1958         * dom/Attr.h:
1959         * dom/Document.cpp:
1960         * dom/Document.h:
1961         * dom/DocumentFragment.cpp:
1962         * dom/DocumentFragment.h:
1963         * dom/Element.cpp:
1964         * dom/Element.h:
1965         * dom/Entity.cpp:
1966         * dom/Entity.h:
1967         * dom/EntityReference.cpp:
1968         * dom/EntityReference.h:
1969         * dom/Node.h:
1970         * dom/Text.cpp:
1971         * dom/Text.h:
1972         * html/HTMLElement.cpp:
1973         * html/HTMLElement.h:
1974         Removed most Node::toString() methods, which were massively wrong, and only used for
1975         XMLHttpRequest::send(). The remanining ones are still used in markup.cpp, but should probably
1976         be folded into it for consistency.
1977
1978 2008-05-19  Anders Carlsson  <andersca@apple.com>
1979
1980         Fix Windows build.
1981         
1982         * plugins/win/PluginViewWin.cpp:
1983         (WebCore::PluginView::userAgentStatic):
1984         (WebCore::PluginView::getValueStatic):
1985         (WebCore::PluginView::getValue):
1986
1987 2008-05-19  Chris Fleizach  <cfleizach@apple.com>
1988
1989         Reviewed by Darin Adler.
1990
1991         <rdar://problem/5935694> AX: crash in text marker range
1992
1993         * page/mac/AccessibilityObjectWrapper.mm:
1994         (textMarkerRangeFromMarkers):
1995
1996 2008-05-19  Darin Adler  <darin@apple.com>
1997
1998         - fix WebKit build
1999
2000         * WebCore.xcodeproj/project.pbxproj: Make CSSReflectionDirection.h "private" instead of "project".
2001
2002 2008-05-19  chris fleizach  <cfleizach@apple.com>
2003
2004         Reviewed by Darin Adler
2005
2006         <rdar://problem/5700830> VO: VoiceOver should fall back to title attr if form element is not labeled
2007
2008         * page/AccessibilityRenderObject.cpp:
2009         (WebCore::AccessibilityRenderObject::title):
2010
2011 2008-05-19  Darin Adler  <darin@apple.com>
2012
2013         Reviewed by Mitz.
2014
2015         - tweak CSSReflectValue, possibly fixing the leaks seen on the buildbot
2016
2017         * WebCore.vcproj/WebCore.vcproj: Added CSSReflectionDirection.h. 
2018         * WebCore.xcodeproj/project.pbxproj: Ditto.
2019         * css/CSSReflectionDirection.h: Added.
2020
2021         * css/CSSComputedStyleDeclaration.cpp:
2022         (WebCore::valueForReflection): Changed to use CSSReflectValue::create.
2023         * css/CSSParser.cpp:
2024         (WebCore::CSSParser::parseReflect): Ditto.
2025
2026         * css/CSSReflectValue.h: Added a create function. Got rid of the setter
2027         functions, which had const PassRefPtr& arguments -- those probably caused
2028         the leaks although I'm not exactly sure why. Made the contructor and all
2029         the data members private.
2030
2031         * rendering/style/RenderStyle.h: Changed to include CSSReflectionDirection.h
2032         instead of CSSReflectValue.h so we can tweak CSSReflectValue without
2033         recompiling the world.
2034
2035 2008-05-19  Holger Hans Peter Freyther  <zecke@selfish.org>
2036
2037         Rubber Stamped by Simon.
2038
2039         Enforce the WebKit Coding Style.
2040
2041         * plugins/PluginView.cpp:
2042         (WebCore::PluginView::load):
2043         (WebCore::PluginView::setValue):
2044         * plugins/gtk/PluginViewGtk.cpp:
2045         (WebCore::PluginView::setFocus):
2046         (WebCore::PluginView::show):
2047         (WebCore::PluginView::hide):
2048         (WebCore::PluginView::attachToWindow):
2049         (WebCore::PluginView::detachFromWindow):
2050         (WebCore::PluginView::getValueStatic):
2051         (WebCore::PluginView::getValue):
2052         * plugins/qt/PluginViewQt.cpp:
2053         (WebCore::PluginView::updateWindow):
2054         (WebCore::PluginView::detachFromWindow):
2055         (WebCore::PluginView::handlePostReadFile):
2056         (WebCore::PluginView::getValueStatic):
2057         (WebCore::PluginView::getValue):
2058
2059 2008-05-14  Marc Ordinas i Llopis  <marc.ordinasillopis@collabora.co.uk>
2060
2061         Reviewed by Holger.
2062
2063         https://bugs.webkit.org/show_bug.cgi?id=18882
2064         https://bugs.webkit.org/show_bug.cgi?id=18892
2065         Based also on work by Chris Lord.
2066         
2067         Provides support for NPAPI plugins that pass NULL as their instance
2068         info. There are two kinds:
2069         - Some call NPN_UserAgent and NPN_GetValue before a PluginView has
2070         been created. For those we provide static versions of those functions.
2071         - Others call NPN_* functions with a NULL instance inside NPP_*
2072         calls, for those we've added extra currentPluginView guards.
2073
2074         * plugins/PluginView.cpp: Add additional currentPluginView guards and
2075         some small style changes.
2076         (WebCore::PluginView::start):
2077         (WebCore::PluginView::performRequest):
2078         (WebCore::PluginView::bindingInstance):
2079         (WebCore::PluginView::handlePost):
2080         * plugins/PluginView.h: Added static versions of NPN_UserAgent and
2081         NPN_GetValue.
2082         * plugins/gtk/PluginViewGtk.cpp: Add additional currentPluginView
2083         guards and some small style changes.
2084         (WebCore::PluginView::setNPWindowRect):
2085         (WebCore::PluginView::stop):
2086         (WebCore::PluginView::userAgentStatic): Added to deal with plugins
2087         that query this before having a PluginView.
2088         (WebCore::PluginView::getValueStatic): Added to deal with plugins
2089         that call this before we have created a PluginView.
2090         (WebCore::PluginView::getValue): Moved some code to getValueStatic.
2091         (WebCore::PluginView::init):
2092         * plugins/npapi.cpp: Call PluginView::userAgentStatic
2093         and PluginView::getValueStatic if no PluginView is
2094         present.
2095         (NPN_UserAgent):
2096         (NPN_GetValue):
2097         * plugins/qt/PluginPackageQt.cpp:
2098         (WebCore::PluginPackage::fetchInfo): Corrected split args because ignoring
2099         empty entries crashed.
2100         (WebCore::PluginPackage::load): Resolve all symbols when loading plugins
2101         to protect against XPCOM dependencies.
2102         * plugins/qt/PluginViewQt.cpp: Add additional currentPluginView guards and
2103         some small style changes.
2104         (WebCore::PluginView::updateWindow):
2105         (WebCore::PluginView::setNPWindowRect):
2106         (WebCore::PluginView::stop):
2107         (WebCore::PluginView::userAgentStatic): Added to deal with plugins
2108         that query this before having a PluginView.
2109         (WebCore::PluginView::handlePostReadFile):
2110         (WebCore::PluginView::getValueStatic): Added to deal with plugins
2111         that call this before we have created a PluginView.
2112         (WebCore::PluginView::getValue): Moved some code to getValueStatic.
2113         (WebCore::PluginView::init): m_needsXEmbed init was moved to constructor.
2114
2115 2008-05-19  Alp Toker  <alp@nuanti.com>
2116
2117         GTK+ build fix on Mac. Conditionalize XP_UNIX use.
2118
2119         * plugins/gtk/PluginPackageGtk.cpp:
2120         (WebCore::PluginPackage::fetchInfo):
2121         (WebCore::PluginPackage::load):
2122         * plugins/gtk/PluginViewGtk.cpp:
2123
2124 2008-05-18  Chris Fleizach  <cfleizach@apple.com>
2125
2126         Reviewed by Darin Adler
2127
2128         <rdar://problem/5942076> WebKit can no longer find URL links with VoiceOVer-U command (19100)
2129
2130         * page/AccessibilityObject.h:
2131
2132 2008-05-18  Darin Adler  <darin@apple.com>
2133
2134         Reviewed by Sam.
2135
2136         - fix <rdar://problem/5943569> crash due to stale ownerNode pointer
2137
2138         Test: fast/dom/StyleSheet/ownerNode-lifetime.html
2139
2140         * bindings/js/JSStyleSheetCustom.cpp:
2141         (WebCore::JSStyleSheet::mark): Added code to mark ownerNode. Includes a comment about how
2142         it would be even better to solve this in the DOM rather than just in the JavaScript binding.
2143
2144         * css/StyleSheet.idl: Added CustomMarkFunction attribute.
2145
2146 2008-05-18  Brady Eidson  <beidson@apple.com>
2147
2148         Reviewed by Sam Weinig
2149
2150         Fix for https://bugs.webkit.org/show_bug.cgi?id=19111
2151         Allow `delete storage.itemName` syntax as an alias for `storage.removeItem("itemName")`
2152
2153         Tests: storage/domstorage/localstorage/delete-removal.html
2154                storage/domstorage/sessionstorage/delete-removal.html
2155
2156         * bindings/js/JSStorageCustom.cpp:
2157         (WebCore::JSStorage::deleteProperty): Only do the delete for non-built in properties
2158         * storage/Storage.idl:
2159
2160 2008-05-17  Sam Weinig  <sam@webkit.org>
2161
2162         Reviewed by Mark Rowe.
2163
2164         Re-factor core setRequestHeader logic into setRequestHeaderInternal.
2165
2166         * xml/XMLHttpRequest.cpp:
2167         (WebCore::XMLHttpRequest::sameOriginRequest):
2168         (WebCore::XMLHttpRequest::setRequestHeader):
2169         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2170         * xml/XMLHttpRequest.h:
2171
2172 2008-05-17  Sam Weinig  <sam@webkit.org>
2173
2174         Reviewed by Mark Rowe.
2175
2176         Differentiate between cancelation errors and generic network error in XHR.
2177
2178         * loader/FrameLoader.cpp:
2179         (WebCore::FrameLoader::requestFromDelegate):
2180         (WebCore::FrameLoader::cancelledError):
2181         * platform/network/ResourceErrorBase.h:
2182         (WebCore::ResourceErrorBase::setIsCancelation):
2183         (WebCore::ResourceErrorBase::isCancelation):
2184         (WebCore::ResourceErrorBase::ResourceErrorBase):
2185         Add state that differentiates between errors created by cancelation and those made
2186         by all other generic network errors as this differentiation is needed by some specs.
2187
2188         * xml/XMLHttpRequest.cpp:
2189         (WebCore::XMLHttpRequest::open):
2190         (WebCore::XMLHttpRequest::loadRequestSynchronously):
2191         (WebCore::XMLHttpRequest::clearResponseEntityBody):
2192         (WebCore::XMLHttpRequest::genericError):
2193         (WebCore::XMLHttpRequest::networkError):
2194         (WebCore::XMLHttpRequest::abortError):
2195         (WebCore::XMLHttpRequest::didFail):
2196         * xml/XMLHttpRequest.h:
2197         * xml/XMLHttpRequestException.h:
2198         (WebCore::XMLHttpRequestException::):
2199         * xml/XMLHttpRequestException.idl:
2200         Add ABORT_ERR. This error cannot be raised with the current WebKit architecture
2201         as it requires the ability to cancel a synchronous XHR, which we cannot currently
2202         do.  It may be possible in the future though.
2203
2204 2008-05-17  Mark Rowe  <mrowe@apple.com>
2205
2206         Reviewed by Sam Weinig.
2207
2208         Including wtf/Platform.h or using any of the macros it defines in headers that may be
2209         included from outside of the WebKit project causes any project using those headers to
2210         fail to build.
2211
2212         * page/mac/WebDashboardRegion.h:
2213
2214 2008-05-17  Sam Weinig  <sam@webkit.org>
2215
2216         Reviewed by Brady Eidson.
2217
2218         Re-factor send() logic a little to make adding cross-site requests easier.
2219
2220         * xml/XMLHttpRequest.cpp:
2221         (WebCore::XMLHttpRequest::send):
2222         (WebCore::XMLHttpRequest::sameOriginRequest):
2223         (WebCore::XMLHttpRequest::loadRequestSynchronously):
2224         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
2225         * xml/XMLHttpRequest.h:
2226
2227 2008-05-16  Anders Carlsson  <andersca@apple.com>
2228
2229         Reviewed by Mitz.
2230
2231         Copy appcache headers.
2232         
2233         * WebCore.vcproj/WebCore.vcproj:
2234
2235 2008-05-16  Antti Koivisto  <antti@apple.com>
2236
2237         Reviewed by Anders.
2238         
2239         Fix <rdar://problem/5934400> 
2240         Movie controller does not update on first load of http://www.apple.com/getamac/ads/
2241         
2242         The issue is that we execute scripts while there are still pending stylesheet loads.
2243         If the script depends on a stylesheet having been applied it may fail.
2244         
2245         This will make external script execution block on external stylesheet loads. A full
2246         fix (as discussed with Hyatt) will also need to block inline script execution.
2247
2248         Test: http/tests/local/stylesheet-and-script-load-order-http.html
2249
2250         * html/HTMLTokenizer.cpp:
2251         (WebCore::HTMLTokenizer::notifyFinished):
2252
2253 2008-05-16  chris fleizach  <cfleizach@apple.com>
2254
2255         Reviewed by Jon Honeycutt
2256
2257         <rdar://problem/5582483> Mail compose area needs to allow AXValue to be settable
2258
2259         * page/AccessibilityRenderObject.cpp:
2260         (WebCore::AccessibilityRenderObject::isReadOnly):
2261         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
2262
2263 2008-05-16  Stephanie Lewis  <slewis@apple.com>
2264
2265         Reviewed by Maciej.
2266
2267         track onbeforeunlaod event counts. Pretty much identical to unload event tracking.
2268         Also rename methods from onunload tracking to be more clear.
2269
2270         increment/decrement event counts when onunload and onbeforeunload events are added/removed
2271         * dom/Document.cpp:
2272         (WebCore::Document::removeHTMLWindowEventListener):
2273         (WebCore::Document::addWindowEventListener):
2274         (WebCore::Document::removeWindowEventListener):
2275         (WebCore::Document::addPendingFrameUnloadEventCount):
2276         (WebCore::Document::removePendingFrameUnloadEventCount):
2277         (WebCore::Document::addPendingFrameBeforeUnloadEventCount):
2278         (WebCore::Document::removePendingFrameBeforeUnloadEventCount):
2279         * dom/Document.h:
2280         
2281         clear onunload count after unload events are dispatched
2282         * loader/FrameLoader.cpp:
2283         (WebCore::FrameLoader::stopLoading):
2284
2285         track onunload and onbeforeunload event counts for each frame
2286         * page/EventHandler.cpp:
2287         (WebCore::EventHandler::EventHandler):
2288         (WebCore::EventHandler::addPendingFrameUnloadEventCount):
2289         (WebCore::EventHandler::removePendingFrameUnloadEventCount):
2290         (WebCore::EventHandler::clearPendingFrameUnloadEventCount):
2291         (WebCore::EventHandler::pendingFrameBeforeUnloadEventCount):
2292         (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount):
2293         (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount):
2294         (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
2295         * page/EventHandler.h:
2296         
2297         clear unbeforeunload count after unbeforeunload events are detached
2298         * page/Frame.cpp:
2299         (WebCore::Frame::shouldClose):
2300
2301         track total event count at page level
2302         * page/Page.cpp:
2303         (WebCore::Page::Page):
2304         (WebCore::Page::changePendingUnloadEventCount):
2305         (WebCore::Page::pendingBeforeUnloadEventCount):
2306         (WebCore::Page::changePendingBeforeUnloadEventCount):
2307         * page/Page.h:
2308
2309 2008-05-16  Anders Carlsson  <andersca@apple.com>
2310
2311         Reviewed by Mitz.
2312
2313         <rdar://problem/5787788>
2314         REGRESSION: fast/loader/xmlhttprequest-missing-file-exception.html fails on Windows.
2315         
2316         Replicate the Mac behavior when a sync load fails.
2317         
2318         * platform/network/cf/ResourceHandleCFNet.cpp:
2319         (WebCore::ResourceHandle::loadResourceSynchronously):
2320
2321 2008-05-16  Anders Carlsson  <andersca@apple.com>
2322
2323         Reviewed by Brady.
2324
2325         Parse and set the headers on the response.
2326
2327         * loader/appcache/ApplicationCacheStorage.cpp:
2328         (WebCore::ApplicationCacheStorage::store):
2329         (WebCore::parseHeader):
2330         (WebCore::parseHeaders):
2331         (WebCore::ApplicationCacheStorage::loadCache):
2332
2333 2008-05-16  Timothy Hatcher  <timothy@apple.com>
2334
2335         Adds the "this" object to the Local scope section of the
2336         Scope Variables pane.
2337
2338         <rdar://problem/5774773> Web Inspector doesn't show the "this"
2339         object in its variables list (10438)
2340
2341         Reviewed by Oliver Hunt.
2342
2343         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2344         (WebCore::JSJavaScriptCallFrame::thisObject): Returns the thisObject
2345         of the JavaScriptCallFrame impl. Returns jsNull if the impl is invalid.
2346         * page/JavaScriptCallFrame.cpp:
2347         (WebCore::JavaScriptCallFrame::thisObject): Return the thisValue from
2348         the ExecState. Return 0 if m_exec is null.
2349         * page/JavaScriptCallFrame.h:
2350         * page/JavaScriptCallFrame.idl: Add thisObject.
2351         * page/inspector/ObjectPropertiesSection.js:
2352         (WebInspector.ObjectPropertiesSection): Adds two new arguments.
2353         The ignoreHasOwnProperty tells the section to show all properties,
2354         including inherited ones. And extraProperties is an object of
2355         additional properties to show.
2356         (WebInspector.ObjectPropertiesSection.prototype): Honor the
2357         extraProperties and ignoreHasOwnProperty properties.
2358         * page/inspector/ScopeChainSidebarPane.js:
2359         (WebInspector.ScopeChainSidebarPane.prototype.update): Add a this
2360         property to an extra object that is passed to the ObjectPropertiesSection.
2361         Also pass true for ignoreHasOwnProperty since we want to show all properties.
2362
2363 2008-05-16  Anders Carlsson  <andersca@apple.com>
2364
2365         Reviewed by Brady.
2366
2367         Add mimeType and textEncodingName to the resource table.
2368         
2369         * loader/appcache/ApplicationCacheStorage.cpp:
2370         (WebCore::ApplicationCacheStorage::openDatabase):
2371         (WebCore::ApplicationCacheStorage::store):
2372         (WebCore::ApplicationCacheStorage::loadCache):
2373
2374 2008-05-16  Kevin McCullough  <kmccullough@apple.com>
2375
2376         Reviewed by Tim.
2377
2378         <rdar://problem/5770054> JavaScript profiler (10928)
2379         Use a Vector instead of a Deque since we don't use the extra capabilities
2380         of the Deque.
2381
2382         * page/JavaScriptProfileNode.cpp:
2383         (WebCore::getChildren):
2384         (WebCore::toJS):
2385
2386 2008-05-16  Anders Carlsson  <andersca@apple.com>
2387
2388         Reviewed by Brady.
2389
2390         Add a version table to the database.
2391
2392         * loader/appcache/ApplicationCacheStorage.cpp:
2393         (WebCore::ApplicationCacheStorage::verifySchemaVersion):
2394         (WebCore::ApplicationCacheStorage::openDatabase):
2395         * loader/appcache/ApplicationCacheStorage.h:
2396
2397 2008-05-16  Timothy Hatcher  <timothy@apple.com>
2398
2399         Adds the ability to evaluate expressions in the local scope
2400         of the selected call frame.
2401
2402         https://bugs.webkit.org/show_bug.cgi?id=19052
2403
2404         Reviewed by Geoff Garen.
2405
2406         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2407         (WebCore::JSJavaScriptCallFrame::evaluate): Pass the exception
2408         from evaluate to the calling ExecState.
2409         * page/JavaScriptCallFrame.cpp:
2410         (WebCore::JavaScriptCallFrame::evaluate): Added an exception out
2411         argument. Simplified the code by calling KJS:eval directly.
2412         * page/JavaScriptCallFrame.h: Change evalutate to take an exception
2413         out argument.
2414         * page/inspector/Console.js: Check if the debugger is paused and
2415         call evaluateInSelectedCallFrame on the Scripts panel.
2416         * page/inspector/ScriptsPanel.js: Added a paused getter and
2417         evaluateInSelectedCallFrame which does the evaluation and updates
2418         the scope variables pane afterwards.
2419
2420 2008-05-16  Timothy Hatcher  <timothy@apple.com>
2421
2422         Fixed the bug where the Inspector node highlight would not show
2423         in the correct place for nodes in frames.
2424
2425         <rdar://problem/5712834> Elements in iframes are highlighted incorrectly (14408)
2426
2427         Reviewed by John Sullivan.
2428
2429         * page/InspectorController.cpp:
2430         (WebCore::convertFromFrameToMainFrame): Helper function to convert
2431         IntRect coordinates from one frame to the main frame.
2432         (WebCore::InspectorController::drawNodeHighlight): Call the
2433         convertFromFrameToMainFrame helper for all the rects we get from
2434         the node since they are in the owner frame's coordinate space.
2435
2436 2008-05-16  Julien Chaffraix  <jchaffraix@webkit.org>
2437
2438         Reviewed by Eric.
2439
2440         Preparatory work for bug 9191: JS*ElementWrapperFactory should be autogenerated
2441
2442         Make video tags use a header guard so that make_names.pl for factory generation.
2443
2444         - Add video tag guard in HTMLTagNames.in & give an extraDefines parameter to make_names.pl
2445         when generating HTMLNames.
2446
2447         - Modify the different build systems to accomodate the new parameter.
2448
2449         - Small make_names.pl clean up (mainly code generated coding style issue).
2450
2451         * DerivedSources.make: Add HTML_FLAGS and pass it to make_names.pl
2452         if it is defined (similar to SVG) 
2453
2454         * GNUmakefile.am: Add HTML_FEATURES & HTML_FLAGS and pass it to
2455         make_names.pl if HTML_FLAGS is defined.
2456
2457         * WebCore.pro: Pass $${DEFINES} to make_names.pl.
2458
2459         * dom/make_names.pl: 
2460         * html/HTMLElement.cpp:
2461         (WebCore::inlineTagList): Add ENABLE(VIDEO) guard.
2462         * html/HTMLTagNames.in: Ditto.
2463
2464 2008-05-16  Anders Carlsson  <andersca@apple.com>
2465
2466         Reviewed by Mitz.
2467
2468         Fire progress events.
2469         
2470         * loader/appcache/ApplicationCacheGroup.cpp:
2471         (WebCore::ApplicationCacheGroup::startLoadingEntry):
2472
2473 2008-05-16  Anders Carlsson  <andersca@apple.com>
2474
2475         Reviewed by John.
2476
2477         Handle the case where the main resource load is cancelled while the cache attempt is in progress.
2478         
2479         * loader/DocumentLoader.cpp:
2480         (WebCore::DocumentLoader::mainReceivedError):
2481         Tell the group that the main resource failed to load.
2482         
2483         * loader/appcache/ApplicationCacheGroup.cpp:
2484         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
2485         Call cacheUpdateFailed.
2486         
2487         (WebCore::ApplicationCacheGroup::cacheUpdateFailed):
2488         Stop loading if the update failed.
2489         
2490         * loader/appcache/ApplicationCacheGroup.h:
2491
2492 2008-05-16  Chris Fleizach  <cfleizach@apple.com>
2493
2494         Reviewed by Alice Liu
2495
2496         <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
2497
2498         * WebCore.base.exp:
2499         * editing/VisiblePosition.cpp:
2500         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
2501         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
2502         * page/AXObjectCache.cpp:
2503         * page/AXObjectCache.h:
2504         (WebCore::AXObjectCache::enableEnhancedUserInterfaceAccessibility):
2505         (WebCore::AXObjectCache::accessibilityEnabled):
2506         (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled):
2507         * page/AccessibilityRenderObject.cpp:
2508         (WebCore::AccessibilityRenderObject::visiblePositionRange):
2509         (WebCore::AccessibilityRenderObject::doSetAXSelectedTextMarkerRange):
2510         (WebCore::AccessibilityRenderObject::addChildren):
2511         (WebCore::AccessibilityRenderObject::actionVerb):
2512         * page/EventHandler.cpp:
2513         (WebCore::EventHandler::handleKeyboardSelectionMovement):
2514         (WebCore::EventHandler::defaultKeyboardEventHandler):
2515         * page/EventHandler.h:
2516
2517 2008-05-15  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2518
2519         Reviewed by Simon.
2520
2521         Since WebKitGtk is fully using autotools now, clean-up the .pro/.pri files
2522         from gtk-port.
2523
2524         * WebCore.pro:
2525
2526 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
2527
2528         Fix the Gtk build.
2529
2530         * GNUmakefile.am: Added rendering/style to the include paths.
2531
2532 2008-05-16  Simon Hausmann  <hausmann@webkit.org>
2533
2534         Fix the Qt build.
2535
2536         * WebCore.pro: Added rendering/style to the include paths
2537         * page/AXObjectCache.cpp:
2538         (WebCore::AXObjectCache::handleActiveDescendantChanged): Don't compile
2539         this method unless a17n is enabled.
2540
2541 2008-05-15  Rob Buis  <buis@kde.org>
2542
2543         Reviewed by Dave Hyatt.
2544
2545         https://bugs.webkit.org/show_bug.cgi?id=17433
2546         getComputedStyle() -> clip returns empty string
2547
2548         Make getComputedStyle return a shape value for clip
2549         if it is set.
2550
2551         Tests: fast/css/getPropertyValue-clip.html
2552
2553         * css/CSSComputedStyleDeclaration.cpp:
2554         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2555
2556 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
2557
2558         wx build fix. Add rendering/style to includes dir.
2559
2560         * webcore-base.bkl:
2561
2562 2008-05-15  Alice Liu  <alice.liu@apple.com>
2563
2564         Reviewed by Beth Dakin.
2565
2566         Fixed <rdar://problem/5882283> Implement ARIA aria-activedescendant
2567         Also added support for aria roles listbox and option, and aria-selected, 
2568         and aria-multiselectable for listboxes
2569
2570         * dom/Element.cpp:
2571         (WebCore::Element::attributeChanged):
2572         * dom/Element.h:
2573         * dom/StyledElement.cpp:
2574         (WebCore::StyledElement::attributeChanged):
2575         * html/HTMLAttributeNames.in:
2576         * page/AXObjectCache.cpp:
2577         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2578         * page/AXObjectCache.h:
2579         (WebCore::AXObjectCache::accessibilityEnabled):
2580         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2581         * page/AccessibilityListBox.cpp:
2582         (WebCore::AccessibilityListBox::selectedChildren):
2583         (WebCore::AccessibilityListBox::visibleChildren):
2584         * page/AccessibilityListBox.h:
2585         * page/AccessibilityListBoxOption.h:
2586         (WebCore::AccessibilityListBoxOption::selectedChildren):
2587         (WebCore::AccessibilityListBoxOption::visibleChildren):
2588         * page/AccessibilityObject.cpp:
2589         * page/AccessibilityObject.h:
2590         (WebCore::AccessibilityObject::isListBox):
2591         (WebCore::AccessibilityObject::shouldFocusActiveDescendant):
2592         (WebCore::AccessibilityObject::activeDescendant):
2593         (WebCore::AccessibilityObject::handleActiveDescendantChanged):
2594         * page/AccessibilityRenderObject.cpp:
2595         (WebCore::AccessibilityRenderObject::title):
2596         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
2597         (WebCore::AccessibilityRenderObject::focusedUIElement):
2598         (WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
2599         (WebCore::AccessibilityRenderObject::activeDescendant):
2600         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2601         (WebCore::RoleEntry::):
2602         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
2603         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
2604         (WebCore::AccessibilityRenderObject::selectedChildren):
2605         (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
2606         (WebCore::AccessibilityRenderObject::visibleChildren):
2607         * page/AccessibilityRenderObject.h:
2608         (WebCore::AccessibilityRenderObject::isDetached):
2609         * page/mac/AccessibilityObjectWrapper.mm:
2610         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2611
2612 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2613
2614         Adds an error and warning count indicator at the bottom right in the
2615         Inspector's status bar.
2616
2617         https://bugs.webkit.org/show_bug.cgi?id=18650
2618
2619         Initial implementation by Adam Roben.
2620         Reviewed by Sam Weinig.
2621
2622         Test: manual-tests/inspector/error-warning-count.html
2623
2624         * English.lproj/localizedStrings.js: Added new strings.
2625         * manual-tests/inspector/error-warning-count.html: Added.
2626         * page/inspector/Console.js:
2627         (WebInspector.Console.prototype.show): Don't do anything if visible.
2628         (WebInspector.Console.prototype.hide): Don't do anything if hidden.
2629         Temporally set properties and classes to mimic the post-animation
2630         values so panels like Elements in their updateStatusBarItems call will
2631         size things to fit the final location. 
2632         * page/inspector/ElementsPanel.js:
2633         (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes):
2634         Account for the #error-warning-count width when sizing breadcrumbs. 
2635         * page/inspector/Resource.js:
2636         (WebInspector.Resource.prototype.set errors): Update the global error count.
2637         (WebInspector.Resource.prototype.set warnings): Update the global warning count.
2638         * page/inspector/inspector.css: Make .hidden's display property
2639         !important to ensure things really hide, and added styling for the new
2640         #error-warning-count element.
2641         * page/inspector/inspector.html: Added an #error-warning-count div
2642         in the #anchored-status-bar-items div.
2643         * page/inspector/inspector.js:
2644         (WebInspector.get errors): Added.
2645         (WebInspector.set errors): Added. Calls _updateErrorAndWarningCounts.
2646         (WebInspector.get warnings): Added.
2647         (WebInspector.set warnings): Added. Calls _updateErrorAndWarningCounts.
2648         (WebInspector._updateErrorAndWarningCounts): Added. Update the
2649         #error-warning-count div with the current error/warning count.
2650         (WebInspector.loaded): Add a click event listener to the
2651         #error-warning-count element that will show the Console. Call
2652         _updateErrorAndWarningCounts to display the initial error/warning counts.
2653
2654 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2655
2656         Fixes a bug in the view source parsing of text within <script>,
2657         <style>, <xmp>, <textarea> and other special tags. The text was
2658         being parsed as HTML and would be syntax highlighted if a "<"
2659         was encountered.
2660
2661         <rdar://problem/5790805> Inspector's source view missing some words,
2662         doubles others in JS source in <script> tag (17752)
2663
2664         Reviewed by Dave Hyatt.
2665
2666         Added test: fast/frames/viewsource-plain-text-tags.html
2667
2668         * html/HTMLTokenizer.cpp:
2669         (WebCore::HTMLTokenizer::scriptHandler): Set scriptCodeSize and
2670         scriptCodeResync to zero before an early return in view source mode.
2671         This was causing text from a previous script tag to show up in
2672         then next style tag.
2673         (WebCore::HTMLTokenizer::parseTag): Enter an if block in view source
2674         mode even if n is null. The n is property guarded in other places
2675         and not used by view source mode. Removes a redundant null check on n.
2676         Add a new null check of n before setting scriptSrcCharset. Other code
2677         in HTMLTokenizer is already guarded for this code path. 
2678
2679 2008-05-15  Timothy Hatcher  <timothy@apple.com>
2680
2681         Changes the Web Inspector node highlight to be less aggressive
2682         and only highlight when hovering over the selected node in the DOM
2683         tree or breadcrumbs. You can highlight on hover for any node if
2684         you hold down the Alt/Option key while hovering.
2685
2686         Reviewed by Kevin McCullough.
2687
2688         * page/inspector/ElementsPanel.js:
2689         * page/inspector/inspector.js:
2690
2691 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2692
2693         Fix windows build
2694
2695         * loader/FrameLoader.cpp:
2696         (WebCore::FrameLoader::stopLoading):
2697
2698 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2699
2700         Reviewed by Anders.
2701         
2702         export a symbol needed for fast teardown
2703
2704         * WebCore.base.exp:
2705
2706 2008-05-15  Stephanie Lewis  <slewis@apple.com>
2707
2708         Reviewed by Anders.
2709
2710         Keep track on pending unload event counts
2711
2712         No change in behavior so no new tests, but I am dumping the 
2713         unload event count to track the new variable.
2714
2715         * WebCore.base.exp:
2716
2717         increment/decrement the count when an event is added/removed
2718         * dom/Document.cpp:
2719         (WebCore::Document::removeHTMLWindowEventListener):
2720         (WebCore::Document::addWindowEventListener):
2721         (WebCore::Document::removeWindowEventListener):
2722         (WebCore::Document::setPendingFrameUnloadEventCount):
2723         * dom/Document.h:
2724
2725         set the count to 0 for each frame after the unload event has been dispatched
2726         * loader/FrameLoader.cpp:
2727         (WebCore::FrameLoader::stopLoading):
2728
2729         keep track of the number of pending unload events for the eventHandler's frame
2730         * page/EventHandler.cpp:
2731         (WebCore::EventHandler::EventHandler):
2732        (WebCore::EventHandler::pendingFrameUnloadEventCount):
2733         (WebCore::EventHandler::setPendingFrameUnloadEventCount):
2734         * page/EventHandler.h:
2735
2736         keep track of the total number of pending unload events for all of the frames
2737         * page/Page.cpp:
2738         (WebCore::Page::Page):
2739         (WebCore::Page::pendingUnloadEventCount):
2740         (WebCore::Page::setPendingUnloadEventCount):
2741         * page/Page.h:
2742
2743 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2744
2745         Fix build.
2746
2747         * WebCore.vcproj/WebCore.vcproj:
2748
2749 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2750
2751         Fix build.
2752
2753         * WebCore.vcproj/WebCore.vcproj:
2754
2755 2008-05-15  Steve Falkenburg  <sfalken@apple.com>
2756
2757         Fix build.
2758
2759         * WebCore.vcproj/WebCore.vcproj:
2760
2761 2008-05-15  David Kilzer  <ddkilzer@apple.com>
2762
2763         Bug 19085: font-family: initial sets font-family differently than font: initial
2764
2765         <https://bugs.webkit.org/show_bug.cgi?id=19085>
2766         <rdar://problem/5939391>
2767
2768         Reviewed by David Hyatt.
2769
2770         Test: fast/css/font-family-initial.html
2771
2772         * css/CSSStyleSelector.cpp:
2773         (WebCore::CSSStyleSelector::applyProperty): Don't set family if first
2774         family of initial font description is empty.
2775
2776 2008-05-15  David Hyatt  <hyatt@apple.com>
2777
2778         Move RenderStyle into a new subdirectory, rendering/style/, in preparation for breaking it up into
2779         a bunch of smaller files.
2780
2781         Reviewed by Dan Bernstein
2782
2783         * GNUmakefile.am:
2784         * WebCore.pro:
2785         * WebCore.vcproj/WebCore.vcproj:
2786         * WebCore.xcodeproj/project.pbxproj:
2787         * WebCoreSources.bkl:
2788         * rendering/RenderStyle.cpp: Removed.
2789         * rendering/RenderStyle.h: Removed.
2790         * rendering/style: Added.
2791         * rendering/style/RenderStyle.cpp: Copied from rendering/RenderStyle.cpp.
2792         * rendering/style/RenderStyle.h: Copied from rendering/RenderStyle.h.
2793
2794 2008-05-15  David Kilzer  <ddkilzer@apple.com>
2795
2796         Fix leaks when stopping a page from loading
2797
2798         Patch suggested by Antti.  Reviewed by Antti.
2799
2800         * loader/DocLoader.cpp:
2801         (WebCore::DocLoader::clearPreloads): If a resource is in m_preloads but
2802         never made it to the cache, delete it to prevent it from leaking.
2803
2804 2008-05-15  Julien Chaffraix  <jchaffraix@webkit.org>
2805
2806         Reviewed by Darin.
2807
2808         https://bugs.webkit.org/show_bug.cgi?id=13942
2809         ASSERTION FAILED: !attrName.contains('/') in HTMLTokenizer.cpp:132 when loading http://bamanzi.blogeden.cn/
2810
2811         In HTML, when an attribute was null (for example when we parse '="somevalue"'
2812         (attribute forgotten or there is a space between the attribute and the '=')),
2813         the fallback was to assign the value to the attribute. However if the value was
2814         a url or did contain a '/', we would trigger the assertion.
2815
2816         To avoid that, we check the value before assigning it now and do not assign it
2817         if it means adding a '/'.
2818
2819         Test: fast/parser/assertion-empty-attribute.html
2820
2821         * html/HTMLTokenizer.cpp:
2822         (WebCore::HTMLTokenizer::parseTag): Add check for '/' in value before
2823         assigning it to an attribute when the attribute is null.
2824
2825 2008-05-15  Kevin Ollivier  <kevino@theolliviers.com>
2826
2827         wx build fix for recent breakages. Add EventLoopWx.cpp, update the Bakefiles,
2828         and add stubs for new Plugins functions. Also move plugin functions outside of
2829         TemporaryLinkStubs.cpp so that they are more noticeable.
2830
2831         * WebCoreSources.bkl:
2832         * platform/wx/EventLoopWx.cpp: Added.
2833         (WebCore::EventLoop::cycle):
2834         * platform/wx/TemporaryLinkStubs.cpp:
2835         * plugins/wx: Added.
2836         * plugins/wx/PluginDataWx.cpp: Added.
2837         (WebCore::PluginData::initPlugins):
2838         (WebCore::PluginData::refresh):
2839         * plugins/wx/PluginDatabaseWx.cpp: Added.
2840         (WebCore::PluginDatabase::getPluginPathsInDirectories):
2841         (WebCore::PluginDatabase::defaultPluginDirectories):
2842         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2843         * plugins/wx/PluginPackageWx.cpp: Added.
2844         (WebCore::PluginPackage::determineQuirks):
2845         (WebCore::PluginPackage::fetchInfo):
2846         (WebCore::PluginPackage::load):
2847         (WebCore::PluginPackage::hash):
2848         (WebCore::PluginPackage::equal):
2849         (WebCore::PluginPackage::compareFileVersion):
2850         * plugins/wx/PluginViewWx.cpp: Added.
2851         (WebCore::PluginView::updateWindow):
2852         (WebCore::PluginView::setFocus):
2853         (WebCore::PluginView::show):
2854         (WebCore::PluginView::hide):
2855         (WebCore::PluginView::paint):
2856         (WebCore::PluginView::handleKeyboardEvent):
2857         (WebCore::PluginView::handleMouseEvent):
2858         (WebCore::PluginView::setParent):
2859         (WebCore::PluginView::setNPWindowRect):
2860         (WebCore::PluginView::attachToWindow):
2861         (WebCore::PluginView::detachFromWindow):
2862         (WebCore::PluginView::stop):
2863         (WebCore::PluginView::userAgent):
2864         (WebCore::PluginView::handlePostReadFile):
2865         (WebCore::PluginView::getValue):
2866         (WebCore::PluginView::invalidateRect):
2867         (WebCore::PluginView::invalidateRegion):
2868         (WebCore::PluginView::forceRedraw):
2869         (WebCore::PluginView::~PluginView):
2870         (WebCore::PluginView::init):
2871         * webcore-wx.bkl:
2872
2873 2008-05-15  Adam Treat  <treat@kde.org>
2874
2875         Reviewed by Simon.
2876
2877         Don't try to setCompositionMode for devices that do not support PorterDuff
2878
2879         * platform/graphics/qt/GraphicsContextQt.cpp:
2880         (WebCore::TransparencyLayer::TransparencyLayer):
2881         (WebCore::GraphicsContext::strokeRect):
2882         (WebCore::GraphicsContext::clip):
2883
2884 2008-05-15  Adele Peterson  <adele@apple.com>
2885
2886         Reviewed and landed by Alexey.
2887
2888         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
2889
2890         * WebCore.base.exp: Exported TextIterator methods.
2891
2892 2008-05-15  Simon Hausmann  <hausmann@webkit.org>
2893
2894         Fix the Qt build by adding NetworkStateNotifier.cpp to the build.
2895
2896         * WebCore.pro:
2897
2898 2008-05-14  Dan Bernstein  <mitz@apple.com>
2899
2900         Reviewed by Mark Rowe.
2901
2902         - fix <rdar://problem/5907633> Memory corruption after closing a document that uses box-reflect
2903
2904         Test: fast/reflections/teardown-crash.html
2905
2906         * rendering/RenderLayer.cpp:
2907         (WebCore::RenderLayer::~RenderLayer): Changed to not call removeLayers()
2908         on the reflection if the document is being destroyed, because in that
2909         case the layer tree is not being maintained.
2910
2911 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2912
2913         Reviewed by Tim.
2914
2915         <rdar://problem/5770054> JavaScript profiler (10928)
2916         - Expose the new Profiler functions to the WebInspector.
2917
2918         * page/JavaScriptProfileNode.cpp:
2919         (WebCore::getTotalPercent):
2920         (WebCore::getSelfPercent):
2921         (WebCore::ProfileNodeClass):
2922
2923 2008-05-14  Timothy Hatcher  <timothy@apple.com>
2924
2925         Fixes a crash in JavaScriptDebugServer::returnEvent when debugging
2926         code that contains an eval. This change makes stepping into eval
2927         code work as expected.
2928
2929         http://bugs.webkit.org/show_bug.cgi?id=19038
2930
2931         Reviewed by Kevin McCullough.
2932
2933         Tested with: manual-tests/inspector/returnEvent-crash.html
2934
2935         * manual-tests/inspector/returnEvent-crash.html: Added.
2936         * page/JavaScriptDebugServer.cpp:
2937         (WebCore::JavaScriptDebugServer::sourceParsed): Adds #ifdefed
2938         debugging code to prevent the sourceID and URL.
2939         (WebCore::updateCurrentCallFrame): Added. A helper function that
2940         is called from all 4 of the debugger hooks below. This function will
2941         update and/or create JavaScriptCallFrames to match the exec state,
2942         sourceID and lineNumber passed into it. Contains #ifdefed debugging
2943         code that was helpful while fixing this bug.
2944         (WebCore::JavaScriptDebugServer::callEvent): Call updateCurrentCallFrame
2945         before pauseIfNeeded.
2946         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
2947         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
2948         (WebCore::JavaScriptDebugServer::exception): Ditto.
2949
2950 2008-05-14  Alp Toker  <alp@nuanti.com>
2951
2952         GTK+ build fix for r33457. Add NetworkStateNotifier.cpp to the build.
2953
2954         * GNUmakefile.am:
2955
2956 2008-05-14  Alp Toker  <alp@nuanti.com>
2957
2958         GTK+ build fix. Include value.h from kjs, not JavaScriptCore.
2959
2960         * page/JavaScriptProfile.cpp:
2961         * page/JavaScriptProfileNode.cpp:
2962
2963 2008-05-14  Adam Roben  <aroben@apple.com>
2964
2965         Windows release build fix
2966
2967         * WebCore.vcproj/WebCore.vcproj: Make sure the warnings we disable on
2968         XPathGrammar.cpp are disabled for all configurations, not just
2969         Debug_Internal.
2970
2971 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
2972
2973         Reviewed by Sam.
2974
2975         <rdar://problem/5770054> JavaScript profiler (10928)
2976         - Rename FunctionCallProfile to ProfileNode
2977
2978         * ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
2979         * ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
2980         * GNUmakefile.am:
2981         * WebCore.pro:
2982         * WebCore.vcproj/WebCore.vcproj:
2983         * WebCore.xcodeproj/project.pbxproj:
2984         * WebCoreSources.bkl:
2985         * page/JavaScriptFunctionCallProfile.cpp: Removed.
2986         * page/JavaScriptFunctionCallProfile.h: Removed.
2987         * page/JavaScriptProfile.cpp:
2988         * page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp.
2989         (WebCore::ProfileNodeCache):
2990         (WebCore::getFunctionName):
2991         (WebCore::getTotalTime):
2992         (WebCore::getSelfTime):
2993         (WebCore::getNumberOfCalls):
2994         (WebCore::getChildren):
2995         (WebCore::finalize):
2996         (WebCore::ProfileNodeClass):
2997         (WebCore::toJS):
2998         * page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
2999
3000 2008-05-13  Beth Dakin  <bdakin@apple.com>
3001
3002         Reviewed by Brady.
3003
3004         This patch adds support for the ARIA progressbar role and the 
3005         following ARIA states (ie HTML attributes): aria-checked, aria-
3006         level, aria-pressed, aria-valuenow, aria-valuemin, and aria-
3007         valuemax.
3008
3009         * html/HTMLAttributeNames.in:
3010         * page/AccessibilityObject.h:
3011         (WebCore::AccessibilityObject::isProgressIndicator):
3012         (WebCore::AccessibilityObject::valueForRange):
3013         (WebCore::AccessibilityObject::maxValueForRange):
3014         (WebCore::AccessibilityObject::minValueForRange):
3015         * page/AccessibilityRenderObject.cpp:
3016         (WebCore::AccessibilityRenderObject::isProgressIndicator):
3017         (WebCore::AccessibilityRenderObject::isPressed): Check the aria-
3018         pressed attribute if this is an ARIA button.
3019         (WebCore::AccessibilityRenderObject::headingLevel): Check the aria-
3020         level attribute if this is an ARIA heading.
3021         (WebCore::AccessibilityRenderObject::intValue): Check the aria-
3022         checked attribute if this is an ARIA radio button or checkbox.
3023         (WebCore::AccessibilityRenderObject::valueForRange):
3024         (WebCore::AccessibilityRenderObject::maxValueForRange):
3025         (WebCore::AccessibilityRenderObject::minValueForRange):
3026         (WebCore::RoleEntry::):
3027         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
3028         * page/AccessibilityRenderObject.h:
3029         * page/mac/AccessibilityObjectWrapper.mm:
3030         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3031         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
3032
3033 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
3034
3035         Reviewed by John.
3036
3037         -<rdar://problem/5770054> JavaScript profiler (10928)
3038         Use the FunctionCallProfile's new total and self time functions.
3039
3040         * page/JavaScriptFunctionCallProfile.cpp:
3041         (WebCore::getTotalTime):
3042         (WebCore::getSelfTime):
3043
3044 2008-05-14  Anders Carlsson  <andersca@apple.com>
3045
3046         Reviewed by Adam.
3047
3048         Don't try to store the resource data if it's empty.
3049         
3050         * loader/appcache/ApplicationCacheStorage.cpp:
3051         (WebCore::ApplicationCacheStorage::store):
3052
3053 2008-05-14  Adam Roben  <aroben@apple.com>
3054
3055         Windows build fix
3056
3057         * platform/network/NetworkStateNotifier.cpp: Added a missing #include.
3058         * platform/network/NetworkStateNotifier.h:
3059         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Removed 'void'
3060         return type from the constructor, and fixed the spelling of a member
3061         variable.
3062
3063 2008-05-14  Kevin McCullough  <kmccullough@apple.com>
3064
3065         Reviewed by Adam.
3066
3067         <rdar://problem/5770054> JavaScript profiler (10928)
3068         - Add support for interacting with the JavaScriptCore profiler.
3069
3070         * ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
3071         * ForwardingHeaders/profiler/Profile.h: Added.
3072         * GNUmakefile.am: Add the new files to all the projects.
3073         * WebCore.pro:
3074         * WebCore.vcproj/WebCore.vcproj:
3075         * WebCore.xcodeproj/project.pbxproj:
3076         * WebCoreSources.bkl:
3077         * page/InspectorController.cpp: Add the ability to retrieve all of the
3078         profiles in JavaScript from the InspectorController.
3079         (WebCore::allProfiles):
3080         (WebCore::InspectorController::windowScriptObjectAvailable):
3081         * page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC
3082         FunctionCallProfile.
3083         (WebCore::functionCallProfileCache): This cache makes sure we don't
3084         needlessly create duplicate wrappers around the same
3085         FunctionCallProfile*.
3086         (WebCore::getFunctionName): Callback to return the name of the function.
3087         (WebCore::getTotalTime): Callback to return the total time spent in the
3088         function.
3089         (WebCore::getSelfTime): Callback to return the time spent in self (total
3090         - time in children) in the function.
3091         (WebCore::getNumberOfCalls): Callback to return the number of times this
3092         function was called.
3093         (WebCore::getChildren): Callback to return the children of this function
3094         where the children are the functions this function called.
3095         (WebCore::finalize): Cleanup.
3096         (WebCore::functionCallProfileClass): Define the JSClassRef for this
3097         object.
3098         (WebCore::toJS): Create a conversion function to make a usable JSValue
3099         to wrap the FunctionCallProfile in JSC.
3100         * page/JavaScriptFunctionCallProfile.h: Added.
3101         * page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile.
3102         (WebCore::profileCache): This cache makes sure we don't needlessly
3103         create duplicate wrappers aroudn the same Profile*.
3104         (WebCore::getHeadCallback): Callback to return the head of the graph of
3105         the functions profiled durring this profile's run.
3106         (WebCore::finalize):
3107         (WebCore::profileClass): Define the JSClassRef for this object.
3108         (WebCore::toJS): Create a conversion function to make a usable JSValue
3109         to wrap the Profile from JSC.
3110         * page/JavaScriptProfile.h: Added.
3111
3112 2008-05-14  David Hyatt  <hyatt@apple.com>
3113
3114         Fix for bug https://bugs.webkit.org/show_bug.cgi?id=16130.
3115
3116         Opacity, transforms, reflections and masks should not honor z-index unless the element is also
3117         positioned.  Always reset to auto if the element is not positioned (and then the following code will
3118         adjust auto to 0 as needed).
3119
3120         Reviewed by Dan Bernstein
3121
3122         * css/CSSStyleSelector.cpp:
3123         (WebCore::CSSStyleSelector::adjustRenderStyle):
3124
3125 2008-05-14  Anders Carlsson  <andersca@apple.com>
3126
3127         Reviewed by Brady.
3128
3129         <rdar://problem/5931742> Support navigator.onLine from HTML5
3130         
3131         * WebCore.vcproj/WebCore.vcproj:
3132         * WebCore.xcodeproj/project.pbxproj:
3133         Add NetworkStateNotifier files.
3134         
3135         * dom/EventNames.h:
3136         Add offline and online events.
3137         
3138         * page/Navigator.cpp:
3139         (WebCore::Navigator::onLine):
3140         * page/Navigator.h:
3141         * page/Navigator.idl:
3142         Add navigator.onLine.
3143         
3144         * page/Page.cpp:
3145         (WebCore::networkStateChanged):
3146         Dispatch offline/online events to all frames.
3147         
3148         (WebCore::Page::Page):
3149         Set state change callback.
3150         
3151         * platform/network/NetworkStateNotifier.cpp: Added.
3152         * platform/network/NetworkStateNotifier.h: Added.
3153
3154         * platform/network/mac/NetworkStateNotifierMac.cpp: Added.
3155         Mac network state notifier.
3156
3157 2008-05-14  Adam Roben  <aroben@apple.com>
3158
3159         Fix Bug 18888: REGRESSION (r32731): console.log always prints
3160         "undefined"
3161
3162         <https://bugs.webkit.org/show_bug.cgi?id=18888>
3163
3164         Reviewed by Tim Hatcher.
3165
3166         Tested by pre-existing
3167         manual-tests/inspector/console-log-formatting.html.
3168
3169         * page/inspector/Console.js:
3170         (WebInspector.ConsoleMessage.prototype._format): Changed to explicitly
3171         wrap Console._format instead of using bind to do it. Using bind was
3172         causing us to pass plainText in as the first parameter instead of as
3173         the second.
3174
3175 2008-05-14  Timothy Hatcher  <timothy@apple.com>
3176
3177         Fixes the bug where stepping out of a function would show the wrong
3178         call stack (would look like it stepped out twice.)
3179
3180         Reviewed by Adam Roben.
3181
3182         * page/JavaScriptDebugServer.cpp:
3183         (WebCore::JavaScriptDebugServer::returnEvent):
3184         Call pauseIfNeeded before setting m_currentCallFrame to the caller.
3185
3186 2008-05-14  Stephanie Lewis  <slewis@apple.com>
3187    
3188         Fix 64bit build
3189
3190         * plugins/PluginView.h:
3191
3192 2008-05-14  David Kilzer  <ddkilzer@apple.com>
3193
3194         REGRESSION (r26474): WebKit fails jQuery test 64 core module: text(String) subtest 1 Check escaped text (createTextNode)
3195
3196         <https://bugs.webkit.org/show_bug.cgi?id=18976>
3197         <rdar://problem/5924793>
3198
3199         Reviewed by Darin.
3200
3201         Tests: fast/dom/dom-parse-serialize-expected.txt:
3202                fast/xsl/xslt-processor-expected.txt:
3203                fast/xsl/xslt-text-expected.txt:
3204
3205         Commit r26474 removed escaping of '>' characters to '&gt;' in serialized
3206         HTML content, which broke one jQuery test.  This change restores that
3207         serialization behavior to both attributes and content for consistency.
3208
3209         * editing/markup.cpp:
3210         (WebCore::appendAttributeValue): Escape '>' as '&gt;'.
3211         (WebCore::escapeContentText): Ditto.
3212         (WebCore::appendEscapedContent): Ditto.  This is the bug fix for the jQuery test.
3213
3214 2008-05-14  Adam Roben  <aroben@apple.com>
3215
3216         Fix Bug 19051: REGRESSION (r33447): Assertion in
3217         JSDebugServer::removeListener closing tab with Inspector open
3218
3219         <https://bugs.webkit.org/show_bug.cgi?id=19051>
3220
3221         m_inspectedPage is now cleared when the Page is destroyed, which never
3222         used to happen. Some of InspectorController's code was not prepared
3223         for this.
3224
3225         Reviewed by Dave Hyatt.
3226
3227         * page/InspectorController.cpp:
3228         (WebCore::InspectorController::~InspectorController): Removed a call
3229         to stopDebugging and added an assertion. Debugging should have already
3230         been stopped by this point.
3231         (WebCore::InspectorController::inspectedPageDestroyed): Moved here
3232         from the header file. Added a call to stopDebugging.
3233         (WebCore::InspectorController::enabled): Return false if our inspected
3234         Page has already been destroyed, since we can't really do much at this
3235         point anyway.
3236         (WebCore::InspectorController::didCommitLoad):
3237         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
3238         (WebCore::InspectorController::identifierForInitialRequest):
3239         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
3240         (WebCore::InspectorController::stopDebugging):
3241         (WebCore::InspectorController::drawNodeHighlight):
3242         Assert that m_inspectedPage hasn't been cleared.
3243         * page/InspectorController.h:
3244
3245 2008-05-14  Justin Garcia  <justin.garcia@apple.com>
3246
3247         Reviewed by Darin.
3248
3249         <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition
3250
3251         * editing/Editor.cpp:
3252         (WebCore::Editor::confirmComposition): Remove the previous composition
3253         when we insert the new one, not with a separate, slower, delete operation.
3254         (WebCore::Editor::setComposition): Ditto.
3255         * editing/InsertTextCommand.cpp:
3256         (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected
3257         text with a low level operation that doesn't perform a layout and insert
3258         the new text in a way that won't trigger a layout from the removal.
3259         (WebCore::InsertTextCommand::input): Call the optimized replace.
3260         * editing/InsertTextCommand.h:
3261         * editing/htmlediting.cpp:
3262         (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid 
3263         the expense of getAttribute in the common case.
3264         * page/Frame.cpp:
3265         (WebCore::Frame::selectionLayoutChanged): Selection::start() and end()
3266         will already be at VisiblePosition deepEquivalents. Selection::validate()
3267         ensures this.
3268
3269 2008-05-14  Adam Roben  <aroben@apple.com>
3270
3271         Make the Inspector able to handle being reloaded
3272
3273         When Reload was selected from the context menu in the Inspector, the
3274         Inspector window would close and never be openable again. Now it
3275         closes, then reopens when the page finishes loading.
3276
3277         Reviewed by Tim Hatcher.
3278
3279         * page/InspectorController.cpp:
3280         (WebCore::InspectorController::close): Removed code that cleared out
3281         m_page. This is now handled by pageDestroyed.
3282         * page/InspectorController.h:
3283         (WebCore::InspectorController::inspectedPageDestroyed): Added.
3284         * page/Page.cpp:
3285         (WebCore::Page::~Page): Fixed a bug and added a call to the new
3286         inspectedPageDestroyed. If we have a parent InspectorController, that
3287         means that we are the Page in the Inspector's window (i.e., we are the
3288         Inspector's UI), so when we are destroyed we should call
3289         InspectorController::pageDestroyed. We also need to call
3290         inspectedPageDestroyed on our own InspectorController so that it won't
3291         try to call into us.
3292
3293 2008-05-14  Timothy Hatcher  <timothy@apple.com>
3294
3295         Add pause on exception support to the Inspector debugger
3296         with a toggle buttons to enable or disable it.
3297
3298         Reviewed by Adam Roben.
3299
3300         * page/InspectorController.cpp:
3301         (WebCore::pauseOnExceptions): Call the InspectorController.
3302         (WebCore::setPauseOnExceptions): Ditto.
3303         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new
3304         setPauseOnExceptions and pauseOnExceptions functions to the JS class.
3305         (WebCore::InspectorController::pauseOnExceptions): Call JavaScriptDebugServer.
3306         (WebCore::InspectorController::setPauseOnExceptions): Ditto.
3307         * page/InspectorController.h:
3308         * page/JavaScriptDebugServer.cpp:
3309         (WebCore::JavaScriptDebugServer::setPauseOnExceptions): Set m_pauseOnExceptions.
3310         (WebCore::JavaScriptDebugServer::exception): Check m_pauseOnExceptions
3311         and set m_pauseOnNextStatement to true before calling pauseIfNeeded.
3312         * page/JavaScriptDebugServer.h:
3313         * page/inspector/Images/pauseOnExceptionButtons.png: Added.
3314         * page/inspector/ScriptsPanel.js: Adds a status bar button that calls
3315         the new InspectorController functions.
3316         * page/inspector/inspector.css: New styles.
3317
3318 2008-05-14  Timothy Hatcher  <timothy@apple.com>
3319
3320         Rename the Scope Chain pane to Scope Variables. Name the global
3321         object Global. Name objects before the locals "With Block".
3322         Name colsure scopes "Closure". Name any element or document
3323         after Local, "Event Target" and "Event Document", respectfully.
3324
3325         Reviewed by Adam Roben.
3326
3327         * English.lproj/localizedStrings.js: Add new strings.
3328         * page/inspector/ObjectPropertiesSection.js:
3329         (WebInspector.ObjectPropertiesSection): Add a new argument that is used
3330         for the empty placeholder text.
3331         (WebInspector.ObjectPropertiesSection.prototype.onpopulate): Use the
3332         empty placeholder text.
3333         * page/inspector/ScopeChainSidebarPane.js:
3334         (WebInspector.ScopeChainSidebarPane): Rename Scope Chain to Scope Variables.
3335         (WebInspector.ScopeChainSidebarPane.prototype.update): Use the object name as
3336         the subtitle. Use "Global" for the global object title. Use "With Block" for
3337         the title of objects before the locals. Use "No Variables" for the empty
3338         placeholder text for locals.
3339
3340 2008-05-14  Michael A. Puls II  <shadow2531@gmail.com>
3341
3342         Reviewed by Alexey.
3343
3344         Fix for https://bugs.webkit.org/show_bug.cgi?id=16923 
3345         Attr nodes with a value of "" should not have any childNodes
3346         
3347         In Opera, Firefox and IE, when an attribute node has a value
3348         of "", the attribute node doesn't have any childNodes. This
3349         is true in WebKit also, but not when you assign "" to the
3350         Attr's value when the existing value is non-empty.
3351         
3352         Test: fast/dom/attribute-empty-value-no-children.html
3353
3354         * dom/Attr.cpp: (WebCore::Attr::setValue): Use createTextChild(), which only appends
3355         a child text node if the value being assigned is not empty.
3356
3357 2008-05-14  Julien Chaffraix  <jchaffraix@webkit.org>
3358
3359         Reviewed by Eric.
3360
3361         GCC 4.3 build fix.
3362         Removes some compiler warnings.
3363
3364         * dom/Document.h:
3365         (WebCore::FormElementKey::hashTableDeletedValue): GCC complained about the const keyword
3366         so remove it as it is only used inside FormElementKey.
3367
3368         * html/HTMLSelectElement.cpp:
3369         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Correct coding style (removes
3370         a warning too).
3371
3372         * loader/appcache/ApplicationCacheResource.cpp: Include stdio.h for gcc4.3 build.
3373
3374         * plugins/PluginPackage.cpp:
3375         (WebCore::PluginPackage::PluginPackage): Changed initialization order in the constructor.
3376         * plugins/PluginView.cpp:
3377         (WebCore::PluginView::PluginView): Ditto.
3378         * plugins/PluginView.h:
3379         * xml/AccessControlList.cpp: Include stdio.h
3380         * xml/AccessItem.cpp: Ditto.
3381         * xml/AccessItemRule.cpp: Ditto.
3382
3383 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3384
3385         Reviewed by Simon.
3386
3387         Qt build fix. Add JSJavaScriptCallFrameCustom.cpp to the build
3388         and implemented EventLoopQt.
3389
3390         * WebCore.pro:
3391         * platform/qt/EventLoopQt.cpp: Added.
3392
3393 2008-05-14  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3394
3395         Reviewed by Simon.
3396
3397         Qt build fix. Add JavaScriptCallFrame.{idl,cpp} to the build.
3398
3399         * WebCore.pro:
3400
3401 2008-05-13  Dan Bernstein  <mitz@apple.com>
3402
3403         Reviewed by John Sullivan.
3404
3405         - Windows part of <rdar://problem/5725912> improve render quality of transformed text
3406
3407         * platform/graphics/win/FontCGWin.cpp:
3408         (WebCore::Font::drawGlyphs): Added call to
3409         wkSetCGContextFontRenderingStyle().
3410
3411 2008-05-13  Alp Toker  <alp@nuanti.com>
3412
3413         GTK+ build fix. Implement EventLoopGtk.cpp.
3414
3415         * GNUmakefile.am:
3416         * platform/gtk/EventLoopGtk.cpp: Added.
3417         (WebCore::EventLoop::cycle):
3418
3419 2008-05-13  Alp Toker  <alp@nuanti.com>
3420
3421         GTK+ build fix. Fix IDL filename typo and add JavaScriptCallFrame.cpp
3422         to the build.
3423
3424         * GNUmakefile.am:
3425
3426 2008-05-13  Matt Lilek  <webkit@mattlilek.com>
3427
3428         Not reviewed, partial Gtk build fix.
3429
3430         * GNUmakefile.am:
3431
3432 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3433
3434         Fixes a crash when stepping out in the Inspector's debugger.
3435
3436         http://bugs.webkit.org/show_bug.cgi?id=19037
3437
3438         Reviewed by Dan Bernstein.
3439
3440         * page/InspectorController.cpp:
3441         (WebCore::currentCallFrame): Adds a null check of currentCallFrame,
3442         since it can be null. Also returns JSNull to better signify this.
3443         * page/inspector/ScriptsPanel.js: Updates the debugger interface
3444         when stepping so the currentCallFrame isn't accessed when not paused.
3445         Adds a _clearInterface function to remove duplicate code.
3446
3447 2008-05-13  chris fleizach  <cfleizach@apple.com>
3448
3449         Reviewed by Beth Dakin
3450
3451         <rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
3452
3453         * page/AccessibilityRenderObject.cpp:
3454         (WebCore::AccessibilityRenderObject::title):
3455
3456 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3457
3458         Adds an overlay window that covers the scripts panel and
3459         informs the user that they need to attach the debugger.
3460         Provides an "Attach Debugger" button below the info text.
3461
3462         Reviewed by Dan Bernstein.
3463
3464         * English.lproj/localizedStrings.js: New strings.
3465         * page/inspector/ScriptsPanel.js:
3466         (WebInspector.ScriptsPanel): Create the overlay elements and
3467         append to the main panel element.
3468         * page/inspector/inspector.css: New styles for the over lay elements.
3469
3470 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3471
3472         Fixes the assertion and crash that would happen when inspecting a element from a frame.
3473         This change makes JSInspectedObjectWrapper pass unwrapped objects around for global objects
3474         that share the same page group identifier. Also returns jsUndefined() instead of 0 to prevent
3475         crashing in release builds if the page groups don't match.
3476
3477         Passes all the tests in: manual-tests/inspector-wrappers
3478
3479         Reviewed by Adam Roben.
3480
3481         * bindings/js/JSInspectedObjectWrapper.cpp:
3482         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Return jsUndefined() instead of 0.
3483         Call allowsUnwrappedAccessFrom instead of unwrappedExecStateMatches.
3484         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3485         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Renamed from unwrappedExecStateMatches.
3486         Return true if the pageGroupIdentifier of both wrappers match.
3487         (WebCore::JSQuarantinedObjectWrapper::callAsFunction): Return jsUndefined() instead of 0.
3488         * bindings/js/JSQuarantinedObjectWrapper.h: Renamed unwrappedExecStateMatches to allowsUnwrappedAccessFrom.
3489
3490 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3491
3492         Fixes the hang that could happen when option-clicking to expand
3493         a disclosure triangle in the Properties pane. This change limits
3494         the recursion depth when expanding the tree elements.
3495
3496         <rdar://problem/5847681> Safari hangs when option-clicking a
3497         disclosure triangle in the Inspector's Properties pane
3498
3499         Reviewed by John Sullivan.
3500
3501         * page/inspector/treeoutline.js:
3502         (TreeElement.prototype.expandRecursively): Pass an empty info object to
3503         traverseNextTreeElement to get the depthChange value. This is used to
3504         compute a current depth. If the depth exceeds the maxDepth argument, the
3505         item isn't expanded and children wont be populated when traverseNextTreeElement
3506         is called until the depth goes below the maxDepth.
3507         (TreeElement.prototype.traverseNextTreeElement): Added a new info
3508         argument that can be optionally used to return extra info like depth change.
3509
3510 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3511
3512         Adds info text to panes and sections in the Inspector's sidebars
3513         that would normally be empty. These help the user know why there
3514         is nothing in these sections.
3515
3516         Reviewed by John Sullivan.
3517
3518         * English.lproj/localizedStrings.js: Add strings.
3519         * page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
3520         * page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
3521         * page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
3522         * page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
3523         * page/inspector/inspector.css: Adds style rules for the info elements.
3524
3525 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3526
3527         Implements the rest of the Scripts panel to get the debugger
3528         mostly working. "Basic debugging seems to work."
3529
3530         Reviewed by Geoff Garen.
3531
3532         * English.lproj/localizedStrings.js: Adds new strings.
3533         * page/inspector/Resource.js:
3534         (WebInspector.Resource.prototype.get scripts): Returns _scripts and 
3535         creates it lazily.
3536         (WebInspector.Resource.prototype.addScript): Add the script object to the
3537         front of the _scripts array.
3538         (WebInspector.Resource.prototype.removeAllScripts): Removed all the scripts
3539         and removes the resource back-reference.
3540         (WebInspector.Resource.prototype.removeScript): Removes the script and
3541         breaks the resource back-reference.
3542         * page/inspector/ResourceView.js:
3543         (WebInspector.ResourceView): Adds a reminder comment.
3544         (WebInspector.ResourceView.prototype.get headersVisible): Returns _headersVisible. 
3545         (WebInspector.ResourceView.prototype.set headersVisible): Stubs out
3546         a setter that currently just sets _headersVisible. Has a comment that
3547         points out this needs implemented when network headers are added.
3548         * page/inspector/ResourcesPanel.js:
3549         (WebInspector.ResourcesPanel.prototype.show): Sets the headersVisible property of
3550         the visible view to true and shows it again, in case it was being shown in Scripts.
3551         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
3552         Copies the headersVisible property from the old view to the new view.
3553         (WebInspector.ResourcesPanel.prototype.showResource): Sets the headersVisible
3554         property to true before showing.
3555         * page/inspector/ScriptView.js:
3556         (WebInspector.ScriptView): Passes in _addBreakpoint for the add breakpoint delegate.
3557         (WebInspector.ScriptView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
3558         for the current Script.sourceID and line.
3559         * page/inspector/ScriptsPanel.js:
3560         (WebInspector.ScriptsPanel): 
3561         (WebInspector.ScriptsPanel.prototype.show): Sets the headersVisible property of
3562         the visible view to false and shows it again, in case it was being shown in Resources.
3563         (WebInspector.ScriptsPanel.prototype.addScript): Makes a new Script object and
3564         adds it to a Resource if one is found. Registers any breakpoint that match
3565         the new Script's source URL, and sets the sourceID of the breakpoints.
3566         (WebInspector.ScriptsPanel.prototype.addBreakpoint): Adds the breakpoint to the
3567         BreakpointsSidebarPane. Also adds it to _breakpointsURLMap so it can be found
3568         later in addScript by URL. Finally adds the breakpoint to the SourceFrame that
3569         represents the resources or script.
3570         (WebInspector.ScriptsPanel.prototype.removeBreakpoint): Removes the breakpoint from
3571         the BreakpointsSidebarPane, _breakpointsURLMap and SourceFrame.
3572         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Update the debugger
3573         state variables, the buttons and the CallStackSidebarPane.
3574         (WebInspector.ScriptsPanel.prototype.reset): Clears and resets debugger
3575         and interface state.
3576         (WebInspector.ScriptsPanel.prototype.get visibleView): Returns _visibleView.
3577         (WebInspector.ScriptsPanel.prototype.set visibleView): Sets _visibleView and
3578         calls hide on the old view and show on the new view.
3579         (WebInspector.ScriptsPanel.prototype.showScript): Calls _showScriptOrResource.
3580         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
3581         (WebInspector.ScriptsPanel.prototype.scriptViewForScript): Lazily creates a
3582         ScriptView for the Script and returns it. 
3583         (WebInspector.ScriptsPanel.prototype.sourceFrameForScript): Returns the SourceFrame
3584         for the Script.
3585         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): Returns the
3586         SourceFrame based on the type of object passed in.
3587         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Shows the view based on
3588         the type of object passed in. If the object is a resource and there are breakpoints
3589         defined for that Resource URL, then populate the SourceFrame with the breakpoints.
3590         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Adds a script to the 
3591         files menu. If the Script is part of a resource, that resource is added.
3592         (WebInspector.ScriptsPanel.prototype._removeScriptFromFilesMenu): Remove a script from
3593         the files menu. If that script is part of a resource and it is the last script of that
3594         resource, then remove the whole resource.
3595         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine): Clears the execution
3596         line from the SourceFrame that is showing it.
3597         (WebInspector.ScriptsPanel.prototype._callFrameSelected): Event listener for when the
3598         call frame changes in the CallStackSidebarPane. Triggers updates to the ScopeChainSidebarPane
3599         and the visible view.
3600         (WebInspector.ScriptsPanel.prototype._changeVisibleFile): Event listener for the change state
3601         of the files select element.
3602         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Update more of the 
3603         buttons to reflect the current debugger state. Updates the status text too.
3604         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Reset the UI and state when
3605         the debugger is attached/detached.
3606         (WebInspector.ScriptsPanel.prototype._togglePause): Call InspectorController.resumeDebugger or
3607         InspectorController.pauseInDebugger depending on the paused state.
3608         (WebInspector.ScriptsPanel.prototype._stepOverClicked): Call InspectorController.stepOverStatementInDebugger.
3609         (WebInspector.ScriptsPanel.prototype._stepIntoClicked): Call InspectorController.stepIntoStatementInDebugger.
3610         (WebInspector.ScriptsPanel.prototype._stepOutClicked): InspectorController.stepOutOfFunctionInDebugger.
3611         * page/inspector/SourceView.js:
3612         (WebInspector.SourceView): Passes in _addBreakpoint for the add breakpoint delegate.
3613         (WebInspector.SourceView.prototype._addBreakpoint): Calls ScriptsPanel's addBreakpoint
3614         for the nearest Script's sourceID and passed in line.
3615         * page/inspector/inspector.css: New style rules for the UI changes.
3616         * page/inspector/inspector.js:
3617         (WebInspector.loaded): Add the ScriptsPanel to the panels list.
3618         (WebInspector.parsedScriptSource): Call ScriptsPanel.addScript.
3619         (WebInspector.failedToParseScriptSource): Ditto.
3620         (WebInspector.pausedScript): Call ScriptsPanel.debuggerPaused.
3621
3622 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3623
3624         Adds implementations of the Scope Chain and Call Stack sidebar panes.
3625         These panes use the JSJavaScriptCallFrame object that will be passed
3626         to the update functions.
3627
3628         Reviewed by Kevin McCullough.
3629
3630         * English.lproj/localizedStrings.js: Adds new strings.
3631         * WebCore.vcproj/WebCore.vcproj: Adds new files.
3632         * page/inspector/CallStackSidebarPane.js:
3633         (WebInspector.CallStackSidebarPane.prototype.update): Walk the 
3634         caller chain of the call frame and make placards for each.
3635         (WebInspector.CallStackSidebarPane.prototype.get selectedCallFrame):
3636         Return _selectedCallFrame. 
3637         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
3638         Set _selectedCallFrame and dispatch the "call frame selected" event.
3639         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
3640         Set the selectedCallFrame based on the clicked placard.
3641         * page/inspector/Placard.js: Added. A user interface object that can
3642         be used to show a title and a subtitle block with a selected state.
3643         * page/inspector/ScopeChainSidebarPane.js: Added.
3644         (WebInspector.ScopeChainSidebarPane): Call the base object and set the title.
3645         (WebInspector.ScopeChainSidebarPane.prototype.update): Iterate over the
3646         call frame's scope chain and make ObjectPropertiesSections for each.
3647         * page/inspector/SidebarPane.js:
3648         (WebInspector.SidebarPane.prototype): Inherit from WebInspector.Object.
3649         * page/inspector/WebKit.qrc: Add new files.
3650         * page/inspector/inspector.css: Add placard styles.
3651         * page/inspector/inspector.html: Add new files.
3652
3653 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3654
3655         Fixes the bug where SourceViews would be blank if shown before
3656         the Resource finished loading.
3657
3658         <rdar://problem/5807420> Safari's Web Inspector won't display the
3659         contents of some CSS and JS files
3660
3661         Reviewed by Kevin McCullough.
3662
3663         * page/inspector/Resource.js:
3664         (WebInspector.Resource.prototype.set finished): Dispatch the finished event
3665         (WebInspector.Resource.prototype): Inherit from WebInspector.Object.prototype.
3666         * page/inspector/SourceView.js:
3667         (WebInspector.SourceView): Register for the finished event on the resource.
3668         When the event fires, setup the source frame and deregister the event.
3669
3670 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3671
3672         Factored most of SourceView out into SourceFrame so it can be shared
3673         by the new ScriptView. Added the ScriptView class to be used for
3674         scripts that arn't Resources (like eval code.) Added a simple Script
3675         object that hold the data from the debugger parsedSource hooks. A
3676         ScriptView holds a Script object, and uses it for source data.
3677
3678         Added breakpoint and execution line support to the SourceFrame
3679         where they are visually represented in the source.
3680
3681         Reviewed by Kevin McCullough.
3682
3683         * page/inspector/inspector.js:
3684         (WebInspector.performSearch): Change the caller of sourceFrameForResource
3685         to use the SourceFrame result's element property.
3686         * page/inspector/ResourcesPanel.js: Use the new SourceFrame.
3687         * page/inspector/Script.js: Added.
3688         * page/inspector/ScriptView.js: Added.
3689         * page/inspector/SourceFrame.js: Added.
3690         * page/inspector/SourceView.js: Use the new SourceFrame.
3691         * WebCore.vcproj/WebCore.vcproj: Add new files.
3692         * page/inspector/WebKit.qrc: Ditto.
3693         * page/inspector/inspector.html: Ditto.
3694
3695 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3696
3697         Adds a Breakpoint object and basic add/remove functions on
3698         BreakpointsSidebarPane that call the InspectorController to
3699         add/remove the breakpoint.
3700
3701         Reviewed by Kevin McCullough.
3702
3703         * page/inspector/Breakpoint.js:
3704         (WebInspector.Breakpoint): 
3705         (WebInspector.Breakpoint.prototype.get enabled): Return _enabled.
3706         (WebInspector.Breakpoint.prototype.set enabled): Set _enabled and
3707         dispatch the enabled/disabled event to listeners.
3708         * page/inspector/BreakpointsSidebarPane.js:
3709         (WebInspector.BreakpointsSidebarPane): Add a breakpoints array.
3710         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
3711         Adds the breakpoint to the breakpoints array. Registers for the disabled
3712         and enabled event types. Call InspectorController.addBreakpoint if attached.
3713         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
3714         Removes the breakpoint from the breakpoints array. Deregisters for the disabled
3715         and enabled event types. Call InspectorController.removeBreakpoint if attached.
3716         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
3717         Call InspectorController.addBreakpoint or InspectorController.removeBreakpoint
3718         depending on the enabled state of the breakpoint.
3719         * WebCore.vcproj/WebCore.vcproj: Add new files.
3720         * page/inspector/WebKit.qrc: Ditto.
3721         * page/inspector/inspector.html: Ditto.
3722
3723 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3724
3725         Make addSourceToFrame not dependent on InspectorResource so it
3726         can be used to add source of a passed in string and mime-type to
3727         a frame. Added addResourceSourceToFrame for use by SourceView.
3728
3729         Also fixes an assertion because of an incorrect static_cast of identifiers
3730         to unsigned long long, when they can be unsigned.
3731
3732         Reviewed by Geoff Garen.
3733
3734         * page/InspectorController.cpp:
3735         (WebCore::addSourceToFrame): Helper function used by addSourceToFrame
3736         and addResourceSourceToFrame.
3737         (WebCore::addSourceToFrame): Generalized to take a source and mime-type string.
3738         (WebCore::addResourceSourceToFrame): Renamed from addSourceToFrame.
3739         (WebCore::getResourceDocumentNode): Fixes the static_cast to be long long.
3740         (WebCore::InspectorController::windowScriptObjectAvailable): Adds
3741         addResourceSourceToFrame to the JavaScript class.
3742         * page/inspector/SourceView.js: Use the new addResourceSourceToFrame.
3743
3744 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3745
3746         Add debugger related functions to the InspectorController and
3747         expose them to the JavaScript side of InspectorController.
3748
3749         Reviewed by Geoff Garen.
3750
3751         * page/InspectorController.cpp:
3752         (WebCore::jsStringRef): Added helper to convert a UString to a JSStringRef.
3753         (WebCore::currentCallFrame): Call InspectorController::currentCallFrame.
3754         (WebCore::pauseInDebugger): Call InspectorController::pauseInDebugger.
3755         (WebCore::resumeDebugger): Call InspectorController::resumeDebugger.
3756         (WebCore::stepOverStatementInDebugger): Call InspectorController::stepOverStatementInDebugger.
3757         (WebCore::stepIntoStatementInDebugger): Call InspectorController::stepIntoStatementInDebugger.
3758         (WebCore::stepOutOfFunctionInDebugger): Call InspectorController::stepOutOfFunctionInDebugger.
3759         (WebCore::addBreakpoint): Call InspectorController::addBreakpoint.
3760         (WebCore::removeBreakpoint): Call InspectorController::removeBreakpoint.
3761         (WebCore::InspectorController::windowScriptObjectAvailable): Add the new functions to the
3762         InspectorController JavaScript class.
3763         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage): Clear breakpoints.
3764         (WebCore::InspectorController::currentCallFrame): Return the currentCallFrame from the
3765         JavaScriptDebugServer.
3766         (WebCore::InspectorController::pauseInDebugger): Call JavaScriptDebugServer's pauseOnNextStatement.
3767         (WebCore::InspectorController::resumeDebugger): Call JavaScriptDebugServer's resume.
3768         (WebCore::InspectorController::stepOverStatementInDebugger):  Call JavaScriptDebugServer's stepOverStatement.
3769         (WebCore::InspectorController::stepIntoStatementInDebugger): Call JavaScriptDebugServer's stepIntoStatement.
3770         (WebCore::InspectorController::stepOutOfFunctionInDebugger): Call JavaScriptDebugServer's stepOutOfFunction.
3771         (WebCore::InspectorController::addBreakpoint): Call JavaScriptDebugServer's addBreakpoint.
3772         (WebCore::InspectorController::removeBreakpoint): Call JavaScriptDebugServer's removeBreakpoint.
3773         (WebCore::InspectorController::didParseSource): Call into the Inspector's JavaScript.
3774         (WebCore::InspectorController::failedToParseSource): Ditto.
3775         (WebCore::InspectorController::didPause): Ditto.
3776         * page/InspectorController.h: Add new functions.
3777
3778 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3779
3780         Implements more debugger APIs on JavaScriptDebugServer and reduces
3781         the number of callbacks to JavaScriptDebugListeners. These changes
3782         will better facilitate debugger optimizations when SquirrelFish merges.
3783
3784         Reviewed by Kevin McCullough.
3785
3786         * page/InspectorController.cpp:
3787         (WebCore::InspectorController::didParseSource): Removed the ExecState.
3788         (WebCore::InspectorController::failedToParseSource): Ditto.
3789         (WebCore::InspectorController::didPause): Added.
3790         * page/InspectorController.h: Changed the JavaScriptDebugListener functions.
3791         * page/JavaScriptDebugListener.h: Removed some callbacks and added didPause.
3792         * page/JavaScriptDebugServer.cpp:
3793         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): Initialize new data members.
3794         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all values of m_breakpoints.
3795         (WebCore::JavaScriptDebugServer::removeListener): Call resume if the last listener was removed.
3796         (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Returns true if there are any
3797         global listeners or a listener for the page.
3798         (WebCore::JavaScriptDebugServer::addBreakpoint): Adds and entry to m_breakpoints.
3799         (WebCore::JavaScriptDebugServer::removeBreakpoint): Removes a entry in m_breakpoints.
3800         (WebCore::JavaScriptDebugServer::hasBreakpoint):  Checks if there is a breakpoint for the
3801         sourceID and line.
3802         (WebCore::JavaScriptDebugServer::clearBreakpoints): Removed all breakpoints.
3803         (WebCore::JavaScriptDebugServer::pauseOnNextStatement): Sets m_pauseOnNextStatement to true.
3804         (WebCore::JavaScriptDebugServer::resume): Sets m_paused to false.
3805         (WebCore::JavaScriptDebugServer::stepIntoStatement): Calls resume and sets
3806         m_pauseOnNextStatement to true.
3807         (WebCore::JavaScriptDebugServer::stepOverStatement): Calls resume and sets m_pauseOnExecState to
3808         the current call frame's ExecState.
3809         (WebCore::JavaScriptDebugServer::stepOutOfFunction): Calls resume and sets m_pauseOnExecState to
3810         the current call frame's caller ExecState.
3811         (WebCore::JavaScriptDebugServer::currentCallFrame): Returns m_currentCallFrame if paused.
3812         (WebCore::dispatchDidParseSource): Removed the ExecState argument.
3813         (WebCore::dispatchFailedToParseSource): Ditto.
3814         (WebCore::JavaScriptDebugServer::sourceParsed): Doesn't pass the ExecState to dispatchDidParseSource
3815         or dispatchFailedToParseSource.
3816         (WebCore::dispatchFunctionToListeners):
3817         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Removes all the arguments passed
3818         to the callback.
3819         (WebCore::JavaScriptDebugServer::setJavaScriptPaused): Various overloaded functions
3820         to pause parts of WebCore to prevent JavaScript execution while paused.
3821         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Decides if the debugger should pause based
3822         on the passed in ExecState, source ID and line number. This checks for breakpoints, stepping, etc.
3823         Calls didPause on all the listeners and spins a EventLoop until resume is called.
3824         (WebCore::JavaScriptDebugServer::callEvent): Call pauseIfNeeded.
3825         (WebCore::JavaScriptDebugServer::atStatement): Ditto.
3826         (WebCore::JavaScriptDebugServer::returnEvent): Ditto.
3827         (WebCore::JavaScriptDebugServer::exception): Ditto.
3828         * page/JavaScriptDebugServer.h: Added new functions.
3829
3830 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3831
3832         Change View.show to call detach if the parentNode dosen't
3833         match before appending to the passed in parent element.
3834         This also prevents appending to the same parent element
3835         multiple times.
3836
3837         Reviewed by John Sullivan.
3838
3839         * page/inspector/FontView.js:
3840         (WebInspector.FontView.prototype.show): Pass the parent element to View.show.
3841         * page/inspector/ResourceView.js: Optimize the attach method to no append if
3842         there is a parentNode already.
3843         * page/inspector/SourceView.js: Ditto.
3844         * page/inspector/View.js: Call detach before appending if the parentNode
3845         doesn't match the passed in element.
3846
3847 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3848
3849         Optimize the panel attach method to no append if there is a
3850         parentNode already.
3851
3852         Reviewed by Adam Roben.
3853
3854         * page/inspector/Panel.js:
3855         (WebInspector.Panel.prototype.attach): Don't append to main-panels
3856         if the panel element already has a parentNode.
3857
3858 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3859
3860         Add Widget::isPluginView so the JavaScriptDebugServer can identify
3861         plugins that need to be paused during debugging. This will be used
3862         in a upcoming commit.
3863
3864         Reviewed by Kevin McCullough.
3865
3866         * platform/Widget.h: Add isPluginView. Return false.
3867         * plugins/PluginView.h: Add isPluginView. Return true.
3868
3869 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3870
3871         Adds an event loop abstraction to platform. This abstraction will be
3872         used by the JavaScriptDebugServer to implement pausing.
3873
3874         Reviewed by Kevin McCullough.
3875
3876         * platform/EventLoop.h: Added.
3877         (WebCore::EventLoop::EventLoop):
3878         (WebCore::EventLoop::ended): Return m_ended.
3879         * platform/mac/EventLoopMac.mm: Added.
3880         (WebCore::EventLoop::cycle): Call nextEventMatchingMask and then sendEvent.
3881         * platform/win/EventLoopWin.cpp: Added.
3882         (WebCore::EventLoop::cycle): Call GetMessage, TranslateMessage and DispatchMessage.
3883         * WebCore.xcodeproj/project.pbxproj: Add new files.
3884         * WebCore.vcproj/WebCore.vcproj: Ditto.
3885
3886 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3887
3888         Breaks out ObjectPropertiesSection from PropertiesSidebarPane
3889         so it can be used by the Scripts panel's Scope Chain pane.
3890
3891         Rubber-stamped by Adam Roben.
3892
3893         * page/inspector/ObjectPropertiesSection.js: Added.
3894         * page/inspector/PropertiesSidebarPane.js: Moved ObjectPropertiesSection
3895         to ObjectPropertiesSection.js.
3896         * WebCore.vcproj/WebCore.vcproj: Add the new file.
3897         * page/inspector/WebKit.qrc: Ditto.
3898         * page/inspector/inspector.html: Ditto.
3899
3900 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3901
3902         Add a helper function to the Inspector's Array prototype
3903         that will remove any identical values/objects from the array.
3904
3905         Reviewed by Kevin McCullough.
3906
3907         * page/inspector/utilities.js:
3908         (Array.prototype.remove): Iterate over the array and strict
3909         compare to the passed in value. If they match, splice that index
3910         out of the array. If onlyFirst is true, return after the first splice.
3911
3912 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3913
3914         Adds a JavaScriptCallFrame object and JavaScript binding with an IDL.
3915         This object will expose the stack to the Inspector's debugger.
3916
3917         Reviewed by Adam Roben.
3918
3919         * DerivedSources.make: Add JavaScriptCallFrame.
3920         * bindings/js/JSJavaScriptCallFrameCustom.cpp: Added.
3921         (WebCore::JSJavaScriptCallFrame::evaluate): Calls impl evaluate and returns the result.
3922         (WebCore::JSJavaScriptCallFrame::scopeChain): Makes an array of the ScopeChain.
3923         * page/JavaScriptCallFrame.cpp: Added.
3924         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
3925         (WebCore::JavaScriptCallFrame::caller): Returns m_caller.
3926         (WebCore::JavaScriptCallFrame::functionName): Returns the function
3927         name from the ExecState if this is not global code or anonymous.
3928         (WebCore::JavaScriptCallFrame::evaluate): Evaluates a script string
3929         in the scope of the call frame.
3930         * page/JavaScriptCallFrame.h: Added.
3931         (WebCore::JavaScriptCallFrame::create): Call the ctor can return in a PassRefPtr.
3932         (WebCore::JavaScriptCallFrame::invalidate): Sets m_mexec to 0. This prevents a
3933         stale ExecState from being accessed after the lifetime of the ExecState.
3934         (WebCore::JavaScriptCallFrame::isValid): Checks if m_exec is 0.
3935         (WebCore::JavaScriptCallFrame::execState): Returns m_exec.
3936         (WebCore::JavaScriptCallFrame::sourceIdentifier): Returns m_sourceID.
3937         (WebCore::JavaScriptCallFrame::line): Returns m_line.
3938         (WebCore::JavaScriptCallFrame::setLine): Sets m_line.
3939         (WebCore::JavaScriptCallFrame::scopeChain): Returns by reference m_exec->scopeChain().
3940         * page/JavaScriptCallFrame.idl: Added.
3941         * WebCore.xcodeproj/project.pbxproj: Add new files.
3942         * WebCore.vcproj/WebCore.vcproj: Ditto.
3943
3944 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3945
3946         Add a new WebInspector.Object base class that will be used for
3947         a few objects in the Web Inspector to support listeners on any
3948         object. This will help add more abstraction to the Inspector.
3949
3950         Reviewed by Adam Roben.
3951
3952         * page/inspector/Object.js: Added.
3953         (WebInspector.Object): Does nothing.
3954         (WebInspector.Object.prototype.addEventListener): Adds the listener to
3955         the _listeners map by type. Supports a this object argument, for easy
3956         addition of listeners without the need for bind.
3957         (WebInspector.Object.prototype.removeEventListener): Remove the listener
3958         from the _listeners map. If the listener is null and the thisObject was
3959         passed, remove any listener for that thisObject.
3960         (WebInspector.Object.prototype.dispatchEventToListeners): Sends an event
3961         for a type to all listeners for that type. Mimics some of the DOMEvent
3962         methods and properties for the event object passed to the listeners.
3963         * WebCore.vcproj/WebCore.vcproj: Add new files.
3964         * page/inspector/WebKit.qrc: Ditto.
3965         * page/inspector/inspector.html: Ditto.
3966
3967 2008-05-13  Timothy Hatcher  <timothy@apple.com>
3968
3969         Update the view source CSS to better match the new Inspector mock-ups.
3970
3971         Reviewed by Kevin McCullough.
3972
3973         * css/view-source.css:
3974
3975 2008-05-13  John Sullivan  <sullivan@apple.com>
3976
3977         Reviewed by Dan Bernstein and Kevin Decker
3978         
3979         - fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind
3980
3981         Test: fast/forms/select-type-ahead-list-box-no-selection.html
3982
3983         * html/HTMLSelectElement.cpp:
3984         (WebCore::HTMLSelectElement::typeAheadFind):
3985         When there's no initially-selected element, we were accessing index -1. Check for this
3986         case and start at 0.
3987
3988 2008-05-13  Sam Weinig  <sam@webkit.org>
3989
3990         Reviewed by Dan Bernstein.
3991
3992         Small cleanup to XMLHttpRequest in preparation for Access Control changes.
3993
3994         * xml/XMLHttpRequest.cpp:
3995         (WebCore::XMLHttpRequest::XMLHttpRequest):
3996         (WebCore::XMLHttpRequest::~XMLHttpRequest):
3997         (WebCore::XMLHttpRequest::open):
3998         (WebCore::XMLHttpRequest::send):
3999         (WebCore::XMLHttpRequest::internalAbort):
4000         (WebCore::XMLHttpRequest::processSyncLoadResults):
4001         (WebCore::XMLHttpRequest::didFinishLoading):
4002         (WebCore::XMLHttpRequest::didReceiveResponse):
4003         (WebCore::XMLHttpRequest::didReceiveData):
4004         * xml/XMLHttpRequest.h:
4005
4006 2008-05-13  chris fleizach  <cfleizach@apple.com>
4007
4008         Beth Dakin
4009
4010         <rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.
4011
4012         * page/AccessibilityRenderObject.cpp:
4013         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
4014
4015 2008-05-13  chris fleizach  <cfleizach@apple.com>
4016
4017         Beth Dakin
4018
4019         <rdar://problem/5908446> AX: webkit needs to return blockquote information for all AX objects, not just in AXTextMarker info
4020
4021         * page/mac/AccessibilityObjectWrapper.mm:
4022         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
4023         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
4024
4025 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
4026
4027         Reviewed by John Sullivan.
4028
4029         <rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
4030         (ISO 8859-11) disappear.
4031
4032         <rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874
4033
4034         Test: fast/encoding/char-decoding.html
4035
4036         * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames):
4037         Register ISO-8859-11, which doesn't have a standard IANA name, despite following
4038         the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.
4039
4040 2008-05-13  chris fleizach  <cfleizach@apple.com>
4041
4042         Reviewed by Beth Dakin
4043
4044         <rdar://problem/5471973> Some AXLinks are not getting AXTitles though there is title text
4045
4046         * page/AccessibilityRenderObject.cpp:
4047         (WebCore::AccessibilityRenderObject::title):
4048
4049 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
4050
4051         Reviewed by Eric Seidel.
4052
4053         https://bugs.webkit.org/show_bug.cgi?id=18681
4054         <rdar://problem/5888130> WebKit should not remove BOM characters from content.
4055
4056         We were only trying to match Firefox, and it doesn't do this any more.
4057
4058         Tests: fast/encoding/bom-in-content.html
4059                fast/encoding/bom-in-content-utf16.html
4060
4061         * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
4062         at the start of input stream.
4063
4064         * platform/text/TextCodec.cpp:
4065         * platform/text/TextCodec.h:
4066         * platform/text/TextCodecICU.cpp:
4067         (WebCore::TextCodecICU::decode):
4068         * platform/text/TextCodecUTF16.cpp:
4069         (WebCore::TextCodecUTF16::decode):
4070         * platform/text/mac/TextCodecMac.cpp:
4071         (WebCore::TextCodecMac::decode):
4072         Don't remove the BOM.
4073
4074 2008-05-13  Anders Carlsson  <andersca@apple.com>
4075
4076         Reviewed by Darin.
4077
4078         Don't crash when a document loader is destroyed while an initial caching attempt
4079         is in progress.
4080
4081         * loader/appcache/ApplicationCacheGroup.cpp:
4082         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
4083         Stop loading.
4084         
4085         (WebCore::ApplicationCacheGroup::stopLoading):
4086         New method that stops a cache update.
4087         
4088         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
4089         Delete ourselves here.
4090         
4091         * loader/appcache/ApplicationCacheGroup.h:
4092
4093 2008-05-13  Alexey Proskuryakov  <ap@webkit.org>
4094
4095         Reviewed by Darin.
4096
4097         <rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254
4098
4099         Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.
4100
4101         Test: fast/encoding/char-decoding.html
4102
4103         * platform/text/TextCodecICU.cpp:
4104         (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
4105         unconditionally. Previously, we registered windows-949-2000 as a special case that lacked 
4106         an IANA standard name, and got away with not registering GBK because it happened
4107         to be reported by ICU normally earlier than any encoding upgraded to it.
4108
4109 2008-05-13  Tor Arne Vestbø  <tavestbo@trolltech.com>
4110
4111         Reviewed by Simon
4112
4113         Fix QtWebKit build on Qt embedded.
4114
4115         * WebCore.pro:
4116         * platform/FileSystem.h:
4117         * platform/qt/FileSystemQt.cpp:
4118
4119 2008-05-13  Ariya Hidayat  <ariya.hidayat@trolltech.com>
4120
4121         Reviewed by Simon.
4122
4123         For Gtk/X11 and Qt/X11, use a more extensive plug-ins scan directories set
4124
4125         * plugins/PluginDatabase.cpp:
4126         (WebCore::addMozillaPluginDirectories):
4127         (WebCore::PluginDatabase::isPreferredPluginDirectory):
4128
4129 2008-05-12  Adam Roben  <aroben@apple.com>
4130
4131         Turn on warnings as errors in WebCore.vcproj
4132
4133         Rubberstamped by Anders Carlsson.
4134
4135         * WebCore.vcproj/WebCore.vcproj: Also let VS reformat the file as it
4136         saw fit. The important part is the removal of the WarnAsError="false"
4137         lines.
4138
4139 2008-05-12  Adam Roben  <aroben@apple.com>
4140
4141         Fix a MSVC warning in PluginViewWin
4142
4143         Reviewed by Anders Carlsson.
4144
4145         Test: http/tests/plugins/post-url-file.html
4146
4147         * plugins/win/PluginViewWin.cpp:
4148         (WebCore::PluginView::handlePostReadFile): Added a missing return
4149         statement.
4150
4151 2008-05-12 &nbs