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