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