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