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