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