2008-08-06 Beth Dakin <bdakin@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-08-06  Beth Dakin  <bdakin@apple.com>
2
3         Reviewed by Adele.
4
5         Fix for <rdar://problem/6130724>
6
7         Disconnected frames should not be allowed to resize the window.
8
9         * page/DOMWindow.cpp:
10         (WebCore::DOMWindow::resizeBy):
11         (WebCore::DOMWindow::resizeTo):
12
13 2008-08-05  David D. Kilzer  <ddkilzer@apple.com>
14
15         Bug 20038: REGRESSION (r35151): Can't post comments on flickr.com
16
17         <https://bugs.webkit.org/show_bug.cgi?id=20038>
18         <rdar://problem/6092270>
19
20         Reviewed by Eric Seidel.
21
22         Test: fast/forms/submit-to-url-fragment.html
23
24         The problem was that isFormSubmission was not being set to true in
25         FrameLoader::loadWithDocumentLoader() when we were actually
26         submitting a form, causing the page to scroll instead of the form to
27         be submitted.
28
29         The isFormSubmission variable wasn't set to true because a FormState
30         object was not being created in
31         FrameLoader::loadFrameRequestWithFormAndValues().
32
33         The FormState object was not being created because
34         HTMLFormElement::submit(Event*, bool activateSubmitButton) would
35         only set FrameLoader::m_formAboutToBeSubmitted to the current form
36         if there was a "text field" element in the form (type = text,
37         password, search or isindex).
38
39         Thus when FrameLoader::submitForm(const FrameLoadRequest&, Event*)
40         called FrameLoader::loadFrameRequestWithFormAndValues(), a null
41         HTMLFormElement pointer would be sent and cause the above failures.
42
43         * html/HTMLFormElement.cpp:
44         (WebCore::HTMLFormElement::submit): Call new
45         FrameLoader::setFormAboutToBeSubmitted() method outside the for
46         loop so we always set FrameLoader::m_formAboutToBeSubmitted exactly
47         once for any form submission.  The FrameLoader::recordFormValue()
48         method is only called with the name/value pair of each text field.
49
50         * loader/FrameLoader.cpp:
51         (WebCore::FrameLoader::setFormAboutToBeSubmitted): Added method that
52         only sets m_formAboutToBeSubmitted.
53         (WebCore::FrameLoader::recordFormValue): Removed
54         PassRefPtr<HTMLFormElement> argument since this method only sets
55         name/value pairs on m_formValuesAboutToBeSubmitted now.
56         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Create a
57         FormState object as long as submitForm is not null so that other
58         FrameLoader methods know when a form is being submitted.
59         * loader/FrameLoader.h:
60
61 2008-08-06  David D. Kilzer  <ddkilzer@apple.com>
62
63         BUILD FIX: Add HTMLPlugInImageElement.cpp to all other build systems
64
65         * GNUmakefile.am:
66         * WebCore.pro:
67         * WebCoreSources.bkl:
68
69 2008-08-06  Dan Bernstein  <mitz@apple.com>
70
71         - Windows build fix
72
73         * WebCore.vcproj/WebCore.vcproj: Added PlugInImageElement.*
74
75 2008-08-06  Kevin McCullough  <kmccullough@apple.com>
76
77         Reviewed by Tim and Darin.
78
79         <rdar://problem/6126160> URLs in the console should be clickable.
80         - Implemented and now use linkifyString() to parse console messages for
81         URLs.
82
83         * page/inspector/Console.js:
84         * page/inspector/inspector.js:
85         * page/inspector/utilities.js:
86
87 2008-07-02  David Kilzer  <ddkilzer@apple.com>
88
89         Images using QT plugin do not display correctly
90
91         <https://bugs.webkit.org/show_bug.cgi?id=9214>
92         <rdar://problem/5683413>
93
94         Reviewed by Darin.
95
96         Tests: fast/images/embed-image.html
97                fast/images/object-image.html
98
99         Use RenderImage instead of RenderPartObject for a renderer when
100         the <embed> tag references an image.  Extract common code from
101         HTMLEmbedElement and HTMLObjectElement into HTMLPlugInImageElement.
102
103         * WebCore.xcodeproj/project.pbxproj: Added new source files.
104
105         * html/HTMLEmbedElement.cpp: Cleaned up #include statements.
106         (WebCore::HTMLEmbedElement::HTMLEmbedElement): Extend
107         HTMLPlugInImageElement which extends HTMLPlugInElement.
108         (WebCore::HTMLEmbedElement::parseMappedAttribute): Split codeAttr
109         and srcAttr cases.  Create or clear HTMLImageLoader as needed for
110         srcAttr.
111         (WebCore::HTMLEmbedElement::rendererIsNeeded): Use
112         HTMLPlugInElement::rendererIsNeeded() for images.
113         (WebCore::HTMLEmbedElement::createRenderer): Create a
114         RenderImage instead of a RenderPartObject for images.
115         (WebCore::HTMLEmbedElement::attach): Create HTMLImageLoader,
116         load image and populate RenderImage for images.
117         (WebCore::HTMLEmbedElement::updateWidget): Don't call
118         RenderPartObject::updateWidget() for images.
119         (WebCore::HTMLEmbedElement::imageSourceAttributeName): Added.
120         * html/HTMLEmbedElement.h: Removed unneeded namespace and class
121         declarations.  Extend HTMLPlugInImageElement which extends
122         HTMLPlugInElement.
123         (WebCore::HTMLEmbedElement::imageSourceAttributeName): Added.
124         (WebCore::HTMLEmbedElement::serviceType): Moved to
125         HTMLPlugInImageElement.
126         (WebCore::HTMLEmbedElement::url): Ditto.
127
128         * html/HTMLObjectElement.cpp: Cleaned up #include statements.
129         (WebCore::HTMLObjectElement::attach): Removed local variable.
130         (WebCore::HTMLObjectElement::isImageType): Moved to
131         HTMLPlugInImageElement.
132         * html/HTMLObjectElement.h: Extend HTMLPlugInImageElement which
133         extends HTMLPlugInElement.
134         (WebCore::HTMLObjectElement::isImageType): Moved to
135         HTMLPlugInImageElement.
136         (WebCore::HTMLObjectElement::serviceType): Ditto.
137         (WebCore::HTMLObjectElement::url): Ditto.
138
139         * html/HTMLPlugInImageElement.cpp: Added.
140         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Added.
141         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Added.
142         (WebCore::HTMLPlugInImageElement::isImageType): Moved from
143         HTMLObjectElement.
144         * html/HTMLPlugInImageElement.h: Added.
145         (WebCore::HTMLPlugInImageElement::isImageType): Added from 
146         HTMLObjectElement.
147         (WebCore::HTMLPlugInImageElement::serviceType): Ditto.
148         (WebCore::HTMLPlugInImageElement::url): Ditto.
149
150         * rendering/HitTestResult.cpp:
151         (WebCore::HitTestResult::absoluteImageURL): Return urlString
152         for embed elements with images.
153
154 2008-08-06  Marco Barisione  <marco.barisione@collabora.co.uk>
155
156         Reviewed by Eric Seidel.
157
158         http://bugs.webkit.org/show_bug.cgi?id=20295
159         RegularExpression::match should not crash when a null string is passed
160
161         RegularExpression::match used to pass null subject strings to
162         jsRegExpExecute causing an ASSERT failure and then a crash.
163         There is no need to fix also RegularExpression:search and
164         RegularExpression::searchRev as they just call
165         RegularExpression::match.
166
167         * platform/text/RegularExpression.cpp:
168         (WebCore::RegularExpression::match): Return -1 if the string is null.
169
170 2008-08-06  Jan Michael Alonzo  <jmalonzo@webkit.org>
171
172         Gtk build fix only
173
174         * bindings/js/ScriptControllerGtk.cpp:
175         * plugins/gtk/PluginViewGtk.cpp:
176         (WebCore::PluginView::getValue):
177         (WebCore::PluginView::~PluginView):
178
179 2008-08-06  Ariya Hidayat  <ariya.hidayat@trolltech.com>
180
181         Fix the Qt build due to recent ScriptController refactoring.
182
183         * plugins/qt/PluginViewQt.cpp:
184         (WebCore::PluginView::getValue):
185         (WebCore::PluginView::~PluginView):
186
187 2008-08-06  Eric Seidel  <eric@webkit.org>
188
189         Reviewed by Cameron Zwarich.
190
191         Fix warnings and errors seen on Qt bot.
192         Including one correctness fix for ThreadingQt.
193         According to the Qt 4.4 docs, we were always passing
194         seconds to "wait()" when we should have been passing
195         milliseconds.
196         
197         Lots of float <-> int conversion warnings.
198
199         * css/CSSCursorImageValue.cpp:
200         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
201         * dom/Element.cpp:
202         (WebCore::adjustForLocalZoom):
203         (WebCore::adjustForAbsoluteZoom):
204         (WebCore::Element::setScrollLeft):
205         (WebCore::Element::setScrollTop):
206         * dom/EventTargetNode.cpp:
207         (WebCore::EventTargetNode::dispatchMouseEvent):
208         * loader/CachedImage.cpp:
209         (WebCore::CachedImage::imageRect):
210         * page/DOMWindow.cpp:
211         (WebCore::DOMWindow::innerHeight):
212         (WebCore::DOMWindow::innerWidth):
213         (WebCore::DOMWindow::scrollX):
214         (WebCore::DOMWindow::scrollY):
215         (WebCore::DOMWindow::scrollTo):
216         * page/EventHandler.cpp:
217         (WebCore::scrollAndAcceptEvent):
218         * plugins/npapi.cpp:
219         * plugins/qt/PluginViewQt.cpp:
220         (WebCore::PluginView::getValue):
221         (WebCore::PluginView::~PluginView):
222         * rendering/RenderReplaced.cpp:
223         (WebCore::RenderReplaced::intrinsicSizeChanged):
224
225 2008-08-06  Eric Seidel  <eric@webkit.org>
226
227         Build fix only, no review.
228
229         Attempt to fix the Windows and Qt builds.
230
231         * bindings/js/ScriptControllerWin.cpp: add runtime.h include
232         * bindings/js/ScriptControllerQt.cpp: add QWidget include
233         * page/win/FrameWin.cpp: remove bogus using namespace
234         * plugins/PluginView.cpp:
235         (WebCore::PluginView::bindingInstance): use script()
236         * plugins/win/PluginViewWin.cpp:
237         (WebCore::PluginView::getValue): use script()
238         (WebCore::PluginView::~PluginView): use script()
239
240   2008-08-06  Eric Seidel  <eric@webkit.org>
241
242         Build fix only, no review.
243
244         Attempt to fix the Linux and --no-svg builds.
245
246         * bindings/js/ScriptController.h: wrap RetainPtr include in PLATFORM(MAC)
247         * css/CSSComputedStyleDeclaration.cpp:
248         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): add missing CSSProperties to switch
249
250 2008-08-06  Eric Seidel  <eric@webkit.org>
251
252         Reviewed by Cameron Zwarich.
253
254         Move more methods from Frame into ScriptController
255         https://bugs.webkit.org/show_bug.cgi?id=20294
256         
257         Finally finish more of the work which Darin started long ago
258         Move a few more Frame methods into ScriptController.
259         I also took this opportunity to clean up some of the plugin
260         code as well, and moved some of that into ScriptController.
261
262         I removed Frame::clearScriptController() and ScriptController::clear() is now clearWindowShell()
263
264         No functional changes, thus no test cases.
265
266         * GNUmakefile.am:
267         * WebCore.NPAPI.exp:
268         * WebCore.base.exp:
269         * WebCore.pro:
270         * WebCore.vcproj/WebCore.vcproj:
271         * WebCore.xcodeproj/project.pbxproj:
272         * bindings/js/ScriptController.cpp:
273         (WebCore::ScriptController::ScriptController):
274         (WebCore::ScriptController::~ScriptController):
275         (WebCore::ScriptController::bindingRootObject):
276         (WebCore::ScriptController::createRootObject):
277         (WebCore::ScriptController::windowScriptNPObject):
278         (WebCore::ScriptController::createScriptObjectForPluginElement): New method.
279         (WebCore::ScriptController::clearPlatformScriptObjects):
280         (WebCore::ScriptController::disconnectPlatformScriptObjects):
281         (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
282         (WebCore::ScriptController::clearScriptObjects):
283         * bindings/js/ScriptController.h:
284         (WebCore::ScriptController::sourceURL):
285         (WebCore::ScriptController::clearFormerWindow):
286         * bindings/js/ScriptControllerGtk.cpp: Copied from WebCore/page/gtk/FrameGtk.cpp.
287         (WebCore::Frame::createScriptInstanceForWidget):
288         * bindings/js/ScriptControllerMac.mm: Added.
289         (WebCore::ScriptController::createScriptInstanceForWidget):
290         (WebCore::ScriptController::windowScriptObject):
291         (WebCore::ScriptController::clearPlatformScriptObjects):
292         (WebCore::ScriptController::disconnectPlatformScriptObjects):
293         (WebCore::updateRenderingForBindings):
294         (WebCore::ScriptController::initJavaJSBindings):
295         * bindings/js/ScriptControllerQt.cpp: Copied from WebCore/page/gtk/FrameGtk.cpp.
296         (WebCore::ScriptController::createScriptInstanceForWidget):
297         * bindings/js/ScriptControllerWin.cpp: Copied from WebCore/svg/graphics/cg/SVGResourceMaskerCg.cpp.
298         (WebCore::ScriptController::createScriptInstanceForWidget):
299         * bindings/objc/DOM.mm:
300         (-[DOMNode KJS::Bindings::]):
301         * bindings/objc/DOMInternal.mm:
302         (-[WebScriptObject _initializeScriptDOMNodeImp]):
303         * bridge/jni/jni_jsobject.mm:
304         (createRootObject):
305         * html/HTMLAppletElement.cpp:
306         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
307         * html/HTMLAppletElement.h:
308         * html/HTMLEmbedElement.cpp:
309         (WebCore::findWidgetRenderer):
310         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
311         * html/HTMLEmbedElement.h:
312         * html/HTMLObjectElement.cpp:
313         (WebCore::HTMLObjectElement::~HTMLObjectElement):
314         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
315         (WebCore::HTMLObjectElement::detach):
316         * html/HTMLObjectElement.h:
317         * html/HTMLPlugInElement.cpp:
318         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
319         (WebCore::HTMLPlugInElement::detach):
320         (WebCore::HTMLPlugInElement::getInstance):
321         (WebCore::HTMLPlugInElement::parseMappedAttribute):
322         (WebCore::HTMLPlugInElement::getNPObject):
323         * html/HTMLPlugInElement.h:
324         * loader/FrameLoader.cpp:
325         (WebCore::FrameLoader::clear):
326         * page/Frame.cpp:
327         (WebCore::Frame::Frame):
328         (WebCore::Frame::~Frame):
329         (WebCore::Frame::pageDestroyed):
330         (WebCore::FramePrivate::FramePrivate):
331         * page/Frame.h:
332         * page/FramePrivate.h:
333         * page/gtk/FrameGtk.cpp:
334         * page/mac/FrameMac.mm:
335         * page/qt/FrameQt.cpp:
336         * page/win/FrameWin.cpp:
337         (WebCore::computePageRectsForFrame):
338
339 2008-08-05  Steve Falkenburg  <sfalken@apple.com>
340
341         Fix last timer fix.
342         Add null check, clear timer using InterlockedExchange.
343         
344         Reviewed by Alice Liu.
345
346         * platform/win/SharedTimerWin.cpp:
347         (WebCore::clearTimer):
348         (WebCore::queueTimerProc):
349         (WebCore::stopSharedTimer):
350
351 2008-08-05  Steve Falkenburg  <sfalken@apple.com>
352
353         Fix timer leak, flag.
354         
355         Timers need to be deleted explicitly, even if they fire.
356         Also added WT_EXECUTEONLYONCE flag, since this is not a repeating timer.
357         
358         Reviewed by Ada Chan.
359
360         * platform/win/SharedTimerWin.cpp:
361         (WebCore::queueTimerProc):
362
363 2008-08-05  Anders Carlsson  <andersca@apple.com>
364
365         Reviewed by Darin.
366
367         <rdar://problem/6037398>
368         ER: Deallocate WebKit objects on the main thread, even if released on secondary thread
369         
370         Add calls to WebCoreObjCScheduleDeallocateOnMainThread in dealloc methods of objects we expose.
371         
372         * bindings/objc/DOMRGBColor.mm:
373         (-[DOMRGBColor dealloc]):
374         * bindings/objc/WebScriptObject.mm:
375         (-[WebScriptObject dealloc]):
376         * platform/mac/SharedBufferMac.mm:
377         (-[WebCoreSharedBufferData dealloc]):
378
379 2008-08-05  Anders Carlsson  <andersca@apple.com>
380
381         Reviewed by Darin.
382
383         Move the main thread deallocator here from WebKit.
384         
385         * WebCore.base.exp:
386         * WebCore.xcodeproj/project.pbxproj:
387         * platform/mac/WebCoreObjCExtras.c:
388         (method_getImplementation):
389         (deallocCallback):
390         (WebCoreObjCScheduleDeallocateOnMainThread):
391         * platform/mac/WebCoreObjCExtras.h:
392
393 2008-08-05  Dean Jackson  <dino@apple.com>
394
395         Parse CSS Animations, including the new
396         -webkit-animation properties and the @-webkit-keyframes rule.
397         Adds some new interfaces for the style rules.
398         
399         https://bugs.webkit.org/show_bug.cgi?id=20088
400
401         Reviewed by David Hyatt.
402
403         * GNUmakefile.am:
404         * WebCore.pro:
405         * WebCore.vcproj/WebCore.vcproj:
406         * WebCore.xcodeproj/project.pbxproj:
407         * WebCoreSources.bkl:
408             build config for new files
409         * css/tokenizer.flex:
410         * css/CSSGrammar.y:
411         * css/CSSParser.cpp:
412         * css/CSSParser.h:
413             new @-webkit-keyframes parsing
414         * css/CSSPropertyNames.in:
415             -webkit-animation properties
416         * css/CSSRule.h:
417         * css/CSSStyleSelector.cpp:
418         * css/CSSStyleSelector.h:
419         * css/CSSValueKeywords.in:
420         * css/StyleBase.h:
421         * css/WebKitCSSKeyframeRule.cpp: Added.
422         * css/WebKitCSSKeyframeRule.h: Added.
423         * css/WebKitCSSKeyframesRule.cpp: Added.
424         * css/WebKitCSSKeyframesRule.h: Added.
425
426 2008-08-05  Kevin McCullough  <kmccullough@apple.com>
427
428         Reviewed by Tim.
429
430         - LayoutTests fix.  Log only to the Inspector because other listeners may not want
431         XHR notifications, including DRT and the numerous tests that don't expect them.
432
433         * xml/XMLHttpRequest.cpp:
434         (WebCore::XMLHttpRequest::didFinishLoading):
435
436 2008-08-05  Timothy Hatcher  <timothy@apple.com>
437
438         Makes DOM attribute editing start on double-click to match the styles
439         pane. Links in attributes are now triggered with a single click again.
440
441         https://bugs.webkit.org/show_bug.cgi?id=20281
442
443         Reviewed by Adam Roben.
444
445         * English.lproj/localizedStrings.js: Removed some strings.
446         * page/inspector/ElementsPanel.js:
447         (WebInspector.DOMNodeTreeElement.prototype.onattach): Call
448         _preventFollowingLinksOnDoubleClick.
449         (WebInspector.DOMNodeTreeElement.prototype._preventFollowingLinksOnDoubleClick):
450         Renamed from _makeURLsActivateOnModifiedClick. Simply sets the
451         preventFollowOnDoubleClick property on all links.
452         (WebInspector.DOMNodeTreeElement.prototype.onselect): Removed
453         _selectedByCurrentMouseDown.
454         (WebInspector.DOMNodeTreeElement.prototype.onmousedown): Moved
455         editing code to ondblclick.
456         (WebInspector.DOMNodeTreeElement.prototype.ondblclick): Calls
457         _startEditing. Removed URL check.
458         (WebInspector.DOMNodeTreeElement.prototype._updateTitle): Calls
459         _preventFollowingLinksOnDoubleClick.
460         * page/inspector/inspector.css:
461         (.editing): Removed the text-decoration property.
462         (.editing, .editing *): Added the text-decoration property here
463         so it removes underlines on child elements.
464         * page/inspector/inspector.js:
465         (WebInspector.documentClick): Removed the followOnAltClick code.
466         Added support for preventFollowOnDoubleClick, which sets a timeout
467         on the first click where future clicks will cancel it (double click).
468         If the timeout isn't canceled, the link is followed.
469
470 2008-08-05  Antti Koivisto  <antti@apple.com>
471
472         Reviewed by Sam Weinig.
473
474         <rdar://problem/6112219> Video in standalone media document flashes when navigating away
475
476         When navigating out from a page, MediaPlayer was set invisible and then immediately 
477         made visible again causing flicker in some cases.
478         
479         The document is not yet marked being in page cache when willSaveToCache() is called.
480
481         * html/HTMLMediaElement.cpp:
482         (WebCore::HTMLMediaElement::willSaveToCache):
483         * rendering/RenderVideo.cpp:
484         (WebCore::RenderVideo::updatePlayer):
485
486 2008-08-05  Dan Bernstein  <mitz@apple.com>
487
488         - fix typo
489
490         * page/mac/FrameMac.mm:
491
492 2008-08-05  Dan Bernstein  <mitz@apple.com>
493
494         - try to fix the 64-bit build
495
496         * page/mac/FrameMac.mm:
497
498 2008-08-05  Alp Toker  <alp@nuanti.com>
499
500         Remove leftover mark pragma from r35568 to fix compiler warning spew.
501
502         * rendering/style/RenderStyle.h:
503
504 2008-08-05  Kevin McCullough  <kmccullough@apple.com>
505
506         - Added a test that checks for several edge cases (see description in
507         test.
508
509         * manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html: Added.
510
511 2008-08-05  Dean Jackson  <dino@apple.com>
512
513         Reviewed by Dave Hyatt
514
515         Add support for CSS Animation properties to RenderStyle
516         https://bugs.webkit.org/show_bug.cgi?id=20068
517
518         (also fix some minor whitespace issues and remove debugging code)
519
520         * css/CSSComputedStyleDeclaration.cpp:
521         * css/CSSStyleSelector.cpp:
522         * page/AnimationController.cpp:
523         * rendering/style/RenderStyle.cpp:
524         * rendering/style/RenderStyle.h:
525
526 2008-08-05  Kevin McCullough  <kmccullough@apple.com>
527
528         - Updated a manual test to be an accurate description of what it is
529         actually testing.
530
531         * manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html:
532
533 2008-08-05  Kevin McCullough  <kmccullough@apple.com>
534
535         Reviewed by Tim.
536
537         <rdar://problem/5732836> XMLHttpRequest: Inspector should show network
538         activity/XHR in Console (17233)
539
540         * xml/XMLHttpRequest.cpp:
541         (WebCore::XMLHttpRequest::didFinishLoading):
542
543 2008-08-05  Dean Jackson  <dino@apple.com>
544
545         Fix the ChangeLog that was corrupted by r34545.
546
547 2008-08-04  Timothy Hatcher  <timothy@apple.com>
548
549         Makes the selection surround just the name or value that was
550         double clicked when editing CSS properties. This regressed when
551         the Inspector started using focus/blur events, since a focus on
552         a content editable region changes the selection.
553
554         https://bugs.webkit.org/show_bug.cgi?id=20280
555
556         Reviewed by Adam Roben.
557
558         * page/inspector/StylesSidebarPane.js:
559         (WebInspector.StylePropertyTreeElement.prototype.startEditing):
560         Change the selection after calling WebInspector.startEditing,
561         since WebInspector.startEditing will set an initial selection
562         due to a focus event.
563
564 2008-08-04  Timothy Hatcher  <timothy@apple.com>
565
566         Changes the editing behavior in the Inspector to commit changes
567         when focus is lost, instead of reverting the changes.
568
569         https://bugs.webkit.org/show_bug.cgi?id=20279
570
571         Reviewed by Adam Roben.
572
573         * page/inspector/inspector.js:
574         (WebInspector.startEditing): Call editingCommitted in blurEventListener
575         instead of editingCancelled.
576
577 2008-08-04  Timothy Hatcher  <timothy@apple.com>
578
579         Adds the ability to increment/decrement numbers in editable style
580         properties with the arrow and page keys.
581
582         Reviewed by Adam Roben.
583
584         https://bugs.webkit.org/show_bug.cgi?id=20273
585
586         * page/inspector/StylesSidebarPane.js:
587         (WebInspector.StylePropertyTreeElement.prototype.updateAll):
588         Updates all properties in the current section, or all sections
589         depending in the argument passed.
590         (WebInspector.StylePropertyTreeElement.prototype.toggleEnabled):
591         Call updateAll instead of having duplicate code.
592         (WebInspector.StylePropertyTreeElement.prototype.startEditing):
593         Assign the list element's handleKeyEvent to editingKeyDown.
594         (WebInspector.StylePropertyTreeElement.prototype.editingKeyDown):
595         Handles the Up and Down arrows keys. Finds the word based on the
596         selection and extracts the number, prefix and suffix. Increments
597         or decrements the number based on the key and modifiers. Replaces
598         the original word with the new value and selects it. Also applies
599         the style so the page reflects the changes live.
600         (WebInspector.StylePropertyTreeElement.prototype.editingEnded):
601         Delete the handleKeyEvent and originalCSSText properties.
602         (WebInspector.StylePropertyTreeElement.prototype.editingCancelled):
603         If originalCSSText exists, set the cssText to that value and call
604         updateAll. Otherwise just call updateTitle like before.
605         (WebInspector.StylePropertyTreeElement.prototype.editingCommitted):
606         Factored out the style applying code to applyStyleText.
607         (WebInspector.StylePropertyTreeElement.prototype.applyStyleText):
608         Factored out from editingCommitted. Takes an argument that specifies
609         if the interface should be updated when the style is applied.
610         * page/inspector/inspector.js:
611         (WebInspector.startEditing): Call the original key handler, if one
612         existed before interrupting key events.
613         * page/inspector/utilities.js:
614         (getStyleTextWithShorthands): Helper to return CSS text that preserves
615         shorthand values, since the cssText property only outputs longhands.
616
617 2008-08-04  Timothy Hatcher  <timothy@apple.com>
618
619         Factors out the TextPrompt.scanBackwards function into a generic
620         helper function on the Node prototype, named rangeOfWord.
621
622         Reviewed by Adam Roben.
623
624         * page/inspector/Console.js:
625         (WebInspector.Console.prototype.completions): Use rangeOfWord.
626         * page/inspector/TextPrompt.js:
627         (WebInspector.TextPrompt.prototype.complete): Ditto.
628         (WebInspector.TextPrompt.prototype.scanBackwards): Removed.
629         * page/inspector/utilities.js:
630         (Node.prototype.rangeOfWord): Added. Copied from TextPrompt.scanBackwards,
631         and added a direction argument allowing scanning forward, backward or
632         both directions from the offset.
633
634 2008-08-04  Timothy Hatcher  <timothy@apple.com>
635
636         Fixes a bug where the property toggle button would not be hidden
637         during editing.
638
639         Reviewed by Adam Roben.
640
641         * page/inspector/inspector.css:
642         (li.editing .swatch, li.editing .enabled-button):
643         Make the display !important, since a more specific rule for 
644         .enabledbutton overrides display.
645
646 2008-08-05  Dan Bernstein  <mitz@apple.com>
647
648         Reviewed by Geoffrey Garen.
649
650         - remove redundant #imports from FrameMac.mm
651
652         * page/mac/FrameMac.mm:
653
654 2008-08-04  Bernhard Krüpl  <kruepl@dbai.tuwien.ac.at>
655
656         Reviewed by Dave Hyatt.
657
658         Fix for https://bugs.webkit.org/show_bug.cgi?id=19094
659         Corrected offsetTop for table cells by subtracting borderTopExtra
660
661         * rendering/RenderObject.cpp:
662         (WebCore::RenderObject::offsetTop):
663
664 2008-08-04  Dean Jackson  <dino@apple.com>
665
666         Reviewed by Dave Hyatt.
667
668         Improve AnimationController
669         https://bugs.webkit.org/show_bug.cgi?id=19938
670
671         - Transition class is now called Animation
672         - new state-based AnimationController that can support CSS Animations
673         - add support for -webkit-transition-delay
674         - remove -webkit-transition-repeat-count (since it never existed officially)
675         - updates the -webkit-transition shorthand to reflect removing repeat count
676         - updates the Transition class so that properties can be shared with animations
677         - adds a "now" keyword for -webkit-transition-delay
678         - adds a new change type for style (changed by animation)
679         - adds new event names (although they are not dispatched yet)
680         - makes text stroke and text fill colors returned by RenderStyle const
681
682         Tests:
683         - manual-tests/transition-left.html
684         - manual-tests/transition-delay.html
685         - manual-tests/transition-timing-functions.html
686
687         * css/CSSComputedStyleDeclaration.cpp:
688         * css/CSSParser.cpp:
689         * css/CSSParser.h:
690         * css/CSSPropertyNames.in:
691         * css/CSSStyleSelector.cpp:
692         * css/CSSStyleSelector.h:
693         * css/CSSTimingFunctionValue.h:
694         * css/CSSValue.h:
695         * css/CSSValueKeywords.in:
696         * css/WebKitCSSTransformValue.cpp:
697         * dom/Document.cpp:
698         * dom/Document.h:
699         * dom/Element.cpp:
700         * dom/EventNames.h:
701         * dom/Node.cpp:
702         * dom/Node.h:
703         * history/CachedPage.cpp:
704         * page/AnimationController.cpp:
705         * page/AnimationController.h:
706         * page/Frame.cpp:
707         * rendering/RenderObject.cpp:
708         * rendering/RenderWidget.cpp:
709         * rendering/style/RenderStyle.cpp:
710         * rendering/style/RenderStyle.h:
711
712 2008-08-04  Mike Belshe  <mike@belshe.com>
713
714         Reviewed by Antti.
715         
716         Currently we create two copies of script in the HTMLTokenizer.
717         One copy gets passed into the javascript engine, the other gets
718         stored in the DOM.  Modify the HTMLParser so that it does not
719         chunk the string into it's normal 64K chunks for script code,
720         and modify the HTMLTokenizer to pass that same string into the
721         JS engine.  On some sites (e.g. GMail), which have hundreds of
722         KB of inline JS, this saves more than a MB of RAM to run the page.
723         (Strings use 16bit strings, so 600KB of JS code == 1.2MB of memory)
724
725         * html\HTMLParser.cpp
726         * html\HTMLTokenizer.cpp
727
728 2008-08-04  Sam Weinig  <sam@webkit.org>
729
730         Reviewed by Mark Rowe.
731
732         Remove extra braces left in from JSLock removal.
733
734         * xml/XMLHttpRequest.cpp:
735         (WebCore::XMLHttpRequest::dropProtection):
736
737 2008-08-02  Sam Weinig  <sam@webkit.org>
738
739         Reviewed by Dan Bernstein.
740
741         Implement the Access-control for Cross Site requests
742         preflight cache.
743
744         Tests: http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html
745                http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-method.html
746                http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html
747                http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html
748
749         * WebCore.vcproj/WebCore.vcproj:
750         * WebCore.xcodeproj/project.pbxproj:
751         * platform/KURL.h:
752         (WTF::):
753         * platform/KURLHash.h: Added.
754         (WebCore::KURLHash::hash):
755         (WebCore::KURLHash::equal):
756         (WTF::):
757         * xml/XMLHttpRequest.cpp:
758         (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
759         (WebCore::preflightResultCache):
760         (WebCore::appendPreflightResultCacheEntry):
761         (WebCore::canSkipPrelight):
762         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
763         (WebCore::parseAccessControlAllowList):
764         (WebCore::parseAccessControlMaxAge):
765         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
766
767 2008-08-04  Eric Seidel  <eric@webkit.org>
768
769         Reviewed by Adam Roben.
770
771         Fix warning seen in MSVC converting ints to floats.
772
773         * rendering/Length.h:
774         (WebCore::Length::calcFloatValue):
775
776 2008-08-04  Eric Seidel  <eric@webkit.org>
777
778         Reviewed by hyatt.
779
780         Clean up Gradient constructors, make sure all members are initialized.
781
782         * platform/graphics/Gradient.cpp:
783         (WebCore::Gradient::Gradient):
784
785 2008-08-02  Maxime Britto  <britto@apple.com>
786
787         Reviewed by Eric Seidel.
788
789         <rdar://problem/6118969>
790         https://bugs.webkit.org/show_bug.cgi?id=19971 
791         Modifiy the cursor interactively when on panning mode (middle click auto scroll)
792         When the panning is in progress the cursor is an arrow representing the direction of the current scroll
793
794         * page/EventHandler.cpp:
795         (WebCore::EventHandler::autoscrollTimerFired): Before each scroll we actualize the cursor to match the current direction
796         (WebCore::EventHandler::setPanScrollCursor): determines the direction of the upcoming scroll.
797         (WebCore::EventHandler::handleMouseMoveEvent):
798         * page/EventHandler.h: 
799         * platform/Cursor.h: Add propotypes for the new cursor functions
800         * platform/gtk/CursorGtk.cpp: to avoid build break
801         (WebCore::middlePanningCursor):
802         (WebCore::eastPanningCursor):
803         (WebCore::northPanningCursor):
804         (WebCore::northEastPanningCursor):
805         (WebCore::northWestPanningCursor):
806         (WebCore::southPanningCursor):
807         (WebCore::southEastPanningCursor):
808         (WebCore::southWestPanningCursor):
809         (WebCore::westPanningCursor):
810         * platform/mac/CursorMac.mm: to avoid build break
811         (WebCore::middlePanningCursor):
812         (WebCore::eastPanningCursor):
813         (WebCore::northPanningCursor):
814         (WebCore::northEastPanningCursor):
815         (WebCore::northWestPanningCursor):
816         (WebCore::southPanningCursor):
817         (WebCore::southEastPanningCursor):
818         (WebCore::southWestPanningCursor):
819         (WebCore::westPanningCursor):
820         * platform/qt/CursorQt.cpp: to avoid build break
821         (WebCore::middlePanningCursor):
822         (WebCore::eastPanningCursor):
823         (WebCore::northPanningCursor):
824         (WebCore::northEastPanningCursor):
825         (WebCore::northWestPanningCursor):
826         (WebCore::southPanningCursor):
827         (WebCore::southEastPanningCursor):
828         (WebCore::southWestPanningCursor):
829         (WebCore::westPanningCursor):
830         * platform/win/CursorWin.cpp: Add specific icons for the panning as windows resizing icons are both sides arrows
831         (WebCore::middlePanningCursor):
832         (WebCore::eastPanningCursor):
833         (WebCore::northPanningCursor):
834         (WebCore::northEastPanningCursor):
835         (WebCore::northWestPanningCursor):
836         (WebCore::southPanningCursor):
837         (WebCore::southEastPanningCursor):
838         (WebCore::southWestPanningCursor):
839         (WebCore::westPanningCursor):
840         * platform/wx/CursorWx.cpp: to avoid build break
841         (WebCore::middlePanningCursor):
842         (WebCore::eastPanningCursor):
843         (WebCore::northPanningCursor):
844         (WebCore::northEastPanningCursor):
845         (WebCore::northWestPanningCursor):
846         (WebCore::southPanningCursor):
847         (WebCore::southEastPanningCursor):
848         (WebCore::southWestPanningCursor):
849         (WebCore::westPanningCursor):
850
851 2008-08-02  Kevin Ollivier  <kevino@theolliviers.com>
852
853         Move to using constants in accordance with discussions about wx renderer commit.
854
855         * platform/wx/RenderThemeWx.cpp:
856         (WebCore::RenderThemeWx::minimumMenuListSize):
857         (WebCore::RenderThemeWx::popupInternalPaddingLeft):
858         (WebCore::RenderThemeWx::popupInternalPaddingRight):
859         (WebCore::RenderThemeWx::popupInternalPaddingTop):
860         (WebCore::RenderThemeWx::popupInternalPaddingBottom):
861
862 2008-08-02  Wouter Bolsterlee  <wbolster@svn.gnome.org>
863
864         Reviewed by Eric Seidel.
865
866         * plugins/gtk/gtk2xtbin.h:
867
868         https://bugs.webkit.org/show_bug.cgi?id=20034
869         Fix malformed Vim modeline.
870
871 2008-08-01  Dan Bernstein  <mitz@apple.com>
872
873         Reviewed by Dave Hyatt.
874
875         - tweak a comment
876
877         * platform/graphics/cg/ImageCG.cpp:
878         (WebCore::BitmapImage::draw):
879
880 2008-08-01  Jan Michael Alonzo  <jmalonzo@webkit.org>
881
882         * ChangeLog: Fix date of previous commit (r35520)
883
884 2008-08-01  Marco Barisione  <marco.barisione@collabora.co.uk>
885
886         Reviewed by Eric Seidel.
887
888         https://bugs.webkit.org/show_bug.cgi?id=19603
889         [SOUP] segfault when closing a file using gio
890
891         Call client->didFinishLoading() only after releasing all the gio
892         resources.
893
894         * platform/network/soup/ResourceHandleSoup.cpp:
895         (WebCore::closeCallback):
896         (WebCore::readCallback):
897
898 2008-08-01  Anders Carlsson  <andersca@apple.com>
899
900         Reviewed by Jon.
901
902         <rdar://problem/6120206>
903         Crash when plug-in queries for NPPVpluginWantsAllNetworkStreams.
904         
905         Pass in a pointer to a void* to make sure that plug-ins don't overwrite the stack.
906         
907         * plugins/PluginStream.cpp:
908         (WebCore::PluginStream::wantsAllStreams):
909
910 2008-08-01  Robin Dunn  <robin@alldunn.com>
911
912         Reviewed by Eric Seidel.
913
914         Native rendering implementations for form elements in the wx port.
915         
916         https://bugs.webkit.org/show_bug.cgi?id=19069
917
918         * platform/wx/RenderThemeWx.cpp:
919         (WebCore::RenderThemeWx::adjustRepaintRect):
920         (WebCore::RenderThemeWx::paintButton):
921         (WebCore::RenderThemeWx::paintTextField):
922         (WebCore::RenderThemeWx::minimumMenuListSize):
923         (WebCore::RenderThemeWx::adjustMenuListStyle):
924         (WebCore::RenderThemeWx::paintMenuList):
925         (WebCore::RenderThemeWx::adjustMenuListButtonStyle):
926         (WebCore::RenderThemeWx::paintMenuListButton):
927         (WebCore::RenderThemeWx::popupInternalPaddingLeft):
928         (WebCore::RenderThemeWx::popupInternalPaddingRight):
929         (WebCore::RenderThemeWx::popupInternalPaddingTop):
930         (WebCore::RenderThemeWx::popupInternalPaddingBottom):
931
932 2008-07-30  David Hyatt  <hyatt@apple.com>
933
934         Improvements to selection drawing.
935
936         Clip out floating and positioned objects when drawing selection so
937         that there is no "double painting" of selection when the selection spans both the space behind the positioned/floating
938         object and the positioned/floating object itself.  Improves most Web pages.
939
940         Do not paint left/right selection gaps if the object's edge is already outside the boundary (at a negative
941         position).  Significantly improves the look of selections on digg.com, since it uses giant negative text-indent.
942
943         Reviewed by Dan
944
945         Covered by existing selection pixel tests.
946
947         * rendering/RenderBlock.cpp:
948         (WebCore::RenderBlock::isSelectionRoot):
949         (WebCore::RenderBlock::paintSelection):
950         (WebCore::clipOutPositionedObjects):
951         (WebCore::RenderBlock::fillSelectionGaps):
952         (WebCore::RenderBlock::fillLeftSelectionGap):
953         (WebCore::RenderBlock::fillRightSelectionGap):
954
955 2008-08-01  Timothy Hatcher  <timothy@apple.com>
956
957         Adds the ability to disable individual properties of a CSS rule.
958         When hovering over a rule, checkboxes show up to the right of all
959         properties and toggling a checkbox disables/enables the property.
960         Behind the scenes the property is removed from the rule when disabled,
961         but still remains in the list and in the computed style. When disabled
962         the property has a line through it, and is faded in computed style.
963
964         <rdar://problem/5712828> Support disabling individual CSS properties
965         https://bugs.webkit.org/show_bug.cgi?id=14377
966
967         Reviewed by Adam Roben.
968
969         * page/inspector/StylesSidebarPane.js:
970         (WebInspector.StylesSidebarPane.prototype.update): Include the
971         inline style when it also has disabled properties. Call
972         deleteDisabledProperty for any property that is in the style,
973         since it might have been added back by the page. Remember all
974         disabled properties so they show up in computed style.
975         (deleteDisabledProperty): Helper function to delete all the
976         right properties that track disabled properties.
977         (WebInspector.StylePropertiesSection): Add the computed-style
978         class when  the section is Computed Style.
979         (WebInspector.StylePropertiesSection.prototype.onpopulate):
980         Include disabled properties.
981         (WebInspector.StylePropertyTreeElement): Added a disabled argument.
982         (WebInspector.StylePropertyTreeElement.prototype.get/set disabled):
983         Sets the _disabled property and calls updateState.
984         (WebInspector.StylePropertyTreeElement.prototype.get priority):
985         Return the priority of enabled or disabled properties.
986         (WebInspector.StylePropertyTreeElement.prototype.get value):
987         Return the value of enabled or disabled properties.
988         (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Use the
989         priority and value getter. Append the checkbox for root elements of
990         an editable section.
991         (WebInspector.StylePropertyTreeElement.prototype.toggleEnabled):
992         Add or remove properties from the rule and remember removed ones
993         by adding three objects to the style: __disabledProperties,
994         __disabledPropertyValues and __disabledPropertyPriorities.
995         The __disabledProperties object will include all longhand
996         properties of a shorthand for use by Computed Style.
997         (WebInspector.StylePropertyTreeElement.prototype.updateState):
998         Use the value getter. Update the disabled state.
999         * page/inspector/inspector.css:
1000         * page/inspector/utilities.js:
1001         (Object.hasProperties): Added. Helper to test if an object
1002         has any properties.
1003
1004 2008-07-31  Anders Carlsson  <andersca@apple.com>
1005
1006         Reviewed by Darin.
1007
1008         <rdar://problem/5949410>
1009         Add the ability to transfer a given application cache to a new database.
1010         
1011         * WebCore.base.exp:
1012         Export ApplicationCacheStorage::storeCopyOfCache.
1013         
1014         * loader/appcache/ApplicationCache.cpp:
1015         (WebCore::ApplicationCache::~ApplicationCache):
1016         Don't call cacheDestroyed for our special "copy" groups.
1017         
1018         * loader/appcache/ApplicationCacheGroup.cpp:
1019         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1020         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
1021         Add a "copy" flag to the ApplicationCacheGroup constructor. A "copied" group is special
1022         and can only be stored to disk.
1023         
1024         * loader/appcache/ApplicationCacheGroup.h:
1025         (WebCore::ApplicationCacheGroup::isCopy):
1026         New getter.
1027         
1028         * loader/appcache/ApplicationCacheStorage.cpp:
1029         (WebCore::ApplicationCacheStorage::store):
1030         Make sure to set the storageID when storing an application resource.
1031         
1032         (WebCore::ApplicationCacheStorage::storeNewestCache):
1033         Change this to return true/false depending on whether storing the cache succeeded or not.
1034         
1035         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
1036         New method which stores a given cache in a new storage (database file).
1037         
1038         * loader/appcache/ApplicationCacheStorage.h:
1039         Add new methods.
1040
1041 2008-07-31  John Sullivan  <sullivan@apple.com>
1042
1043         WebCore part of <rdar://problem/6116650> Text-only zoom setting should be stored in WebKit prefs
1044
1045         Reviewed by Hyatt
1046
1047         * WebCore.base.exp:
1048         export symbol for WebCoreSettings::setZoomsTextOnly()
1049         
1050         * page/Frame.cpp:
1051         (WebCore::Frame::isZoomFactorTextOnly):
1052         use value from Settings instead of data member
1053         (WebCore::Frame::shouldApplyTextZoom):
1054         call isZoomFactorTextOnly() to get value instead of accessing now-removed data member
1055         (WebCore::Frame::shouldApplyPageZoom):
1056         ditto
1057         (WebCore::Frame::setZoomFactor):
1058         set value into Settings rather than into data member
1059         (WebCore::FramePrivate::FramePrivate):
1060         don't set initial value of now-removed data member; this is managed by Settings now
1061         
1062         * page/FramePrivate.h:
1063         removed m_zoomFactorIsTextOnly
1064         
1065         * page/Settings.cpp:
1066         (WebCore::Settings::setZoomsTextOnly):
1067         new function, sets values and reapplies styles in all frames
1068         
1069         * page/Settings.h:
1070         (WebCore::Settings::zoomsTextOnly):
1071         new function, returns value of new data member
1072
1073 2008-07-31  Simon Fraser  <simon.fraser@apple.com>
1074
1075         Reviewed by Dave Hyatt
1076
1077         Null-check parent clip rects, because they may not have been
1078         set up yet.
1079         https://bugs.webkit.org/show_bug.cgi?id=20243
1080
1081         * rendering/RenderLayer.cpp:
1082         (WebCore::RenderLayer::calculateClipRects):
1083
1084 2008-07-31  Dan Bernstein  <mitz@apple.com>
1085
1086         Reviewed by Dave Hyatt.
1087
1088         - fix <rdar://problem/6058958> REGRESSION (r34210): Seams are visible in border-image
1089
1090         * platform/graphics/cg/ImageCG.cpp:
1091         (WebCore::BitmapImage::draw): To work around a Core Graphics
1092         interpolation issue, reverted to using a temporary subimage for drawing
1093         a portion of the image with scaling and high-quality interpolation in
1094         effect.
1095
1096 2008-07-31  chris fleizach  <cfleizach@apple.com>
1097
1098         Reviewed by Alice Liu
1099
1100         <rdar://problem/3563671> VO doesn't highlight characters when interacting when static text in web areas
1101
1102         Need to expose the AXBoundsForRange parameter which allows an AX client to get the visible bounds
1103         for individual characters on a webpage.
1104
1105         Test: accessibility/bounds-for-range.html
1106
1107         * ChangeLog:
1108         * page/AccessibilityRenderObject.cpp:
1109         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1110         * page/mac/AccessibilityObjectWrapper.mm:
1111         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1112         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1113
1114 2008-07-31  Kevin Ollivier <kevino@theolliviers.com>
1115
1116         Second attempt at Windows/wx build fix. Instead of avoiding inclusion of windows.h,
1117         use defines, etc. to avoid conflicts in each affected file.
1118
1119         * config.h:
1120         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1121         * platform/wx/PopupMenuWx.cpp:
1122
1123 2008-07-31  Erik Bunce  <elbunce@thehive.com>
1124
1125         Reviewed by Simon.
1126
1127         https://bugs.webkit.org/show_bug.cgi?id=20224
1128
1129         Include the Writing Direction sub-menu in the context menu of all
1130         platforms but GTK. This fixes a regression introduced by revision
1131         34426.
1132
1133         * platform/ContextMenu.cpp:
1134         (WebCore::ContextMenu::populate):
1135
1136 2008-07-31  Brady Eidson  <beidson@apple.com>
1137
1138         Reviewed by Adam and Hyatt
1139
1140         Fix for <rdar://problem/6099748>
1141
1142         Adds a "don't enforce CSS mime type in strict mode" quirk for iWeb 2
1143
1144         * WebCore.base.exp:
1145
1146         * html/HTMLLinkElement.cpp:
1147         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1148
1149         * loader/CachedCSSStyleSheet.cpp:
1150         (WebCore::CachedCSSStyleSheet::canUseSheet):
1151         * loader/CachedCSSStyleSheet.h:
1152         (WebCore::CachedCSSStyleSheet::sheetText): 
1153         * page/Settings.cpp:
1154
1155         (WebCore::Settings::Settings):
1156         (WebCore::Settings::setEnforceCSSMIMETypeInStrictMode):
1157         * page/Settings.h:
1158         (WebCore::Settings::enforceCSSMIMETypeInStrictMode):
1159
1160 2008-07-31  Erik Bunce  <elbunce@thehive.com>
1161
1162         Reviewed by Simon.
1163
1164         Added the ability to get SQLite headers and source from the location 
1165         specified via the SQLITE3SRCDIR environtment variable.
1166
1167         * WebCore.pro:
1168
1169 2008-07-31  Alexey Proskuryakov  <ap@webkit.org>
1170
1171         Rubber-stamped by Maciej.
1172
1173         Eliminate JSLock (it was already disabled, removing the stub implementaion and all
1174         call sites now).
1175
1176         * ForwardingHeaders/kjs/JSLock.h: Removed.
1177         * WebCore.vcproj/WebCore.vcproj:
1178         * bindings/js/GCController.cpp:
1179         (WebCore::collect):
1180         (WebCore::GCController::gcTimerFired):
1181         (WebCore::GCController::garbageCollectNow):
1182         * bindings/js/JSCustomSQLStatementCallback.cpp:
1183         (WebCore::JSCustomSQLStatementCallback::handleEvent):
1184         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1185         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
1186         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1187         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
1188         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1189         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
1190         * bindings/js/JSCustomVoidCallback.cpp:
1191         (WebCore::JSCustomVoidCallback::handleEvent):
1192         * bindings/js/JSCustomXPathNSResolver.cpp:
1193         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1194         * bindings/js/JSDOMWindowBase.cpp:
1195         (WebCore::DOMWindowTimer::~DOMWindowTimer):
1196         (WebCore::JSDOMWindowBase::clear):
1197         (WebCore::JSDOMWindowBase::timerFired):
1198         * bindings/js/JSEventCustom.cpp:
1199         (WebCore::toJS):
1200         * bindings/js/JSEventListener.cpp:
1201         (WebCore::JSAbstractEventListener::handleEvent):
1202         (WebCore::JSLazyEventListener::parseCode):
1203         * bindings/js/JSNSResolver.cpp:
1204         (WebCore::JSNSResolver::lookupNamespaceURI):
1205         * bindings/js/JSNodeFilterCondition.cpp:
1206         (WebCore::JSNodeFilterCondition::acceptNode):
1207         * bindings/js/ScheduledAction.cpp:
1208         (WebCore::ScheduledAction::execute):
1209         * bindings/js/ScriptController.cpp:
1210         (WebCore::ScriptController::evaluate):
1211         (WebCore::ScriptController::clear):
1212         (WebCore::ScriptController::createHTMLEventHandler):
1213         (WebCore::ScriptController::createSVGEventHandler):
1214         (WebCore::ScriptController::initScript):
1215         (WebCore::ScriptController::updateDocument):
1216         * bindings/objc/WebScriptObject.mm:
1217         (_didExecute):
1218         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1219         (-[WebScriptObject evaluateWebScript:]):
1220         (-[WebScriptObject setValue:forKey:]):
1221         (-[WebScriptObject valueForKey:]):
1222         (-[WebScriptObject removeWebScriptKey:]):
1223         (-[WebScriptObject stringRepresentation]):
1224         (-[WebScriptObject webScriptValueAtIndex:]):
1225         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1226         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1227         * bridge/NP_jsobject.cpp:
1228         (_NPN_InvokeDefault):
1229         (_NPN_Invoke):
1230         (_NPN_Evaluate):
1231         (_NPN_GetProperty):
1232         (_NPN_SetProperty):
1233         (_NPN_RemoveProperty):
1234         (_NPN_HasProperty):
1235         (_NPN_HasMethod):
1236         (_NPN_Enumerate):
1237         * bridge/c/c_class.cpp:
1238         (KJS::Bindings::CClass::~CClass):
1239         (KJS::Bindings::CClass::methodsNamed):
1240         (KJS::Bindings::CClass::fieldNamed):
1241         * bridge/c/c_instance.cpp:
1242         (KJS::Bindings::CInstance::invokeMethod):
1243         (KJS::Bindings::CInstance::invokeDefaultMethod):
1244         (KJS::Bindings::CInstance::getPropertyNames):
1245         * bridge/c/c_runtime.cpp:
1246         (KJS::Bindings::CField::valueFromInstance):
1247         (KJS::Bindings::CField::setValueToInstance):
1248         * bridge/c/c_utility.cpp:
1249         (KJS::Bindings::convertValueToNPVariant):
1250         (KJS::Bindings::convertNPVariantToValue):
1251         * bridge/jni/jni_class.cpp:
1252         (JavaClass::JavaClass):
1253         (JavaClass::~JavaClass):
1254         * bridge/jni/jni_instance.cpp:
1255         (JavaInstance::stringValue):
1256         * bridge/jni/jni_jsobject.mm:
1257         (JavaJSObject::call):
1258         (JavaJSObject::eval):
1259         (JavaJSObject::getMember):
1260         (JavaJSObject::setMember):
1261         (JavaJSObject::removeMember):
1262         (JavaJSObject::getSlot):
1263         (JavaJSObject::setSlot):
1264         (JavaJSObject::toString):
1265         (JavaJSObject::convertValueToJObject):
1266         (JavaJSObject::convertJObjectToValue):
1267         * bridge/jni/jni_objc.mm:
1268         (KJS::Bindings::dispatchJNICall):
1269         * bridge/jni/jni_runtime.cpp:
1270         (appendClassName):
1271         (JavaMethod::signature):
1272         * bridge/jni/jni_runtime.h:
1273         (KJS::Bindings::JavaString::JavaString):
1274         (KJS::Bindings::JavaString::_commonInit):
1275         (KJS::Bindings::JavaString::~JavaString):
1276         (KJS::Bindings::JavaString::UTF8String):
1277         * bridge/jni/jni_utility.cpp:
1278         (KJS::Bindings::convertValueToJValue):
1279         * bridge/npruntime.cpp:
1280         (_NPN_GetStringIdentifier):
1281         * bridge/objc/objc_instance.mm:
1282         (ObjcInstance::moveGlobalExceptionToExecState):
1283         (ObjcInstance::invokeMethod):
1284         (ObjcInstance::invokeDefaultMethod):
1285         (ObjcInstance::setValueOfUndefinedField):
1286         (ObjcInstance::getValueOfUndefinedField):
1287         * bridge/objc/objc_runtime.mm:
1288         (ObjcField::valueFromInstance):
1289         (ObjcField::setValueToInstance):
1290         * bridge/objc/objc_utility.mm:
1291         (KJS::Bindings::convertValueToObjcValue):
1292         (KJS::Bindings::convertNSStringToString):
1293         (KJS::Bindings::convertObjcValueToValue):
1294         * bridge/qt/qt_instance.cpp:
1295         (KJS::Bindings::QtRuntimeObjectImp::removeFromCache):
1296         (KJS::Bindings::QtInstance::~QtInstance):
1297         (KJS::Bindings::QtInstance::getQtInstance):
1298         (KJS::Bindings::QtInstance::getRuntimeObject):
1299         * bridge/qt/qt_runtime.cpp:
1300         (KJS::Bindings::convertValueToQVariant):
1301         (KJS::Bindings::convertQVariantToValue):
1302         (KJS::Bindings::QtRuntimeMetaMethod::call):
1303         (KJS::Bindings::QtRuntimeConnectionMethod::call):
1304         (KJS::Bindings::QtConnectionObject::QtConnectionObject):
1305         (KJS::Bindings::QtConnectionObject::execute):
1306         * bridge/runtime.cpp:
1307         (KJS::Bindings::Instance::createRuntimeObject):
1308         * bridge/testbindings.cpp:
1309         (main):
1310         * bridge/testbindings.mm:
1311         (main):
1312         * bridge/testqtbindings.cpp:
1313         (main):
1314         * dom/Document.cpp:
1315         (WebCore::Document::~Document):
1316         * dom/Node.cpp:
1317         (WebCore::Node::setDocument):
1318         * history/CachedPage.cpp:
1319         (WebCore::CachedPage::CachedPage):
1320         (WebCore::CachedPage::restore):
1321         (WebCore::CachedPage::clear):
1322         * html/HTMLPlugInElement.cpp:
1323         (WebCore::HTMLPlugInElement::createNPObject):
1324         * loader/FrameLoader.cpp:
1325         (WebCore::getString):
1326         * page/Frame.cpp:
1327         (WebCore::Frame::bindingRootObject):
1328         (WebCore::Frame::windowScriptNPObject):
1329         (WebCore::Frame::clearScriptObjects):
1330         * page/InspectorController.cpp:
1331         (WebCore::jsStringRef):
1332         (WebCore::ConsoleMessage::ConsoleMessage):
1333         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
1334         (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource):
1335         (WebCore::getResourceDocumentNode):
1336         (WebCore::search):
1337         (WebCore::inspectedWindow):
1338         (WebCore::wrapCallback):
1339         (WebCore::currentCallFrame):
1340         (WebCore::profiles):
1341         (WebCore::InspectorController::focusNode):
1342         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
1343         (WebCore::InspectorController::addDatabaseScriptResource):
1344         (WebCore::InspectorController::addScriptProfile):
1345         * page/JavaScriptCallFrame.cpp:
1346         (WebCore::JavaScriptCallFrame::evaluate):
1347         * page/JavaScriptProfileNode.cpp:
1348         (WebCore::getTotalTime):
1349         (WebCore::getSelfTime):
1350         (WebCore::getTotalPercent):
1351         (WebCore::getSelfPercent):
1352         (WebCore::getNumberOfCalls):
1353         (WebCore::getChildren):
1354         (WebCore::getVisible):
1355         * page/Page.cpp:
1356         * page/mac/FrameMac.mm:
1357         (WebCore::Frame::windowScriptObject):
1358         * page/qt/FrameQt.cpp:
1359         * plugins/PluginView.cpp:
1360         (WebCore::PluginView::start):
1361         (WebCore::getString):
1362         (WebCore::PluginView::performRequest):
1363         (WebCore::PluginView::bindingInstance):
1364         * plugins/gtk/PluginViewGtk.cpp:
1365         (WebCore::PluginView::paint):
1366         (WebCore::PluginView::handleKeyboardEvent):
1367         (WebCore::PluginView::handleMouseEvent):
1368         (WebCore::PluginView::setNPWindowRect):
1369         (WebCore::PluginView::stop):
1370         (WebCore::PluginView::init):
1371         * plugins/qt/PluginViewQt.cpp:
1372         (WebCore::PluginView::setNPWindowRect):
1373         (WebCore::PluginView::stop):
1374         (WebCore::PluginView::init):
1375         * plugins/win/PluginViewWin.cpp:
1376         (WebCore::PluginView::dispatchNPEvent):
1377         (WebCore::PluginView::handleKeyboardEvent):
1378         (WebCore::PluginView::handleMouseEvent):
1379         (WebCore::PluginView::setNPWindowRect):
1380         (WebCore::PluginView::stop):
1381         * xml/XMLHttpRequest.cpp:
1382         (WebCore::XMLHttpRequest::clearResponse):
1383         (WebCore::XMLHttpRequest::didFinishLoading):
1384         (WebCore::XMLHttpRequest::didReceiveData):
1385
1386 2008-07-30  Timothy Hatcher  <timothy@apple.com>
1387
1388         Fix various minor bugs with style editing in the Inspector.
1389
1390         - Restores the scroll position to 0,0 when finished editing a
1391         string that was longer than the editing input area.
1392
1393         - Adjusts the margin of the list item to ensure the text does
1394         not shift when entering and exiting editing mode.
1395
1396         - Reliably remembers if a shorthand has children when the
1397         children haven't been populated yet.
1398
1399         - Reliably remembers if a shorthand was expanded, and expands
1400         if needed after editing finishes.
1401
1402         - Hides color swatches when editing.
1403
1404         https://bugs.webkit.org/show_bug.cgi?id=20238
1405
1406         Reviewed by Adam Roben.
1407
1408         * page/inspector/StylesSidebarPane.js:
1409         (WebInspector.StylePropertyTreeElement.prototype.startEditing):
1410         Store the expanded state and children state in wasExpanded and
1411         reallyHasChildren properties.
1412         (WebInspector.StylePropertyTreeElement.prototype.editingEnded):
1413         Removed the wasExpanded argument and use the reallyHasChildren and
1414         wasExpanded properties to restore state. Deletes the state properties.
1415         (WebInspector.StylePropertyTreeElement.prototype.editingCancelled):
1416         Removed the wasExpanded argument.
1417         (WebInspector.StylePropertyTreeElement.prototype.editingCommitted):
1418         Removed the wasExpanded argument.
1419         * page/inspector/inspector.css: Tweak the margin and hides the color
1420         swatches. ALso removes a rule that was not needed.
1421         * page/inspector/inspector.js:
1422         (WebInspector.startEditing): Restore the scrollLeft and scrollTop
1423         to zero when editing finishes.
1424
1425 2008-07-30  Alice Liu  <alice.liu@apple.com>
1426
1427         Implement userIdleTime() for Windows, and place a band-aid over other
1428         platform implementations of userIdleTime().  This will fix the issue
1429         of indefinitely postposing releasing pages from the PageCache
1430         on non-Mac platforms, causing us to hang onto just about everything 
1431         else about a web page.
1432         
1433         Reviewed by Sam Weinig.
1434
1435         * platform/gtk/TemporaryLinkStubs.cpp:
1436         * platform/wx/TemporaryLinkStubs.cpp:
1437         * platform/qt/TemporaryLinkStubs.cpp:
1438         (WebCore::userIdleTime): set to FLT_MAX
1439
1440         * platform/win/SystemTimeWin.cpp:
1441         (WebCore::userIdleTime): implemented
1442
1443 2008-07-30  Beth Dakin  <bdakin@apple.com>
1444
1445         Reviewed by Anders Carlsson.
1446
1447         Fixes <rdar://problem/6041390>
1448
1449         Adds the ability to have a frame that is "disconnected" from the 
1450         main frame from the perspective of top and parent in 
1451         Javascript.
1452
1453         * WebCore.base.exp:
1454         * page/DOMWindow.cpp:
1455         (WebCore::DOMWindow::parent):
1456         (WebCore::DOMWindow::top):
1457         * page/Frame.cpp:
1458         (WebCore::Frame::isDisconnectedFrame):
1459         (WebCore::Frame::setIsDisconnectedFrame):
1460         (WebCore::FramePrivate::FramePrivate):
1461         * page/Frame.h:
1462         * page/FramePrivate.h:
1463         * page/FrameTree.cpp:
1464         (WebCore::FrameTree::parent):
1465         (WebCore::FrameTree::top):
1466         * page/FrameTree.h:
1467
1468 2008-07-25  Eric Seidel  <eric@webkit.org>
1469
1470         Reviewed by Justin.
1471
1472         Crash Safari when dragging images into Google presentations
1473         https://bugs.webkit.org/show_bug.cgi?id=20161
1474
1475         Test: manual-tests/remove-on-drop-crash.html
1476
1477         * editing/ReplaceSelectionCommand.cpp:
1478         (WebCore::ReplaceSelectionCommand::doApply):
1479         * manual-tests/remove-on-drop-crash.html: Added.
1480
1481 2008-07-30  Christian Dywan  <christian@twotoasts.de>
1482
1483         Reviewed by Mark.
1484
1485         Build fix for Cairo < 1.6
1486
1487         * platform/graphics/cairo/PathCairo.cpp:
1488         (WebCore::Path::boundingRect): use cairo_stroke_extends for < 1.6
1489
1490 2008-07-29  Kevin McCullough  <kmccullough@apple.com>
1491
1492         Reviewed by Geoff.
1493
1494         <rdar://problem/6110314> Crash in profiler dereferencing null frame or
1495         page (20214)
1496         - Null check.
1497
1498         * page/Console.cpp:
1499         (WebCore::Console::finishedProfiling):
1500
1501 2008-07-30  David Hyatt  <hyatt@apple.com>
1502
1503         https://bugs.webkit.org/show_bug.cgi?id=18070
1504         
1505         Full page zoom needs to work properly with JS mouse events.  Make sure to adjust the coordinates of the
1506         JS mouse event to account for zoom.
1507
1508         Reviewed by olliej
1509
1510         * dom/EventTargetNode.cpp:
1511         (WebCore::EventTargetNode::dispatchMouseEvent):
1512
1513 2008-07-29  Sam Weinig  <sam@webkit.org>
1514
1515         Reviewed by Darin Adler.
1516
1517         Update Cross-site XMLHttpRequests using Access control to
1518         the latest spec. (Editor's Draft 8 July 2008)
1519
1520         - This leaves us at about the same place as we previously were
1521           still needing preflight caching and better redirect support.
1522
1523         * GNUmakefile.am:
1524         * WebCore.pro:
1525         * WebCore.vcproj/WebCore.vcproj:
1526         * WebCore.xcodeproj/project.pbxproj:
1527         * WebCoreSources.bkl:
1528         * xml/AccessControlList.cpp: Removed.
1529         * xml/AccessControlList.h: Removed.
1530         * xml/AccessItem.cpp: Removed.
1531         * xml/AccessItem.h: Removed.
1532         * xml/AccessItemRule.cpp: Removed.
1533         * xml/AccessItemRule.h: Removed.
1534         * xml/XMLHttpRequest.cpp:
1535         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
1536         (WebCore::XMLHttpRequest::XMLHttpRequest):
1537         (WebCore::XMLHttpRequest::isSimpleCrossSiteAccessRequest):
1538         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequest):
1539         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
1540         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
1541         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
1542         (WebCore::XMLHttpRequest::abort):
1543         (WebCore::XMLHttpRequest::clearRequest):
1544         (WebCore::XMLHttpRequest::didFinishLoading):
1545         (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
1546         (WebCore::XMLHttpRequest::accessControlCheck):
1547         (WebCore::XMLHttpRequest::didReceiveResponse):
1548         (WebCore::parseAccessControlAllowList):
1549         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
1550         * xml/XMLHttpRequest.h:
1551
1552 2008-07-29  Kevin Calhoun  <kcalhoun@apple.com>
1553
1554         Reviewed by Adele.
1555
1556         Fix for <rdar://problem/6060647> Adopt QTMovieOpenForPlaybackAttribute flag
1557
1558         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie):
1559
1560 2008-07-29  Kevin Calhoun  <kcalhoun@apple.com>
1561
1562         Reviewed by Adele.
1563
1564         Fix for <rdar://problem/6031021> Make standalone video render more like the quicktime plugin to improve performance
1565
1566         For standalone video, use QTMovieView to draw.
1567
1568         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1569         (WebCore::MediaPlayerPrivate::createQTMovieView): Moved nil checks to setUpVideoRendering.
1570          Associate the QTMovieView with the WebCoreMovieObserver.
1571          If we're in a media document, allow QTMovieView to render in its default mode; otherwise tell it to draw synchronously. 
1572         (WebCore::MediaPlayerPrivate::detachQTMovieView): Set the WebCoreMovieObserver's view to nil.
1573         (WebCore::MediaPlayerPrivate::createQTVideoRenderer): Nil check is now in setUpVideoRendering, which is the only caller of this.
1574         (WebCore::MediaPlayerPrivate::setUpVideoRendering): Added nil checks.  Call createQTMovieView for media documents.
1575         (WebCore::MediaPlayerPrivate::tearDownVideoRendering): Call detachQTMovieView if a QTMovieView exists.
1576         (WebCore::MediaPlayerPrivate::setRect): Call setFrame on the QTMovieView if necessary.
1577         (-[WebCoreMovieObserver menuForEventDelegate:]): Added. Returns the frame view's menu.
1578         (-[WebCoreMovieObserver setView:]): Added.
1579
1580 2008-07-29  Adele Peterson  <adele@apple.com>
1581
1582         Reviewed by Dan Bernstein.
1583
1584         Fix for <rdar://problem/6073372> Move built-in controls below <video> element for standalone media documents
1585
1586         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added -webkit-full-page-media pseudo class.
1587         * css/CSSSelector.h: (WebCore::CSSSelector::): Added PseudoFullPageMedia.
1588         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added case to
1589         apply PseudoFullPageMedia for elements in a full page media document.
1590
1591         * css/html4.css: Added rule to shift control panel down for video in standalone media documents.
1592
1593         * rendering/RenderMedia.cpp:
1594         (WebCore::RenderMedia::lowestPosition): Added implementation that takes the controls into account.
1595         This makes sure that scrollbars on the page will account for controls not directly contained in the RenderMedia.
1596         (WebCore::RenderMedia::rightmostPosition): ditto.
1597         (WebCore::RenderMedia::leftmostPosition): ditto.
1598         * rendering/RenderMedia.h:
1599
1600 2008-07-29  Sam Weinig  <sam@webkit.org>
1601
1602         Reviewed by Anders Carlsson.
1603
1604         <rdar://problem/6084585> Investigate upload progress events.
1605
1606         - Add progress notifications for data being sent via a ResourceHandle.
1607         - Add XMLHttpRequestUpload support.
1608
1609         Upload notifications only work on the Mac right now as the CFNetwork API
1610         on windows does not expose enough information.
1611
1612         Tests: http/tests/xmlhttprequest/upload-onload-event.html
1613                http/tests/xmlhttprequest/upload-onloadstart-event.html
1614                http/tests/xmlhttprequest/upload-onprogress-event.html
1615                http/tests/xmlhttprequest/upload-progress-events.html
1616
1617         * DerivedSources.make:
1618         * GNUmakefile.am:
1619         * WebCore.pro:
1620         * WebCore.vcproj/WebCore.vcproj:
1621         * WebCore.xcodeproj/project.pbxproj:
1622         * WebCoreSources.bkl:
1623         * bindings/js/JSEventTargetBase.cpp:
1624         (WebCore::toJS):
1625         * bindings/js/JSXMLHttpRequestCustom.cpp:
1626         (WebCore::JSXMLHttpRequest::mark):
1627         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: Added.
1628         (WebCore::JSXMLHttpRequestUpload::mark):
1629         (WebCore::JSXMLHttpRequestUpload::onabort):
1630         (WebCore::JSXMLHttpRequestUpload::setOnabort):
1631         (WebCore::JSXMLHttpRequestUpload::onerror):
1632         (WebCore::JSXMLHttpRequestUpload::setOnerror):
1633         (WebCore::JSXMLHttpRequestUpload::onload):
1634         (WebCore::JSXMLHttpRequestUpload::setOnload):
1635         (WebCore::JSXMLHttpRequestUpload::onloadstart):
1636         (WebCore::JSXMLHttpRequestUpload::setOnloadstart):
1637         (WebCore::JSXMLHttpRequestUpload::onprogress):
1638         (WebCore::JSXMLHttpRequestUpload::setOnprogress):
1639         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1640         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1641         (WebCore::JSXMLHttpRequestUpload::dispatchEvent):
1642         * dom/EventTarget.cpp:
1643         (WebCore::EventTarget::toXMLHttpRequestUpload):
1644         * dom/EventTarget.h:
1645         * loader/ResourceLoader.cpp:
1646         (WebCore::ResourceLoader::didSendData):
1647         * loader/ResourceLoader.h:
1648         * loader/SubresourceLoader.cpp:
1649         (WebCore::SubresourceLoader::didSendData):
1650         * loader/SubresourceLoader.h:
1651         * loader/SubresourceLoaderClient.h:
1652         (WebCore::SubresourceLoaderClient::didSendData):
1653         * page/DOMWindow.idl:
1654         * platform/network/FormData.cpp:
1655         (WebCore::FormData::FormData):
1656         * platform/network/FormData.h:
1657         (WebCore::FormData::alwaysStream):
1658         (WebCore::FormData::setAlwaysStream):
1659         * platform/network/ResourceHandleClient.h:
1660         (WebCore::ResourceHandleClient::didSendData):
1661         * platform/network/mac/FormDataStreamMac.h:
1662         * platform/network/mac/FormDataStreamMac.mm:
1663         (WebCore::getStreamFormDataMap):
1664         (WebCore::getStreamResourceHandleMap):
1665         (WebCore::associateStreamWithResourceHandle):
1666         (WebCore::disassociateStreamWithResourceHandle):
1667         (WebCore::DidSendDataCallbackData::DidSendDataCallbackData):
1668         (WebCore::performDidSendDataCallback):
1669         (WebCore::formCreate):
1670         (WebCore::formFinalize):
1671         (WebCore::formRead):
1672         (WebCore::setHTTPBody):
1673         (WebCore::httpBodyFromStream):
1674         * platform/network/mac/ResourceHandleMac.mm:
1675         (WebCore::ResourceHandle::start):
1676         (WebCore::ResourceHandle::cancel):
1677         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
1678         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
1679         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
1680         * xml/XMLHttpRequest.cpp:
1681         (WebCore::XMLHttpRequest::XMLHttpRequest):
1682         (WebCore::XMLHttpRequest::~XMLHttpRequest):
1683         (WebCore::XMLHttpRequest::upload):
1684         (WebCore::XMLHttpRequest::open):
1685         (WebCore::XMLHttpRequest::send):
1686         (WebCore::XMLHttpRequest::createRequest):
1687         (WebCore::XMLHttpRequest::abort):
1688         (WebCore::XMLHttpRequest::networkError):
1689         (WebCore::XMLHttpRequest::abortError):
1690         (WebCore::XMLHttpRequest::didSendData):
1691         * xml/XMLHttpRequest.h:
1692         (WebCore::XMLHttpRequest::optionalUpload):
1693         * xml/XMLHttpRequest.idl:
1694         * xml/XMLHttpRequestUpload.cpp: Added.
1695         (WebCore::XMLHttpRequestUpload::XMLHttpRequestUpload):
1696         (WebCore::XMLHttpRequestUpload::addEventListener):
1697         (WebCore::XMLHttpRequestUpload::removeEventListener):
1698         (WebCore::XMLHttpRequestUpload::dispatchEvent):
1699         (WebCore::XMLHttpRequestUpload::dispatchXMLHttpRequestProgressEvent):
1700         (WebCore::XMLHttpRequestUpload::dispatchAbortEvent):
1701         (WebCore::XMLHttpRequestUpload::dispatchErrorEvent):
1702         (WebCore::XMLHttpRequestUpload::dispatchLoadEvent):
1703         (WebCore::XMLHttpRequestUpload::dispatchLoadStartEvent):
1704         (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
1705         * xml/XMLHttpRequestUpload.h: Added.
1706         (WebCore::XMLHttpRequestUpload::create):
1707         (WebCore::XMLHttpRequestUpload::toXMLHttpRequestUpload):
1708         (WebCore::XMLHttpRequestUpload::associatedXMLHttpRequest):
1709         (WebCore::XMLHttpRequestUpload::disconnectXMLHttpRequest):
1710         (WebCore::XMLHttpRequestUpload::setOnAbortListener):
1711         (WebCore::XMLHttpRequestUpload::onAbortListener):
1712         (WebCore::XMLHttpRequestUpload::setOnErrorListener):
1713         (WebCore::XMLHttpRequestUpload::onErrorListener):
1714         (WebCore::XMLHttpRequestUpload::setOnLoadListener):
1715         (WebCore::XMLHttpRequestUpload::onLoadListener):
1716         (WebCore::XMLHttpRequestUpload::setOnLoadStartListener):
1717         (WebCore::XMLHttpRequestUpload::onLoadStartListener):
1718         (WebCore::XMLHttpRequestUpload::setOnProgressListener):
1719         (WebCore::XMLHttpRequestUpload::onProgressListener):
1720         (WebCore::XMLHttpRequestUpload::eventListeners):
1721         (WebCore::XMLHttpRequestUpload::refEventTarget):
1722         (WebCore::XMLHttpRequestUpload::derefEventTarget):
1723         * xml/XMLHttpRequestUpload.idl: Added.
1724
1725 2008-07-29  Maxime Britto  <britto@apple.com>
1726
1727         Reviewed by Darin.
1728
1729         <rdar://problem/6095023> "When pan-scrolling, mouse click on hyperlink stop the pan-Scroll but follow the link after that."
1730         With this patch we now stop the pan scroll and swallow the event to prevent any following action.
1731
1732         * page/EventHandler.cpp:
1733         (WebCore::EventHandler::handleMousePressEvent): If we were in pan scrolling mode we no longer just stop the pan scroll and continue with the function, we now stop and return true to attest that we swallowed the event.
1734
1735 2008-07-29  Maxime Britto  <britto@apple.com>
1736
1737         Reviewed by adele.
1738
1739         Test: fast/events/autoscroll-in-textfield.html
1740
1741         * rendering/RenderObject.cpp:
1742         (WebCore::RenderObject::canBeProgramaticallyScrolled): reverted a bad change introduced in r35244
1743         nb:the test case introduced in r35244 is still working.
1744
1745 2008-07-29  Maxime Britto  <britto@apple.com>
1746
1747         Reviewed by adele.
1748         This test verifies that the autoscroll works within textfields.
1749
1750         * fast/events/autoscroll-in-textfield-expected.txt: Added.
1751         * fast/events/autoscroll-in-textfield.html: Added.
1752
1753 2008-07-29  Adele Peterson  <adele@apple.com>
1754
1755         Reviewed by Sammy Weinig.
1756
1757         Fix for <rdar://problem/6103024>
1758         When a QT movie is loaded directly in the browser, I can't pause it by single-clicking on the video
1759
1760         Test: media/video-click-dlbclick-standalone.html
1761
1762         * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): For standalone media documents,
1763         match the default Quicktime plugin behavior to allow clicking and double-clicking to pause and play the media.
1764         * loader/MediaDocument.h: Added defaultEventHandler.
1765
1766         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::defaultEventHandler): Return early if the event has been handled.
1767         * rendering/MediaControlElements.cpp:
1768         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Correct what was probably a typo.  Instead of "event->defaultHandled()",
1769          it is supposed to be "event->setDefaultHandled()".
1770         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
1771         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
1772         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
1773
1774 2008-07-29  Dan Bernstein  <mitz@apple.com>
1775
1776         Reviewed by Dave Hyatt.
1777
1778         - fix <rdar://problem/6059648> Some content not visible when the window is short at courtneyalbright.com
1779
1780         Test: fast/overflow/float-in-relpositioned.html
1781
1782         * rendering/RenderBlock.cpp:
1783         (WebCore::RenderBlock::lowestPosition): Add this block's relative offset
1784         to floats' and positioned objects' lowest position.
1785         (WebCore::RenderBlock::rightmostPosition): Ditto.
1786         (WebCore::RenderBlock::leftmostPosition): Ditto.
1787         * rendering/RenderBox.cpp:
1788         (WebCore::RenderBox::lowestPosition): Removed redundant test.
1789         (WebCore::RenderBox::rightmostPosition): Ditto.
1790         (WebCore::RenderBox::leftmostPosition): Ditto.
1791
1792 2008-07-29  Dan Bernstein  <mitz@apple.com>
1793
1794         Reviewed by Dave Hyatt.
1795
1796         - fix <rdar://problem/6048566> Repaint original element's position, not its offset position
1797
1798         Test: fast/repaint/layout-state-relative.html
1799
1800         * rendering/RenderBox.cpp:
1801         (WebCore::RenderBox::absolutePosition): Changed the LayoutState-enabled
1802         code path to account for the object's relative offset.
1803         (WebCore::RenderBox::computeAbsoluteRepaintRect): Ditto.
1804
1805 2008-07-29  Keishi Hattori  <casey.hattori@gmail.com>
1806
1807         Fixed Bug 19158: Inspector should support console.group/console.groupEnd
1808
1809         <https://bugs.webkit.org/show_bug.cgi?id=19158>
1810
1811         Reviewed by Tim Hatcher and Adam Roben.
1812
1813         * bindings/js/JSConsoleCustom.cpp:
1814         (WebCore::JSConsole::group): Added.
1815         * page/Console.cpp:
1816         (WebCore::Console::group): Added.
1817         (WebCore::Console::groupEnd): Added.
1818         * page/Console.h:
1819         (WebCore::):
1820         * page/Console.idl: Added group/groupEnd.
1821         * page/InspectorController.cpp:
1822         (WebCore::ConsoleMessage::ConsoleMessage):
1823         (WebCore::InspectorController::InspectorController): Added m_groupLevel.
1824         (WebCore::InspectorController::addMessageToConsole): Added groupLevel argument.
1825         (WebCore::InspectorController::startGroup): Increments m_groupLevel by one and calls js function if needed.
1826         (WebCore::InspectorController::endGroup): Decrements m_groupLevel by one and calls js function if needed.
1827         (WebCore::InspectorController::addScriptConsoleMessage): Added groupLevel argument.
1828         (WebCore::InspectorController::didCommitLoad): Resets m_groupLevel.
1829         * page/InspectorController.h:
1830         * page/inspector/Console.js:
1831         (WebInspector.Console): Added groupLevel and currentGroup topGroup.
1832         (WebInspector.Console.addMessage): Calls addMessage method in the currentGroup.
1833         (WebInspector.Console.startGroup): Added.
1834         (WebInspector.Console.endGroup): Added.
1835         (WebInspector.Console.clearMessages): Resets groupLevel and currentGroup.
1836         (WebInspector.ConsoleMessage): Added groupLevel property.
1837         (WebInspector.ConsoleMessage.MessageLevel.GroupTitle): Added.
1838         (WebInspector.ConsoleGroup): Added.
1839         (WebInspector.ConsoleGroup.addMessage): Adds console message to group.
1840         (WebInspector.ConsoleGroup._titleClicked): Adds "collapsed" style class.
1841         * page/inspector/inspector.css:
1842         * page/inspector/inspector.js:
1843         (WebInspector.startGroupInConsole): Calls console.startGroup
1844         (WebInspector.endGroupInConsole): Calls console.endGroup
1845
1846 2008-07-29  Adam Roben  <aroben@apple.com>
1847
1848         Add names for WebCore's threads
1849
1850         Reviewed by Anders Carlsson.
1851
1852         * loader/icon/IconDatabase.cpp:
1853         (WebCore::IconDatabase::open):
1854         * storage/DatabaseThread.cpp:
1855         (WebCore::DatabaseThread::start):
1856         * storage/LocalStorageThread.cpp:
1857         (WebCore::LocalStorageThread::start):
1858         Pass in names to createThread.
1859
1860         * platform/network/cf/ResourceHandleCFNet.cpp:
1861         (WebCore::runLoaderThread):
1862         (WebCore::ResourceHandle::loaderRunLoop):
1863         Changed to use WTF::createThread.
1864
1865 2008-07-28  Anders Carlsson  <andersca@apple.com>
1866
1867         Reviewed by Kevin Decker.
1868
1869         Based on a patch from Dimcho Balev.
1870         
1871         Windows part of 
1872     
1873         https://bugs.webkit.org/show_bug.cgi?id=18676
1874         <rdar://problem/6106578>
1875         Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
1876
1877         * plugins/PluginStream.cpp:
1878         (WebCore::PluginStream::wantsAllStreams):
1879         * plugins/PluginStream.h:
1880
1881 2008-07-28  Brady Eidson  <beidson@apple.com>
1882
1883         Reviewed by Sam Weinig
1884
1885         Test: security/autocomplete-cleared-on-back.html
1886
1887         <rdar://problem/6093281> - autocomplete="off" should work when going back
1888
1889         Taken care of in two ways:
1890         1 - Listening for the page cache notification to clear the form, in cases where the page
1891             is being restored from the page cache
1892         2 - Not saving such form elements when doing the normal "save state" to a history item,
1893             for cases with no page cache
1894
1895         * html/HTMLFormElement.cpp:
1896         (WebCore::HTMLFormElement::~HTMLFormElement):
1897         (WebCore::HTMLFormElement::parseMappedAttribute):
1898         (WebCore::HTMLFormElement::didRestoreFromCache):
1899         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
1900         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
1901         * html/HTMLFormElement.h:
1902
1903         * html/HTMLInputElement.cpp:
1904         (WebCore::HTMLInputElement::~HTMLInputElement):
1905         (WebCore::HTMLInputElement::setInputType):
1906         (WebCore::HTMLInputElement::saveState):
1907         (WebCore::HTMLInputElement::parseMappedAttribute):
1908         (WebCore::HTMLInputElement::needsCacheCallback):
1909         (WebCore::HTMLInputElement::registerForCacheCallbackIfNeeded): Only register if the type or attribute
1910           indicate we should.
1911         (WebCore::HTMLInputElement::unregisterForCacheCallbackIfNeeded): Only unregister if both the type
1912           and attribute are clear of needing registration.
1913         (WebCore::HTMLInputElement::didRestoreFromCache):
1914         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
1915         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
1916         * html/HTMLInputElement.h:
1917
1918 2008-07-28  David Hyatt  <hyatt@apple.com>
1919
1920         Add support for CSS variable declaration blocks.
1921
1922         Reviewed by Sam
1923
1924         Added tests in fast/css/variables.
1925
1926         * css/CSSGrammar.y:
1927         * css/CSSMutableStyleDeclaration.h:
1928         (WebCore::CSSMutableStyleDeclaration::isMutableStyleDeclaration):
1929         * css/CSSParser.cpp:
1930         (WebCore::CSSParser::addVariableDeclarationBlock):
1931         * css/CSSParser.h:
1932         * css/CSSProperty.cpp:
1933         (WebCore::CSSProperty::cssText):
1934         * css/CSSPropertyNames.in:
1935         * css/CSSStyleSelector.cpp:
1936         (WebCore::CSSStyleSelector::addMatchedDeclaration):
1937         (WebCore::CSSStyleSelector::resolveVariablesForDeclaration):
1938         * css/CSSStyleSelector.h:
1939         * css/CSSValueList.h:
1940         (WebCore::CSSValueList::isValueList):
1941         * css/CSSVariablesDeclaration.cpp:
1942         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
1943         (WebCore::CSSVariablesDeclaration::getVariableValue):
1944         (WebCore::CSSVariablesDeclaration::removeVariable):
1945         (WebCore::CSSVariablesDeclaration::addParsedVariable):
1946         (WebCore::CSSVariablesDeclaration::getParsedSimpleVariable):
1947         (WebCore::CSSVariablesDeclaration::getParsedComplexVariable):
1948         * css/CSSVariablesDeclaration.h:
1949         (WebCore::CSSVariablesDeclaration::create):
1950         * css/StyleBase.cpp:
1951         (WebCore::StyleBase::cssText):
1952         * css/StyleBase.h:
1953         (WebCore::StyleBase::isValueList):
1954         (WebCore::StyleBase::isMutableStyleDeclaration):
1955
1956 2008-07-28  Anders Carlsson  <andersca@apple.com>
1957
1958         Reviewed by Sam.
1959
1960         <rdar://problem/6098335>
1961         https://bugs.webkit.org/show_bug.cgi?id=20150
1962         
1963         Handle willSendRequest correctly.
1964
1965         * loader/SubresourceLoader.cpp:
1966         (WebCore::SubresourceLoader::willSendRequest):
1967         Make sure to keep the previous URL around so we know when to call willSendRequest.
1968         
1969         * xml/XMLHttpRequest.cpp:
1970         (WebCore::XMLHttpRequest::processSyncLoadResults):
1971         Abort if we don't have access to the response URL.
1972         
1973         (WebCore::XMLHttpRequest::willSendRequest):
1974         Dispatch a network error if we can't access the new URL.
1975
1976 2008-07-28  Geoffrey Garen  <ggaren@apple.com>
1977
1978         Reviewed by Sam Weinig.
1979
1980         Renamed "ConstructTypeNative" => "ConstructTypeHost".
1981         
1982 2008-07-28  Anders Carlsson  <andersca@apple.com>
1983
1984         Reviewed by Kevin Decker.
1985
1986         Based on a patch by Dimcho Balev.
1987
1988         https://bugs.webkit.org/show_bug.cgi?id=18676
1989         <rdar://problem/6106578>
1990         Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
1991         
1992         * bridge/npapi.h:
1993         Add new enum values.
1994         
1995         * loader/NetscapePlugInStreamLoader.cpp:
1996         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1997         When the plug-in indicates that it wants all streams to be delivered, don't cancel the stream
1998         if an error occurs.
1999         
2000         * loader/NetscapePlugInStreamLoader.h:
2001         (WebCore::NetscapePlugInStreamLoaderClient::wantsAllStreams):
2002         Add new client method.
2003
2004 2008-07-27  Sam Weinig  <sam@webkit.org>
2005
2006         Reviewed by Oliver Hunt.
2007
2008         Fix for https://bugs.webkit.org/show_bug.cgi?id=20176
2009         querySelectorAll id optimization no longer working
2010
2011         Turn the querySelector/querySelectorAll id optimization back on
2012         for only strict and almost strict mode.  In quirks mode, the optimiztion
2013         won't work as the id match is not case sensitive.
2014
2015         Tests: fast/dom/SelectorAPI/caseID-almost-strict.html
2016                fast/dom/SelectorAPI/caseID-strict.html
2017                fast/dom/SelectorAPI/caseID.html
2018
2019         * dom/Node.cpp:
2020         (WebCore::Node::querySelector):
2021         (WebCore::Node::querySelectorAll):
2022         * dom/SelectorNodeList.cpp:
2023         (WebCore::createSelectorNodeList):
2024         * dom/SelectorNodeList.h:
2025
2026 2008-07-27  Anatoli Papirovski  <apapirovski@mac.com>
2027
2028         Reviewed by Dave Hyatt.
2029
2030         Fix for https://bugs.webkit.org/show_bug.cgi?id=14346
2031         Modified the css parser:
2032         - not to fail when closing braces are not found for 
2033           a declaration at the end of the file
2034         - not to accept "!important fail" as valid
2035         - to keep accepting @import when it comes after invalid @ rules
2036         - not to drop the whole @media block when there's an error before the 
2037           closing brace
2038         + some other minor css parsing revisions.
2039
2040         CSSGrammar.y tweaked by David Kilzer to fix Tiger builds.
2041
2042         * css/CSSGrammar.y:
2043
2044 2008-07-27  Jan Michael Alonzo  <jmalonzo@webkit.org>
2045
2046         Reviewed by Eric Seidel.
2047
2048         Use --outputDir instead of --output when invoking make_names.pl
2049         There's no option named "output" in make_names.pl
2050
2051         * GNUmakefile.am:
2052         * WebCore.pro:
2053         * DerivedSources.make: Remove --output. Not necessary here.
2054         * bindings/scripts/generate-bindings.pl: Rename --outputdir to
2055           --outputDir for consistency with make_names.pl
2056
2057 2008-07-26  Dirk Schulze  <vbs85@gmx.de>
2058
2059         Reviewed by Eric Seidel.
2060
2061         http://bugs.webkit.org/show_bug.cgi?id=18694
2062         [CAIRO] Problem with rotation in a given matrix in SVG
2063
2064         Changed values given to AffineTransform.
2065
2066         * platform/graphics/cairo/AffineTransformCairo.cpp:
2067         (WebCore::AffineTransform::AffineTransform):
2068         (WebCore::AffineTransform::setMatrix):
2069
2070 2008-07-26  Jan Michael Alonzo  <jmalonzo@webkit.org>
2071
2072         Reviewed by Mark Rowe.
2073
2074         Call curl_global_cleanup() to release resources acquired by curl_global_init()
2075
2076         * platform/network/curl/ResourceHandleManager.cpp:
2077         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2078
2079 2008-07-26  Marc Ordinas i Llopis  <marc.ordinasillopis@collabora.co.uk>
2080
2081         Reviewed by Simon Hausmann.
2082
2083         Bug 18938: [GTK] Plugins not resized
2084         https://bugs.webkit.org/show_bug.cgi?id=18938
2085
2086         * plugins/PluginView.cpp:
2087         (WebCore::PluginView::setFrameGeometry): When viewing a full-page
2088         plugin in unix, geometry changes have to be passed to the plugin.
2089
2090 2008-07-26  Keishi Hattori  <casey.hattori@gmail.com>
2091
2092         Reviewed by Adam Roben.
2093
2094         Add console.time/timeEnd.
2095         https://bugs.webkit.org/show_bug.cgi?id=19159
2096
2097         * manual-tests/inspector/console-time.html: Added. Test cases for console.time/timeEnd.
2098         * page/Console.cpp:
2099         (WebCore::Console::time): Added.
2100         (WebCore::Console::timeEnd): Added.
2101         * page/Console.h:
2102         * page/Console.idl: Added console.time/timeEnd.
2103         * page/InspectorController.cpp:
2104         (WebCore::InspectorController::startTiming): Added.
2105         (WebCore::InspectorController::stopTiming): Added.
2106         * page/InspectorController.h:
2107
2108 2008-07-26  Dirk Schulze  <vbs85@gmx.de>
2109
2110         Reviewed by Nikolas Zimmermann.
2111
2112         Fixes rendering issues with gradients in SVG/Cairo.
2113
2114         * platform/graphics/cairo/PathCairo.cpp:
2115         (WebCore::Path::boundingRect):
2116         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp:
2117         (WebCore::applyStrokeStyleToContext):
2118         (WebCore::SVGPaintServerGradient::setup):
2119
2120 2008-07-26  Dirk Schulze  <vbs85@gmx.de>
2121
2122         Reviewed by Nikolas Zimmermann.
2123
2124         Added pattern-support for SVG in Cairo.
2125
2126         * svg/graphics/cairo/SVGPaintServerPatternCairo.cpp:
2127         (WebCore::applyStrokeStyleToContext):
2128         (WebCore::SVGPaintServerPattern::setup):
2129
2130 2008-07-26  Keishi Hattori  <casey.hattori@gmail.com>
2131
2132         Reviewed by Adam Roben.
2133
2134         Fixed bug 18540: console.log('multiple', 'strings') quotes all strings after the first
2135         <https://bugs.webkit.org/show_bug.cgi?id=18540>
2136
2137         * page/inspector/Console.js:
2138         (WebInspector.ConsoleMessage.prototype._format): String arguments are appended without formatting.
2139
2140 2008-07-26  Anthony Ricaud  <rik24d@gmail.com>
2141
2142         Reviewed by Tim Hatcher.
2143
2144         <https://bugs.webkit.org/show_bug.cgi?id=17589> Line highlighting should last longer
2145
2146         Restore the fade out effect after highlighting.
2147
2148         * page/inspector/SourceFrame.js: Add a class for fade-out effects and sets it at the end of highlighting time.
2149
2150 2008-07-26  Michelangelo De Simone  <michelangelo@me.com>
2151
2152         Reviewed by Adele Petersen.
2153
2154         Added the simple willValidate attribute to form controls according to
2155         WebForms 2 spec.
2156
2157         URL: http://www.w3.org/TR/web-forms-2/#willvalidate
2158
2159         Tests: fast/forms/willvalidate-000.html
2160                fast/forms/willvalidate-001.html
2161                fast/forms/willvalidate-002.html
2162                fast/forms/willvalidate-003.html
2163                fast/forms/willvalidate-004.html
2164                fast/forms/willvalidate-005.html
2165                fast/forms/willvalidate-006.html
2166                fast/forms/willvalidate-007.html
2167                fast/forms/willvalidate-008.html
2168                fast/forms/willvalidate-009.html
2169
2170         * html/HTMLButtonElement.h: Added willValidate(), always false.
2171         * html/HTMLButtonElement.idl: willValidate attribute exposed.
2172         * html/HTMLFieldSetElement.h: Added willValidate(), always false.
2173         * html/HTMLFieldSetElement.idl: willValidate attribute exposed.
2174         * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::willValidate):
2175         Added base willValidate() implementation.
2176         * html/HTMLFormControlElement.h: Added willValidate().
2177         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::willValidate):
2178         Added willValidate(), checks for input type.
2179         * html/HTMLInputElement.h: Added willValidate()
2180         * html/HTMLInputElement.idl: willValidate attribute exposed.
2181         * html/HTMLSelectElement.idl: willValidate attribute exposed.
2182         * html/HTMLTextAreaElement.idl: willValidate attribute exposed.
2183
2184 2008-07-26  Mark Rowe  <mrowe@apple.com>
2185
2186         Build fix.
2187
2188         * loader/FrameLoader.cpp:
2189         (WebCore::FrameLoader::load): Use 0 rather than nil as this is a C++ file.
2190
2191 2008-07-26  Mark Rowe  <mrowe@apple.com>
2192
2193         Build fix.
2194
2195         * loader/FrameLoader.h: Use 0 rather than nil as this is a C++ header.
2196
2197 2008-07-26  Daniel Jalkut  <jalkut@red-sweater.com>
2198
2199         Reviewed by Geoff Garen.
2200
2201         Revised the FrameLoader class to clean up a variety of load methods, and hopefully
2202         move things closer to integrating into a smaller set of load methods. To this
2203         end, I renamed many of the overloaded load() methods to have more meaningful and 
2204         easier to search names.  I added comments to the header file to provide clues as 
2205         to how many of the load methods are being used, and how they fit into the loading 
2206         process. I suspect that the renamed methods and comments indicating their present 
2207         usage will facilitate easier cleanup by myself and others as inspiration strikes.
2208
2209         Updated clients of FrameLoader where necessary to adapt to the new method names and signatures.
2210
2211         Combined the 3 canLoad() methods into a single canLoad which expresses the 
2212         intended logic of the 3 with a single method interface.
2213
2214         Removed unnecessary "treatAsLocal" attribute of CachedResource. It was only called from
2215         one place in FrameLoader.cpp, and it derived at initialization time by calling back to FrameLoader.
2216
2217         Removed unused userGesture parameter to one variant of the urlSelected method, and 
2218         moved one of the urlSelected methods so that it lives nearer to its overloaded 
2219         sibling.
2220
2221         * WebCore.base.exp:
2222         * loader/Cache.cpp:
2223         (WebCore::Cache::requestResource):
2224         * loader/CachedResource.cpp:
2225         (WebCore::CachedResource::CachedResource):
2226         * loader/CachedResource.h:
2227         (WebCore::CachedResource::errorOccurred):
2228         * loader/FrameLoader.cpp:
2229         (WebCore::FrameLoader::createWindow):
2230         (WebCore::FrameLoader::urlSelected):
2231         (WebCore::FrameLoader::loadURLIntoChildFrame):
2232         (WebCore::FrameLoader::loadPlugin):
2233         (WebCore::FrameLoader::loadFrameRequestWithFormState):
2234         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues):
2235         (WebCore::FrameLoader::loadURL):
2236         (WebCore::FrameLoader::loadWithNavigationAction):
2237         (WebCore::FrameLoader::load):
2238         (WebCore::FrameLoader::loadWithDocumentLoader):
2239         (WebCore::FrameLoader::canLoad):
2240         (WebCore::FrameLoader::reloadAllowingStaleData):
2241         (WebCore::FrameLoader::reload):
2242         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
2243         (WebCore::FrameLoader::submitForm):
2244         (WebCore::FrameLoader::loadPostRequest):
2245         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2246         (WebCore::FrameLoader::loadItem):
2247         * loader/FrameLoader.h:
2248         * loader/SubresourceLoader.cpp:
2249         (WebCore::SubresourceLoader::create):
2250         * page/ContextMenuController.cpp:
2251         (WebCore::ContextMenuController::contextMenuItemSelected):
2252
2253 2008-07-26  Sam Weinig  <sam@webkit.org>
2254
2255         Reviewed by Dan Bernstein.
2256
2257         Fix https://bugs.webkit.org/show_bug.cgi?id=20122
2258         <rdar://problem/6089522>
2259         REGRESSION (r35075-r35110): Cannot enlarge images at Apple Store product page
2260
2261         Use strict parsing when in AlmostStrict mode.
2262
2263         Tests: fast/dom/SelectorAPI/dumpNodeList-almost-strict.html
2264                fast/dom/SelectorAPI/id-fastpath-almost-strict.html
2265                fast/dom/SelectorAPI/id-fastpath-strict.html
2266
2267         * dom/Node.cpp:
2268         (WebCore::Node::querySelector):
2269         (WebCore::Node::querySelectorAll):
2270
2271 2008-07-25  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2272
2273         Reviewed by Simon.
2274
2275         Switch off QPainter's anti aliasing when painting the widgets using QStyle
2276         because otherwise the widgets will look blurry and not crisp.
2277
2278         * platform/qt/RenderThemeQt.cpp:
2279         (WebCore::StylePainter::StylePainter):
2280         (WebCore::StylePainter::~StylePainter):
2281         * platform/qt/RenderThemeQt.h:
2282
2283 2008-07-25  Dan Bernstein  <mitz@apple.com>
2284
2285         Reviewed by Anders Carlsson.
2286
2287         - fix crash due to re-entering purgeInactiveFontData() now that it is
2288           called by releaseFontData()
2289
2290         Not testable in DumpRenderTree
2291
2292         * platform/graphics/FontCache.cpp:
2293         (WebCore::FontCache::purgeInactiveFontData): Added a reentry guard.
2294
2295 2008-07-25  Brady Eidson  <beidson@apple.com>
2296
2297         Reviewed by Sam
2298
2299         Test: security/set-form-autocomplete-attribute.html
2300
2301         Part of the fix for <rdar://problem/6093281> - Improper handling of autocomplete
2302
2303         The autocomplete attribute works on both <form> and <input> elements, but was not
2304         inherited properly when someone asked an <input> if it should autocomplete.
2305
2306         I fixed this up based on the rules in the current WF2 spec so if the <input> element
2307         has its own autocomplete attribute set, it will follow that but otherwise it will
2308         inherit from its parent <form>
2309
2310         * WebCore.base.exp:
2311
2312         * html/HTMLInputElement.cpp:
2313         (WebCore::HTMLInputElement::init):
2314         (WebCore::HTMLInputElement::autoComplete):
2315         (WebCore::HTMLInputElement::parseMappedAttribute):
2316         * html/HTMLInputElement.h:
2317         (WebCore::HTMLInputElement::):
2318
2319 2008-07-25  Wouter Bolsterlee  <uws+webkit@xs4all.nl>
2320
2321         Reviewed by Holger Freyther.
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=20078
2324         [GTK] Use G_* macros instead of deprecated GTK_* macros in gtk2xtbin.h
2325
2326         * plugins/gtk/gtk2xtbin.h:
2327
2328 2008-07-25  Anders Carlsson  <andersca@apple.com>
2329
2330         Reviewed by Sam.
2331
2332         Add workaround for a Leopard bug which causes webarchive/test-xml-stylesheet.xml to fail.
2333
2334         * platform/network/mac/WebCoreURLResponse.mm:
2335         (-[NSURLResponse _webcore_MIMEType]):
2336
2337 2008-07-25  chris fleizach  <cfleizach@apple.com>
2338
2339         Reviewed by Beth Dakin
2340
2341         <rdar://problem/6084806> AX: REGRESSION: returned line number from TextArea is incorrect
2342
2343         Tests: accessibility/textarea-insertion-point-line-number.html
2344                accessibility/textarea-line-for-index.html
2345
2346         * page/AccessibilityObject.cpp:
2347         (WebCore::AccessibilityObject::lineForPosition):
2348         * page/AccessibilityObject.h:
2349         * page/mac/AccessibilityObjectWrapper.mm:
2350         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2351         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2352
2353 2008-07-25  Jacob Refstrup  <jacob.refstrup@hp.com>
2354
2355         Reviewed by mitz.
2356
2357         - fix https://bugs.webkit.org/show_bug.cgi?id=17906
2358         <rdar://problem/5805741> white-space: pre-wrap or -webkit-line-break: after-white-space text can overlap float at end of line
2359         
2360         Test: fast/block/float/editable-text-overlapping-float.html
2361
2362         * rendering/RenderBlock.h:
2363         * rendering/bidi.cpp:
2364         (WebCore::RenderBlock::skipTrailingWhitespace):
2365         - renamed to reflect usage and removed call to position floats; 
2366           they only get added
2367         (WebCore::RenderBlock::skipLeadingWhitespace):
2368         - renamed to reflect usage
2369         (WebCore::RenderBlock::findNextLineBreak):
2370         - use skipTrailingWhitespace at end of line (as before but with new
2371           name)
2372
2373 2008-07-25  Dan Bernstein  <mitz@apple.com>
2374
2375         Reviewed by Sam Weinig.
2376
2377         - Finish fixing https://bugs.webkit.org/show_bug.cgi?id=17097
2378           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
2379
2380         * platform/graphics/FontCache.cpp:
2381         (WebCore::FontDataCacheKeyTraits): Changed needsDestruction to true because FontPlatformData
2382         instances hold references to the platform resources and release them in the destructor.
2383         (WebCore::cTargetInactiveFontData): Added, replacing cInactiveFontDataPurgeRatio with the
2384         number of inactive FontData instances to leave in the cache when automatically purging.
2385         (WebCore::FontCache::getCachedFontData): Moved the code that checks if there are too many
2386         inactive FontData instances and if so calls purgeInactiveFontData() from here...
2387         (WebCore::FontCache::releaseFontData): ... to here.
2388         (WebCore::FontCache::purgeInactiveFontData): Added code to also purge the platform font data
2389         cache. All FontPlatformData instances that do not have entries in the font data cache are
2390         removed, thus releasing the platform resources (such as HFONTs and NSFonts).
2391
2392 2008-07-24  David Hyatt  <hyatt@apple.com>
2393
2394         Add support for an alternate syntax for CSS variables.  Testers on www-style will be able to try out
2395         both versions of the syntax in WebKit to help us make a decision regarding which one to go with.
2396
2397         Reviewed by Dan
2398
2399         Added fast/css/variables/alternate-syntax/ (duplicated all existing CSS variables tests)
2400
2401         * css/CSSGrammar.y:
2402         * css/CSSParser.cpp:
2403         (WebCore::CSSParser::createVariablesRule):
2404         (WebCore::CSSParser::checkForVariables):
2405         * css/CSSParser.h:
2406         * css/CSSParserValues.cpp:
2407         (WebCore::CSSParserValue::isVariable):
2408         (WebCore::CSSParserValueList::addValue):
2409         (WebCore::CSSParserValueList::deleteValueAt):
2410         (WebCore::CSSParserValue::createCSSValue):
2411         * css/CSSParserValues.h:
2412         * css/CSSPrimitiveValue.cpp:
2413         (WebCore::CSSPrimitiveValue::cleanup):
2414         (WebCore::CSSPrimitiveValue::getStringValue):
2415         (WebCore::CSSPrimitiveValue::cssText):
2416         (WebCore::CSSPrimitiveValue::parserValue):
2417         * css/CSSPrimitiveValue.h:
2418         (WebCore::CSSPrimitiveValue::):
2419         (WebCore::CSSPrimitiveValue::isVariable):
2420         * css/CSSStyleSelector.cpp:
2421         (WebCore::CSSStyleSelector::addMatchedDeclaration):
2422         * css/CSSVariablesRule.cpp:
2423         (WebCore::CSSVariablesRule::CSSVariablesRule):
2424         (WebCore::CSSVariablesRule::cssText):
2425         * css/CSSVariablesRule.h:
2426         (WebCore::CSSVariablesRule::create):
2427         * css/maketokenizer:
2428         * css/tokenizer.flex:
2429
2430 2008-07-25  Maxime Britto  <britto@apple.com>
2431
2432         Reviewed by Anders Carlsson.
2433
2434         <rdar://6102387> "REGRESSION: horizontal scroll with the mouse wheel is inverted on some subframes"
2435
2436         * page/EventHandler.cpp:
2437         (WebCore::EventHandler::handleWheelEvent): Inverted the scroll direction relative to the delta value (positive scrolls left,negative scrolls right)
2438
2439 2008-07-25  Adele Peterson  <adele@apple.com>
2440
2441         Another build fix.
2442
2443         * platform/win/PlatformScrollBarSafari.cpp:
2444         (WebCore::PlatformScrollbar::paint):
2445
2446 2008-07-25  Adele Peterson  <adele@apple.com>
2447
2448         More build fixes.
2449
2450         * platform/win/PlatformScrollBarSafari.cpp:
2451         (WebCore::PlatformScrollbar::paint):
2452
2453 2008-07-25  Adele Peterson  <adele@apple.com>
2454
2455         Build fix.
2456
2457         * platform/win/PlatformScrollBarSafari.cpp:
2458
2459 2008-07-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2460
2461         Reviewed by Simon
2462
2463         Provide access to the underlying QKeyEvent in PlatformKeyboardEvent.
2464
2465         * platform/PlatformKeyboardEvent.h: add accessor and member.
2466         * platform/qt/PlatformKeyboardEventQt.cpp: copy pointer in ctor.
2467         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2468
2469 2008-07-25  Simon Hausmann  <hausmann@webkit.org>
2470
2471         Fix linking of QtWebKit against the statically built JavaScriptCore
2472         library, under Windows/Mac we may need _d/_debug suffixes.
2473
2474         * WebCore.pro:
2475
2476 2008-07-25  Simon Hausmann  <hausmann@webkit.org>
2477
2478         Rubber-stamped by Lars.
2479
2480         Fix the Qt build by adapting to the latest ArgList API changes and
2481         replacing the inclusion of npapi.h in MainThreadScheduler with a forward
2482         declaration of NPP to avoid an include conflict. npapi.h on X11 includes
2483         X headers, which include wonderful defines such as "#define Status" that
2484         cause conflicts.
2485
2486         * bridge/qt/qt_runtime.cpp:
2487         (KJS::Bindings::findMethodIndex):
2488         (KJS::Bindings::QtRuntimeConnectionMethod::call):
2489         * plugins/PluginMainThreadScheduler.h:
2490
2491 2008-07-25  Simon Hausmann  <hausmann@webkit.org>
2492
2493         Discussed with and rubber-stamped by Lars.
2494
2495         Fix the build system for the Qt port.
2496
2497         Recent JavaScriptCore changes require the addition of JavaScriptCore/API to the
2498         include search path. With a build process that combines JavaScriptCore and
2499         WebCore in one build process/Makefile the existance of
2500         JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include conflicts.
2501
2502         This commit solves this by introducing a separate build of JavaScriptCore into
2503         a static library.
2504
2505         As a result of the split-up a race-condition due to broken dependencies of
2506         regular source files to header files of generated sources showed up very
2507         frequently when doing parallel builds (which the buildbot does). This commit at
2508         the same time tries to address the dependency problem by making the
2509         addExtraCompiler() function also generate a pseudo extra compiler that
2510         represents the header file output, so that qmake is aware of the creation of
2511         the header file for dependency calculation.
2512
2513         At the same time I removed a lot of cruft from the pro files to ease maintenance.
2514
2515         * WebCore.pro:
2516
2517 2008-07-24  kevino  <kevino@theolliviers.com>
2518
2519         wx build fix on Win for plugins coode.
2520
2521         * plugins/PluginDatabase.cpp:
2522         * plugins/PluginView.cpp:
2523         (WebCore::PluginView::PluginView):
2524         * plugins/PluginView.h:
2525
2526 2008-07-24  Sam Weinig  <sam@webkit.org>
2527
2528         Reviewed by Anders Carlsson.
2529
2530         Make isElementNode() non-virtual for a speedup on many benchmarks
2531         including 20% on http://ejohn.org/apps/fragment/.
2532
2533         - Replace Node::m_attrWasSpecifiedOrElementHasRareData with bits in 
2534           Element and Attr where space was available.  Use the new free bit
2535           to represent if an node is an element or not.
2536
2537         * dom/Attr.cpp:
2538         (WebCore::Attr::Attr):
2539         * dom/Attr.h:
2540         (WebCore::Attr::specified):
2541         (WebCore::Attr::setSpecified):
2542         * dom/ContainerNode.cpp:
2543         (WebCore::ContainerNode::ContainerNode):
2544         * dom/ContainerNode.h:
2545         * dom/Element.cpp:
2546         (WebCore::Element::Element):
2547         * dom/Element.h:
2548         (WebCore::Element::hasRareData):
2549         (WebCore::Element::setHasRareData):
2550         * dom/EventTargetNode.cpp:
2551         (WebCore::EventTargetNode::EventTargetNode):
2552         * dom/EventTargetNode.h:
2553         * dom/Node.cpp:
2554         (WebCore::Node::Node):
2555         * dom/Node.h:
2556         (WebCore::Node::isElementNode):
2557
2558 2008-07-24  Dan Bernstein  <mitz@apple.com>
2559
2560         Reviewed by Dave Hyatt.
2561
2562         - fix <rdar://problem/6082111> REGRESSION (r31876): Root element with percent height does not resize when resizing the window vertically
2563
2564         Not testable in DumpRenderTree
2565
2566         * rendering/RenderView.cpp:
2567         (WebCore::RenderView::layout): Ensured that all children with percentage
2568         heights get laid out again if the height changes.
2569
2570 2008-07-24  kevino  <kevino@theolliviers.com>
2571
2572         Windows build fix for wx. wx doesn't implement pan scrolling yet. 
2573
2574         * page/EventHandler.cpp:
2575         (WebCore::EventHandler::handleAutoscroll):
2576         (WebCore::EventHandler::autoscrollTimerFired):
2577         (WebCore::EventHandler::stopAutoscrollTimer):
2578         (WebCore::EventHandler::handleMousePressEvent):
2579
2580 2008-07-24  David Hyatt  <hyatt@apple.com>
2581
2582         Fix for bug 18673, crash when using full page zoom on generated content.  Don't call
2583         intrinsicSizeChanged when we are first setting our style.
2584
2585         Reviewed by olliej
2586
2587         * ChangeLog:
2588         * rendering/RenderReplaced.cpp:
2589         (WebCore::RenderReplaced::setStyle):
2590
2591 2008-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2592
2593         Reviewed by Eric.
2594
2595         Bug 20053: .in files should use a custom format instead of XML
2596
2597         - Remove our XML parser perl module (XML::Tiny)
2598
2599         - Add a custom perl parser
2600
2601         - Move XML files to the new format
2602
2603         * bindings/scripts/InFilesParser.pm: Added.
2604         * bindings/scripts/XMLTiny.pm: Removed.
2605         * dom/make_names.pl: Switched to our new
2606         parser.
2607
2608         * html/HTMLAttributeNames.in: Switched to
2609         our custom format.
2610         * html/HTMLTagNames.in: Ditto.
2611         * svg/svgattrs.in: Ditto.
2612         * svg/svgtags.in: Ditto.
2613         * svg/xlinkattrs.in: Ditto.
2614         * xml/xmlattrs.in: Ditto.
2615
2616 2008-07-23  Julien Chaffraix  <jchaffraix@webkit.org>
2617
2618         Reviewed by Eric.
2619
2620         Bug 19588: CRASH doing open() on destroyed window
2621         https://bugs.webkit.org/show_bug.cgi?id=19588
2622
2623         Add frame's page null check as it could have been
2624         detached from the page.
2625
2626         Test: fast/frames/crash-removed-iframe.html
2627
2628         * bindings/js/JSDOMWindowBase.cpp:
2629         (WebCore::windowProtoFuncOpen):
2630         * page/FrameTree.cpp:
2631         (WebCore::FrameTree::find):
2632
2633 2008-07-23  Dan Bernstein  <mitz@apple.com>
2634
2635         Reviewed by Alexey Proskuryakov.
2636
2637         - fix a leak when using hex color values in CSS variables
2638
2639         - fix CSSOM access to hex color values in variables declarations
2640
2641         Test: fast/css/variables/color-hex-test.html
2642
2643         Added a new unit/type, CSS_PARSER_HEXCOLOR, which serves as the unit for
2644         CSSParserValues coming from colors in hex notation. CSSParserValues can
2645         no longer have CSS_RGBCOLOR as their unit. CSS_PARSER_HEXCOLOR is also
2646         used as the type for CSSValues in CSS variables declarations where the
2647         parser value was a hex color. However the type of all other color
2648         CSSValues remains CSS_RGBCOLOR.
2649
2650         * css/CSSGrammar.y: Changed to use the new CSS_PARSER_HEXCOLOR value
2651         for color values in hex notation.
2652         * css/CSSParser.cpp:
2653         (WebCore::CSSParser::parseColorFromValue): Updated for the new unit.
2654         * css/CSSParserValues.cpp:
2655         (WebCore::CSSParserValue::createCSSValue): Ditto.
2656         * css/CSSPrimitiveValue.cpp:
2657         (WebCore::CSSPrimitiveValue::cleanup): Fixed the leak by deref()ing the
2658         string containing the color.
2659         (WebCore::CSSPrimitiveValue::cssText): Added support for
2660         CSS_PARSER_HEXCOLOR for when serializing variable values.
2661         (WebCore::CSSPrimitiveValue::parserValue): Updated for the new unit.
2662         * css/CSSPrimitiveValue.h:
2663         (WebCore::CSSPrimitiveValue::): Added a new unti, CSS_PARSER_HEXCOLOR.
2664
2665 2008-07-23  Beth Dakin  <bdakin@apple.com>
2666
2667         Reviewed by Dan Bernstein.
2668
2669         Fix for <rdar://problem/5997215> display: table-row-group 
2670         for :before content causes a crash
2671  
2672         The actual bug fix here is to ddd the generated content container 
2673         as a child before adding any of the generated content to the 
2674         container. There are two correctness fixes as well that deal with 
2675         style changes and correctly.
2676
2677         This patch also makes Node::diff() a static function.
2678
2679         * dom/Node.cpp:
2680         (WebCore::Node::diff):
2681         * dom/Node.h:
2682         (WebCore::Node::):
2683         (WebCore::Node::recalcStyle):
2684         * rendering/RenderContainer.cpp:
2685         (WebCore::findBeforeAfterParent):
2686         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
2687         * svg/SVGUseElement.cpp:
2688         (WebCore::SVGUseElement::recalcStyle):
2689
2690 2008-07-23  Timothy Hatcher  <timothy@apple.com>
2691
2692         Updates the elements DOM tree when nodes are added or removed from
2693         the inspected document.
2694
2695         https://bugs.webkit.org/show_bug.cgi?id=6590
2696         <rdar://problem/5712921>
2697
2698         Reviewed by Adam Roben.
2699
2700         * loader/FrameLoader.cpp:
2701         (WebCore::FrameLoader::dispatchWindowObjectAvailable): Added a call to
2702         InspectorController::inspectedWindowScriptObjectCleared.
2703         * page/InspectorController.cpp:
2704         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
2705         Calls the WebInspector.inspectedWindowCleared script function.
2706         * page/InspectorController.h:
2707         * page/inspector/ElementsPanel.js:
2708         (WebInspector.ElementsPanel): Create the event listener callback wrappers.
2709         (WebInspector.ElementsPanel.prototype.show): Call _updateModifiedNodes if
2710         there are any recently modified nodes.
2711         (WebInspector.ElementsPanel.prototype.reset): Remove previous mutation event listeners.
2712         Adds a check for InspectorController.isWindowVisible to prevent adding
2713         event listeners when the window isn't visible.
2714         (WebInspector.ElementsPanel.prototype.inspectedWindowCleared): 
2715         (WebInspector.ElementsPanel.prototype._addMutationEventListeners): Add DOMNodeInserted,
2716         DOMNodeRemoved and DOMContentLoaded event listeners to the passed in window or window's document.
2717         (WebInspector.ElementsPanel.prototype._removeMutationEventListeners): Removes the event listeners
2718         added in _addMutationEventListeners.
2719         (WebInspector.ElementsPanel.prototype.updateMutationEventListeners): Call _addMutationEventListeners
2720         again to reinstate the listners if the document changed or window cleared them.
2721         (WebInspector.ElementsPanel.prototype.registerMutationEventListeners): Append the window to
2722         _mutationMonitoredWindows and call _addMutationEventListeners.
2723         (WebInspector.ElementsPanel.prototype.unregisterMutationEventListeners): Remove the window from
2724         _mutationMonitoredWindows and call _removeMutationEventListeners.
2725         (WebInspector.ElementsPanel.prototype.unregisterAllMutationEventListeners): Call
2726         _removeMutationEventListeners for all windows in _mutationMonitoredWindows and
2727         clear _mutationMonitoredWindows.
2728         (WebInspector.ElementsPanel.prototype._contentLoaded): Append the node and parent
2729         to the recentlyModifiedNodes array. Call _updateModifiedNodesSoon if visible.
2730         (WebInspector.ElementsPanel.prototype._nodeInserted): Ditto.
2731         (WebInspector.ElementsPanel.prototype._nodeRemoved): Ditto.
2732         (WebInspector.ElementsPanel.prototype._updateModifiedNodesSoon): Call
2733         _updateModifiedNodes on a zero timeout.
2734         (WebInspector.ElementsPanel.prototype._updateModifiedNodes): Iterate over
2735         the recentlyModifiedNodes array and call updateChildren on all the parent
2736         elements that had changes. Only calls updateChildren once per parent element.
2737         (WebInspector.ElementsPanel.prototype._isAncestorIncludingParentFrames): Return
2738         false if the nodes are the same. Return true if the nodes are the same while
2739         looking at ancestor frame elements. THis use to return false, which was incorrect.
2740         (WebInspector.DOMNodeTreeElement.prototype.onpopulate): Call updateChildren.
2741         (WebInspector.DOMNodeTreeElement.prototype.updateChildren): Copied from
2742         onpopulate and changed to rebuild the children elements by adding new children,
2743         moving existing children and removed old children.
2744         (WebInspector.DOMNodeTreeElement.prototype.onexpand): If the node has a contentDocument
2745         call registerMutationEventListeners to track any mutations.
2746         * page/inspector/inspector.js:
2747         (WebInspector.inspectedWindowCleared): Call ElementsPanel.inspectedWindowCleared.
2748         * page/inspector/treeoutline.js:
2749         (TreeElement.prototype.get hasChildren): Return _hasChildren.
2750         (TreeElement.prototype.set hasChildren): Set _hasChildren and update the className.
2751         (TreeElement.prototype.hasAncestor): Return true if the element has the passed in ancestor.
2752         (TreeElement.prototype.expand): Fix an exception that can happen if expand is
2753         called before _attach.
2754         * WebCore/manual-tests/inspector/dom-mutation.html: Added.
2755         * WebCore/manual-tests/inspector/resources/mutate-frame-2.html: Added.
2756         * WebCore/manual-tests/inspector/resources/mutate-frame.html: Added.
2757
2758 2008-07-22  Timothy Hatcher  <timothy@apple.com>
2759
2760         Fix an exception that occurred when double clicking the closing tag
2761         of an element in the DOM tree.
2762
2763         Reviewed by Anders Carlsson.
2764
2765         * page/inspector/ElementsPanel.js:
2766         (WebInspector.ElementsPanel.prototype._ondblclick): Null check
2767         element.ondblclick.
2768
2769 2008-07-22  Timothy Hatcher  <timothy@apple.com>
2770
2771         Fix a regression where elements in subframes would not be revealed
2772         or selected when inspected from the context menu. This was caused by
2773         JavaScript equality is not being true for JSInspectedObjectWrappers
2774         of the same node wrapped with different global ExecStates. This change
2775         adds a helper function that uses isSameNode to compare wrapped nodes.
2776
2777         https://bugs.webkit.org/show_bug.cgi?id=19377
2778
2779         Reviewed by Adam Roben.
2780
2781         * page/inspector/ElementsPanel.js:
2782         (WebInspector.ElementsPanel.prototype.set rootDOMNode): Use objectsAreSame
2783         to compare nodes.
2784         (WebInspector.ElementsPanel.prototype.set focusedDOMNode): Ditto.
2785         (WebInspector.ElementsPanel.prototype.set hoveredDOMNode): Ditto. 
2786         (WebInspector.ElementsPanel.prototype._updateModifiedNodes): Ditto.
2787         (WebInspector.ElementsPanel.prototype.revealNode): Ditto.
2788         (WebInspector.ElementsPanel.prototype.updateBreadcrumb): Ditto.
2789         (WebInspector.DOMNodeTreeElement.prototype.updateChildren): Ditto.
2790         * page/inspector/treeoutline.js:
2791         (TreeOutline.prototype.findTreeElement): Add an equal argument
2792         to accept a functions to compare two representedObjects. Defaults
2793         to strict equal if not supplied. All current clients pass objectsAreSame.
2794         * page/inspector/utilities.js:
2795         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Use objectsAreSame
2796         to compare nodes.
2797         (Node.prototype.enclosingNodeOrSelfWithClass): Ditto.
2798         (Element.prototype.query): Use the ownerDocument of the node, not document.
2799         (objectsAreSame): Added. Compares strict equal first, then uses isSameNode if
2800         it exists on both objects.
2801         (isAncestorNode): Use objectsAreSame to compare nodes.
2802         (firstCommonNodeAncestor): Ditto.
2803         (traverseNextNode): Ditto.
2804
2805 2008-07-21  Timothy Hatcher  <timothy@apple.com>
2806
2807         Added InspectorController.isWindowVisible to the JavaScript class
2808         for use in an upcoming change. This will allow the Inspector to not
2809         perform selective actions while the window is hidden.
2810
2811         Reviewed by Adam Roben.
2812
2813         * page/InspectorController.cpp:
2814         (WebCore::isWindowVisible): Call InspectorController::windowVisible.
2815         (WebCore::InspectorController::windowScriptObjectAvailable): Add
2816         the isWindowVisible function to the JavaScript class.
2817
2818 2008-07-21  Timothy Hatcher  <timothy@apple.com>
2819
2820         Added TreeOutline.removeChildAtIndex and TreeElement.removeChildAtIndex
2821         for efficiency of callers that know the index of the child. This
2822         will be used in an upcoming change.
2823
2824         Reviewed by Adam Roben.
2825
2826         * page/inspector/treeoutline.js:
2827         (TreeOutline._removeChildAtIndex): Renamed from _removeChild
2828         and modified to take an index.
2829         (TreeOutline._removeChild): Call _removeChildAtIndex with the
2830         child index found using indexOf.
2831         (TreeOutline.prototype.removeChildAtIndex): Added. Calls
2832         TreeOutline._removeChildAtIndex.
2833         (TreeElement.prototype.removeChildAtIndex): Ditto.
2834
2835 2008-07-21  Timothy Hatcher  <timothy@apple.com>
2836
2837         Fixes a regression where TreeOutline.findTreeElement would
2838         return the parent TreeElement of the representedObject instead
2839         of the TreeElement for the representedObject. Regressed with the
2840         fix for bug 19164.
2841
2842         Reviewed by Adam Roben.
2843
2844         * page/inspector/treeoutline.js:
2845         (TreeOutline.prototype.findTreeElement): When performing a slow search,
2846         do a final search for representedObject instead of returning item, which
2847         is the parent of representedObject.
2848
2849 2008-07-23  Adele Peterson  <adele@apple.com>
2850
2851         Reviewed by Adam.
2852
2853         WebCore part of fix for <rdar://problem/5698672>  Add drawing callback for a WebKit app to draw its own scrollbars
2854
2855         * WebCore.base.exp: Added symbols.
2856         * page/Chrome.cpp:
2857         (WebCore::ChromeClient::paintCustomScrollbar): Added. Calls up to WebKit, which will call a new delegate method.
2858         (WebCore::ChromeClient::paintCustomScrollCorner): ditto.
2859         * page/ChromeClient.h:
2860         * page/Settings.cpp:
2861         (WebCore::Settings::Settings): Added the ability to store whether or not the application has decided to draw its own scrollbars.
2862         (WebCore::Settings::setShouldPaintCustomScrollbars):
2863         * page/Settings.h: (WebCore::Settings::shouldPaintCustomScrollbars):
2864         * platform/ScrollBar.h: Moved ScrollbarControlSize enum to ScrollTypes.h
2865         * platform/ScrollTypes.h: (WebCore::): Moved some existing types, and added new ones to be used in WebCore in WebKit.
2866         * platform/win/PlatformScrollBar.h: Moved ScrollbarPart enum to ScrollTypes.h
2867         * platform/win/PlatformScrollBarSafari.cpp:
2868         (WebCore::ScrollbarPartToScrollBarPiece): Added helper function.
2869         (WebCore::ScrollBarPieceMaskToScrollbarControlPartMask): ditto.
2870         (WebCore::ScrollbarControlStateFromThemeState): ditto.
2871         (WebCore::PlatformScrollbar::paint): Consolidated painting so the logic for the individual pieces is all in one place.
2872          Added new code to paint the custom scrollbars if necessary.
2873         * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::paint): Added code to paint the custom scroll corner if necessary.
2874
2875 2008-07-23  Sam Weinig  <sam@webkit.org>
2876
2877         Reviewed by Anders Carlsson.
2878
2879         Cleanup and pack the member variables in Node.
2880
2881         * bindings/js/JSNodeCustom.cpp:
2882         (WebCore::JSNode::mark):
2883         * dom/Attr.cpp:
2884         (WebCore::Attr::Attr):
2885         * dom/Attr.h:
2886         (WebCore::Attr::specified):
2887         (WebCore::Attr::setSpecified):
2888         * dom/ContainerNode.cpp:
2889         (WebCore::ContainerNode::setFocus):
2890         * dom/Document.cpp:
2891         (WebCore::Document::adoptNode):
2892         * dom/Element.cpp:
2893         (WebCore::Element::~Element):
2894         (WebCore::Element::rareData):
2895         (WebCore::Element::createRareData):
2896         * dom/Element.h:
2897         (WebCore::Element::hasRareData):
2898         (WebCore::Element::setHasRareData):
2899         * dom/Node.h:
2900         (WebCore::Node::setIsLink):
2901         (WebCore::Node::inSubtreeMark):
2902         (WebCore::Node::setInSubtreeMark):
2903         (WebCore::Node::attrWasSpecifiedOrElementHasRareData):
2904         (WebCore::Node::setAttrWasSpecifiedOrElementHasRareData):
2905         * html/HTMLAnchorElement.cpp:
2906         (WebCore::HTMLAnchorElement::supportsFocus):
2907         (WebCore::HTMLAnchorElement::isFocusable):
2908         (WebCore::HTMLAnchorElement::defaultEventHandler):
2909         (WebCore::HTMLAnchorElement::parseMappedAttribute):
2910         (WebCore::HTMLAnchorElement::isLiveLink):
2911         * html/HTMLImageElement.cpp:
2912         (WebCore::HTMLImageElement::parseMappedAttribute):
2913         * html/HTMLInputElement.cpp:
2914         (WebCore::HTMLInputElement::setInputType):
2915         * html/HTMLTableElement.cpp:
2916         (WebCore::HTMLTableElement::attach):
2917         * svg/SVGAElement.cpp:
2918         (WebCore::SVGAElement::svgAttributeChanged):
2919         (WebCore::SVGAElement::defaultEventHandler):
2920
2921 2008-07-23  Kevin Calhoun  <kcalhoun@apple.com>
2922
2923         Reviewed by Adele.
2924
2925         Follow-up fix for <rdar://problem/6031039> don't disable track-types when media is in a standalone document
2926
2927         Associate MovieControllers with Movies to support all of the media types QuickTime is able to play in standalone media documents.
2928
2929         * platform/graphics/win/QTMovieWin.cpp:
2930         (QTMovieWinPrivate::QTMovieWinPrivate):
2931         (QTMovieWinPrivate::~QTMovieWinPrivate):
2932         (QTMovieWinPrivate::task):
2933         (QTMovieWinPrivate::createMovieController):
2934         (QTMovieWinPrivate::createGWorld):
2935         (QTMovieWinPrivate::setSize):
2936         (QTMovieWinPrivate::deleteGWorld):
2937         (QTMovieWin::play):
2938         (QTMovieWin::pause):
2939         (QTMovieWin::setRate):
2940         (QTMovieWin::setCurrentTime):
2941         (QTMovieWin::load):
2942
2943 2008-07-23  Kevin Calhoun  <kcalhoun@apple.com>
2944
2945         Reviewed by Adele.
2946
2947         Added a debug mode for viewing frames per second for videos.  This is controlled by two 
2948         independent compiler flags DRAW_FRAME_RATE in MediaPlayerPrivateQTKit.h and MediaPlayerPrivateQuickTimeWin.h.
2949         Unless either flags is turned on there is no change to the code for video frame drawing.
2950
2951         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2952         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2953         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2954         (WebCore::MediaPlayerPrivate::play):
2955         (WebCore::MediaPlayerPrivate::pause):
2956         (WebCore::MediaPlayerPrivate::didEnd):
2957         (WebCore::MediaPlayerPrivate::repaint):
2958         (WebCore::MediaPlayerPrivate::paint):
2959         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2960         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2961         (WebCore::MediaPlayerPrivate::play):
2962         (WebCore::MediaPlayerPrivate::pause):
2963         (WebCore::MediaPlayerPrivate::didEnd):
2964         (WebCore::MediaPlayerPrivate::paint):
2965         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2966         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2967
2968 2008-07-23  Adele Peterson  <adele@apple.com>
2969
2970         Reviewed by Sam.
2971
2972         Fix for <rdar://problem/6080634> use lower quality CG interpolation in MediaPlayerPrivateQTKit to improve performance
2973
2974         * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage):
2975         Call setImageInterpolationQuality(InterpolationNone) instead of setUseLowQualityImageInterpolation(true).
2976         * platform/graphics/GraphicsContext.h:
2977         (WebCore::): Added InterpolationQuality enum.
2978         (WebCore::GraphicsContext::setImageInterpolationQuality): Renamed from setUseLowQualityImageInterpolation.
2979         The implementation was always setting the quality to "none", and now we want to distinguish between "none" and "low".
2980         (WebCore::GraphicsContext::imageInterpolationQuality): Renamed from useLowQualityImageInterpolation.
2981         * platform/graphics/cg/GraphicsContextCG.cpp:
2982         (WebCore::GraphicsContext::setImageInterpolationQuality): Added.
2983         (WebCore::GraphicsContext::imageInterpolationQuality): Added.
2984         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::paint):
2985         Calls setImageInterpolationQuality(InterpolationLow) which will improve the painting performance without degrading quality too much.
2986
2987 2008-07-23  Sam Weinig  <sam@webkit.org>
2988
2989         Reviewed by Anders Carlsson.
2990
2991         Remove extraneous allocations by using equalIgnoringCase rather than
2992         String::lower.
2993
2994         * dom/StyledElement.cpp:
2995         (WebCore::StyledElement::addCSSColor):
2996         * html/HTMLCollection.cpp:
2997         (WebCore::HTMLCollection::checkForNameMatch):
2998         * html/HTMLFormCollection.cpp:
2999         (WebCore::HTMLFormCollection::getNamedFormItem):
3000         * html/HTMLLinkElement.cpp:
3001         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
3002         * html/HTMLObjectElement.cpp:
3003         (WebCore::HTMLObjectElement::containsJavaApplet):
3004         * html/PreloadScanner.cpp:
3005         (WebCore::PreloadScanner::emitCSSRule):
3006         * loader/FrameLoader.cpp:
3007         (WebCore::FrameLoader::createJavaAppletWidget):
3008         * page/DOMSelection.cpp:
3009         (WebCore::DOMSelection::modify):
3010         * rendering/RenderPartObject.cpp:
3011         (WebCore::RenderPartObject::updateWidget):
3012
3013 2008-07-23  Maxime Britto  <britto@apple.com>
3014
3015         Reviewed by Adam Roben.
3016
3017         <rdar://6092952> "REGRESSION: Crash beneath EventHandler::stopAutoscrollTimer() when closing Gmail"
3018         Add a check for the m_page member value before asking for page()->mainFrame()
3019
3020         * page/EventHandler.cpp:
3021         (WebCore::EventHandler::stopAutoscrollTimer):
3022
3023 2008-07-23  Kevin Calhoun  <kcalhoun@apple.com>
3024
3025        Reviewed by Adele.
3026
3027        Fix for <rdar://problem/5710065> QT movies should be inactive when opened
3028
3029        Implemented deferral of set-up of video rendering on Mac until the ready state is Loaded and 
3030        until after movie tracks of unsupported types have been disabled, to make sure they never draw.
3031
3032         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3033         (WebCore::MediaPlayerPrivate::load):
3034         (WebCore::MediaPlayerPrivate::updateStates):
3035         (WebCore::MediaPlayerPrivate::setVisible):
3036
3037 2008-07-22  Maxime Britto  <britto@apple.com>
3038
3039         Reviewed by John Sullivan.
3040
3041         <rdar://problem/6083116>
3042         When pan-scrolling, Back then Forward causes pan-scrolling to start again
3043
3044         * page/Frame.cpp:
3045         (WebCore::Frame::clearTimers): Ask to stop the autoscroll timer when we clear the timers from the frame
3046         * loader/FrameLoader.cpp:
3047         (WebCore::FrameLoader::scrollToAnchor): When the link is an anchor we Frame::clearTimers() isn't called since we're only scrolling the page so we need to ask to stop the autoscroll timer here too.
3048
3049 2008-07-22  Geoffrey Garen  <ggaren@apple.com>
3050
3051         Reviewed by Oliver Hunt and Sam Weinig.
3052
3053         Next step toward putting doubles in registers: Prepare the Register class
3054         and its clients for registers that don't contain JSValue*s.
3055         
3056 2008-07-22  Sam Weinig  <sam@webkit.org>
3057
3058         Reviewed by Mark Rowe.
3059
3060         <rdar://problem/5788451> toDataURL not implemented for Windows (need mapping of MIME type to UTI)
3061         Add additional support for JPEG and GIF for toDataURL encoding canvases.
3062
3063         * platform/MIMETypeRegistry.cpp:
3064         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3065         * platform/graphics/cg/ImageBufferCG.cpp:
3066         (WebCore::utiFromMIMEType):
3067
3068 2008-07-22  Chris Fleizach  <cfleizach@apple.com>
3069
3070         Reviewed by Dave Hyatt.
3071
3072         <rdar://problem/6004877> internal anchors on this page are not showing up in the AXLinkedUIElements
3073         Test: accessibility/internal-link-anchors2.html
3074
3075         * page/AccessibilityRenderObject.cpp:
3076         (WebCore::AccessibilityRenderObject::internalLinkElement):
3077
3078 2008-07-22  Anders Carlsson  <andersca@apple.com>
3079
3080         Reviewed by Adam.
3081
3082         Allocate the empty StringImpl from the heap.
3083         
3084         * platform/text/StringImpl.cpp:
3085         (WebCore::StringImpl::empty):
3086
3087 2008-07-21  Kevin McCullough  <kmccullough@apple.com>
3088
3089         Reviewed by Tim.
3090
3091         <rdar://problem/5951532> JSProfiler: Implement heavy (or bottom-up)
3092         view (19228)
3093         - Implement UI for Heavy (Bottom Up) view.
3094
3095         * English.lproj/localizedStrings.js:
3096         * page/JavaScriptProfile.cpp: Expose the ability to get a heavy/tree
3097         profile from a profile to the Web Inspector's JavaScript.
3098         (WebCore::getHeavyProfileCallback):
3099         (WebCore::getTreeProfileCallback):
3100         (WebCore::ProfileClass):
3101         * page/inspector/ProfileView.js: Implement the dropdown for changing
3102         profile views.
3103         * page/inspector/inspector.css:
3104
3105 2008-07-22  Alexey Proskuryakov  <ap@webkit.org>
3106
3107         Reviewed by Adam Roben.
3108
3109         <rdar://problem/5955602> WebKit should support charset name x-windows-949
3110
3111         Test: fast/encoding/char-decoding.html
3112
3113         * platform/text/TextCodecICU.cpp:
3114         (WebCore::TextCodecICU::registerExtendedEncodingNames): Added support for this name for
3115         Firefox compatibility.
3116
3117 2008-07-22  Gavin Barraclough  <barraclough@apple.com>
3118
3119         Reviewed by Alexey Proskuryakov.
3120
3121         New test to check that arrays fail gracefully (throw an out of memory exception)
3122         when the vector grows to large.
3123
3124         * manual-tests/array-out-of-memory.html: Added.
3125
3126 2008-07-21  Alexey Proskuryakov  <ap@webkit.org>
3127
3128         Reviewed by Dan Bernstein.
3129
3130         https://bugs.webkit.org/show_bug.cgi?id=20117
3131         setBaseAndExtent fails to reverse the current selection
3132
3133         Test: editing/selection/setBaseAndExtent-revert-selection.html
3134
3135         * editing/Selection.h: (WebCore::operator==): Compare direction, too.
3136
3137 2008-07-21  Julien Chaffraix  <jchaffraix@webkit.org>
3138
3139         Reviewed by Sam Weinig.
3140
3141         Bug 19919: Add selectors' string parsing in CSSParser
3142         https://bugs.webkit.org/show_bug.cgi?id=19919
3143
3144         No functional change.
3145
3146         * css/CSSGrammar.y: Added entry for parsing only a selector.
3147         * css/CSSParser.cpp:
3148         (WebCore::CSSParser::CSSParser):
3149         (WebCore::CSSParser::parseSelector):
3150         * css/CSSParser.h: Added m_floatingSelector to hold the
3151         Selector parsed in parseSelector.
3152
3153         * css/tokenizer.flex: Added "@-webkit-selector" token.
3154         * dom/Node.cpp:
3155         (WebCore::Node::querySelector):
3156         (WebCore::Node::querySelectorAll): Switched to parseSelector
3157         method.
3158
3159 2008-07-21  Kevin Calhoun  <kcalhoun@apple.com>
3160
3161         Reviewed by Adele.
3162
3163         Fix for <rdar://problem/6081160> REGRESSION: Hang loading many pages if QuickTime isn't installed
3164
3165         * platform/graphics/win/QTMovieWin.cpp:
3166         (initializeSupportedTypes): Do a Quicktime version minimum version check.
3167         (QTMovieWin::initializeQuickTime): Store the Quicktime version globally so in can be used in initializeSupportedTypes as well.
3168
3169 2008-07-21  Kevin Calhoun  <kcalhoun@apple.com>
3170
3171         Reviewed by Adele.
3172
3173         Fix for <rdar://problem/5713336> <video> and <audio> elements that use a autoplay attribute fail to start playing when returning back to page
3174
3175         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::willSaveToCache): Reset the ready state to DATA_UNAVAILABLE when saving to the cache
3176         so that everything starts back up normally when the page is retrieved from the cache.
3177
3178 2008-07-21  Sam Weinig  <sam@webkit.org>
3179
3180         Reviewed by Mark Rowe.
3181
3182         Remove unused interface declaration.
3183
3184         * platform/network/mac/ResourceHandleMac.mm:
3185
3186 2008-07-21  Mark Rowe  <mrowe@apple.com>
3187
3188         Reviewed by Sam Weinig.
3189
3190         <rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number.
3191
3192         * Configurations/Version.xcconfig:
3193         * Info.plist:
3194
3195 2008-07-21  Kevin Calhoun  <kcalhoun@apple.com>
3196
3197         Reviewed by Adele.
3198
3199         Fix for <rdar://problem/6031039> don't disable track-types when media is in a standalone document
3200
3201         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::inMediaDocument): Added.
3202         * platform/graphics/MediaPlayer.h:
3203         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::updateStates):
3204         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::updateStates):
3205
3206 2008-07-21  Anders Carlsson  <andersca@apple.com>
3207
3208         Reviewed by Jon.
3209
3210         Don't allow requests to be made when the document loader is stopping all loaders.
3211
3212         * plugins/PluginView.cpp:
3213         (WebCore::PluginView::load):
3214
3215 2008-07-20  Maxime Britto  <britto@apple.com>
3216
3217         Reviewed by John Sullivan.
3218
3219         [PFR] <rdar://problem/6080639> New middle click scrolling speed seems much slower than in FF
3220         Accelerate and enhance the smoothness of the pan scrollling.
3221
3222         * page/EventHandler.cpp: Changed the TimerInterval from 0.1 to 0.05. The scrolling is way more fluid like this.
3223         * rendering/RenderLayer.cpp: 
3224         (WebCore::RenderLayer::panScrollFromPoint): Differentiate the speed within a 200 pixel side square, around the original click location to the speed for farther distances. This way we allow easyier handle when we are close to the center and very fast scrolling when we go far from the original point.
3225
3226 2008-07-18  David Hyatt  <hyatt@apple.com>
3227
3228         Change the cached clip rects to not assume they should be infinite when the root layer has been
3229         shifted as the result of a transformation.
3230
3231         Reviewed by Maciej
3232
3233         Added fast/transforms/overflow-with-transform.html
3234
3235         * rendering/RenderLayer.cpp:
3236         (WebCore::RenderLayer::calculateClipRects):
3237
3238 2008-07-21  Rob Buis  <buis@kde.org>
3239
3240         Reviewed by Mitz.
3241
3242         https://bugs.webkit.org/show_bug.cgi?id=19966
3243         CSS variables crash when using hex notation for colors
3244
3245         Support hex colors as values for the css variables.
3246
3247         Test: fast/css/variables/color-hex-test.html
3248
3249         * css/CSSParserValues.cpp:
3250         (WebCore::CSSParserValue::createCSSValue):
3251         * css/CSSPrimitiveValue.cpp:
3252         (WebCore::CSSPrimitiveValue::parserValue):
3253         * css/CSSVariablesRule.cpp:
3254
3255 2008-07-21  Simon Hausmann  <hausmann@webkit.org>
3256
3257         Reviewed by Holger.
3258
3259         Fix drawing of windowless plugins on Windows with the Qt port by
3260         avoiding the reset of the translation of the HDC to 0, 0.
3261
3262         * plugins/win/PluginViewWin.cpp:
3263         (WebCore::PluginView::paint):
3264
3265 2008-07-21  Simon Hausmann  <hausmann@webkit.org>
3266
3267         Reviewed by Holger.
3268
3269         Fix rendering of transparent windowless netscape plugins by passing
3270         the right conversion parameter to QPixmap::fromWinHBITMAP when
3271         converting from HBITMAP to QPixmap.
3272
3273         * platform/graphics/qt/GraphicsContextQt.cpp:
3274         (WebCore::GraphicsContext::releaseWindowsContext):
3275
3276 2008-07-21  Simon Hausmann  <hausmann@webkit.org>
3277
3278         Reviewed by Holger.
3279
3280         In the implementation of getValue for NPNVnetscapeWindow treat
3281         windowHandleForPlatformWidget on the return value of
3282         containingWindow() to receive the correct HWND for the Qt port.
3283
3284         * plugins/win/PluginViewWin.cpp:
3285         (WebCore::PluginView::getValue):
3286
3287 2008-07-21  Simon Hausmann  <hausmann@webkit.org>
3288
3289         Reviewed by Holger.
3290
3291         Fix windowHandleForPlatformWidget to return 0 as HWND if we don't have
3292         a QWidget. This can happen on page/view destruction for example.
3293
3294         * plugins/win/PluginViewWin.cpp:
3295         (windowHandleForPlatformWidget):
3296
3297 2008-07-20  Steve Falkenburg  <sfalken@apple.com>
3298
3299         Touch file to force rebuild for vsprops change.
3300
3301         * WebCorePrefix.h:
3302
3303 2008-07-20  Sam Weinig  <sam@webkit.org>
3304
3305         Remove extra space Oliver Hunt left in.
3306
3307         * page/Console.cpp:
3308         (WebCore::Console::reportException):
3309         (WebCore::Console::reportCurrentException):
3310
3311 2008-07-20  Oliver Hunt  <oliver@apple.com>
3312
3313         Reviewed by Dan Bernstein.
3314
3315         Bug 19757: Crash when an ondragstart handler hides the element
3316         <https://bugs.webkit.org/show_bug.cgi?id=19757>
3317
3318         The solution to this is problem is just to null check the renderer
3319         immediately before launching the system drag, and terminate the
3320         drag if the renderer is gone.
3321
3322         * page/EventHandler.cpp:
3323         (WebCore::EventHandler::handleDrag):
3324
3325 2008-07-20  Nikolas Zimmermann  <zimmermann@kde.org>
3326
3327         Reviewed by Oliver.
3328
3329         Fixes: https://bugs.webkit.org/show_bug.cgi?id=12171
3330
3331         Remove manual SVG property <-> XML attribute synchronization in SVGPolyElement.
3332         Added svg/custom/poly-points-attribute-changes.svg (testcase from Rob)
3333
3334         * svg/SVGPointList.cpp:
3335         (WebCore::SVGPointList::valueAsString):
3336         * svg/SVGPointList.h:
3337         (WebCore::SVGPointList::create):
3338         * svg/SVGPolyElement.cpp:
3339         (WebCore::SVGPolyElement::SVGPolyElement):
3340         (WebCore::SVGPolyElement::svgAttributeChanged):
3341         (WebCore::SVGPolyElement::updateAnimatedSVGAttribute):
3342         * svg/SVGPolyElement.h:
3343
3344 2008-07-20  Nikolas Zimmermann  <zimmermann@kde.org>
3345
3346         Reviewed by Oliver.
3347
3348         Cleanup JSSVGPODTypeWrapper code.
3349
3350         Rename: JSSVGPODTypeWrapperCreatorReadOnly -> JSSVGStaticPODTypeWrapper
3351                 JSSVGPODTypeWrapperReadWrite       -> JSSVGDynamicPODTypeWrapper
3352                 JSSVGPODTypeWrapperCache           -> JSSVGDynamicPODTypeWrapperCacheCache
3353
3354         No functional changes.
3355
3356         * bindings/js/JSSVGMatrixCustom.cpp:
3357         (WebCore::JSSVGMatrix::multiply):
3358         (WebCore::JSSVGMatrix::inverse):
3359         (WebCore::JSSVGMatrix::translate):
3360         (WebCore::JSSVGMatrix::scale):
3361         (WebCore::JSSVGMatrix::scaleNonUniform):
3362         (WebCore::JSSVGMatrix::rotate):
3363         (WebCore::JSSVGMatrix::rotateFromVector):
3364         (WebCore::JSSVGMatrix::flipX):
3365         (WebCore::JSSVGMatrix::flipY):
3366         (WebCore::JSSVGMatrix::skewX):
3367         (WebCore::JSSVGMatrix::skewY):
3368         * bindings/js/JSSVGPODTypeWrapper.h:
3369         (WebCore::JSSVGDynamicPODTypeWrapper::create):
3370         (WebCore::JSSVGDynamicPODTypeWrapper::operator PODType):
3371         (WebCore::JSSVGDynamicPODTypeWrapper::JSSVGDynamicPODTypeWrapper):
3372         (WebCore::JSSVGStaticPODTypeWrapper::create):
3373         (WebCore::JSSVGStaticPODTypeWrapper::operator PODType):
3374         (WebCore::JSSVGStaticPODTypeWrapper::JSSVGStaticPODTypeWrapper):
3375         (WebCore::JSSVGPODTypeWrapperCreatorForList::create):
3376         (WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
3377         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
3378         (WebCore::PODTypeWrapperCacheInfo::PODTypeWrapperCacheInfo):
3379         (WebCore::PODTypeWrapperCacheInfo::operator==):
3380         (WebCore::PODTypeWrapperCacheInfoHash::hash):
3381         (WebCore::PODTypeWrapperCacheInfoHash::equal):
3382         (WebCore::PODTypeWrapperCacheInfoTraits::emptyValue):
3383         (WebCore::PODTypeWrapperCacheInfoTraits::constructDeletedValue):
3384         (WebCore::PODTypeWrapperCacheInfoTraits::isDeletedValue):
3385         (WebCore::JSSVGDynamicPODTypeWrapperCache::dynamicWrapperHashMap):
3386         (WebCore::JSSVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
3387         (WebCore::JSSVGDynamicPODTypeWrapperCache::forgetWrapper):
3388         * bindings/js/JSSVGPointListCustom.cpp:
3389         (WebCore::finishGetter):
3390         (WebCore::finishSetter):
3391         (WebCore::finishSetterReadOnlyResult):
3392         (WebCore::JSSVGPointList::initialize):
3393         (WebCore::JSSVGPointList::insertItemBefore):
3394         (WebCore::JSSVGPointList::replaceItem):
3395         (WebCore::JSSVGPointList::appendItem):
3396         * bindings/js/JSSVGTransformListCustom.cpp:
3397         (WebCore::finishGetter):
3398         (WebCore::finishSetter):
3399         (WebCore::finishSetterReadOnlyResult):
3400         (WebCore::JSSVGTransformList::initialize):
3401         (WebCore::JSSVGTransformList::getItem):
3402         (WebCore::JSSVGTransformList::insertItemBefore):
3403         (WebCore::JSSVGTransformList::replaceItem):
3404         (WebCore::JSSVGTransformList::removeItem):
3405         (WebCore::JSSVGTransformList::appendItem):
3406         * bindings/scripts/CodeGeneratorJS.pm:
3407
3408 2008-07-19  Oliver Hunt  <oliver@apple.com>
3409
3410         Reviewed by Mark Rowe.
3411
3412         Bug 15979: Console logs in a database callback lose line number information
3413         <https://bugs.webkit.org/show_bug.cgi?id=15979>
3414
3415         The problem was that there were multiple versions of the logic to
3416         log an exception to the console, many of which were incorrect.  We
3417         resolve this by making one single shared reportException method,
3418         which handles the exceptions correctly.
3419
3420         This improves fidelity of callback errors, and ensures that
3421         exceptions thrown in timer callbacks correctly report line numbers,
3422         etc.
3423
3424         Test: fast/js/exceptions-thrown-in-callbacks.html
3425
3426         * bindings/js/JSCustomSQLStatementCallback.cpp:
3427         (WebCore::JSCustomSQLStatementCallback::handleEvent):
3428         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3429         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
3430         * bindings/js/JSCustomSQLTransactionCallback.cpp:
3431         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
3432         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
3433         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
3434         * bindings/js/JSCustomVoidCallback.cpp:
3435         (WebCore::JSCustomVoidCallback::handleEvent):
3436         * bindings/js/JSCustomXPathNSResolver.cpp:
3437         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3438         * bindings/js/JSEventListener.cpp:
3439         (WebCore::JSAbstractEventListener::handleEvent):
3440         * bindings/js/ScheduledAction.cpp:
3441         (WebCore::ScheduledAction::execute):
3442         * bindings/js/ScriptController.cpp:
3443         (WebCore::ScriptController::evaluate):
3444         * bindings/objc/WebScriptObject.mm:
3445         (WebCore::addExceptionToConsole):
3446         * page/Console.cpp:
3447         (WebCore::Console::reportException):
3448         * page/Console.h:
3449
3450 2008-07-20  Nikolas Zimmermann  <zimmermann@kde.org>
3451
3452         Rubber stamped by Oliver.
3453
3454         Another attempt to fix the win build.
3455
3456         * svg/SVGAnimatedProperty.h:
3457
3458 2008-07-20  Alexey Proskuryakov  <ap@webkit.org>
3459
3460         Reviewed by David Kilzer.
3461
3462         Fix high CPU usage on testmyiphone.com.
3463
3464         - Made the logic for determining when to stop looking for meta charset more strainghtforward.
3465         Previously, this happened if a tag that's disallowed in HEAD was seen past the first 512
3466         bytes. Now, the algorithm bails out at the boundary if we are lo longer in HEAD (i.e, an
3467         offending tag was seen at any point before).
3468
3469         - The above change made one of our regression tests fail, because it had its <meta>
3470         declaration past the 512 byte boundary. Fixed it by raising the boundary to 1024 bytes.
3471
3472         - Made the algorithm bail out quickly if a comment that's not in HEAD crosses the boundary.
3473
3474         - Moved a check for XML content type out of the loop.
3475
3476         * loader/TextResourceDecoder.cpp:
3477         (WebCore::TextResourceDecoder::checkForHeadCharset): 
3478
3479 2008-07-20  Oliver Hunt  <oliver@apple.com>
3480
3481         Reviewed by NOBODY (build fix).
3482
3483         Attempt to fix windows build
3484
3485         * svg/SVGAnimatedProperty.h:
3486
3487 2008-07-19  Nikolas Zimmermann  <zimmermann@kde.org>
3488
3489         Reviewed by Oliver & parts by Eric.
3490
3491         Fixes: https://bugs.webkit.org/show_bug.cgi?id=20051
3492
3493         Rewrite animated property concept without heavy macro usage, replace by a templatified solution.
3494         Fewer virtual function calls, no more usage of the tear-off's within internal code (synchronization needed it before.)
3495
3496         * dom/Element.cpp:
3497         (WebCore::Element::attributes):
3498         (WebCore::Element::getAttribute):
3499         (WebCore::Element::hasAttributes):
3500         * dom/Element.h:
3501         (WebCore::Element::updateAnimatedSVGAttribute): Take const String&, not StringImpl*.
3502         * svg/SVGAElement.cpp:
3503         (WebCore::SVGAElement::SVGAElement):
3504         * svg/SVGAElement.h:
3505         * svg/SVGAltGlyphElement.h:
3506         * svg/SVGAnimatedProperty.h: Added.
3507         * svg/SVGAnimatedTemplate.h:
3508         (WebCore::lookupOrCreateWrapper):
3509         * svg/SVGAnimationElement.h:
3510         * svg/SVGCircleElement.cpp:
3511         (WebCore::SVGCircleElement::SVGCircleElement):
3512         * svg/SVGCircleElement.h:
3513         * svg/SVGClipPathElement.cpp:
3514         (WebCore::SVGClipPathElement::SVGClipPathElement):
3515         * svg/SVGClipPathElement.h:
3516         * svg/SVGComponentTransferFunctionElement.cpp:
3517         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
3518         * svg/SVGComponentTransferFunctionElement.h:
3519         * svg/SVGCursorElement.cpp:
3520         (WebCore::SVGCursorElement::SVGCursorElement):
3521         * svg/SVGCursorElement.h:
3522         * svg/SVGDefsElement.h:
3523         (WebCore::SVGDefsElement::contextElement):
3524         * svg/SVGElement.cpp:
3525         (WebCore::SVGElement::updateAnimatedSVGAttribute):
3526         * svg/SVGElement.h:
3527         (WebCore::SVGElement::supplementalTransform):
3528         (WebCore::SVGElement::invokeSVGPropertySynchronizer):
3529         (WebCore::SVGElement::invokeAllSVGPropertySynchronizers):
3530         (WebCore::SVGElement::addSVGPropertySynchronizer):
3531         * svg/SVGEllipseElement.cpp:
3532         (WebCore::SVGEllipseElement::SVGEllipseElement):
3533         * svg/SVGEllipseElement.h:
3534         * svg/SVGExternalResourcesRequired.cpp:
3535         (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
3536         * svg/SVGExternalResourcesRequired.h:
3537         * svg/SVGFEBlendElement.cpp:
3538         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
3539         * svg/SVGFEBlendElement.h:
3540         * svg/SVGFEColorMatrixElement.cpp:
3541         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
3542         * svg/SVGFEColorMatrixElement.h:
3543         * svg/SVGFEComponentTransferElement.cpp:
3544         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
3545         * svg/SVGFEComponentTransferElement.h:
3546         * svg/SVGFECompositeElement.cpp:
3547         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
3548         * svg/SVGFECompositeElement.h:
3549         * svg/SVGFEDiffuseLightingElement.cpp:
3550         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
3551         * svg/SVGFEDiffuseLightingElement.h:
3552         * svg/SVGFEDisplacementMapElement.cpp:
3553         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
3554         * svg/SVGFEDisplacementMapElement.h:
3555         * svg/SVGFEFloodElement.h:
3556         * svg/SVGFEGaussianBlurElement.cpp:
3557         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
3558         * svg/SVGFEGaussianBlurElement.h:
3559         * svg/SVGFEImageElement.cpp:
3560         (WebCore::SVGFEImageElement::SVGFEImageElement):
3561         * svg/SVGFEImageElement.h:
3562         * svg/SVGFELightElement.cpp:
3563         (WebCore::SVGFELightElement::SVGFELightElement):
3564         * svg/SVGFELightElement.h:
3565         (WebCore::SVGFELightElement::contextElement):
3566         * svg/SVGFEMergeElement.h:
3567         * svg/SVGFEMergeNodeElement.cpp:
3568         (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
3569         * svg/SVGFEMergeNodeElement.h:
3570         * svg/SVGFEOffsetElement.cpp:
3571         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
3572         * svg/SVGFEOffsetElement.h:
3573         * svg/SVGFESpecularLightingElement.cpp:
3574         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
3575         * svg/SVGFESpecularLightingElement.h:
3576         * svg/SVGFETileElement.cpp:
3577         (WebCore::SVGFETileElement::SVGFETileElement):
3578         * svg/SVGFETileElement.h:
3579         * svg/SVGFETurbulenceElement.cpp:
3580         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
3581         * svg/SVGFETurbulenceElement.h:
3582         * svg/SVGFilterElement.cpp:
3583         (WebCore::SVGFilterElement::SVGFilterElement):
3584         * svg/SVGFilterElement.h:
3585         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3586         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
3587         * svg/SVGFilterPrimitiveStandardAttributes.h: