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