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