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