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