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